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.ParallelThreePortAdaptor(value: tuple[int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat, int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat] = (0, 0), in0: SignalSourceProvider | None = None, in1: SignalSourceProvider | None = None, in2: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: _Adaptor

Wave digital filter parallel threeport-adaptor operation.

\[\begin{split}\begin{eqnarray} s & = & \text{value}_0 x_0 + \text{value}_1 x_1 + (2 - \text{value}_0 - \text{value}_1) x_2\\ y_0 & = & s - x_0\\ y_1 & = & s - x_1\\ y_2 & = & s - x_2 \end{eqnarray}\end{split}\]

Port 2 is the dependent port. Both coefficients must be between 0 and 2 and their sum must not exceed 2.

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 coefficients of this operation.

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

Bases: _Adaptor

Wave digital filter parallel twoport-adaptor operation.

\[\begin{split}\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}\end{split}\]

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.ReflectionFreeParallelThreePortAdaptor(value: int | float | complex | DTypeLike | APyFixed | APyCFixed | APyFloat | APyCFloat = 0, in0: SignalSourceProvider | None = None, in1: SignalSourceProvider | None = None, in2: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: _Adaptor

Wave digital filter reflection free parallel threeport-adaptor operation.

\[\begin{split}\begin{eqnarray} y_1 & = & \text{value} x_0 + (1 - \text{value}) x_2\\ y_0 & = & y_1 + x_1 - x_0\\ y_2 & = & y_1 + x_1 - x_2 \end{eqnarray}\end{split}\]

Port 1 is the reflection-free port and port 2 is the dependent port. The coefficient must be between 0 and 1.

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]

Return input indices required to evaluate the requested output.

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 coefficient of this operation.

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

Bases: _Adaptor

Wave digital filter reflection free series threeport-adaptor operation.

\[\begin{split}\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}\end{split}\]

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), in0: SignalSourceProvider | None = None, in1: SignalSourceProvider | None = None, in2: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: _Adaptor

Wave digital filter series threeport-adaptor operation.

\[\begin{split}\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}\end{split}\]

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, in0: SignalSourceProvider | None = None, in1: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: _Adaptor

Wave digital filter series twoport-adaptor operation.

\[\begin{split}\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}\end{split}\]

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, in0: SignalSourceProvider | None = None, in1: SignalSourceProvider | None = None, name: str = '', latency: int | None = None, latency_offsets: dict[str, int] | None = None, execution_time: int | None = None)

Bases: _Adaptor

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.