DescriptionQ316
Q316DVASIC interview problem
Verify a return-stack trace validator
TechniquesDVTwo stream agentsStackID correlationError injection
DifficultyMedium
TopicUVM Components
LanguageSystemVerilog
Requirements4 checkpoints
01
Problem
Write the format and stack oracle for a validator fed by two independent Universal Verification Methodology (UVM) stream agents, one for push traces and one for pop traces. Equal transaction IDs identify the pair.
Example input and output
Use this case to check your interpretationInput
id7 push frame=[A,B,C]; id7 pop frame=[C,B,A], with either half allowed to arrive firstOutput
format_error=0; sequence_valid=1; first_bad_index=0Explanation
Both halves have equal unique value sets, and simulating the stack reproduces every pop in order.
02
Requirements (4)
- Accept two already assembled 1-to-16-value queues belonging to the same ID and predict format_error for overlength, unequal lengths, duplicate values, or unequal value sets.
- For a well-formed pair, simulate a stack and return sequence_valid or the first impossible pop index.
- Perform all format checks before stack simulation so malformed input is not mislabeled as a legal but impossible sequence.
- Treat frame assembly, four-ID pairing, missing-mate watchdogs, response matching, and reset epochs as follow-up scoreboard architecture.
