Skip to main content

Sequencer

Struct Sequencer 

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

Source

pub fn new() -> Sequencer<REQ, RSP>

Source

pub fn handle(&self) -> Sequencer<REQ, RSP>

Another handle to the same sequencer — for the ConfigDb.

Source

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, RSP> Clone for Sequencer<REQ, RSP>

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<REQ: 'static, RSP: 'static> Component for Sequencer<REQ, RSP>

Source§

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 more
Source§

fn connect(&mut self, ctx: &mut RustdvCtx)

connect — bottom-up. Wire children together once they exist. Read more
Source§

fn end_of_elaboration(&mut self, ctx: &mut RustdvCtx)

end_of_elaboration — top-down. The hierarchy is final. Read more
Source§

fn start_of_simulation(&mut self, ctx: &mut RustdvCtx)

start_of_simulation — top-down. Last chance before time moves. Read more
Source§

async fn run(&mut self, ctx: &mut RustdvCtx) -> Result<(), TestError>

run — bottom-up, async, objection-gated. The test body; Err fails the test. Read more
Source§

fn extract(&mut self, ctx: &mut RustdvCtx)

extract — top-down, post-run. Read more
Source§

fn check(&mut self, ctx: &mut RustdvCtx, errors: &mut CheckSink)

check — top-down. Report failures into the sink. Read more
Source§

fn report(&mut self, ctx: &mut RustdvCtx)

report — top-down. Read more
Source§

fn final_phase(&mut self, ctx: &mut RustdvCtx)

final_phase — top-down. (final is a Rust keyword.) Read more
Source§

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 str
where 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
where Self: Sized + Default + ComponentNode + 'static,

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
where Self: Sized + Default + ComponentNode + 'static,

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>

Source§

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

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

This node’s port binding cell of the given name, erased (D83). Read more
Source§

fn port_infos(&self) -> Vec<PortInfo>

Every port this node declares, for the elaboration report.
Source§

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

Move this node’s RustdvComp children out, for the run phase (D82b). Read more
Source§

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.
Source§

impl<REQ: 'static, RSP: 'static> Debug for Sequencer<REQ, RSP>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

ConfigDb values must be Debug for its dump (D68). A sequencer has nothing worth dumping; say which object it is.

Source§

impl<REQ: 'static, RSP: 'static> Default for Sequencer<REQ, RSP>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> 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<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> DynPhases for T
where T: Component,

Source§

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

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.
Source§

fn dyn_connect(&mut self, ctx: &mut RustdvCtx)

Source§

fn dyn_end_of_elaboration(&mut self, ctx: &mut RustdvCtx)

Source§

fn dyn_start_of_simulation(&mut self, ctx: &mut RustdvCtx)

Source§

fn dyn_extract(&mut self, ctx: &mut RustdvCtx)

Source§

fn dyn_check(&mut self, ctx: &mut RustdvCtx, errors: &mut CheckSink)

Source§

fn dyn_report(&mut self, ctx: &mut RustdvCtx)

Source§

fn dyn_final(&mut self, ctx: &mut RustdvCtx)

Source§

fn dyn_start(&mut self, ctx: &mut RustdvCtx)

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

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.