Part 6 · Agents & Protocol IP · Intermediate
Transaction Reconstruction: Temporal Decode to Objects
Reconstructing complete transactions from multi-cycle protocol events using explicit state machines.
Stateful decode
Most protocols require partial capture across cycles. Use explicit monitor states and only publish once semantic completion is reached.
[MON] reconstruction states
IDLE -> CAPTURE -> COMPLETE
reset/abort returns to IDLE without publishtypedef enum {MON_IDLE, MON_CAP} mon_state_e;
mon_state_e st;
my_txn pending;
task run_phase(uvm_phase phase);
forever begin
@(posedge vif.clk);
if (!vif.rst_n) begin st = MON_IDLE; pending = null; continue; end
// collect and finalize pending transaction
end
endtaskOne semantic transfer should map to one published transaction.
Clear pending objects on reset and abort paths.
Normalize fields before publication for consistency.
Applied Patterns
This appendix consolidates reusable monitor patterns for enterprise-scale UVM environments where multiple teams share protocol VIP.
Use this as a quick implementation checklist before releasing monitor updates into regression branches.
[MON][UVM][AGT] reusable pattern grid
sampling:
accepted-handshake gating only
reconstruction:
key-based accumulator with completion predicate
publishing:
clone policy + counter instrumentation
debug:
boundary-first triage with deterministic smokefunction void monitor_health_report();
`uvm_info("MON_HEALTH",
$sformatf("sampled=%0d published=%0d dropped=%0d pending=%0d",
sampled_cnt, published_cnt, dropped_cnt, pending_cnt),
UVM_LOW)
endfunction[MON] review checklist
- passive contract verified
- reset/flush policy documented
- publish ownership policy documented
- consumer fan-out validated
- counters visible in report_phaseDesign monitor updates as API changes to downstream consumers, not local edits.
Keep monitor diagnostics always-on and low overhead for regression reliability.
Revalidate sample-to-publish boundary after every protocol extension.