← Design Verification Interviews
Interview Question · Concept
Frontdoor vs Backdoor Register Access
The Question
The interviewer asks
What is the difference between a frontdoor and a backdoor register access? When would you use each?
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
A frontdoor access runs a real bus transfer through the adapter and the agent. It takes clock cycles and tests the bus decode and the register logic. A backdoor access reads or writes the register storage directly, in zero time. Use the frontdoor to verify the registers themselves. Use the backdoor to set up state quickly, or to check a value without disturbing the bus.
- 60 ns: peek
peekcalls the backdoor'sread_func, which returnstb.dut.count= 3. No transfer and no side effect; the mirror records 3.Follow the calls, values and waits
- call peek(st, v): Test → regs.count
- call peek(st, v): regs.count → incr_backdoor
- return count = 3 (variable read): tb.dut.count → incr_backdoor
- return count = 3 (variable read): incr_backdoor → regs.count
- return count = 3 (variable read): regs.count → Test
- 70 ns: frontdoor read
The map sends an APB read of 0x0C to the driver, which puts it on the pins.
Follow the calls, values and waits
- call read(st, v), frontdoor: Test → regs.count
- call read(st, v), frontdoor: regs.count → map + apb_adapter
- data apb_item: read 0x0C: map + apb_adapter → APB driver
- data apb_item: read 0x0C: APB driver → tb.dut.count
- Waiting: Test — inside read() until 90 ns
- 85 ns: the design answers
The design returns 3 and clears COUNT at 85 ns.
Follow the calls, values and waits
- return prdata = 3: tb.dut.count → APB driver
- 90 ns: the read returns
The 3 travels back through the driver and the map. The access policy is
RC, so the mirror predicts 0.Follow the calls, values and waits
- return prdata = 3: APB driver → map + apb_adapter
- return v = 3, mirror predicts 0: map + apb_adapter → regs.count
- return v = 3, mirror predicts 0: regs.count → Test
- Released: Test
- 130 ns: backdoor read
The model reads 2 through the backdoor, sees the
RCpolicy and writes 0 back through the same backdoor, imitating the bus. The mirror keeps the 2 it read.Follow the calls, values and waits
- call read(st, v, UVM_BACKDOOR): Test → regs.count
- call read(st, v, UVM_BACKDOOR): regs.count → incr_backdoor
- return count = 2 (variable read): tb.dut.count → incr_backdoor
- data count = 0 (RC write-back): incr_backdoor → tb.dut.count
- return count = 2 (variable read): incr_backdoor → regs.count
- return count = 2 (variable read): regs.count → Test
- Both routes update one mirror
Each route ends by predicting the same register's mirror, but not always to the value now stored. After the frontdoor read the mirror is 0, like the design; after the backdoor read it is the 2 that was read, while the design holds 0.
Read the diagram as text
- Test: Calls read, peek, poke or write on regs.count
- regs.count: Register model: mirror and access policy RC
- map + apb_adapter: Address 0x0C; builds an apb_item
- APB driver: Setup and access phase, 30 ns
- incr_backdoor: read_func and write use hierarchical references
- tb.dut.count: The design's storage; a bus read clears it
- Test → regs.count: register call
- regs.count → map + apb_adapter: UVM_FRONTDOOR
- map + apb_adapter → APB driver: apb_item
- APB driver → tb.dut.count: APB transfer
- regs.count → incr_backdoor: UVM_BACKDOOR, peek, poke
- incr_backdoor → tb.dut.count: reads or assigns the variable
The route decides whether the design sees an access, and which value the mirror records. The register object is the same either way.
Frontdoor
regs.ctrl.write(status, 8'h5a);
Bus cycles; tests decode, byte lanes and side effects
Backdoor
regs.ctrl.poke(status, 8'h5a);
Zero time; touches only the storage
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer names one thing a backdoor cannot test, such as address decode. It also names one place where the backdoor saves time.
What Interviewers Listen For (Mid-Level)
A good mid-level answer says that logic which reacts to a bus write never runs on a backdoor write. It adds that the HDL path itself needs checking.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
What IfProve ItBreak ItCompareScale It
- Frontdoor vs Backdoor Register Access
-
CompareHow Each Door Updates the MirrorL2 Mid-Level
Compare how the mirror is updated after a frontdoor access and after a backdoor access.
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 backdoor access always updates the mirror, because the model knows the exact value it deposited or read. A frontdoor access updates it only through auto-prediction or through a predictor watching the bus. So a frontdoor write with neither one leaves the mirror stale.
Self-Check
Tick each key point you covered in your answer.
-
What IfDid the Write Land in the Right Register?L1 JuniorL2 Mid-Level
What if a frontdoor write seems to work, but you suspect it went to the wrong register?
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
Write through the frontdoor, then
peek()the intended register through the backdoor. Peek its neighbours too. If the value landed somewhere else, the address decode is wrong. The built-inuvm_reg_access_seqdoes this for every register: it writes one way and reads the other.Self-Check
Tick each key point you covered in your answer.
-
Break ItA Backdoor That Reads the Wrong SignalL2 Mid-Level
How can a backdoor check pass while the register is broken?
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 the HDL path points at the wrong signal, such as the next-state value instead of the flop. The backdoor then reads what it expects.
uvm_reg_mem_hdl_paths_seqonly checks that each path exists. A wrong path that exists still passes it. Only a frontdoor and backdoor comparison, such as the access test, catches it.Self-Check
Tick each key point you covered in your answer.
Misconception
"The HDL path sequence proves the backdoor is right."
It checks that the path can be accessed, not that it names the register's storage. An existing but wrong signal passes.
Source uvm-core 2020.3.1 (IEEE 1800.2 library) source, reg/sequences/uvm_reg_mem_hdl_paths_seq.svh (uvm_hdl_check_path)
-
Scale ItBackdoor Paths in Gate-Level SimulationL3 Senior
Scale it: what happens to backdoor paths when the same tests run on the gate-level netlist?
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
Synthesis renames, flattens or merges register signals, so the RTL paths no longer exist. Teams either keep a second path map for the netlist, under its own HDL path kind, or use only the frontdoor there. Plan this before the netlist arrives, because a broken backdoor makes many tests fail at once.
Self-Check
Tick each key point you covered in your answer.
-
Prove ItSolve U14.2.1: The Overflow Flag That Would Not Stay SetSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
What People Get Wrong
Common wrong answers and why they fail.
Misconception
"A backdoor write behaves exactly like a bus write."
It deposits bits into the storage. Logic that reacts to a bus write, such as starting a transfer, never runs. The model can apply a field policy, but the design never sees a write.
Source Verification Academy, UVM Cookbook, Registers: frontdoor and backdoor trade-offs (PDF p362)
Half-Truth
"Use the backdoor everywhere; it is faster."
Then the bus path is never tested. A wrong address decode or byte lane passes every test, because no test used them.
Tool as Truth
"A backdoor works the same on every simulator."
The default backdoor uses the simulator's HDL access routines. Some tools lack them or need switches. On this site's Verilator runner they are stubs, so lesson U14.1 writes its own backdoor class.
Source Lesson U14.1 review claims: uvm_hdl_deposit and uvm_hdl_read are stubbed on the Verilator runner