UVM Coding Practice · Senior

Analysis Port Fanout

One monitor port to scoreboard and coverage.

Interview prompt

Connect monitor analysis port to scoreboard and subscriber — draw diagram.

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

Reference sketch (≤40 lines)

systemverilog
// env connect_phase
agent.mon.ap.connect(sb.act_imp);
agent.mon.ap.connect(cov_sub.analysis_export);
// monitor side
uvm_analysis_port #(txn) ap;

Mechanism to narrate

  • Monitor calls ap.write(txn) once per completed beat

  • Each subscriber write() runs in same simulation thread

  • Order: scoreboard then coverage — document if order matters

Code lab drill

After reading, try Code lab exercise uvm-l8-int-tlm-fanout — topic reference: /topics/uvm/coding-practice/tlm-analysis/analysis-port-fanout

Smoke test (5 minutes)

  • One bus beat → UVM_INFO from scoreboard and subscriber.

  • print_topology shows two connects from mon.ap.

Common pitfalls

  • Forgot export on subscriber.

  • Dangling unconnected imp.

  • Connecting port to port directly.