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.
| Signal | Direction | Description |
|---|---|---|
araddr | Input | Address requested by master |
rdata | Output | Data returned to master |
rvalid | Output | Indicates 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
- Open RtlStudio and select this chapter.
- Confirm files in Explore.
- Open
student/rtl/ip/soc/sys_id_regs.sv. - Define
REG_IDaslocalparamwith value32'h00. - Define
REG_REVaslocalparamwith value32'h04. - Implement address decoding to return
REG_IDdata whenaraddrmatchesREG_ID. - Implement address decoding to return
REG_REVdata whenaraddrmatchesREG_REV. - 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
- 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 System ID / version regs. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.