b_asic.utility_operations¶

B-ASIC Utility Operations Module.
Contains some operations that are not really operations, but needed for other reasons.
- class b_asic.utility_operations.DontCare(name: str = '')¶
Bases:
AbstractOperationDont-care operation.
Used for ignoring the input to another operation and thus avoiding dangling input nodes.
- Parameters:
- nameName, optional
Operation name.
- evaluate(data_type=None) float¶
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.
- get_input_coordinates() tuple[tuple[float, float], ...]¶
Return coordinates for inputs.
These maps to the polygons and are corresponding to a start time of 0 and height 1.
See also
- get_output_coordinates() tuple[tuple[float, float], ...]¶
Return coordinates for outputs.
These maps to the polygons and are corresponding to a start time of 0 and height 1.
See also
- get_plot_coordinates() tuple[tuple[tuple[float, float], ...], tuple[tuple[float, float], ...]]¶
Return coordinates for the latency and execution time polygons.
This returns a tuple containing coordinates for the two polygons outlining the latency and execution time of the operation. The polygons are corresponding to a start time of 0 and are of height 1.
- is_linear = True¶
- property latency: int¶
Get the latency of the operation.
This is the longest time it takes from one of the input ports to one of the output ports.
- classmethod type_name() TypeName¶
Get the type name of this graph component.
- class b_asic.utility_operations.Sink(name: str = '')¶
Bases:
AbstractOperationSink operation.
Used for ignoring the output from another operation to avoid dangling output nodes.
- Parameters:
- nameName, optional
Operation name.
- evaluate() 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.
- get_input_coordinates() tuple[tuple[float, float], ...]¶
Return coordinates for inputs.
These maps to the polygons and are corresponding to a start time of 0 and height 1.
See also
- get_output_coordinates() tuple[tuple[float, float], ...]¶
Return coordinates for outputs.
These maps to the polygons and are corresponding to a start time of 0 and height 1.
See also
- get_plot_coordinates() tuple[tuple[tuple[float, float], ...], tuple[tuple[float, float], ...]]¶
Return coordinates for the latency and execution time polygons.
This returns a tuple containing coordinates for the two polygons outlining the latency and execution time of the operation. The polygons are corresponding to a start time of 0 and are of height 1.
- is_linear = True¶
- property latency: int¶
Get the latency of the operation.
This is the longest time it takes from one of the input ports to one of the output ports.
- classmethod type_name() TypeName¶
Get the type name of this graph component.