Trait libreda_sta::traits::constraint_base::ConstraintBase
source · pub trait ConstraintBase: DelayBase {
type Constraint: Clone + Debug + Sync + Send;
type RequiredSignal: Clone + Debug + Sync + Send;
type Slack: Clone + Debug + Sync + Send;
// Required methods
fn summarize_constraints(
&self,
constraint1: &Self::RequiredSignal,
constraint2: &Self::RequiredSignal
) -> Self::RequiredSignal;
fn solve_delay_constraint(
&self,
actual_delay: &Self::Delay,
required_output: &Self::RequiredSignal,
actual_signal: &Self::Signal
) -> Self::RequiredSignal;
fn get_slack(
&self,
actual_signal: &Self::Signal,
required_signal: &Self::RequiredSignal
) -> Self::Slack;
}Expand description
Abstraction of a constraint model.
Required Associated Types§
sourcetype Constraint: Clone + Debug + Sync + Send
type Constraint: Clone + Debug + Sync + Send
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.
Required Methods§
sourcefn summarize_constraints(
&self,
constraint1: &Self::RequiredSignal,
constraint2: &Self::RequiredSignal
) -> Self::RequiredSignal
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.
sourcefn solve_delay_constraint(
&self,
actual_delay: &Self::Delay,
required_output: &Self::RequiredSignal,
actual_signal: &Self::Signal
) -> Self::RequiredSignal
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).
sourcefn get_slack(
&self,
actual_signal: &Self::Signal,
required_signal: &Self::RequiredSignal
) -> Self::Slack
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.