RTL Studio Open IDE

3.4 · SOC CLASS

System ID / version regs

Expose read-only chip ID and revision CSRs in the SoC IP.

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

What you practice

System ID / version regs (3.4). Expose read-only chip ID and revision CSRs in the SoC IP. It is in System ID Version — Part 3 · System Control of the SoC Masterclass. Sequence reset, clock enables, boot vector, and watchdog into a sysctrl block.

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 expose read-only chip ID and revision CSRs in the SoC IP. This allows software to identify the silicon version at runtime.

Learning objectives

  • Define register address offsets for ID and revision.
  • Map read addresses to specific parameter values.
  • Verify the read response with a simple testbench.

Theory

Read-only registers return data when the bus master issues an AR transaction. The design uses a simple state machine to latch the address and return data. Address decoding compares the lower bits of the request address to known offsets.

SignalDirectionDescription
araddrInputAddress requested by master
rdataOutputData returned to master
rvalidOutputIndicates data is valid

The REG_ID and REG_REV parameters define the base addresses for these registers. These offsets must match the memory map expected by the testbench.

Practice

  1. Open RtlStudio and select this chapter.
  2. Confirm files in Explore.
  3. Open student/rtl/ip/soc/sys_id_regs.sv.
  4. Define REG_ID as localparam with value 32'h00.
  5. Define REG_REV as localparam with value 32'h04.
  6. Implement address decoding to return REG_ID data when araddr matches REG_ID.
  7. Implement address decoding to return REG_REV data when araddr matches REG_REV.
  8. Open student/tb/tb_top.sv.

Summary

You implemented read-only System ID and version registers using local parameters and a simple AXI-Lite state machine. This exercise demonstrated how to map specific addresses to constant data values for hardware identification. The successful simulation confirms that software can correctly query chip identity and revision during system initialization.

© 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 System ID / version regs. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.