Skip to content
← All work

PWM Generator

Pulse-width modulation generator in Verilog, simulated in ModelSim.

  • Verilog
  • ModelSim
PWM Generator cover artwork

Problem

Digital systems need a controllable pulse-width signal to drive motors, LEDs and power circuits.

My role

Solo — RTL design and simulation.

Solution

A Verilog PWM module where a counter is compared against a duty-cycle input to produce the output wave, verified in ModelSim.

Architecture

ClockCounterComparatorDuty-cycle inputPWM out

Tech stack

Verilog · ModelSim

Challenges

Verifying timing
Wrote a testbench and checked the waveforms in ModelSim for different duty cycles.
Clean duty-cycle changes
Compared the counter against the duty value on each clock edge.

Results & learnings

Thinking in hardware: clocks, registers and simulation-driven verification.

Next project

buddy_connect →