Skip to main content

ResolvedSuspend

Enum ResolvedSuspend 

Source
pub enum ResolvedSuspend {
    Delay(u64),
    DynamicDelay,
    Edge {
        cell: StateCellId,
        edge: EdgeKind,
    },
    Done,
    RepeatEdge {
        count: u64,
        cell: StateCellId,
        edge: EdgeKind,
    },
    EdgeWithGuard {
        cell: StateCellId,
        edge: EdgeKind,
        guard_fn: extern "C" fn(SimHandle) -> bool,
    },
    ForkJoin {
        join_kind: JoinKind,
        base: u32,
        count: u32,
    },
    WaitFork,
    ByRequest,
    EventList {
        base: u32,
        count: u32,
    },
}
Expand description

The compile-time-resolved suspend shape build_eval_result encodes. Deliberately not vj_sim::process::cfg::SuspendPoint (an sv_lang-carrying, frontend-gated type): this module – and the whole sched module tree – must build with --no-default-features (D4), so every type crossing this boundary is sv_lang-free. vj-codegen resolves its own SuspendPoint (a constant delay tick count, or an edge signal’s already-assigned SlotId) down to this shape before calling in.

Variants§

§

Delay(u64)

§

DynamicDelay

A delay computed at run time (#d, #(expr)): the kernel stores the tick count with real_sv_rt_set_delay just before it returns.

§

Edge

Fields

§

Done

§

RepeatEdge

Task 6 (CG-081/CG-171): a single-cell, single-edge REPEAT wait – count occurrences of edge on cell must fire before the process resumes. Closes SuspendPoint::CycleDelay (##N, always reachable via a Timed statement – FULLY resolved by this task) and would close RepeatedEventControl (repeat(n) @(...), CG-081’s own name for this kind) too, were that AST shape ever reachable from a Timed statement at all – see vj-codegen::process_lower:: resolve_suspend_point’s CycleDelay arm and vj-sim::process:: cfg::SuspendPoint’s own doc comment for the full reasoning on both. count is the RAW, un-multiplied cycle count – edges of cell are counted LIVE at scheduler runtime (EventTerm::Repeat, SC-052/SC-053, already built and tested), never pre-multiplied against any period at codegen time (ARCHITECTURE §6.5).

Fields

§count: u64
§

EdgeWithGuard

Task 7 (AB-096/CG-082): a single-cell, single-edge wait carrying a compiled re-check guard – the wait(expr)/iff-qualified shape. See [RescheduleReqLayoutProposal::from_single_edge_with_guard]’s own doc comment for the full ABI-budget reasoning behind reusing a/b instead of a ninth struct field, and for why this is NOT extended to RepeatEdge in this pass.

Fields

§guard_fn: extern "C" fn(SimHandle) -> bool
§

ForkJoin

R-run Task 17 (PR-047/PR-061/PR-085): a fork ... join (JoinKind::All only – this task’s own scope) suspend. Unlike every other variant above, a fork/join site’s real payload (one super::SpawnSpec per branch) is NOT self-contained here – it is compile-time-known (branches are static source, not a per-instance runtime count) but too large to fit RescheduleReqLayoutProposal’s frozen 24-byte budget for more than ~2 branches, so vj-codegen instead materializes a real, compile-time-constant Vec<SpawnSpec> fork table (one per compiled program, growing as each fork/join site is lowered) and this variant carries only base/count, an crate::process::ArenaRange-shaped reference into it – exactly [RescheduleReqLayoutProposal::from_fork_join]’s own, already-specified KIND_FORK_JOIN wire shape (docs/CONTRACTS.md open question 8 / D1a’s own “no allocator, no STATE-owned storage” concern does not apply here: this table is compiled INTO the program as an ordinary Rust Vec a CompiledKernelProcess is handed at construction time – see decode_reschedule_with_fork_table).

Fields

§join_kind: JoinKind
§base: u32
§count: u32
§

WaitFork

wait fork; (SC-125) – see reschedule_req_proposal::KIND_WAIT_FORK.

§

ByRequest

p.await() / p.suspend() (classes plan Task 13) – see reschedule_req_proposal::KIND_BY_REQUEST.

§

EventList

A wait on several terms (@*, @(a or posedge b), wait(expr) on a wide or multi-signal condition, @(a) any-change): the terms live in the program’s wait table ([base, base+count), see WaitTableEntry), encoded as KIND_EDGE_LIST.

Fields

§base: u32
§count: u32

Trait Implementations§

Source§

impl Clone for ResolvedSuspend

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 ResolvedSuspend

Source§

impl Debug for ResolvedSuspend

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