Part 7 · Environment & Tests · Intermediate
Env Checking Pipeline: Stage-Based Compare Architecture
Structuring checking into staged pipeline blocks for normalization, correlation, compare, and diagnostics at environment scale.
Stage architecture
Large projects benefit from explicit checker stages. Stage boundaries make ownership, performance, and debug responsibilities clear.
[ENV][UVM][CHECK] pipeline stages
stage 0: ingest
stage 1: normalize
stage 2: correlate
stage 3: compare
stage 4: classify + report
for each stage:
input counter
output counter
drop/reject reason counterfunction txn pipeline_normalize(txn in);
txn out = in.clone();
out.addr = out.addr & 'hFFFF;
out.byte_en = sanitize_be(out.byte_en);
norm_hits++;
return out;
endfunctionStage counters localize failures immediately.
Normalization logic should be pure and deterministic.
Stage ownership can be split across team members safely.
Key takeaways
Pipelines scale checker complexity without losing debug clarity.
Countered stage boundaries make regressions observable.
Common pitfalls
Monolithic compare functions with hidden preprocessing.
No stage-level counters, forcing wave-only debug.
Applied Patterns
Capture stage transition metadata so each mismatch includes full provenance.
[CHECK] provenance fields
txn.debug.stage0_time
txn.debug.stage1_time
txn.debug.stage2_time
txn.debug.stage3_time
txn.debug.source_stream
txn.debug.correlation_id
diagnostic policy:
include provenance in all mismatch reportsfunction void stamp_stage(txn t, string stage_name);
t.debug.last_stage = stage_name;
t.debug.last_time = $time;
endfunctionProvenance data converts vague mismatches into actionable reports.
Keep provenance lightweight to avoid throughput impact.
Standardize stage names across scoreboards.
Integration Drilldown
Run stage-isolation tests that bypass one stage at a time and verify expected failure signatures.
[CHECK] stage isolation
test A: bypass normalize
expect format mismatches
test B: bypass correlate
expect missing-pair errors
test C: bypass compare
expect suspiciously zero mismatches warningKey takeaways
Stage isolation proves each pipeline block is genuinely active.
Common pitfalls
Assuming stage enable flags work without targeted tests.