Skip to main content

PathDelaySet

Struct PathDelaySet 

Source
pub struct PathDelaySet { /* private fields */ }
Expand description

A module path’s own 12-entry transition-delay table (LRM 1800-2023 §30.5.1 Table 30-2, §30.5.2 Table 30-3) – docs/superpowers/plans/ 2026-10-03-sdf.md Task 4a’s PathDelaySet.

Deviation from the plan’s own §1.1 placement (“new, crates/vj/src/specify.rs”): this type lives here instead, alongside [PathEntry], because [PathEntry::delays] below is a FIELD of this type, and vj depends on vj-sim (never the other way around) – a type used as a field of a vj-sim-resident struct cannot itself live in a downstream crate. This is also the layering [TimingModel]’s own module doc already commits to: $sdf_annotate (Track C) mutates a PathEntry’s delays in place, which means the delays must live in TimingModel itself, not in a transient vj-only plan-time structure.

Evaluating a path’s own path_delay_value expressions into real u64 tick counts needs sv_lang::EvalSession (constant-folding) AND vj-codegen::timescale (unit/precision conversion) – the latter this crate cannot depend on (see PathEntry::delays’s own doc comment). So PathDelaySet::from_list takes already-evaluated, already tick-converted u64s: evaluation+conversion is vj’s own job (crate::specify::discover’s delay-attachment pass, Task 4a), calling [TimingModel::set_path_delays] to attach the result – mirroring [TimingModel::set_specparam]’s own, already-established “no sv_lang/EvalSession in the mutation path” shape exactly.

Implementations§

Source§

impl PathDelaySet

Source

pub fn from_list(d: &[u64]) -> Result<PathDelaySet, String>

LRM Table 30-2’s full 1/2/3/6/12-value path_delay_value forms (d already evaluated and tick-converted by the caller – see this type’s own doc comment).

For the 1/2/3/6-value forms, once the six “known” transitions (0->1, 1->0, 0->z, z->1, 1->z, z->0) are set from d per Table 30-2’s own column for that count – the 6-value form is simply those six values given directly, in the SAME t01,t10,t0z,tz1,t1z, tz0 order Table 30-2’s own 6-value column lists them, so it needs no grouping logic of its own, unlike the 1/2/3-value forms’ rise/ fall/z-shared derivation – the six x-involving transitions are filled in from THEM via Table 30-3’s own general algorithm (s->x = the shorter of the two delays INTO x from a known state; x->s = the longer of the two delays OUT of x into a known state). This is the table’s own “general algorithm,” not an approximation, and applies identically to the 1/2/3-value and 6-value forms alike (one shared match arm set feeds it).

The 12-value form is different in kind, not just in count: Table 30-2 lists an explicit column for all twelve transitions, INCLUDING the six x-involving ones – there are no “known” vs “unknown” transitions left for Table 30-3’s algorithm to derive from, so a 12-value list is copied straight into t, in [transition_index]’s own 0->1,1->0,0->z,z->1,1->z,z->0,0->x,x->1,1->x,x->0,x->z,z->x order – which is, verified directly against the LRM text, the EXACT order Table 30-2’s own 12-value column already lists them in, so no reordering is needed, only the copy.

Source

pub fn from_transitions(t: [u64; 12]) -> PathDelaySet

A table from its twelve per-transition values, in TRANSITIONS order. The one constructor that takes a table already expanded by someone other than Self::from_list (SDF’s own Table 32-4 expansion, vj::sdf_apply, which is a different function from Table 30-3’s and so must not go through it).

Source

pub fn transitions(&self) -> [u64; 12]

The twelve per-transition values, in TRANSITIONS order.

Source

pub fn uniform(v: u64) -> PathDelaySet

A table whose twelve transitions all hold v – the shape a PATHPULSE$ limit takes (LRM 30.7.1 names ONE reject and ONE error value for the whole path, never one per transition).

Source

pub fn of(&self, from: Bit4, to: Bit4) -> u64

The delay for transition from -> to, in scheduler ticks. Callers (vj::specify::PathRetimer) only ever call this after proving from != to (a real transition) themselves – see [transition_index]’s own doc comment for why that guard lives at the call site, not here.

Source

pub fn at_least(self, floor: u64) -> PathDelaySet

Every transition’s delay raised to at least floor ticks (LRM 31.9.1: a timing check signal delayed by more than a path’s delay makes the output follow the delayed signal, “as if its specify path delay were equal to the delay applied to the timing check signal”).

Source

pub fn min_all(&self) -> u64

The shortest of all 12 transitions’ delays – the longest a vj::primitives::Delayer reused for this path may sleep at once without risking a later, shorter-delayed transition arriving late (mirrors primitives::Delays::min’s own identical role).

Trait Implementations§

Source§

impl Clone for PathDelaySet

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PathDelaySet

Source§

impl Debug for PathDelaySet

Source§

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

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

impl Default for PathDelaySet

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PathDelaySet

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for PathDelaySet

Source§

impl PartialEq for PathDelaySet

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PathDelaySet

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PathDelaySet

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V