UVM Coding Practice · Senior

Find config_db Mismatch

Broken top.sv wrong path — verbal debug worksheet.

Triage worksheet (say aloud before opening code)

  1. Symptom: Driver never wiggles bus — no PSEL/PENABLE activity

  2. Hypothesis list — config_db, objections, TLM connect, factory, seq not started

  3. Minimal experiment — dump, topology print, one UVM_INFO probe

  4. Root cause statement in one sentence

  5. Fix + regression hook

Interview prompt

Driver never wiggles bus — list hypotheses before opening code.

diagram
WHITEBOARD CHAIN

1. DECLARE    interfaces / types / ports you need
2. SKELETON   class extends + utils macro + key methods
3. MECHANISM  fill one critical method while narrating
4. PITFALL    name one bug juniors make on this pattern
5. TEST       how you would smoke-test the component

Buggy snippet — critique verbally

systemverilog
// top.sv
uvm_config_db#(apb_vif)::set(this, "env.master", "vif", vif);
// agent path is env.agent.m_driver — get fails

Answer

Path mismatch: set env.agent* or match get path. Run uvm_config_db::dump() in agent build_phase.

Mechanism to narrate

  • Null vif → driver waits forever on clock edge

  • dump() shows set vs get paths side by side

  • Fix: uvm_config_db::set(this, "env.agent*", "vif", vif)

Smoke test (5 minutes)

  • Fix path — one transaction on bus.

  • Add dump in agent build if get fails.

Code lab drill

After reading, try Code lab exercise uvm-l9-bug-config — topic reference: /topics/uvm/coding-practice/debug-broken-tb/find-config-db-mismatch