What you practice
What is a mini-SoC? (0.1). Introduce SoC memory map constants and verify base address assignments via simulation. It is in What is a mini-SoC? — Part 0 · SoC Warming Up of the SoC Masterclass. Meet a mini-SoC memory map and walk a pre-built hierarchy in simulation.
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
This lesson introduces the concept of a System-on-Chip (SoC) memory map and the constants that define peripheral addresses. You will see how a top-level design connects IP blocks to a global address space using simple assignment statements. Understanding these base addresses is essential for software drivers to communicate with hardware peripherals.
Learning objectives
- Define the purpose of a SoC memory map in hardware design.
- Identify the base address constants for GPIO, Timer, UART, and System Control.
- Understand how a top-level module exposes these constants as output ports.
- Run a simulation to verify that the correct addresses are assigned to the DUT outputs.
Theory
A System-on-Chip integrates multiple independent hardware modules (IPs) onto a single silicon die. To allow a processor or software to interact with these modules, each module is assigned a specific region in the memory map. This region is defined by a base address, which is a fixed 32-bit hexadecimal value. In this mini-SoC, four key peripherals are defined: GPIO for general-purpose input/output, a Timer for timekeeping, a UART for serial communication, and a System Controller for global configuration. The soc_pkg package typically holds these constant definitions (e.g., BASE_GPIO). The top-level design module, often named dut, acts as a wrapper that connects these internal constants to the external ports of the chip. This allows the rest of the system to see these addresses as if they were physical memory locations. The design uses continuous assignment statements to drive the output ports with these constant values. This ensures that the addresses are static and known at compile time. This approach simplifies the interface between the hardware and the software that will eventually run on the SoC.
Practice
- Open this chapter in RtlStudio to load the workspace.
- Navigate to the Explore panel and open
student/rtl/design.sv. - Review the module port list and the
assignstatements that connect constants to outputs. - Open
student/tb/tb_top.svto examine the testbench structure. - Notice how the testbench instantiates the
dutmodule and monitors the output ports. - Click Simulation in the sidebar and run the simulation.
- Observe the Log panel to see the printed base addresses and the pass/fail status.
Summary
You defined the memory map for a mini-SoC by assigning base address constants from the soc_pkg package to the design output ports. The testbench verified that these constants were correctly propagated, confirming the memory map alignment. This exercise established the foundational vocabulary and structure for modular System-on-Chip integration.
© 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 What is a mini-SoC?. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.