What you practice
Memory map table design (1.1). Design localparam memory map bases and region sizes for address decoding. It is in Memory Map Table — 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
You will design the address decoding logic for a system-on-chip memory map. This ensures that specific address ranges correctly identify peripheral regions like GPIO and UART.
Learning objectives
- Define local parameters for memory base addresses and region sizes.
- Implement address range checking logic for multiple slave devices.
- Verify the memory map decoder using a simple testbench.
Theory
A memory map defines how the CPU accesses different peripherals. Each peripheral occupies a specific address range. The decoder checks if an address falls within any defined range. This logic uses comparison operators to determine the active region. Correct base addresses prevent address collisions between devices.
Practice
Open this chapter in RtlStudio and select the lesson from the Examples list. The workspace loads automatically with student/ and golden/ folders in the Explore panel. Open student/rtl/ip/soc/memory_map_table.sv in the editor. You need to fill in the __TODO__ comments for indices 0 and 1. Use the pattern from indices 2-5 as a guide. The pattern is (addr >= BASE_XXX) && (addr < BASE_XXX + REGION_SIZE_4K). Open student/tb/tb_top.sv to see the test stimulus. Run the simulation by clicking Simulation in the left sidebar. Check the Log panel for results.
Summary
You defined local parameters for base addresses and region sizes to establish a clear memory map for the SoC. You implemented address decoding logic that validates access ranges and identifies the correct peripheral region. The testbench confirmed the design by printing an INFO: PASS message upon successful verification.
© 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
- Open the lesson workspace in the IDE. The fabric and the peripheral are one simulation.
- Run Verilator and follow the address, write data, and read response on the waveform.
- A passing log is not enough when decode or an IRQ line is the point of the lesson — those show up on the VCD.
- Run Yosys on the RTL island you just integrated when you want the mapped cells.
The lesson is done when the simulation matches Memory map table design. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.