Skip to main content

EventTerm

Enum EventTerm 

Source
pub enum EventTerm {
    Edge {
        cell: StateCellId,
        edge: EdgeKind,
        iff: Option<PredicateFn>,
    },
    ImplicitAny(Vec<StateCellId>),
    Select {
        cell: StateCellId,
        edge: EdgeKind,
        lsb: u32,
        width: u32,
    },
    NamedEventTrigger(StateCellId),
    Repeat {
        count: u64,
        inner: Box<EventTerm>,
    },
}
Expand description

One @(...)/wait(...) disjunct (scheduler.md §4/§5; ledger SC-048..SC-051, SC-065).

Variants§

§

Edge

§

ImplicitAny(Vec<StateCellId>)

§

Select

A wait on a bit/part select of one cell (@(v[3]), @(posedge v[5:4]), LRM 9.4.2): it fires on an update that changed bits [lsb, lsb + width) of cell (any change when edge is None, else the transition of bit lsb classified as edge). The update is judged on its own old/new words (ChangeDelta), so a bit that is set and cleared again by two updates in one time step wakes the waiter once per update, exactly as the LRM’s update events do (4.9.4).

Fields

§lsb: u32
§width: u32
§

NamedEventTrigger(StateCellId)

Also the resolution for BlockEventListControl (@(block. triggered)), SC-054’s own “kept as a hook-only EventTerm mapping in v1” acceptance, resolved here rather than by adding a 5th variant: @(block.triggered) needs no new EventTerm shape at all – codegen reserves one synthetic StateCellId per named statement block and fires it (through the same TimerAction:: TriggerEvent/direct notify_change fan-out an ordinary ->/->> trigger already uses, sched::wheel’s own SC-069 doc comment) exactly when that block completes – i.e. .triggered is modeled as an ordinary named event whose trigger site is block-exit instead of an explicit -> statement. NamedEventTrigger’s own scheduler-side consumption (installing an any-change dynamic entry keyed by the cell, waking every waiter on a real fire) is already real and tested (Task 5, sched::sensitivity::tests:: named_event_trigger_term_installs_an_any_change_dynamic_entry) – what remains for @(block.triggered) specifically is purely whether codegen (B-process, out of this track’s ownership) actually emits the block-exit trigger call; this scheduler-side half never hits a silent mis-simulation regardless (SC-054’s own negative acceptance clause), since an unfired trigger cell simply never wakes anyone – observably a hang/timeout, never a wrong value.

§

Repeat

repeat(count)@(...) (mirrors slang’s RepeatedEventControl{expr, event}; ledger SC-052). SensitivityTable::install_term installs only inner’s own edge at this term’s index — the count itself is resume-orchestration state, tracked live by RepeatCounters (sched/repeat.rs), not by the sensitivity table.

##N/clocking-block cycle delays reduce to this term, with no second mechanism (SC-004, SC-005, SC-053): per ARCHITECTURE §6.5, CycleDelayControl is resolved to absolute ticks at runtime, not pre-resolved by codegen/elaboration — ##N relative to a clocking block’s bound clock is semantically Repeat{count: N, inner: Edge{cell: <bound clock's cell>, edge: Posedge, iff: None}}. Because RepeatCounters counts live firings of inner’s real signal rather than precomputing an absolute tick offset, “the same compiled ##N delay produces different absolute tick timing when its associated clock’s period changes dynamically at runtime” (SC-053’s own differentiating acceptance clause) holds by construction: there is no cached tick offset to go stale. See sched::repeat’s own module doc comment and sched::control’s sc053_repeat_based_wait_re_reads_the_clocks_live_period_not_a_cached_tick_offset for the proof against a deliberately irregular (non-periodic) clock.

Fields

§count: u64

Trait Implementations§

Source§

impl Clone for EventTerm

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 Debug for EventTerm

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