RTL Studio Open IDE

Control & Timers

16-Bit Pulse Width Modulator (PWM) Controller

Glitch-free 16-bit PWM with shadow registers for dynamic period/duty updates, active-high output, and full verification.

About this block

Simulate it in the Verilog IDE

Mediumsystemverilogsimsyn

16-Bit Pulse Width Modulator (PWM) Controller is a SystemVerilog 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 implements a glitch-free, 16-bit pulse width modulator with shadow-register-based updates for dynamic period and duty-cycle reconfiguration.

The PWM generates an active-high output waveform where the output is high when the internal free-running counter is less than the current duty register value, and low otherwise.

It supports runtime updates of both period and duty cycle via request signals, with updates committed at the end of the current period (when the counter wraps to zero) to prevent glitches.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 16-Bit Pulse Width Modulator (PWM) Controller.
  2. Read the SystemVerilog module in the editor. The catalog line for this block: Glitch-free 16-bit PWM with shadow registers for dynamic period/duty updates, active-high output, and full verification.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. 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.

Ports

NameDirectionTypeWidthDescription
clkinputlogic1Clock
rst_ninputlogic1Active-low asynchronous reset
period_newinputlogic [15:0]16New period value (shadowed on request)
duty_newinputlogic [15:0]16New duty value (shadowed on request)
duty_update_reqinputlogic1Assert to latch duty_new into shadow
period_update_reqinputlogic1Assert to latch period_new into shadow
pwm_outoutputlogic1PWM output signal

More in Control & Timers

All Control & Timers blocks