RTL Studio Open IDE

5.6 · AXI CLASS

AXI exclusive access: ARLOCK and EXOKAY response handling

Implement and verify exclusive access with ARLOCK and EXOKAY handling.

Video coming soon. This lesson page stays at the same URL when the lecture publishes.

What you practice

AXI exclusive access: ARLOCK and EXOKAY response handling (5.6). Implement and verify exclusive access with ARLOCK and EXOKAY handling. It is in AXI Exclusive Access — 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 learn how to assert the ARLOCK signal to request an atomic exclusive read-modify-write sequence on the AXI bus and verify that the slave correctly responds with EXOKAY on the RRESP channel.

Learning objectives

  • Understand the purpose of ARLOCK/AWLOCK signals in AXI for exclusive access.
  • Learn how EXOKAY indicates successful acquisition of exclusive access.
  • Implement a UVM sequence that asserts arlock for an exclusive read.
  • Verify correct response handling in the testbench.

Theory

AXI provides optional exclusive access support via the ARLOCK and AWLOCK signals. When asserted (1'b1), they request atomic access to a memory location, preventing other masters from interfering during a read-modify-write sequence. The slave indicates success by returning EXOKAY (2'b01) on RRESP or BRESP (AXI4 encoding). A normal access returns OKAY (2'b00).

SignalWidthMeaning
ARLOCK11'b1 requests exclusive read access
AWLOCK11'b1 requests exclusive write access
RRESP22'b00 = OKAY, 2'b01 = EXOKAY, 2'b10 = SLVERR
BRESP22'b00 = OKAY, 2'b01 = EXOKAY, 2'b10 = SLVERR

Exclusive access is used in multi-master systems to implement locks, semaphores, or atomic updates without software spinlocks.

Practice

  1. Open this chapter in RtlStudio; files appear in Explore.
  2. Edit student/tb/seq/axi_exclusive_seq.sv to assert the ARLOCK signal for an exclusive read.
  3. Run Simulation and verify the log shows the expected INFO messages and INFO: PASS.
  4. (Optional) Open the Waveform tab to inspect ARLOCK assertion and EXOKAY response timing.

Summary

You practiced using ARLOCK to initiate an exclusive read on the AXI bus. You verified that the slave returns EXOKAY (2'b01) on RRESP when arlock is asserted and the address is valid. The UVM scoreboard checks both read data and the EXOKAY response code.

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 exclusive access: ARLOCK and EXOKAY response handling. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.