Skip to main content

SensitivityEntry

Enum SensitivityEntry 

Source
pub enum SensitivityEntry {
    Static {
        proc: ProcessId,
        term_index: usize,
        edge: Option<EdgeKind>,
        sel: Option<(u32, u32)>,
    },
    Dynamic {
        proc: ProcessId,
        term_index: usize,
        edge: EdgeKind,
        iff: Option<PredicateFn>,
        repeat_total: Option<u64>,
        sel: Option<(u32, u32)>,
    },
}
Expand description

One row of the inverted index (scheduler.md §4’s literal shape): Static entries are installed once, at process-registration time, from codegen-supplied StaticSensitivity metadata; Dynamic entries are installed/removed every time a process suspends/resumes on a general @(...)/wait(...) (built from the live EventWaitSet at that exact suspend point) and are gone from the table the instant the owning process resumes.

Static::edge == None means “any change” (always_comb/always_latch’s LRM-implicit “all variables read” sensitivity); Static::edge == Some(k) means “only transitions classifying as k” (always_ff’s explicit clock/reset edge). Dynamic::edge is not wrapped in Option because scheduler.md’s EventWaitSet/EventTerm family never produces an untyped “no edge” dynamic term — an any-change dynamic wakeup (e.g. an ImplicitAny disjunct, or a named-event trigger pulse) is represented directly as EdgeKind::None, the same sentinel SensitivityTable::matches treats as an unconditional match (any call into matches already implies a real change happened — see matches’s doc comment) for Static entries — so one matching rule serves both variants uniformly.

Variants§

§

Static

Fields

§term_index: usize

The edge’s index in StaticSensitivity::edges (reported as the fired term, so a native process can tell which member of its event list fired).

§sel: Option<(u32, u32)>

Some((lsb, width)) for an always_comb/always_latch that reads only a constant bit/part select of the cell (LRM 9.2.2.2.1: the longest static prefix, not the whole variable, is in the implicit sensitivity list): the entry matches only an update that changed those bits (see SensitivityTable::narrow_static).

§

Dynamic

Fields

§term_index: usize
§repeat_total: Option<u64>

Some(count) iff this row was installed from the inner term of an EventTerm::Repeat { count, inner } (ledger SC-052) — None for an ordinary Edge/ImplicitAny/NamedEventTrigger term. matches surfaces this so sched::control’s EngineNotifySink::notify_change can route a matching firing through RepeatCounters::on_term_fired before ever enqueueing — the sensitivity table itself only tracks whether a row is repeat-sourced and its declared total, never a live remaining count (that lives in sched::repeat::RepeatCounters, keyed by (proc, term_index), not here).

§sel: Option<(u32, u32)>

Some((lsb, width)) for a wait on a bit/part select of the cell (@(v[3]), @(posedge v[5:4]), LRM 9.4.2): the entry matches only an update that changed those bits (and, for an edge, whose transition on bit lsb is that edge) – decided from the update’s ChangeDelta, not from the cell’s own bit-0 classification.

Trait Implementations§

Source§

impl Clone for SensitivityEntry

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 SensitivityEntry

Source§

impl Debug for SensitivityEntry

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