Part 7 · Environment & Tests · Intermediate
Connect-Phase Wiring: Legal Graphs and Fan-Out Hygiene
Connecting analysis ports, exports, and sequencer links in connect_phase with deterministic fan-out and zero hidden wiring.
Wiring discipline
All structural connectivity should be visible in connect_phase. Avoid delayed or conditional runtime wiring that creates hidden modes.
[ENV][UVM][CHECK] connect graph
ctrl_agt.mon.ap ---- +--> sb.exp_ctrl
data_agt[0].mon.ap --+--> sb.exp_data
data_agt[1].mon.ap --+--> cov.sub_data
v_sqr.ctrl_sqr_h = ctrl_agt.sqr
v_sqr.data_sqr_h = data_agt[0].sqr
all links established in connect_phasefunction void connect_phase(uvm_phase phase);
super.connect_phase(phase);
ctrl_agt.mon.ap.connect(sb.ctrl_exp);
foreach (data_agts[i]) begin
data_agts[i].mon.ap.connect(sb.data_exp[i]);
data_agts[i].mon.ap.connect(cov.data_imp[i]);
end
v_sqr.ctrl_sqr_h = ctrl_agt.sqr;
v_sqr.data_sqr_h = data_agts[0].sqr;
endfunctionConnect graph should be searchable and centralized.
Fan-out is acceptable when ownership and ordering are explicit.
Avoid runtime reconnect behavior unless protocol mandates it.
Key takeaways
Deterministic connect_phase logic is the backbone of stable checker pipelines.
A readable graph cuts integration debug time dramatically.
Common pitfalls
Conditional connect logic tied to random scenario knobs.
Invisible reconnects in run_phase that bypass review.
Applied Patterns
Use a graph inventory helper to verify all expected links are present before stimulus starts.
[ENV] graph inventory
required links:
ctrl monitor -> sb
each data monitor -> sb
each data monitor -> cov
v_sqr handles -> active sequencers
audit:
count expected links
count actual links
print missing endpointsfunction void assert_connectivity();
if (ap_link_count != expected_ap_links)
`uvm_fatal("WIRING",
$sformatf("ap links mismatch exp=%0d got=%0d",
expected_ap_links, ap_link_count))
endfunctionConnectivity assertions catch silent no-check regressions.
Graph inventory belongs in env utilities, not tests.
Treat link count deltas as first-class review items.
Integration Drilldown
Probe each analysis endpoint with a known transaction and confirm all subscribers increment counters.
[CHECK] endpoint probe recipe
inject txn tag=CONNECT_SMOKE
expect:
sb.ctrl_hits/data_hits updated
cov bins sampled
no duplicate counts beyond expected fanoutKey takeaways
Endpoint probes prove fan-out correctness without full regressions.
Common pitfalls
Assuming checker paths are live because monitor logs appear.