RTL Studio Open IDE

1.5 · SOC CLASS

Read/write permission gates

Implement read/write permission gates and assert SLVERR on access violations.

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

What you practice

Read/write permission gates (1.5). Implement read/write permission gates and assert SLVERR on access violations. It is in RW Permission Gates — Part 1 · Address Map & Decode of the SoC Masterclass. Turn a memory map into combinational decode, one-hot selects, and an AXI-Lite fabric.

SoC lessons simulate the fabric and the peripheral together in the IDE. Verilator is the simulator; the waveform is where address and response show up.

What you will learn

Today you will implement permission gates for an address map. You will learn to assert SLVERR on access violations.

Learning objectives

  • Implement logic to gate read and write access based on permissions.
  • Assert SLVERR when an access is not permitted.
  • Handle unmapped address regions correctly.

Theory

Permission gates enforce security policies in SoC designs. They prevent unauthorized access to memory-mapped registers. The design checks the address against a memory map. It retrieves the permission bits for the target region. The logic then compares the requested access type against the allowed permissions. Read-only regions must block write attempts. Write-only regions must block read attempts. Unmapped addresses must always trigger an error. This ensures system stability and security.

Practice

Open RtlStudio and select this chapter in the Examples list. The workspace loads automatically with all files in the Explore tree. Open student/rtl/ip/soc/rw_permission_gates.sv in the editor. Fill in the __TODO__ comments to implement the permission logic. Run Simulation from the sidebar to check your work. Read the Log panel for INFO: messages and pass/fail status.

Summary

You implemented logic to gate read and write access based on memory region permissions in the rw_permission_gates module. You asserted SLVERR for invalid address maps and for write attempts to read-only regions. This practice ensures that unauthorized transactions are rejected, enhancing system security. The simulation confirmed correct behavior with the expected PASS status.

© 2026 RtlStudio. Licensed under CC BY-NC-ND 4.0. Commercial use and modifications by third parties are not permitted.

Run it in the Verilog IDE

  1. Open the lesson workspace in the IDE. The fabric and the peripheral are one simulation.
  2. Run Verilator and follow the address, write data, and read response on the waveform.
  3. A passing log is not enough when decode or an IRQ line is the point of the lesson — those show up on the VCD.
  4. Run Yosys on the RTL island you just integrated when you want the mapped cells.

The lesson is done when the simulation matches Read/write permission gates. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.