piel.tools.amaranth.construct#
Functions#
|
This function implements a truth table as a module in amaranth, |
Module Contents#
- construct_amaranth_module_from_truth_table(truth_table: dict, inputs: list[str], outputs: list[str], implementation_type: Literal['combinatorial', 'sequential', 'memory'] = 'combinatorial')[source]#
This function implements a truth table as a module in amaranth, Note that in some form in amaranth each statement is a form of construction.
The truth table is in the form of:
- detector_phase_truth_table = {
“detector_in”: [“00”, “01”, “10”, “11”], “phase_map_out”: [“00”, “10”, “11”, “11”],
}
- Parameters:
truth_table (dict) – The truth table in the form of a dictionary.
inputs (list[str]) – The inputs to the truth table.
outputs (list[str]) – The outputs to the truth table.
implementation_type (Literal["combinatorial", "sequential", "memory"], optional) – The type of implementation. Defaults to “combinatorial”.
- Returns:
Generated amaranth module.