Struct libreda_sta::models::clock_tag::ClockAwareModel

source ·
pub struct ClockAwareModel<M> { /* private fields */ }
Expand description

Wrap a delay and/or constraint model and add the capability of tracking clock sources.

Implementations§

source§

impl<M> ClockAwareModel<M>

source

pub fn new(inner_model: M) -> Self

Wrap a cell delay model.

source

pub fn create_primary_clock(&mut self, period: Time, jitter: Time) -> ClockId

Register a clock. Returns an ID which can be used for labelling signals with this clock.

Trait Implementations§

source§

impl<M, N> CellConstraintModel<N> for ClockAwareModel<M>

source§

fn get_required_input( &self, netlist: &N, arc: &CellConstraintArc<N::PinId>, constrained_pin_signal: &Self::Signal, related_pin_signal: &Self::Signal, other_inputs: &impl Fn(&N::PinId) -> Option<Self::Signal>, output_loads: &impl Fn(&N::PinId) -> Option<Self::Load> ) -> Option<Self::RequiredSignal>

Compute the constraint on the constrained_pin imposed by the related_pin. Returns None if there’s no such constraint. Read more
source§

fn constraint_arcs( &self, netlist: &N, cell_id: &N::CellId ) -> impl Iterator<Item = CellConstraintArc<N::PinId>> + '_

Get all constraint arcs in the given cell.
source§

impl<M, N> CellDelayModel<N> for ClockAwareModel<M>

source§

fn cell_output( &self, netlist: &N, arc: &CellDelayArc<N::PinId>, input_signal: &Self::Signal, output_load: &Self::Load, other_inputs: &impl Fn(&N::PinId) -> Option<Self::LogicValue> ) -> Option<Self::Signal>

Propagate a signal from the input_pin to the output_pin. This is used as a more general form of computing the cell delay. The input_pin and the output_pin must be pins of the same cell. Read more
source§

fn delay_arcs( &self, netlist: &N, cell_id: &N::CellId ) -> impl Iterator<Item = CellDelayArc<N::PinId>> + '_

Iterate over the output pins of all delay arcs starting at related_pin.
source§

impl<M, N> CellModel<N> for ClockAwareModel<M>
where N: NetlistBase, M: CellModel<N>,

source§

fn ordered_pins(&self, cell: &N::CellId) -> Vec<<N as NetlistIds>::PinId>

Get the cell pins in a consistent ordering. The same ordering will be used for passing input signals to the cell delay model or cell constraint model.
source§

impl<M> ConstraintBase for ClockAwareModel<M>
where M: ConstraintBase,

§

type Constraint = <M as ConstraintBase>::Constraint

Representation of a constraint. This might be for example an earliest or latest required arrival time or a allowed timing window or also a constraint on any other signal properties such as the slew.
§

type RequiredSignal = SignalWithClock<<M as ConstraintBase>::RequiredSignal>

Representation of a signal which is required to satisfy constraints.
§

type Slack = <M as ConstraintBase>::Slack

Difference between the arrival times of an actual signal and a required signal.
source§

fn summarize_constraints( &self, constraint1: &Self::RequiredSignal, constraint2: &Self::RequiredSignal ) -> Self::RequiredSignal

Summarize two constraints c1 and c2 into a single constraint c such that if c is satisfied then also c1 and c2 are satisfied. Depending on the timing analysis mode (late/early) this might be a max or min function.
source§

fn solve_delay_constraint( &self, actual_delay: &Self::Delay, required_output: &Self::RequiredSignal, actual_signal: &Self::Signal ) -> Self::RequiredSignal

Find the required input signal such that the actual output signal is equal to the required_output. The actual_delay from the input to the output is given. Also the actual output is given (might not be necessary to compute the result).
source§

fn get_slack( &self, actual_signal: &Self::Signal, required_signal: &Self::RequiredSignal ) -> Self::Slack

Compute the slack between the actual signal and the required signal. Positive slack implies a met timing. Negative slack implies a violated timing.
source§

impl<M: Debug> Debug for ClockAwareModel<M>

source§

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

Formats the value using the given formatter. Read more
source§

impl<M> DelayBase for ClockAwareModel<M>
where M: DelayBase,

§

type Delay = <M as DelayBase>::Delay

Type representing a delay. This can be as simple as a f64 or more complicated such as a probability distribution.
source§

fn summarize_delays( &self, signal1: &Self::Signal, signal2: &Self::Signal ) -> Self::Signal

Summarize multiple possible output signals into one signal. Depending on the timing analysis mode (late/early) this might be a max or min function.
source§

fn get_delay(&self, from: &Self::Signal, to: &Self::Signal) -> Self::Delay

Compute the delay from one signal to another signal.
source§

impl<M> Deref for ClockAwareModel<M>

§

type Target = M

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<M> LoadBase for ClockAwareModel<M>
where M: LoadBase,

§

type Load = <M as LoadBase>::Load

An electrical load. Typically a capacitance.
source§

fn sum_loads(&self, load1: &Self::Load, load2: &Self::Load) -> Self::Load

Compute the sum of two loads.
source§

impl<M> TimingBase for ClockAwareModel<M>
where M: TimingBase,

§

type Signal = SignalWithClock<<M as TimingBase>::Signal>

Representation of signals at input or output pins. In case of the Non-linear delay model (NDLM) this could be a bundle of the slew rate and the delay but also the polarity of the signal. But this type could as well also be a statistical representation of a signal, e.g. a probability distribution of arrival times.
§

type LogicValue = <M as TimingBase>::LogicValue

Type of logic value. Typically this might be a three-valued type which represents logical 0, 1 and ‘unknown’. The default is typically ‘unknown’. This is used to specify static input signals when evaluating cell delays or constraints.

Auto Trait Implementations§

§

impl<M> !Freeze for ClockAwareModel<M>

§

impl<M> RefUnwindSafe for ClockAwareModel<M>
where M: RefUnwindSafe,

§

impl<M> Send for ClockAwareModel<M>
where M: Send,

§

impl<M> Sync for ClockAwareModel<M>
where M: Sync,

§

impl<M> Unpin for ClockAwareModel<M>
where M: Unpin,

§

impl<M> UnwindSafe for ClockAwareModel<M>
where M: UnwindSafe,

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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

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

Initializes a with the given initializer. Read more
source§

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

Dereferences the given pointer. Read more
source§

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

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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

§

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.