RTL Studio Open IDE

2.3 · AXI CLASS

AXI monitor and scoreboard: sample bus and compare registers

Passively sample the bus and verify register reads/writes with monitor and scoreboard.

Watch on YouTube

What you practice

AXI monitor and scoreboard: sample bus and compare registers (2.3). Passively sample the bus and verify register reads/writes with monitor and scoreboard. It is in AXI Monitor and Scoreboard — Part 2 · AXI4-Lite UVM Verification of the AXI Masterclass. Verify the AXI4-Lite DUT with UVM and RAL.

AXI only counts when the handshake simulates. RTL Studio is the Verilog and SystemVerilog IDE where you edit the RTL and prove each beat on a VCD.

What you will learn

Today you will implement a UVM monitor to passively sample AXI4-Lite transactions and a scoreboard to compare actual bus activity against expected register values, enabling passive verification of register reads and writes.

Learning objectives

  • Implement an axi_monitor class to sample AXI4-Lite write and read channels.
  • Implement an axi_scoreboard class to track expected register values and compare against monitored data.
  • Connect the monitor’s analysis port to the scoreboard via an analysis subscriber.
  • Verify correct operation by observing INFO: log lines and INFO: PASS in simulation.

Theory

UVM monitors capture live interface activity without modifying the DUT, forwarding sampled transactions to a scoreboard via an uvm_analysis_port. Scoreboards maintain expected state (e.g., register values) and compare it with actual behavior.

ComponentRole
uvm_monitorObserves interface signals; samples valid transactions; exports via analysis_port.
uvm_scoreboardCompares actual vs expected data; maintains expected state (e.g., exp_by_addr map).
uvm_subscriberActs as analysis port sink; forwards items to scoreboard’s FIFO.

The monitor samples awvalid/awready, wvalid/wready, arvalid/arready, and rvalid/rready handshake pairs. Writes store data in a register map; reads compare against the stored value.

Practice

Open RtlStudio and select this chapter. Files appear in Explore; edit only student/ files.

  1. Open student/tb/env/axi_monitor.sv.

In the run_phase task, complete the write sampling logic: - Set is_write = 1'b1 for write transactions. - Capture addr from lat_awaddr (last write address). - Capture data from vif.wdata. - Capture wstrb from vif.wstrb.

  1. Open student/tb/env/axi_scoreboard.sv.

No changes needed — the reference implementation already compares writes and reads correctly.

  1. Open student/tb/env/axi_env.sv.

Ensure mon.ap.connect(sb_sink) is present in connect_phase.

  1. Run Simulation.

Summary

You implemented an AXI4-Lite monitor to passively sample bus transactions and export them via an analysis port. You built a scoreboard to compare sampled data against expected register values for CTRL, STAT, and DATA. Wiring the monitor’s analysis port to the scoreboard enabled real-time verification of register behavior. The key takeaway is how UVM components collaborate to validate protocol compliance and register-level functionality in a verification environment.

Run it in the Verilog IDE

  1. Open the lesson in the IDE and find the valid/ready or AXI channel ports in the editor.
  2. Simulate with Verilator. Confirm the beat on the VCD, not only in the transcript.
  3. Check that data moves only on the beats this lesson describes, and that backpressure holds the transfer.
  4. Synthesize the RTL master, slave, or buffer with Yosys. Leave the UVM bench out of synthesis.

The lesson is done when the simulation matches AXI monitor and scoreboard: sample bus and compare registers. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.