UVM Coding Practice · Senior
Reusable VIP Integration
Wrapping commercial or internal VIP.
Interview prompt
Integrate third-party AXI VIP without modifying VIP — sketch wrapper.
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 componentReference sketch (≤40 lines)
systemverilog
class axi_env_wrapper extends uvm_env;
axi_vip_agent vip; // vendor — do not edit
my_scoreboard sb;
function void build_phase(uvm_phase phase);
vip = axi_vip_agent::type_id::create("vip", this);
sb = my_scoreboard::type_id::create("sb", this);
uvm_config_db#(axi_cfg)::set(this, "vip*", "cfg", cfg);
endfunction
function void connect_phase(uvm_phase phase);
vip.monitor.ap.connect(sb.act_imp);
endfunction
endclasscfg object via config_db, monitor export to scoreboard — never fork vendor RTL/VIP source.
Mechanism to narrate
Wrapper env owns VIP + your check components
Push VIP cfg through config_db with VIP-documented field names
Your scoreboard subscribes to VIP monitor analysis port
Common pitfalls
Modify VIP internals.
Hardcode VIP paths in test.
Skip VIP cfg object.