Struct logiclib::LogicOutputPin
source · [−]pub struct LogicOutputPin {
pub related_inputs: IndexMap<CompactString, bool>,
pub num_internals: u8,
pub table_size: usize,
pub table_start: usize,
}Expand description
An output pin of logic cell.
This struct contains essentially the metadata of related input pins and a pointer to the flattened table.
Fields
The set of related input names. Not including the internal states.
This IndexMap has order, which is used as the truthtable array index order.
The bool value of the map indicates whether it is RF-sensitive. If true, it will take 01XZURF in the truth table. Otherwise, it will take 01XZU.
num_internals: u8The number of internal states.
All internal states take 01XZ.
table_size: usizeThe size of truth table (in the number of u8s).
It should be:
(5 or 7).pow(related_inputs.len()) * 4.pow(num_internals) * (1 + num_internals)
table_start: usizeThe starting index of truth table.
In implementation, we have two passes. The first pass only computes the table size and start. The second pass actually fills in the table elements in the global array.