Verilog LED chaser¶
Download verilog-led-chaser.rgate and open it with File → Open… in desktop RGate. A Verilog module moves a single lit bit across an eight-bit LED bar. Switches control reset, pause, and direction; a DIP input sets the speed.
Run it¶
- Clock-step once with RESET=1 to initialize the lit bit.
- Click RESET to set it to 0.
- Run or clock-step. With SPEED=3, the bit moves every four clock cycles.
- Set ENABLE=0 to hold the current position; set it back to 1 to continue.
- Toggle REVERSE to change the direction.
- Double-click SPEED and enter a hex digit from
0toF. The bit moves everySPEED + 1clocks:0is fastest,Fadvances every sixteen clocks.
The hex display shows the same output: 01, 02, 04, 08, 10, 20, 40,
80, then back to 01. Reverse traverses that sequence in the other direction.
Edit and inspect¶
Stop simulation, select led_chaser in Modules, and open Edit. Change the reset pattern or rotation expression, then return to main and run again. The standalone source is also available.
Probe leds to record the output. Choose Simulate → Browse HDL signals…,
filter for chaser, and probe divider to watch the speed counter inside the
running module.