Control & Timers
Complementary PWM Dead-Time Inserter — L2 Upgrade
Inserts configurable dead-time between complementary PWM signals and captures rising edges for sticky IRQ generation.
About this block
Simulate it in the Verilog IDE
Complementary PWM Dead-Time Inserter — L2 Upgrade is a Verilog reference block in the Control & Timers catalog. FSMs, timers, watchdogs, and control/state sequencing blocks. Marked Medium: more state or a wider datapath, still one workspace in the IDE.
This IP core inserts configurable dead-time between complementary PWM signals to prevent shoot-through in power electronics applications. It features an 8-bit configurable dead-time counter, a 4-state Finite State Machine (FSM), and a sticky interrupt request (IRQ) mechanism triggered by the rising edge of the input PWM signal.
The design ensures safe switching by forcing outputs low during dead-time periods, guaranteeing non-overlapping waveforms for pwm_out_pos and pwm_out_neg.
- Choose Open in IDE. RTL Studio loads the packaged workspace for Complementary PWM Dead-Time Inserter — L2 Upgrade.
- Read the Verilog module in the editor. The catalog line for this block: Inserts configurable dead-time between complementary PWM signals and captures rising edges for sticky IRQ generation.
- Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
- Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.
RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.
Features
- Configurable Dead-Time: Adjust dead-time duration via the
DT_VALparameter (up to 255 clock cycles). - Complementary Outputs: Generates
pwm_out_posandpwm_out_negwith guaranteed non-overlapping waveforms. - Sticky IRQ: Captures rising edges of the input PWM and latches an interrupt flag until cleared by
clear_irq. - Robust Reset: Asynchronous reset with a defined idle state to ensure predictable power-up behavior.
- Standard Compliance: Verilog-2001 compliant syntax for broad synthesis tool compatibility.
Ports
| Port Name | Direction | Width | Description |
|---|---|---|---|
clk | Input | 1 | System clock input |
rst_n | Input | 1 | Active-low asynchronous reset |
pwm_in | Input | 1 | Input PWM signal |
clear_irq | Input | 1 | Clear sticky IRQ flag |
pwm_out_pos | Output | 1 | Positive PWM output |
pwm_out_neg | Output | 1 | Negative PWM output |
irq_sticky | Output | 1 | Sticky interrupt flag |
Verification
The provided testbench verifies the following:
- Dead-Time Insertion: Ensures outputs remain low during the configured dead-time window on both rising and falling edges.
- IRQ Capture: Validates that the sticky IRQ is set on rising edges and can be cleared via
clear_irq. - Reset Behavior: Confirms that all states and outputs initialize correctly upon assertion of
rst_n.
### Simulation Results
Run the simulation to see the following log entries:
TC1 Pos low during deadtime PASSTC1 Pos high after deadtime PASSTC1 Neg low during active PASSTC2 IRQ sticky set PASSTC2 IRQ sticky cleared PASSTC3 Outputs low during deadtime neg PASSTC3 Outputs in Idle state PASSTC4 Reset state PASS
More in Control & Timers
- 1 MHz Tick Generator — L1 Upgrade — L2 Upgrade
- 16-Bit Down Timer (Match on Load-Zero Too) — L2 Upgrade
- 16-Bit Programmable Prescaler — L1 Upgrade — L2 Upgrade
- 16-bit Programmable Timer with Interrupt — L2 Upgrade
- 16-Bit Pulse Width Modulator (PWM) Controller
- 32-Bit Interval Timer with IRQ
- 32-Bit Kick Watchdog with Configurable Timeout and Reset Pulse
- 8-Bit Down Timer (Pulse Match on Zero) — L2 Upgrade
- 8-Bit Programmable Digital Deglitch Filter — L1 Upgrade — L2 Upgrade
- 8-Bit Window Comparator — L1 Upgrade — L2 Upgrade
- 8-Channel 16-Bit PWM Controller
- Activity Timeout Flag 8-bit — L2 Upgrade
- Bang-Bang Thermostat 8-bit
- Duty-Cycle Measurement 8-Bit — L2 Upgrade
- Edge Rate Limiter 8-bit — L2 Upgrade
- Enable-Gated Set/Reset Flag