Part 7 · Environment & Tests · Intermediate
Scoreboard Env Wiring: Connect-Phase Contracts
Wiring monitor analysis ports into scoreboard exports in connect_phase with explicit and auditable contracts.
Wiring contracts
Keep scoreboard wiring centralized in env connect_phase so all data paths are reviewable and deterministic.
[ENV][UVM][CHECK] scoreboard wiring contract
required links:
ctrl_agt.mon.ap -> sb.ctrl_imp
req_agt.mon.ap -> sb.req_imp
rsp_agt.mon.ap -> sb.rsp_imp
err_agt.mon.ap -> sb.err_imp
reject:
conditional runtime connects
hidden helper-side reconnectsfunction void connect_phase(uvm_phase phase);
super.connect_phase(phase);
ctrl_agt.mon.ap.connect(sb.ctrl_imp);
req_agt.mon.ap.connect(sb.req_imp);
rsp_agt.mon.ap.connect(sb.rsp_imp);
err_agt.mon.ap.connect(sb.err_imp);
endfunctionEvery scoreboard input should map to exactly one monitor stream.
Connect code should be short, explicit, and discoverable.
Missing links should fail fast in smoke tests.
Key takeaways
Explicit wiring contracts prevent silent checker bypasses.
Connect-phase centralization improves code review effectiveness.
Common pitfalls
Using convenience wrappers that hide critical connects.
Deferring connectivity decisions to run_phase.
Applied Patterns
Pair connect statements with expected-link assertions so graph regressions are caught immediately.
[CHECK] link assertion pattern
expected_links = 4
actual_links = count_connects()
if actual != expected:
fatal with missing endpoint names
optional:
print full graph table in UVM_LOWfunction void assert_sb_links();
if (sb_link_count != 4)
`uvm_fatal("SB_WIRE",
$sformatf("scoreboard links expected=4 got=%0d", sb_link_count))
endfunctionAssertion failures should name missing endpoints explicitly.
Link-count checks are cheap and highly effective.
Run assertion before first sequence item is issued.
Integration Drilldown
Intentionally remove one connect and confirm the assertion pinpoints the exact missing edge.
[CHECK] missing-edge test
inject:
comment rsp_agt.mon -> sb.rsp_imp connect
expect:
startup fatal naming rsp endpoint
no deep-run false confidenceKey takeaways
Edge-removal tests validate checker wiring diagnostics.
Common pitfalls
Trusting full regressions without startup connectivity guards.