pub(crate) struct TimingGraph<N: NetlistIds, T: ConstraintBase> {
    pub(crate) arc_graph: StableDiGraph<NodeData<N, T>, EdgeData<T>>,
    pub(crate) aat_source_node: NodeIndex,
    pub(crate) rat_source_node: NodeIndex,
    pub(crate) node2term: FnvHashMap<NodeIndex, TerminalId<N>>,
    pub(crate) term2node: FnvHashMap<TerminalId<N>, NodeIndex>,
    frontier: FnvHashSet<NodeIndex>,
}

Fields§

§arc_graph: StableDiGraph<NodeData<N, T>, EdgeData<T>>

Graph structure holding all delay and constraint arcs. Their value corresponds to the delay.

§aat_source_node: NodeIndex

The source node is used as a starting point for computing the actual arrival times. All primary inputs to the combinational logic are connected to this source node.

§rat_source_node: NodeIndex

The source node is used as a starting point for computing the required arrival times. All constrained pins are connected to this source node.

§node2term: FnvHashMap<NodeIndex, TerminalId<N>>

Mapping from graph nodes to terminal IDs in the netlist.

§term2node: FnvHashMap<TerminalId<N>, NodeIndex>

Mapping from terminal IDs in the netlist to graph nodes.

§frontier: FnvHashSet<NodeIndex>

List of nodes from which a timing change originates. They are used to find the forward-cone and backward-code which are subject to change during an incremental update.

Implementations§

source§

impl<N: NetlistBase, T: ConstraintBase> TimingGraph<N, T>

source

pub fn new() -> Self

Create empty timing graph.

source

pub fn get_node_data( &self, pin: &TerminalId<N> ) -> Option<IdLockReadGuard<'_, SyncNodeData<T>>>

Get read access to the node data. Returns None if the terminal does not exist in the timing graph. Panics, if the read-lock cannot be acquired. Use only while there’s no timing propagation running!

source

pub fn graph(&self) -> &StableDiGraph<NodeData<N, T>, EdgeData<T>>

Get a reference to the delay graph.

source

pub fn take_frontier(&mut self) -> FnvHashSet<NodeIndex>

Take the set of frontier nodes and replace it by an empty set.

source

pub fn add_to_frontier(&mut self, terminal: &TerminalId<N>)

Mark a node which needs to be recomputed in the next incremental update.

source

pub fn build_from_netlist<C, D>( top_ref: &CellRef<'_, N>, delay_model: &D, constraint_model: &C ) -> Selfwhere D: CellDelayModel<N, Delay = T::Delay>, C: CellConstraintModel<N, Constraint = T::Constraint>,

Assemble a directed graph which represents all delays arcs and constraints (without values yet). Net terminals become nodes in the graph. Cell-internal arcs are derived from the cell_delay_arcs. Inter-cell arcs (interconnects) are derived from the netlist of the top cell top_ref.

source

pub fn create_cell_instance<C, D>( &mut self, inst: &CellInstRef<'_, N>, delay_model: &D, constraint_model: &C )where D: CellDelayModel<N, Delay = T::Delay>, C: CellConstraintModel<N, Constraint = T::Constraint>,

Create graph nodes for each pin instance.

source

pub fn remove_cell_instance(&mut self, inst: &CellInstRef<'_, N>)

source

pub fn remove_net(&mut self, net: &NetRef<'_, N>) -> Result<(), StaError>

Remove all inter-cell arcs created by this net.

source

pub fn connect_terminal(&mut self, t: TerminalRef<'_, N>, net: Option<N::NetId>)

Disconnect the terminal from the old net and connect it to the new net (if it is Some).

source

pub fn create_terminal(&mut self, terminal_id: TerminalId<N>)

source

fn create_pin(&mut self, pin: PinRef<'_, N>)

source

fn remove_terminal(&mut self, terminal: TerminalId<N>)

source

pub fn remove_pin(&mut self, pin: N::PinId)

source

pub fn remove_pin_instance(&mut self, pin: N::PinInstId)

source

fn create_delay_edges_inter_cell( &mut self, top_ref: &CellRef<'_, N> ) -> Result<(), StaError>

source

fn pin_instance_to_graph_node(&self, pin_inst: &PinInstRef<'_, N>) -> NodeIndex

source

fn create_delay_edges_intra_cell<D>( &mut self, inst: &CellInstRef<'_, N>, delay_model: &D )where D: CellDelayModel<N, Delay = T::Delay>,

source

fn create_constraint_edges<C>( &mut self, inst: &CellInstRef<'_, N>, constraint_model: &C )where C: CellConstraintModel<N, Constraint = T::Constraint>,

source

fn create_primary_input(&mut self, primary_input: TerminalId<N>)

Create a directed edge from the AAT source node the primary input nodes.

source

fn create_primary_input_delay_arcs(&mut self, top_cell: &CellRef<'_, N>)

Create directed edges from the AAT source node all primary input nodes.

Trait Implementations§

source§

impl<N: Debug + NetlistIds, T: Debug + ConstraintBase> Debug for TimingGraph<N, T>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<N, T> !RefUnwindSafe for TimingGraph<N, T>

§

impl<N, T> Send for TimingGraph<N, T>where <N as NetlistIds>::PinId: Send, <N as NetlistIds>::PinInstId: Send,

§

impl<N, T> Sync for TimingGraph<N, T>where <N as NetlistIds>::PinId: Sync, <N as NetlistIds>::PinInstId: Sync,

§

impl<N, T> Unpin for TimingGraph<N, T>where <T as ConstraintBase>::Constraint: Unpin, <T as DelayBase>::Delay: Unpin, <N as NetlistIds>::PinId: Unpin, <N as NetlistIds>::PinInstId: Unpin, <T as ConstraintBase>::RequiredSignal: Unpin, <T as TimingBase>::Signal: Unpin,

§

impl<N, T> UnwindSafe for TimingGraph<N, T>where <T as ConstraintBase>::Constraint: UnwindSafe, <T as DelayBase>::Delay: UnwindSafe, <N as NetlistIds>::PinId: UnwindSafe, <N as NetlistIds>::PinInstId: UnwindSafe, <T as ConstraintBase>::RequiredSignal: UnwindSafe, <T as TimingBase>::Signal: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.