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

related_inputs: IndexMap<CompactString, bool>

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: u8

The number of internal states.

All internal states take 01XZ.

table_size: usize

The 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: usize

The 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.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.