Part 2 · Phases & Lifecycle · Intermediate

Phase Domains & Synchronization Hub

Hub — independent runtime schedules for subsystems, sync barriers across domains, use cases, cross-domain debug, and integration patterns.

Overview

By default every UVM component shares one phase domain — a single runtime schedule through reset/configure/main/shutdown. Complex SoCs sometimes need independent timelines : a power-managed island may reset and configure on a different schedule than the main fabric. uvm_domain gives a subtree its own copy of the runtime phase schedule; sync() creates rendezvous barriers so domains align when they must.

Sub-lessons in this topic

  1. phase-domain-concept — what a domain is and when you need one.

  2. multiple-domains-example — building two domains in one testbench.

  3. sync-points-barriers — uvm_domain::sync rendezvous mechanics.

  4. domain-use-cases — power islands, multi-clock subsystems, VIP timelines.

  5. cross-domain-debug — races, stuck sync, and phase trace interpretation.

  6. domains-sync-patterns — reusable templates and when to avoid domains.

Domain architecture map

diagram
[PHASE][UVM] default vs multi-domain

SINGLE DOMAIN (most testbenches):
  all components  uvm_domain (common)
  one runtime schedule, one phase pointer

MULTI-DOMAIN (advanced):
  main_env   common domain     (reset  main  shutdown)
  pmu_env    pmu_domain       (independent schedule)
                    │
                    └── sync() barriers at reset, main
systemverilog
function void build_phase(uvm_phase phase);
  super.build_phase(phase);
  pmu_env = pmu_env_c::type_id::create("pmu_env", this);
  uvm_domain pmu_dom = new("pmu_domain");
  pmu_env.set_domain(pmu_dom);
endfunction

Key takeaways

  • Domains give subtrees independent runtime phase schedules.

  • Use sync() to rendezvous domains that must align at specific phases.

  • Most block-level testbenches never need more than the default domain.

  • Domains add real complexity — reach for them only with decoupled timelines.

Common pitfalls

  • Using domains when careful objections on a single schedule would suffice.

  • Forgetting sync between domains that share hardware dependencies.

  • Assuming domains affect function phases — only runtime sub-phases are domain-scoped.


When domains earn their complexity

Reach for domains when subsystems have genuinely independent power/clock lifecycles. If two blocks simply start stimulus at different times, objections and sequences on one domain are usually enough.

diagram
[PHASE][UVM] decision tree

Need independent reset/configure cycles?
  NO   single domain + objections
  YES  candidate for separate domain

Domains must rendezvous before shared activity?
  YES  add sync() at reset and/or main
  NO   verify no hidden cross-domain dependencies