Part 7 · Environment & Tests · Intermediate

Passive/Active Mix: Per-Instance Activity Policy

Combining active and passive agents in one environment with clear policy ownership and predictable virtual sequence behavior.

Activity policy model

Mixed activity is common: one control agent drives stimulus while mirrored interfaces stay passive for observation.

diagram
[ENV][UVM][CHECK] mixed-activity map

ctrl_agt      : active
data_agt[0]   : active
data_agt[1]   : passive
trace_agt     : passive

virtual sequence rules:
  start only active sequencers
  still consume all monitor outputs
  keep checker expectations mode-aware
systemverilog
function void apply_activity_policy(env_cfg cfg);
  ctrl_agt.set_is_active(cfg.ctrl_active ? UVM_ACTIVE : UVM_PASSIVE);
  foreach (data_agts[i]) begin
    data_agts[i].set_is_active(
      cfg.data_active_mask[i] ? UVM_ACTIVE : UVM_PASSIVE
    );
  end
endfunction
  • Centralize activity policy in one config object.

  • Virtual sequences should discover active handles dynamically.

  • Passive agents still provide essential observed-truth streams.

Key takeaways

  • Activity policy is a first-class contract between tests and env.

  • Mixed modes increase reuse when policy remains explicit and logged.

Common pitfalls

  • Hardcoding active assumptions in virtual sequences.

  • Disabling monitors in passive mode and losing observability.


Applied Patterns

Use mode matrices to validate that checks remain meaningful across all activity combinations.

diagram
[ENV] activity matrix

mode | ctrl | data0 | data1 | expected checks
-----+------+-------+-------+-------------------------
A    | act  | act   | act   | full end-to-end
B    | act  | act   | pas   | one-sided comparison
C    | act  | pas   | pas   | control-only checks
D    | pas  | pas   | pas   | monitor-liveness only

all modes must compile and smoke
systemverilog
function void report_activity();
  `uvm_info("ACT_MODE",
    $sformatf("ctrl=%s data0=%s data1=%s",
      ctrl_agt.is_active() ? "A" : "P",
      data_agts[0].is_active() ? "A" : "P",
      data_agts[1].is_active() ? "A" : "P"),
    UVM_LOW)
endfunction
  • Matrix-based smoke tests expose hidden active assumptions quickly.

  • Checker expectations should annotate mode-specific behavior.

  • Keep passive-mode checks lightweight but non-zero.


Integration Drilldown

Run the same seed across two modes and diff checker counters to verify expected deltas only.

diagram
[CHECK] mode delta audit

seed S:
  run mode A -> collect counters
  run mode C -> collect counters

allowed deltas:
  sequence-driven paths reduced
  monitor-only paths unchanged

Key takeaways

  • Counter diffs make mode regressions obvious and reviewable.

Common pitfalls

  • Comparing waves manually instead of using counter deltas.