pub struct Sequencer<REQ: 'static, RSP: 'static = REQ> { /* private fields */ }Expand description
The sequencer: a queue of items feeding one driver.
It is a component — it has a path and appears in the hierarchy — and a
cheap Clone handle, so an env can file one in the ConfigDb for a test to
find (pyuvm’s "SEQR" idiom). Clones share state.
Implementations§
Source§impl<REQ: 'static, RSP: 'static> Sequencer<REQ, RSP>
impl<REQ: 'static, RSP: 'static> Sequencer<REQ, RSP>
pub fn new() -> Sequencer<REQ, RSP>
Sourcepub fn handle(&self) -> Sequencer<REQ, RSP>
pub fn handle(&self) -> Sequencer<REQ, RSP>
Another handle to the same sequencer — for the ConfigDb.
Sourcepub fn seq_item_export(&self) -> SeqItemExport<REQ, RSP>
pub fn seq_item_export(&self) -> SeqItemExport<REQ, RSP>
The driver-side endpoint, connected in the parent’s connect phase.
Trait Implementations§
Source§impl<REQ: 'static, RSP: 'static> Component for Sequencer<REQ, RSP>
impl<REQ: 'static, RSP: 'static> Component for Sequencer<REQ, RSP>
Source§fn build(&mut self, ctx: &mut RustdvCtx)
fn build(&mut self, ctx: &mut RustdvCtx)
build — top-down. Where a component constructs its children
(D6); the gap between “a component exists” and “its children exist”
that all late binding lives in. Read moreSource§fn connect(&mut self, ctx: &mut RustdvCtx)
fn connect(&mut self, ctx: &mut RustdvCtx)
connect — bottom-up. Wire children together once they exist. Read moreSource§fn end_of_elaboration(&mut self, ctx: &mut RustdvCtx)
fn end_of_elaboration(&mut self, ctx: &mut RustdvCtx)
end_of_elaboration — top-down. The hierarchy is final. Read moreSource§fn start_of_simulation(&mut self, ctx: &mut RustdvCtx)
fn start_of_simulation(&mut self, ctx: &mut RustdvCtx)
start_of_simulation — top-down. Last chance before time moves. Read moreSource§fn check(&mut self, ctx: &mut RustdvCtx, errors: &mut CheckSink)
fn check(&mut self, ctx: &mut RustdvCtx, errors: &mut CheckSink)
check — top-down. Report failures into the sink. Read moreSource§fn final_phase(&mut self, ctx: &mut RustdvCtx)
fn final_phase(&mut self, ctx: &mut RustdvCtx)
Source§fn start(&mut self, ctx: &mut RustdvCtx)
fn start(&mut self, ctx: &mut RustdvCtx)
Transitional spawn hook, pre-dating the restored
run
traversal. tinyalu_tb and the not-yet-converted chapters still
spawn free-running behavior here; it folds into run as each
converts. Not part of the nine-phase lifecycle.Source§fn comp_name() -> &'static strwhere
Self: Sized,
fn comp_name() -> &'static strwhere
Self: Sized,
This type’s registered short name, used as the factory override key.
The last path segment of the type name (
Foo from
crate::mod::Foo), which matches the name #[derive(Component)]
registers.Source§fn new_comp() -> RustdvComp
fn new_comp() -> RustdvComp
Build this component the normal way and drop it in an
crate::factory::RustdvComp
slot — the analogue of UVM’s new (D75). Not overridable.Source§fn create_comp() -> RustdvComp
fn create_comp() -> RustdvComp
Build this component through the factory — the analogue of UVM’s
create (D75). The default is built now and the slot is flagged; the
build walk swaps in an override if one applies.Source§impl<REQ: 'static, RSP: 'static> ComponentNode for Sequencer<REQ, RSP>
impl<REQ: 'static, RSP: 'static> ComponentNode for Sequencer<REQ, RSP>
Source§fn node_name(&self) -> &'static str
fn node_name(&self) -> &'static str
The component’s type-level name (hierarchical path is synthesized
from field names during traversal).
Source§fn children_mut(&mut self) -> Vec<(String, &mut (dyn ComponentNode + 'static))>
fn children_mut(&mut self) -> Vec<(String, &mut (dyn ComponentNode + 'static))>
Direct children as (field-derived name, node) pairs, in declaration
order. An owned Vec, not a
visit_children-style sync callback:
run_all awaits inside the walk, and a higher-ranked closure
cannot yield a child borrow that outlives the call, so the borrows
have to come back in a value the caller holds. An Option<T> child
created during build (D6) appears here only once it is Some.Source§fn port_slot(&self, name: &str) -> Option<Rc<dyn Any>>
fn port_slot(&self, name: &str) -> Option<Rc<dyn Any>>
This node’s port binding cell of the given name, erased (D83). Read more
Source§fn port_infos(&self) -> Vec<PortInfo>
fn port_infos(&self) -> Vec<PortInfo>
Every port this node declares, for the elaboration report.
Source§fn resolve_children(&mut self, ctx: &RustdvCtx)
fn resolve_children(&mut self, ctx: &RustdvCtx)
Resolve factory overrides for this node’s
RustdvComp fields (D75).
The derive generates this to call field.resolve(ctx, "field") for
each RustdvComp field; the default is a no-op for nodes with none.
Called by build_all after build, before descending — so a
swapped-out default’s own phases never run.Source§fn take_children(&mut self) -> Vec<(String, Box<dyn ComponentNode>)>
fn take_children(&mut self) -> Vec<(String, Box<dyn ComponentNode>)>
Move this node’s
RustdvComp children out, for the run phase (D82b). Read moreSource§fn restore_children(&mut self, taken: Vec<(String, Box<dyn ComponentNode>)>)
fn restore_children(&mut self, taken: Vec<(String, Box<dyn ComponentNode>)>)
Put back what
ComponentNode::take_children removed, in the same order.
Called unconditionally after the run phase — including on error — so the
post-run phases walk a whole tree.Auto Trait Implementations§
impl<REQ, RSP = REQ> !RefUnwindSafe for Sequencer<REQ, RSP>
impl<REQ, RSP = REQ> !Send for Sequencer<REQ, RSP>
impl<REQ, RSP = REQ> !Sync for Sequencer<REQ, RSP>
impl<REQ, RSP = REQ> !UnwindSafe for Sequencer<REQ, RSP>
impl<REQ, RSP> Freeze for Sequencer<REQ, RSP>
impl<REQ, RSP> Unpin for Sequencer<REQ, RSP>
impl<REQ, RSP> UnsafeUnpin for Sequencer<REQ, RSP>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DynPhases for Twhere
T: Component,
impl<T> DynPhases for Twhere
T: Component,
fn dyn_build(&mut self, ctx: &mut RustdvCtx)
Source§fn dyn_run<'a>(
&'a mut self,
ctx: &'a mut RustdvCtx,
) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + 'a>>
fn dyn_run<'a>( &'a mut self, ctx: &'a mut RustdvCtx, ) -> Pin<Box<dyn Future<Output = Result<(), TestError>> + 'a>>
The async
run, boxed so it can be awaited behind dyn (D48). This
is the object-safe shim run_all needs to fire each component’s run.