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

  1. One domain never reaches the sync target phase — objection leak in lagging domain.

  2. Circular sync graph — domain A waits for B, B waits for A.

  3. Target phase typo — syncing at wrong phase name.

Race-like functional failures

  1. Traffic sent before synced reset completes on peer domain.

  2. Missing sync at configure — register programming races.

  3. Assuming global reset_phase completion when only common domain finished.

bash
simv +UVM_PHASE_TRACE +UVM_OBJECTION_TRACE +UVM_VERBOSITY=UVM_MEDIUM

Phase trace interpretation

diagram
[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 released
  • Tag 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

  1. Run each domain's subtree in single-domain mode (sanity baseline).

  2. Add sync one barrier at a time.

  3. After each sync, rerun phase trace and confirm release.

  4. Re-enable cross-domain traffic only after reset sync passes.