Part 2 · Phases & Lifecycle · Intermediate
Cross-Domain Debug: Races, Stuck Sync, Phase Trace
Systematic triage for cross-domain ordering bugs, sync deadlocks, and interpreting +UVM_PHASE_TRACE with multiple domains.
Symptom catalog
Simulation hangs at sync barrier
One domain never reaches the sync target phase — objection leak in lagging domain.
Circular sync graph — domain A waits for B, B waits for A.
Target phase typo — syncing at wrong phase name.
Race-like functional failures
Traffic sent before synced reset completes on peer domain.
Missing sync at configure — register programming races.
Assuming global reset_phase completion when only common domain finished.
simv +UVM_PHASE_TRACE +UVM_OBJECTION_TRACE +UVM_VERBOSITY=UVM_MEDIUMPhase trace interpretation
[PHASE][UVM] reading multi-domain trace
look for interleaved entries:
[PHASE] axi_agent.reset_phase START (domain=common)
[PHASE] pmu_agent.reset_phase START (domain=pmu_domain)
...
[SYNC] waiting at reset_phase for pmu_domain
[PHASE] pmu_agent.reset_phase END
[SYNC] barrier releasedTag log messages with domain name in custom components.
Compare phase START/END pairs per domain for leaks.
If sync never releases, find the domain that never reaches target.
Key takeaways
+UVM_PHASE_TRACE is essential for multi-domain debug.
Stuck sync almost always means one domain did not reach the barrier.
Race bugs mean missing or misplaced sync, not random simulator behavior.
Common pitfalls
Removing all sync to 'fix' hang without fixing root dependency.
Debugging with waveforms only — phase trace shows domain interleaving.
Isolation procedure
Run each domain's subtree in single-domain mode (sanity baseline).
Add sync one barrier at a time.
After each sync, rerun phase trace and confirm release.
Re-enable cross-domain traffic only after reset sync passes.