Part 6 · Agents & Protocol IP · Intermediate

Agent Config Hub: Object Contract, Wiring, Validation, and Debug

Hub - cfg object architecture, config_db propagation, random policy constraints, per-field knob ergonomics, fail-fast validation, and debug playbooks.

Overview

A reusable agent needs a stable cfg contract. That contract drives topology , timing policy, checker policy, and debug visibility.

This topic treats configuration as architecture, not boilerplate: define a meaningful object model, wire it deterministically, validate it before behavior begins, and debug effective values through hierarchy.

Sub-lessons in this topic

  1. cfg-object-design - structuring config schema, defaults, and ownership.

  2. config-db-wiring - reliable set/get flow and child forwarding.

  3. rand-constraints-cfg - constrained random policy selection with replayability.

  4. per-field-knobs - orthogonal controls and semantics clarity.

  5. cfg-validation-checks - fail-fast legality and coherence checks.

  6. cfg-debug-patterns - triage strategy for propagation and interpretation bugs.

Configuration architecture map

diagram
Legend: [UVM] [AGT] [DRV] [TLM] [CFG]

[UVM] test/env
   |
   | create + populate [CFG]
   |   - mode
   |   - vif handles
   |   - policy knobs
   v
config_db::set(path="env.agt*", field="cfg")
   |
   v
[AGT] wrapper build_phase
   |
   | get cfg + validate + normalize
   | forward cfg to [DRV] and monitor
   v
[DRV] run uses cfg timing/flow controls
   |
   | handshake behavior on [TLM]
   v
sequence progression reflects configured policy
systemverilog
class my_agent_cfg extends uvm_object;
  `uvm_object_utils(my_agent_cfg)

  uvm_active_passive_enum is_active = UVM_ACTIVE;
  virtual my_if vif;

  int unsigned timeout_cycles = 256;
  bit enable_checks = 1;
  bit trace_cfg = 0;

  function new(string name = "my_agent_cfg");
    super.new(name);
  endfunction
endclass
diagram
[UVM][AGT][DRV][TLM] cfg lifecycle

build:
  create, randomize/assign, validate, distribute

connect:
  verify topology implied by mode knobs

run:
  treat cfg as policy source, not mutable state

report:
  emit effective cfg summary for replayability

Key takeaways

  • Config is the public integration API for reusable agents.

  • Object design, wiring, validation, and debug must be treated as one architecture.

  • Effective cfg visibility is mandatory for reproducible regressions.

  • Deterministic config flow reduces flaky debug loops across teams.

Common pitfalls

  • Treating cfg as ad-hoc globals instead of a typed contract.

  • Configuring via wildcards with hidden precedence interactions.

  • Skipping validation and discovering errors only after protocol traffic starts.

  • No effective cfg dump, making intent-vs-reality mismatches opaque.