← Design Verification Interviews
Interview Question · Design
Coordinating Two Interfaces
The Question
The interviewer asks
Your DUT has an AXI host port and a UART. A test must configure it over AXI, then send UART traffic while AXI polls status. How do you structure the stimulus?
You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Use a virtual sequence: a sequence that drives no pins itself. It holds handles to the AXI and UART sequencers and starts ordinary agent sequences on them. First it runs the configuration sequence on AXI. Then it forks the UART traffic and the AXI status polling. The scenario lives in one place, and each agent's sequences stay reusable.
- Start together0 ns (illustrative)
Two start calls run in separate branches. The virtual sequence waits at join.
Follow the calls, values and waits
- call start(a): Virtual sequence → Lane a sequence
- call start(b): Virtual sequence → Lane b sequence
- Waiting: fork ... join — Waiting for both lanes
- One lane returns45 ns (illustrative)
Lane a has had both requests accepted. Lane b still owes its third request, so c cannot start yet.
Follow the calls, values and waits
- return a returned: Lane a sequence → fork ... join
- Waiting: fork ... join — Waiting for lane b
- The join releases75 ns (illustrative)
Lane b returns after 102 is accepted. Both branches are finished, so the next start call can run.
Follow the calls, values and waits
- return b returned: Lane b sequence → fork ... join
- call start(c): fork ... join → Then start c
- Released: fork ... join
- Stimulus is complete85 ns (illustrative)
The driver completes c when 200 is accepted. Its result is still inside the DUT; checking completion is a separate wait.
Read the diagram as text
- Virtual sequence: Start a and b in parallel
- Lane a sequence: 16 then 32; returns at 45 ns
- Lane b sequence: 100, 101, 102; returns at 75 ns
- fork ... join: Both child calls must return
- Then start c: Lane a accepts 200 at 85 ns
- Virtual sequence → Lane a sequence: start a
- Virtual sequence → Lane b sequence: start b
- Lane a sequence → fork ... join: a ends
- Lane b sequence → fork ... join: b ends
- fork ... join → Then start c: start c
Arrows show sequence calls and branch completion, not DUT wires. This driver calls item_done at acceptance; a returned sequence does not prove its results were checked.
class cfg_then_traffic extends uvm_sequence; // no item type: drives nothing
uvm_sequencer #(axi_item) axi_sqr;
uvm_sequencer #(uart_item) uart_sqr;
task body();
axi_cfg_seq cfg = axi_cfg_seq::type_id::create("cfg");
uart_rx_seq rx = uart_rx_seq::type_id::create("rx");
axi_poll_seq poll = axi_poll_seq::type_id::create("poll");
cfg.start(axi_sqr);
fork
rx.start(uart_sqr);
poll.start(axi_sqr);
join
endtask
endclassSelf-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer draws the virtual sequence above both agents. It keeps each agent's sequences unaware of the other agent.
What Interviewers Listen For (Senior)
A good senior answer chooses between a virtual sequencer and handles set by the test. It explains how the same sequence moves to a subsystem bench.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
WhyWhat IfProve ItCompareScale It
- Coordinating Two Interfaces
-
CompareVirtual Sequencer vs Handles in the SequenceL2 Mid-Level
Compare running a virtual sequence on a virtual sequencer with assigning sequencer handles to it directly.
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
With a virtual sequencer, the env builds a sequencer that only holds handles, and the sequence reaches them through
p_sequencer. That ties the sequence to one sequencer class. With direct handles, the test or a base sequence assigns them, and the sequence runs withstart(null). That is fewer classes, and the sequence works in any env that can supply the handles.Who Starts WhomArrows are start calls. API sequences belong to the agent; workers and the virtual sequence belong to the test library. Illustrative sequenceCallValueReturnWaiting- The test starts one thing
The test's
run_phasestarts the virtual sequence and waits for it. Choice, order and parallelism live there.Follow the calls, values and waits
- call vseq.start(null): Test → Virtual sequence
- Waiting: Test — in vseq.start
- Workers per interface
The virtual sequence starts a worker on each agent's sequencer. A worker composes small actions into a job.
Follow the calls, values and waits
- call start wrap_job on a_sqr: Virtual sequence → Worker: wrap_job
- call start B's worker on b_sqr: Virtual sequence → Worker on agent B
- Waiting: Virtual sequence — until its workers return
- API sequences do one thing
Each API sequence sends one protocol action: here one value from a range. The worker runs
write_hifirst.Follow the calls, values and waits
- call start write_hi: Worker: wrap_job → API: write_hi, write_wrap
- data item: x from 240 to 254: API: write_hi, write_wrap → Agent A sequencer
- Then the wrap case
The worker's second action is
write_wrap, which sends 255, whose result wraps to 0.Follow the calls, values and waits
- call start write_wrap: Worker: wrap_job → API: write_hi, write_wrap
- data item: x = 255: API: write_hi, write_wrap → Agent A sequencer
- Returns climb back up
When its last API sequence returns, the worker returns to the virtual sequence; when every worker is done, the virtual sequence returns to the test.
Follow the calls, values and waits
- return wrap_job returns: Worker: wrap_job → Virtual sequence
- return vseq returns: Virtual sequence → Test
- Released: Virtual sequence
- Released: Test
Read the diagram as text
- Test: run_phase starts one sequence
- Virtual sequence: Coordinates; sends no items
- Worker: wrap_job: Program a value, then the wrap case
- Worker on agent B: Another interface's job
- API: write_hi, write_wrap: One item each, in the agent package
- Agent A sequencer: Arbitrates the items
- Test → Virtual sequence: vseq.start(null)
- Virtual sequence → Worker: wrap_job: uvm_do(w, a_sqr)
- Virtual sequence → Worker on agent B: uvm_do(b, b_sqr)
- Worker: wrap_job → API: write_hi, write_wrap: uvm_do(hi)
- API: write_hi, write_wrap → Agent A sequencer: one item
Change a test by changing the upper layers; the API layer ships, unchanged, with the agent.
Self-Check
Tick each key point you covered in your answer.
Misconception
"
p_sequencerandm_sequencerare the same handle."m_sequenceris the generic base handle.p_sequenceris a typed handle that exists only if the sequence declares it with a macro.Source uvm-core 2020.3.1 (IEEE 1800.2 library) source, macros/uvm_sequence_defines.svh, `uvm_declare_p_sequencer
- The test starts one thing
-
WhyWhy a Virtual Sequence Can Start on NullL2 Mid-Level
Why can a virtual sequence run with
start(null)when it has no sequencer?2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
A virtual sequence sends no items itself. It only starts child sequences on real sequencers, through its handles. So it needs no sequencer of its own, and
start(null)just runs itsbody(). A child sequence is different, because it must send items through a sequencer.Self-Check
Tick each key point you covered in your answer.
Misconception
"A virtual sequence must run on a virtual sequencer."
It needs one only if it uses
p_sequencer. With handles assigned directly,start(null)is enough.Source Verification Academy, UVM Cookbook, Sequences: virtual sequencer (PDF p238)
-
What IfStarting Traffic Only After ConfigurationL2 Mid-Level
Asked if they fork everything at once
What if UART traffic must start only after the AXI write that enables the UART, not at time 0?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Put the order in the virtual sequence: run the configuration sequence to completion, then fork the traffic. When the trigger is inside another running sequence, share a
uvm_eventor a barrier. The AXI side triggers it after the enabling write, and the UART side waits on it.Three Arrivals at a Barrier with Threshold 3Three processes meet at a uvm_barrier. Arrows point from each process to the barrier:wait_for()travels along them, and the release comes back.Illustrative sequenceCallValueReturnWaiting- A arrives30 ns (illustrative)
A calls
wait_for(). One waiter is fewer than three, so A is parked.Follow the calls, values and waits
- call wait_for(): Process A → burst
- Waiting: Process A — parked
- B arrives37 ns (illustrative)
B is the second waiter and is parked too.
Follow the calls, values and waits
- call wait_for(): Process B → burst
- Waiting: Process B — parked
- C arrives55 ns (illustrative)
C prints
2 already waitingfromget_num_waiters(), then callswait_for()as the third arrival.Follow the calls, values and waits
- call wait_for(): Process C → burst
- All three pass55 ns (illustrative)
The threshold is reached, and the barrier releases all three in the same time step. Each prints
passed the barrierat 55 ns.Follow the calls, values and waits
- return release: burst → Process A
- return release: burst → Process B
- return release: burst → Process C
- Released: Process A
- Released: Process B
Read the diagram as text
- Process A: arrives at 30 ns
- Process B: arrives at 37 ns
- Process C: arrives at 55 ns
- burst: uvm_barrier, threshold 3
- Process A → burst: wait_for()
- Process B → burst: wait_for()
- Process C → burst: wait_for()
Nobody passes until the last party arrives; then everybody passes at once.
Self-Check
Tick each key point you covered in your answer.
Half-Truth
"Add
#1usbefore the UART sequence."A fixed delay breaks when configuration takes longer, and wastes time when it is short.
Source uvm-core 2020.3.1 (IEEE 1800.2 library) source, base/uvm_event.svh and base/uvm_barrier.svh
- A arrives30 ns (illustrative)
-
Prove ItSolve U5.3.1: A Background Sequence That Leaves Cleanly When KilledSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
-
Scale ItReusing Block Virtual Sequences at Subsystem LevelL3 Senior
How do you reuse the block's virtual sequences when the block becomes one of four in a subsystem bench?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Give each block virtual sequence its sequencer handles from outside, never by searching paths. The subsystem virtual sequence holds handles to each block environment's sequencers and starts the block sequences on them. Interfaces that become internal at subsystem level have no driver, so those agents turn passive and their sequences are not started.
Self-Check
Tick each key point you covered in your answer.
Wrong Altitude
"Copy the block sequences into the subsystem bench."
Copies drift apart. Starting the same classes with different handles keeps one source of truth.
Source Verification Academy, UVM Cookbook, Chaining virtual sequencers for vertical reuse (PDF p241)
What People Get Wrong
Common wrong answers and why they fail.
Misconception
"A virtual sequence drives pins through a virtual interface."
The two "virtual" words are unrelated. A virtual sequence drives nothing; it starts other sequences on real sequencers.
Source Accellera, UVM 1.1 User's Guide, §4.8 Virtual Sequences (PDF p77-78)
Half-Truth
"You must build a virtual sequencer to run one."
A virtual sequencer is one option. The Cookbook prefers assigning the sequencer handles to the sequence directly.
Source Verification Academy, UVM Cookbook, Sequences: virtual sequences and the alternative to a virtual sequencer (PDF p198, p237)
Wrong Altitude
"Let the AXI sequence start the UART sequence when it finishes."
That ties two agents together. Neither sequence can then be reused without the other.