AMBA AXI · Module 16
UVM AXI Agent Overview
Assemble the driver, sequencer, and monitor into a reusable UVM AXI agent — the standard unit that bundles one interface's verification, switchable between active (drive + observe) and passive (observe-only), with an analysis port to scoreboard and coverage. The reuse boundary that makes AXI verification composable across environments.
The previous chapters built the pieces — a driver's stimulus (16.6), a passive monitor (16.3), a scoreboard (16.4), coverage (16.5), assertions (16.2). The UVM agent is the standard packaging that bundles the per-interface pieces — sequencer + driver + monitor — into one reusable unit. An agent is the reuse boundary of UVM verification: built once for an AXI interface, it drops into any environment, at any level, wherever that interface appears, and switches between active (drive + observe) and passive (observe-only) with a single mode setting. This chapter assembles the AXI agent: its three components and their connections, the active/passive modes, the configuration that controls it, and how it plugs into an environment's scoreboard and coverage — the composable unit that everything before it slots into.
1. The Three Components and the Agent Boundary
An AXI agent bundles exactly three components for one interface: a sequencer (arbitrates and feeds sequence items to the driver), a driver (drives the AXI signals from those items, honoring the handshake), and a monitor (passively observes the bus and reconstructs transactions). The agent is the unit — you don't place a sequencer, driver, and monitor individually; you instantiate the agent and configure it.
The agent's build_phase constructs its components, and its connect_phase wires the driver to the sequencer and exports the monitor's port:
class axi_agent extends uvm_agent;
`uvm_component_utils(axi_agent)
axi_sequencer sqr;
axi_driver drv;
axi_monitor mon;
uvm_analysis_port #(axi_txn) ap; // exported monitor port
function void build_phase(uvm_phase phase);
mon = axi_monitor::type_id::create("mon", this); // always built
if (get_is_active() == UVM_ACTIVE) begin // only if active
sqr = axi_sequencer::type_id::create("sqr", this);
drv = axi_driver::type_id::create("drv", this);
end
endfunction
function void connect_phase(uvm_phase phase);
ap = mon.ap; // export monitor's port
if (get_is_active() == UVM_ACTIVE)
drv.seq_item_port.connect(sqr.seq_item_export); // driver pulls from sequencer
endfunction
endclass2. Active vs. Passive
The agent's single most important configuration is its mode. An active agent builds all three components and drives the interface (sequencer + driver) while also observing (monitor) — used when the testbench is the source of traffic for that interface. A passive agent builds only the monitor and never drives — used to observe an interface that's driven by the real RTL (e.g. an internal interconnect port, or the DUT's own master). The same agent class serves both; the mode decides what it builds.
3. Configuration and the Reuse Boundary
An agent is parameterised/configured through a config object (set via uvm_config_db): its mode (active/passive), the virtual interface handle, and any protocol parameters (data width, ID width). This is what makes the agent the reuse boundary — the same agent code, configured differently, serves every AXI interface in the design. The interface protocol recurs everywhere (an AXI port appears in dozens of DUTs), so building the per-interface crew once as an agent and reusing it avoids re-implementing the protocol's interaction per project.
4. The Agent in the Environment
The agent plugs into a UVM environment: the env instantiates one or more agents (one per interface), and connects each agent's monitor analysis port to the scoreboard and coverage subscribers. The test, at the top, configures the env (sets agent modes, the vif handles) and runs sequences on the active agents' sequencers. The agent thus sits between the bus (its driver/monitor) and the env-level checking (its analysis port), encapsulating the interface so the env reasons in transactions, not signals.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
The UVM AXI agent is the standard packaging that bundles one interface's verification crew — sequencer + driver + monitor — into a single reusable component. The sequencer feeds items to the driver, the driver drives the AXI signals honoring the handshake, and the monitor passively observes and reconstructs transactions, exporting them on an analysis port. The agent's defining configuration is its mode: an active agent builds all three and drives + observes (testbench is the traffic source); a passive agent builds only the monitor and observes without driving (the RTL is the source, e.g. an internal node) — the same class, with get_is_active() gating construction. A config object (via uvm_config_db) sets mode, virtual interface, and width parameters, making the agent the reuse boundary: built once per protocol, instantiated and configured wherever that interface appears.
In the environment, the agent plugs in by exporting its monitor's analysis port to the env-level scoreboard and coverage, while the test configures the env and runs sequences on the active agents' sequencers — so checking stays outside the agent and the same agent can feed any set of checks. Agent bring-up bugs cluster at the seams (mode, connections, config), not the verified internals. The agent parallels the reusable RTL library (15.8): both encapsulate the recurring protocol work behind a configurable, composable unit and externalize the varying concern (checking for the agent, system composition for the library), enabling correct-by-composition assembly. Next, the final chapter shows how a commercial/open AXI VIP — essentially a pre-built, pre-verified agent plus checks — slots into exactly this structure.
10. What Comes Next
You can now assemble a reusable agent; the final chapter uses a pre-built one:
- 16.9 — Using AXI VIP (coming next) — how a commercial or open-source AXI Verification IP — essentially a pre-verified agent plus assertions and coverage — slots into the environment you've just learned to build.
Previous: 16.7 — Negative & Error-Injection Testing. Related: 16.3 — AXI Monitors for the monitor the agent bundles, 16.4 — AXI Scoreboards for the env-level checking the agent feeds, and 15.8 — Reusable AXI RTL Templates for the parallel reuse-boundary pattern in RTL.