Skip to main content

Module sequence

Module sequence 

Source
Expand description

Sequences: stimulus as a program, separate from the testbench structure.

The handshake is pyuvm’s, event for event (pyuvm/_s14_15_python_sequences.py):

  1. Sequence: start_item → enqueue; block until this item’s turn.
  2. Driver: get_next_item → dequeue; grant; block until the sequence has filled it in.
  3. Sequence: sets the fields; finish_item → hand off; block until done.
  4. Driver: drives the DUT; item_done(rsp) → release the sequence.
  5. Sequence, if it wants the answer: get_response(id).

The gap between steps 1 and 3 is the point (D3). It is the window in which the driver is committed and the values are not yet decided, which is where late stimulus setting lives. SystemVerilog had mailbox#(T) and built this two-phase rendezvous anyway; pyuvm simplified nearly everything else about sequences and kept both phases.

Identity lives in the SeqItem envelope, not in the user’s data type (D93/D98): a transaction stays a plain struct with derives.

Structs§

GetResponse
ResponseQueue
Responses, retrievable in order or by ticket (pyuvm’s ResponseQueue).
RustdvSeq
A slot holding any sequence with these request/response types — what create_seq() returns, and what a component declares when the factory chooses the type. The parallel of RustdvComp.
SeqCtx
What a running sequence is handed. Its equivalent of a component’s crate::RustdvCtx: it can log, it has a seeded RNG, and it knows its sequencer — if it has one.
SeqError
SeqItem
What a driver receives: the framework’s id plus the user’s plain payload.
SeqItemExport
The sequencer’s side, handed to connect.
Sequencer
The sequencer: a queue of items feeding one driver.
TxnId
A transaction’s ticket. Assigned by the sequencer, carried in the envelope, and echoed on the response so a sequence gets the answer to the question it asked.

Traits§

DynSequence
Dyn-safe mirror of Sequence, so a factory-created sequence can be held in a variable. The same treatment Component::run needed (D48/D55).
SeqItemIf
What a sequencer’s export offers a driver. Behind dyn, so the port can hold it without knowing which sequencer it came from.
Sequence
A sequence: a program that produces stimulus.

Functions§

clear_seq_overrides
Clear per test, as the ConfigDb and the component overrides are.
create_seq
Build a sequence of this type, honouring any override installed for it.
set_seq_override
Install a sequence override: wherever From::create_seq() is called, build a To instead.
set_sequence_seed
Called by the runner so sequences inherit the test’s seed.

Type Aliases§

SeqItemPort
A driver’s request for items. Declared #[port(seq_item)].