pub enum SwitchOn<'d> {
FiredTerm,
FiredBit(u32),
ClassFired(Option<u32>),
VifId(Expression<'d>),
RandCase(Statement<'d>),
ObjClass {
receiver: Option<Expression<'d>>,
ids: Vec<Vec<u32>>,
},
NoTarget {
what: String,
},
FnDisable {
labels: Vec<String>,
},
}Expand description
What a Terminator::Switch selects on.
Variants§
FiredTerm
The index of the wait term that woke the process at the suspend just
before (sv_rt_fired_term): wait_order.
FiredBit(u32)
Whether term k of the event wait just before matched (bit k of
sv_rt_fired_mask): 1 when it did, else 0. A class event queues every
term of an @(a iff x or b iff y) list on its own, and the resume
judges each fired term’s iff (LRM 1800-2023 9.4.2.3, 15.5).
ClassFired(Option<u32>)
After a mixed @(class_event or signal ...) wait: whether class term
k of the list (its kth class event) woke the process (Some(k)), or
any class term did (None); 0 when a signal term woke it. The class
side keeps its own record (sched::class_event::fired_bit) because a
signal term’s index would share the fired-term mask with it.
VifId(Expression<'d>)
A virtual interface’s instance id minus one (netlist::vif): an
interface task called through it.
RandCase(Statement<'d>)
A randcase‘s item, picked at random by the items’ weights (none
when every weight is 0).
ObjClass
The arm whose class template ids hold the dynamic class of the object
receiver names (the current object when None): a virtual class
task that can suspend, one inlined override per arm (LRM 8.20).
NoTarget
No arm is ever taken: the switch only reports its error (what is the
message) and continues at the default – a call to an extern forkjoin
task no module implements (LRM 25.7.5).
FnDisable
The arm of the named block (labels[i], innermost first) that the
subroutine call just before disabled with disable <block>; from
inside a function (LRM 9.6.2, 35.9), else the default
(sv_rt_dpi_fn_disable_index).