RTL Problems / Level 7 · Advanced RTL & Protocol Design
What You Will Learn
By solving SoC Multi-Rail Power Sequencing Controller, you will acquire core industry skills:
- Synthesizable hardware modeling in standard Verilog-2001 / SystemVerilog.
- Correct handling of interface port contracts, edge-triggered clocks, and active-low/high resets.
- Simulation waveform interpretation and debugging using timing diagrams (VCD traces).
- Architectural avoidance of timing violations, glitching hazards, and synthesis warnings.
Problem Statement & Requirements
Design a deterministic hardware power-on and power-down sequencing controller with supply-good handshake monitoring and fault timeout protection.
Hardware design teams at leading semiconductor firms evaluate these exact port contracts, race-condition assertions, and corner cases during technical design reviews and ASIC engineer interviews.
Prerequisites: SoC power management, PMIC power sequencing, power-good handshaking, FSM design, watchdog timers.
Port List & Interface Timing
The hidden testbench instantiates top_module. Module port names and bit-widths must match the interface contract exactly:
| Port | Dir | Width | Description |
|---|---|---|---|
clk, rst_n | input | 1 | Sequencer clock and active-low async reset |
pwr_req | input | 1 | Power-up request (1=ON, 0=OFF) |
vdd_io_ok, vdd_core_ok | input | 1, 1 | Power-good indicators from external PMIC / regulators |
pll_locked | input | 1 | Analog PLL frequency and phase lock status |
pwr_en_io, pwr_en_core | output | 1, 1 | Regulator enable controls (IO rail first, then Core) |
clk_enable | output | 1 | Clock distribution tree enable gate |
sys_rst_n_out | output | 1 | Deasserted (1) when system is operational |
seq_error | output | 1 | Latched high if any stage exceeds 15-cycle timeout |
Timing Constraints & Synthesizable RTL Rules
Timing Contract: Clocked on posedge clk with active-low async rst_n. Timeout limit = 15 cycles per state. Stabilization delay after clock enable = 4 cycles.
Synthesis Constraints: No rail order violation (IO must precede Core on power-up; Core must drop before IO on power-down). Synthesizable Verilog-2001.
Architectural Deep Dive & Implementation Walkthrough
Why Modern SoCs Require Strict Power Sequencing
Modern System-on-Chips contain distinct power domains: I/O pads (1.8V/3.3V), analog PLLs (1.2V), and digital logic cores (0.75V - 0.9V). Violating the turn-on order can cause forward-biasing of parasitic PN junctions, leading to destructive CMOS latch-up.
Typical SoC Power-Up Sequence
- I/O Power First: Turn on I/O rails so pads enter safe tri-state mode without driving floating voltages onto unpowered external interfaces.
- Core Power Second: Ramp the internal digital core voltage. Wait for external PMIC
power_goodassertion. - Analog Lock: Enable analog PLLs and wait for lock status.
- Clock Distribution: Ungate internal clock trees, allowing flip-flops to stabilize under valid clock edges.
- Reset Release: Deassert synchronous reset cleanly aligned to clock edges.
Common RTL Designer Pitfalls
Deasserting reset before clocks stabilize, or shutting down I/O rails before the core logic has ceased activity.
Silicon & Hardware Engineering Notes
Silicon power sequencers are placed in an "Always-On" (AON) power domain powered by an auxiliary backup battery or low-dropout regulator (LDO).
Starter RTL Code
module top_module (
input wire clk,
input wire rst_n,
input wire pwr_req,
input wire vdd_io_ok,
input wire vdd_core_ok,
input wire pll_locked,
output reg pwr_en_io,
output reg pwr_en_core,
output reg clk_enable,
output reg sys_rst_n_out,
output reg seq_error
);
// Implement the multi-rail power sequencer FSM:
// 1. IDLE: Wait for pwr_req == 1.
// 2. EN_IO: Assert pwr_en_io. Wait for vdd_io_ok.
// 3. EN_CORE: Assert pwr_en_core. Wait for vdd_core_ok.
Verified Reference Solution
🔒 Reveal Verified Reference RTL Solution
module top_module (
input wire clk,
input wire rst_n,
input wire pwr_req,
input wire vdd_io_ok,
input wire vdd_core_ok,
input wire pll_locked,
output reg pwr_en_io,
output reg pwr_en_core,
output reg clk_enable,
output reg sys_rst_n_out,
output reg seq_error
);
localparam S_IDLE = 4'd0;
localparam S_EN_IO = 4'd1;
localparam S_EN_CORE = 4'd2;
localparam S_WAIT_PLL = 4'd3;
localparam S_EN_CLK = 4'd4;
localparam S_ACTIVE = 4'd5;
localparam S_DOWN_RESET = 4'd6;
localparam S_DOWN_CLK = 4'd7;
localparam S_DOWN_CORE = 4'd8;
localparam S_DOWN_IO = 4'd9;
localparam S_ERROR = 4'd10;
reg [3:0] state, next_state;
reg [3:0] timer;
always @(posedge clk or negedge rst_n) begin
if (!rst_n) begin
state <= S_IDLE;
timer <= 4'd0;
end else begin
state <= next_state;
if (state != next_state) begin
timer <= 4'd0;
end else begin
timer <= timer + 4'd1;
end
end
end
always @(*) begin
next_state = state;
case (state)
S_IDLE: begin
if (pwr_req) next_state = S_EN_IO;
end
S_EN_IO: begin
if (!pwr_req) next_state = S_DOWN_IO;
else if (vdd_io_ok) next_state = S_EN_CORE;
else if (timer >= 4'd15) next_state = S_ERROR;
end
S_EN_CORE: begin
if (!pwr_req) next_state = S_DOWN_CORE;
else if (vdd_core_ok) next_state = S_WAIT_PLL;
else if (timer >= 4'd15) next_state = S_ERROR;
end
S_WAIT_PLL: begin
if (!pwr_req) next_state = S_DOWN_CORE;
else if (pll_locked) next_state = S_EN_CLK;
else if (timer >= 4'd15) next_state = S_ERROR;
end
S_EN_CLK: begin
if (!pwr_req) next_state = S_DOWN_CLK;
else if (timer >= 4'd3) next_state = S_ACTIVE; // 4 stabilization cycles
end
S_ACTIVE: begin
if (!pwr_req || !vdd_io_ok || !vdd_core_ok || !pll_locked) next_state = S_DOWN_RESET;
end
S_DOWN_RESET: next_state = S_DOWN_CLK;
S_DOWN_CLK: next_state = S_DOWN_CORE;
S_DOWN_CORE: next_state = S_DOWN_IO;
S_DOWN_IO: next_state = S_IDLE;
S_ERROR: begin
if (!pwr_req) next_state = S_IDLE;
end
default: next_state = S_IDLE;
endcase
end
// Output registered decoding
always @(posedge clk or negedge rst_n) begin
if (!rst_n) begin
pwr_en_io <= 1'b0;
pwr_en_core <= 1'b0;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
seq_error <= 1'b0;
end else begin
case (next_state)
S_IDLE: begin
pwr_en_io <= 1'b0;
pwr_en_core <= 1'b0;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
end
S_EN_IO: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b0;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
end
S_EN_CORE: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b1;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
end
S_WAIT_PLL: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b1;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
end
S_EN_CLK: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b1;
clk_enable <= 1'b1;
sys_rst_n_out <= 1'b0;
end
S_ACTIVE: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b1;
clk_enable <= 1'b1;
sys_rst_n_out <= 1'b1;
end
S_DOWN_RESET: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b1;
clk_enable <= 1'b1;
sys_rst_n_out <= 1'b0;
end
S_DOWN_CLK: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b1;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
end
S_DOWN_CORE: begin
pwr_en_io <= 1'b1;
pwr_en_core <= 1'b0;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
end
S_DOWN_IO: begin
pwr_en_io <= 1'b0;
pwr_en_core <= 1'b0;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
end
S_ERROR: begin
pwr_en_io <= 1'b0;
pwr_en_core <= 1'b0;
clk_enable <= 1'b0;
sys_rst_n_out <= 1'b0;
seq_error <= 1'b1;
end
endcase
end
end
endmodule
Related RTL Problems in Level 7
- Async-Assert / Sync-Deassert Reset — Assert reset the instant it goes active, but only release it once it has been clean for 2 clock edges — the standard reset architecture for any real design.
- 3-Flop CDC Synchronizer — A deeper 3-stage synchronizer for signals that need extra MTBF margin beyond the standard 2-flop chain.
- Synchronized Rising-Edge Detector — Safely synchronize an asynchronous level signal, then produce a clean single-cycle pulse the moment it rises in the local clock domain.
Connected EcrioniX Learning Resources
Accelerate your VLSI engineering knowledge with these curated learning materials:
Progress through step-by-step verified modules from fundamentals to advanced silicon design.
Benchmark your hardware knowledge across 10 semiconductor domains and receive study roadmaps.
Explore foundational circuit theory, waveform timing, and physical hardware implementation.
Frequently Asked Questions
What does SoC Multi-Rail Power Sequencing Controller require?
Design a deterministic hardware power-on and power-down sequencing controller with supply-good handshake monitoring and fault timeout protection. Implement it as Verilog module top_module matching the listed ports.
Is this design combinational or sequential?
Tags: advanced-rtl, soc-controllers, systemverilog, asic, fpga. If a clock signal is present in the port table, implement it as sequential logic; otherwise, use continuous assignments or combinational blocks.
How is my solution graded?
A hidden SystemVerilog testbench simulates your module in the cloud judge. You pass when all directed corner cases match the golden model and the VCD timing waveform matches the contract.
How does this challenge help with semiconductor interviews?
Technical interviewers at NVIDIA, Qualcomm, Apple, and Intel routinely ask candidates to code, debug, and explain the timing waveforms of SoC Multi-Rail Power Sequencing Controller to assess real-world synthesizability and race-condition awareness.