Pulse-width Modulation LED Dimmer – Part 2: Simulation
In this part, I’ll show how I built a self-checking testbench to verify the PWM logic. After we make the testbench, we’ll load it up in ModelSim and make sure everything works as expected.
In this part, I’ll show how I built a self-checking testbench to verify the PWM logic. After we make the testbench, we’ll load it up in ModelSim and make sure everything works as expected.
Like many FPGA beginners, one of my first tutorials was the classic “turn on an LED” project. While a great starting point, I wanted to explore further. I also found the LED far too bright! This led me to design an LED “dimmer” using Pulse Width Modulation (PWM). With PWM, we can lower each channel’s brightness. PWM also allows color mixing in RGB (three-channel) LEDs.