RTL Studio Open IDE

3.1 · SOC CLASS

Reset sequencing

Implement a reset sequencer that stretches POR for a configurable number of cycles before releasing system and peripheral resets.

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

What you practice

Reset sequencing (3.1). Implement a reset sequencer that stretches POR for a configurable number of cycles before releasing system and peripheral resets. It is in Reset Sequencing — 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

Today you will implement a Power-On Reset (POR) sequencer that stretches the reset signal for a configurable number of clock cycles. This ensures that all internal state machines have enough time to initialize before the system becomes active. Proper reset sequencing is critical for preventing undefined behavior in complex SoC designs.

Learning objectives

  • Implement a counter-based stretch mechanism for the POR signal.
  • Use a state flag to track when the stretch period has elapsed.
  • Derive system reset (rst_n) and peripheral reset (periph_rst_n) from the sequencer logic.
  • Verify the timing behavior using the provided testbench.

Theory

Reset sequencing ensures that the design remains in a known reset state for a sufficient duration after power stabilizes. A common approach uses a counter that increments while the POR signal is active. Once the counter reaches a target value, a flag is set to indicate that the reset period is complete. The system reset is then asserted only when both the POR signal is released and the stretch period has finished. This prevents premature release of reset during the critical power-up phase.

SignalDirectionDescription
por_nInputActive-low Power-On Reset signal from the power domain.
rst_nOutputSystem-wide reset, released after POR and stretch.
periph_rst_nOutputPeripheral reset, typically tied to rst_n in simple designs.
stretch_cntInternalCounter tracking the number of clock cycles during POR.
por_releasedInternalFlag indicating the stretch period has completed.

The logic operates in two phases during POR. First, the counter increments until it matches the STRETCH_CYCLES parameter. Second, the por_released flag is asserted, allowing rst_n to go high once por_n is de-asserted.

Practice

  1. Open RtlStudio and select this chapter from the Examples or Lecture list.
  2. Confirm that student/rtl/ip/soc/reset_sequencer.sv and student/tb/tb_top.sv appear in the Explore tree.
  3. Open student/rtl/ip/soc/reset_sequencer.sv in the editor.
  4. Replace the __TODO__ comments with the correct logic to stretch POR and release reset in order.
  5. Save the file and open the Simulation panel in the left sidebar.
  6. Click Run to start the simulation and read the Log panel.
  7. Check the Waveform tab to verify the timing of rst_n and periph_rst_n relative to por_n.

Summary

You implemented a reset sequencer that stretches the Power-On Reset signal using a configurable counter. This logic ensures the main reset remains active until the core logic has stabilized. You then verified that peripheral resets are released only after the main reset is deasserted. The simulation confirmed correct timing and passed all verification checks.

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