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):
- Sequence:
start_item→ enqueue; block until this item’s turn. - Driver:
get_next_item→ dequeue; grant; block until the sequence has filled it in. - Sequence: sets the fields;
finish_item→ hand off; block until done. - Driver: drives the DUT;
item_done(rsp)→ release the sequence. - 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
- Response
Queue - Responses, retrievable in order or by ticket (pyuvm’s
ResponseQueue). - Rustdv
Seq - 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 ofRustdvComp. - 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.
- SeqItem
Export - 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 treatmentComponent::runneeded (D48/D55). - SeqItem
If - 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 aToinstead. - set_
sequence_ seed - Called by the runner so sequences inherit the test’s seed.
Type Aliases§
- SeqItem
Port - A driver’s request for items. Declared
#[port(seq_item)].