← Design Verification Interviews
Interview Question · Concept
Choosing a Reference Model
The Question
The interviewer asks
Your scoreboard needs expected results for a complex block. When do you use a transaction-level predictor, a C model through DPI, or a cycle-accurate model?
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 an untimed transaction-level predictor in SystemVerilog when the function is clear and timing is not the point. Use a C or C++ model through DPI when the architects already have one, such as a codec. Avoid a cycle-accurate model unless timing itself is the specification. It copies the RTL so closely that it can copy the RTL's bugs. Whoever writes the model should work from the spec, not from the RTL.
Read the diagram as text
- Is the data transformed?: Modes, arithmetic, encodings
- Write, read back, compare: Assumes data comes back unchanged
- Does history matter?: Modes, state, earlier inputs
- Transfer function: One expression in the predictor
- Is timing the question?: Latency, cycle order
- Untimed model: SV class or C over DPI
- Timing check: Cycle-accurate model or latency meter
- Is the data transformed? → Write, read back, compare: no
- Is the data transformed? → Does history matter?: yes
- Does history matter? → Transfer function: no
- Does history matter? → Is timing the question?: yes
- Is timing the question? → Untimed model: no
- Is timing the question? → Timing check: yes
Most outputs need two answers: an untimed model for values plus a timing check. For a whole processor subsystem, an ISS or virtual platform.
| Model | Good for | Cost |
|---|---|---|
| Untimed SV predictor | Clear functions; quick to write | Needs sync points with the DUT |
| C/C++ model via DPI | Algorithms the architects already modelled | Wrapper, type mapping, error cases missing |
| Cycle-accurate model | Timing that is itself the spec | Slow to write; breaks on legal RTL changes |
Pick the lowest abstraction that still checks what the spec defines.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Senior)
A good senior answer picks the kind of model from what the spec defines. It says who should write the model, and why that person must work from the spec.
What Interviewers Listen For (Staff)
A good staff answer weighs what the model costs against the schedule. It plans the sync points, and keeps a cheaper checker for early RTL.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
What IfProve ItBreak ItCompareScale It
- Choosing a Reference Model
-
CompareComparing an Untimed Model with Timed RTLL3 Senior
An untimed model produces results at once, but the DUT takes many cycles. How do you compare them?
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
Compare at sync points that both sides define: the end of a transaction, a frame or an interrupt. The model pushes its expected result into a queue as soon as it sees the input. The scoreboard compares when the DUT's output for that point appears. Nothing between sync points is compared.
Ask at the Input, Compare at the OutputArrows from the left are monitor writes; the model is a function call; the queue holds predictions. Illustrative sequenceCallValueReturnWaiting- 15 ns
The data beat 10 is answered in mode 0 at once: 11 waits in the queue.
Follow the calls, values and waits
- call step(10): Data beat taken → alu_model
- data prediction 11: alu_model → expected[$]
- 25 ns
The beat 20 is answered the same way: 21 joins 11 in the queue.
Follow the calls, values and waits
- call step(20): Data beat taken → alu_model
- data prediction 21: alu_model → expected[$]
- 35 ns
The mode beat reaches the model at the same event the design acts on. Earlier answers are already queued.
Follow the calls, values and waits
- call set_mode(1): Mode beat taken → alu_model
- 45 ns
The result for 10 pops 11, which was computed in mode 0. With
late = 1the model would be asked now, in mode 1, and say 20.Follow the calls, values and waits
- data observed y=11: Result seen → write_out
- data prediction 11: expected[$] → write_out
Read the diagram as text
- Data beat taken: 10 at 15 ns, 20 at 25 ns
- Mode beat taken: mode 1 at 35 ns
- alu_model: step(x) or set_mode(m), no time
- expected[$]: 11, 21 waiting
- Result seen: 11 at 45 ns
- write_out: Pop the oldest, compare
- Data beat taken → alu_model: step(x)
- Mode beat taken → alu_model: set_mode
- alu_model → expected[$]: push
- Result seen → write_out: write
- expected[$] → write_out: pop
Data and mode reach the model in the order the design took them; the queue carries answers across the 30 ns latency.
Self-Check
Tick each key point you covered in your answer.
- 15 ns
-
Break ItA Sync Point That Hides a BugL3 Senior
How does a badly chosen sync point hide a bug?
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
Say you compare only at the end of a frame. A wrong value in the middle, later overwritten by the DUT, is never seen. Choose sync points where the value is visible to software or to the next block. Add assertions for the rules between them.
Self-Check
Tick each key point you covered in your answer.
-
Prove ItSolve U9.3.1: Three Channels and a Model That DisagreesSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
-
What IfWhat Breaks at the DPI BoundaryL3 Senior
Asked if they choose a C model
What breaks most often at the DPI boundary of a C reference model?
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
Type mapping and memory ownership. A 4-state value passed to an
intargument loses its X and Z bits. A C function that keeps a pointer to SystemVerilog data after the call may read freed memory. Keep the interface to simple 2-state types or packed arrays, and copy data during the call.One Beat Across the Language BoundaryArrows are calls and returns for one input beat, x = 200, sent to a C model through DPI. The value changes sign at the import, not inside either model. Illustrative sequenceCallValueReturnWaiting- SystemVerilog side65 ns (illustrative)
The scoreboard calls the wrapper exactly as it called the SV model.
Follow the calls, values and waits
- data op_item x = 200 (c8): Input monitor → write_in
- call model.step(200): write_in → SV wrapper
- The boundary65 ns (illustrative)
input byteis signed: c8 crosses as -56. The call takes no simulation time.Follow the calls, values and waits
- call alu_model_step(h, 8'hc8): SV wrapper → input byte
- call step(h, x = -56): input byte → model.c
- Back again65 ns (illustrative)
C halves -56 to -28 and returns it as the unsigned value 228. The wrapper narrows it to e4, and the scoreboard queues that prediction.
Follow the calls, values and waits
- return returns 228, queued as e4: model.c → expected[$]
- Waiting: expected[$] — e4 waits for the result
- The result appears95 ns (illustrative)
The design's 100 meets the queued e4: a mismatch, although each model is right about its own input.
Follow the calls, values and waits
- data expected e4: expected[$] → write_out
- Released: expected[$]
Read the diagram as text
- Input monitor: op_item x = 200 (c8)
- write_in: model.step(t.x)
- SV wrapper: alu_model_step(h, x)
- input byte: c8 arrives as char -56
- model.c: mode 2: -56 >> 1 = -28
- expected[$]: int 228 narrowed to e4
- write_out: design y = 100: mismatch
- Input monitor → write_in: write
- write_in → SV wrapper: call
- SV wrapper → input byte: import call
- input byte → model.c: C call
- model.c → expected[$]: return
- expected[$] → write_out: pop, 30 ns later
Both models are right about their own inputs; the hand-off type is wrong.
Self-Check
Tick each key point you covered in your answer.
Misconception
"The C model can keep a pointer to the SystemVerilog array for the next call."
Pointers to argument data are valid only during the call. The simulator may move or reuse that memory afterwards.
Source IEEE 1800-2017 Annex H, C layer rules for pointers to actual arguments
- SystemVerilog side65 ns (illustrative)
-
Scale ItOne Reference Model from Block to ChipL3 SeniorL4 Staff
Scale it: how do you reuse the same model from block level up to the full chip?
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
Keep the model behind a transaction interface with no pins and no clocks. At block level, the block's monitors feed it. At chip level, the same model listens to monitors on the chip boundary or to an internal passive agent. Only the connections change, so the model's own bugs are found once.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Staff)
A good staff answer defines the model's transaction interface before the block bench exists. Then reusing the model at chip level costs only wiring.
What People Get Wrong
Common wrong answers and why they fail.
Buzzword Without Mechanism
"Use a golden model."
That names an object, not a choice. The interviewer wants the level of abstraction, where results are compared, and who keeps the model right.
Misconception
"A cycle-accurate model is always the safest."
To match cycle by cycle, it is often written by reading the RTL. A shared misreading of the spec then passes in both, and every legal timing change breaks the model.
Source Lesson U9.1 review claims (choosing the checking strategy)
Half-Truth
"A DPI model is free because the C code already exists."
You still write the wrapper, the type mapping and the sync logic. Algorithm models also skip error cases, so the bench needs its own checks there.