One DMA job touches three interfaces: registers over APB, data over AXI-Stream, and an interrupt line. A single-agent sequence can drive one of them. Something has to own the story across all three: program the registers, stream the data, notice the interrupt, clear it, and do it again with different numbers. That something is a virtual sequence, and this topic is about writing one well.
Explain why cross-agent ordering belongs in a virtual sequence and not in the test, and keep tests thin.
Wire a virtual sequencer, declare p_sequencer, and explain the DCLPSQ fatal you get when the types do not match.
Run a virtual sequence with no virtual sequencer at all, the way the bench's dma_vseq does, and say when that is the better choice.
Compose sequences from sub-sequences, run a sequence library, and predict exactly which sequence gets the sequencer under lock() and grab().
Build a translator sequence that turns upper-layer items into bus traffic, and a responder sequence that answers the DUT.
Read the left half as who decides the order and the right half as who decides the next bus access. The virtual sequence owns the first question. The sequencer's arbitration (Inside the Sequencer), and lock() or grab(), own the second. Most bugs in this topic come from mixing the two up.
Lesson | What it answers |
|---|---|
Why a DMA job needs one owner across three interfaces, and how that keeps tests thin. | |
The handle-bundle component, why handles are assigned in connect_phase, and null-handle defence. | |
What the macro expands to, the | |
Fork shapes, stopping a background sequence cleanly, layered vseqs, and who owns which sequence. | |
Composing sequences with the parent argument, and libraries that let the seed pick the sequence. | |
The bench's | |
Queue position, children of the holder, nested locks, deadlocks and killed lock holders, with a real log. | |
DMA jobs as upper-layer items, translated into APB writes and stream beats, and rebuilt by a monitor. | |
A responder that answers what a monitor saw: random TREADY backpressure on the DMA's output. |
Before you start, make sure the handshake between a sequence and a driver is solid: the driver loop is assumed throughout. Start with: The Coordination Problem.