What you practice
The ultimate AXI system: 2x2 capstone with UVM, SVA, and 100% coverage (5.7). Tune virtual-sequence constraints and arbitration to reach 100% LCOV in a 2-master × 2-slave system. It is in The Ultimate AXI System — Part 5 · SVA and System Integration of the AXI Masterclass. SVA protocol checkers, multi-master systems, and the capstone.
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 adjust virtual-sequence constraints and crossbar arbitration logic to ensure all AXI transaction corner cases (parallel masters, exclusive access, routing to both slaves) are exercised, enabling 100% line and branch coverage in the integrated system.
Learning objectives
- Adjust
axi_virtual_sequenceconstraints to cover all master contention and routing scenarios. - Fix the crossbar round-robin initialization and update logic to ensure fair arbitration.
- Run Verilator with
--coverageand verify 100% LCOV coverage after stimulus tuning. - Confirm UVM factory overrides and
coverage_lcovflag are enabled in the testbench.
Theory
This capstone integrates UVM verification, SystemVerilog Assertions (SVA), and a 2-master-to-2-slave AXI crossbar. Coverage closure requires covering:
- Parallel vs sequential transaction execution (
stress_parallelflag). - Access to both slaves (
hit_slave1flag). - Exclusive read transactions (
use_exclflag). - Crossbar arbitration fairness (round-robin turn updates on clashes).
| Signal | Purpose | Coverage Impact |
|---|---|---|
stress_parallel | Fork/join vs sequential execution | Ensures interleaved master contention |
hit_slave1 | Destination slave selection | Covers routing to both slaves |
use_excl | ARLOCK bit for exclusive access | Triggers SVA exclusive-monitor checks |
rr_turn | Crossbar arbitration state | Must toggle on clashes for branch coverage |
Practice
- Open this chapter in RtlStudio; confirm files appear in Explore (
student/tb/seq/axi_virtual_sequence.sv,student/rtl/axi_crossbar.sv,student/tb/tb_top.sv). - Edit
student/tb/seq/axi_virtual_sequence.svto complete theaddr_candburst_cconstraints inaxi_write_burst_sequsing the same pattern asaxi_read_burst_seq. - Edit
student/rtl/axi_crossbar.svto setrr_turnto1'b0on reset and update it to1'b1when master 0 wins a clash on slave 0 or slave 1. - Run Simulation and verify
INFO: PASSappears in the Log panel. - Open Synthesis and run to generate coverage data; check
sim/lcov.infofor 100% line coverage.
Summary
You practiced tuning virtual-sequence constraints to cover address routing and burst-length corners while fixing crossbar arbitration logic for fair round-robin behavior. By initializing rr_turn correctly and ensuring it toggles on contention, you enabled full coverage of parallel and sequential access patterns. This capstone confirmed 100% line coverage using UVM stimulus and SVA assertions on a 2x2 AXI crossbar system. Key takeaway: precise constraint control and state initialization are essential for closing coverage gaps in complex multi-master systems.
Run it in the Verilog IDE
- Open the lesson in the IDE and find the valid/ready or AXI channel ports in the editor.
- Simulate with Verilator. Confirm the beat on the VCD, not only in the transcript.
- Check that data moves only on the beats this lesson describes, and that backpressure holds the transfer.
- Synthesize the RTL master, slave, or buffer with Yosys. Leave the UVM bench out of synthesis.
The lesson is done when the simulation matches The ultimate AXI system: 2x2 capstone with UVM, SVA, and 100% coverage. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.