b_asic.wdf_operations

Inheritance diagram of b_asic.wdf_operations

B-ASIC WDF Operations Module.

Contains wave digital filter adaptors.

class b_asic.wdf_operations.ParallelTwoportAdaptor(value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat = 0, src0: SignalSourceProvider | None = None, src1: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: AbstractOperation

Wave digital filter parallel twoport-adaptor operation. .. math:

\begin{eqnarray}
y_0 & = & - x_0 + \text{value}\times x_0 + (2 - \text{value}) \times x_1\\
    & = & 2x_1 - x_0 + \text{value}\times \left(x_0 - x_1\right)
y_1 & = & - x_1 + \text{value}\times x_0 + (2 - \text{value}) \times x_1\\
    & = & x_1 + \text{value}\times\left(x_0 - x_1\right)
\end{eqnarray}

Port 1 is the dependent port.

evaluate(a, b, data_type=None)

Evaluate the operation and generate a list of output values.

Parameters:
*inputs

List of input values.

data_typeDataType, optional

Data type to use for quantization during evaluation.

is_linear = True
is_swappable = True
swap_io(force: bool = False) None

Swap inputs (and outputs) of operation.

Parameters:
forcebool, optional

If True, force the swapping even if is_swappable() is False.

Errors if :meth:`is_swappable` is False.
classmethod type_name() TypeName

Get the type name of this graph component.

property value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat

Get the constant value of this operation.

class b_asic.wdf_operations.ReflectionFreeSeriesThreeportAdaptor(value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat = 0, src0: SignalSourceProvider | None = None, src1: SignalSourceProvider | None = None, src2: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: AbstractOperation

Wave digital filter reflection free series threeport-adaptor operation. .. math:

\begin{eqnarray}
y_0 & = & x_0 - \text{value}\times\left(x_0 + x_1 + x_2\right)\\
y_1 & = & -x_0 - x_2\\
y_2 & = & x_2 - \left(1 - \text{value}\right)\times\left(x_0
        + x_1 + x_2\right) \\
    & = & -x_0 - x_1 + \text{value}\times\left(x_0
            + x_1 + x_2\right)
\end{eqnarray}

Port 1 is the reflection-free port and port 2 is the dependent port.

evaluate(a, b, c, data_type=None)

Evaluate the operation and generate a list of output values.

Parameters:
*inputs

List of input values.

data_typeDataType, optional

Data type to use for quantization during evaluation.

inputs_required_for_output(output_index: int) Iterable[int]

Get the input indices of all inputs in this operation whose values are required in order to evaluate the output at the given output index.

is_linear = True
is_swappable = True
classmethod type_name() TypeName

Get the type name of this graph component.

property value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat

Get the constant value of this operation.

class b_asic.wdf_operations.SeriesThreeportAdaptor(value: tuple[int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat, int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat] = (0, 0), src0: SignalSourceProvider | None = None, src1: SignalSourceProvider | None = None, src2: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: AbstractOperation

Wave digital filter series threeport-adaptor operation. .. math:

\begin{eqnarray}
y_0 & = & x_0 - \text{value}_0\times\left(x_0 + x_1 + x_2\right)\\
y_1 & = & x_1 - \text{value}_1\times\left(x_0 + x_1 + x_2\right)\\
y_2 & = & x_2 - \left(2 - \text{value}_0 - \text{value}_1\right)\times\left(x_0
        + x_1 + x_2\right)
\end{eqnarray}

Port 2 is the dependent port.

evaluate(a, b, c, data_type=None)

Evaluate the operation and generate a list of output values.

Parameters:
*inputs

List of input values.

data_typeDataType, optional

Data type to use for quantization during evaluation.

is_linear = True
is_swappable = True
classmethod type_name() TypeName

Get the type name of this graph component.

property value: tuple[int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat, int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat]

Get the constant value of this operation.

class b_asic.wdf_operations.SeriesTwoportAdaptor(value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat = 0, src0: SignalSourceProvider | None = None, src1: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: AbstractOperation

Wave digital filter series twoport-adaptor operation. .. math:

\begin{eqnarray}
y_0 & = & x_0 - \text{value}\times\left(x_0 + x_1\right)\\
y_1 & = & x_1 - (2-\text{value})\times\left(x_0 + x_1\right)\\
    & = & -2x_0 - x_1  + \text{value}\times\left(x_0 + x_1\right)
\end{eqnarray}

Port 1 is the dependent port.

evaluate(a, b, data_type=None)

Evaluate the operation and generate a list of output values.

Parameters:
*inputs

List of input values.

data_typeDataType, optional

Data type to use for quantization during evaluation.

is_linear = True
is_swappable = True
swap_io(force: bool = False) None

Swap inputs (and outputs) of operation.

Parameters:
forcebool, optional

If True, force the swapping even if is_swappable() is False.

Errors if :meth:`is_swappable` is False.
classmethod type_name() TypeName

Get the type name of this graph component.

property value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat

Get the constant value of this operation.

class b_asic.wdf_operations.SymmetricTwoportAdaptor(value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat = 0, src0: SignalSourceProvider | None = None, src1: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: AbstractOperation

Wave digital filter symmetric twoport-adaptor operation.

\[\begin{split}y_0 & = x_1 + \text{value}\times\left(x_1 - x_0\right)\\ y_1 & = x_0 + \text{value}\times\left(x_1 - x_0\right)\end{split}\]
evaluate(a, b, data_type=None) int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat

Evaluate the operation and generate a list of output values.

Parameters:
*inputs

List of input values.

data_typeDataType, optional

Data type to use for quantization during evaluation.

is_linear = True
is_swappable = True
swap_io(force: bool = False) None

Swap inputs (and outputs) of operation.

Parameters:
forcebool, optional

If True, force the swapping even if is_swappable() is False.

Errors if :meth:`is_swappable` is False.
classmethod type_name() TypeName

Get the type name of this graph component.

property value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat

Get the constant value of this operation.