LogicOutputPin

Struct 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§

§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§

Source§

impl Debug for LogicOutputPin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.