FPGA digital watch
A watch built from digital logic in SystemVerilog, running on an FPGA board: time, stopwatch, timer and ten alarms.
University of Melbourne, ELEN20006 Digital Systems, 2026.
A watch built from digital logic in SystemVerilog, running on an FPGA board: time, stopwatch, timer and ten alarms.
University of Melbourne, ELEN20006 Digital Systems, 2026.
Hours, minutes and seconds live in three counters, driven by the board’s 50 MHz clock.
I compared four ways to store the time and chose three counters: only 17 bits of state, and each unit is simple to set.
It counts in centiseconds, and the first tick lands exactly 10 ms after you press start.
A snapshot multiplexer freezes the display for a lap time while the counter keeps running underneath.
Set the countdown, start it and it stops at zero.
A three-state controller (stopped, set, running) sits on top of an editable countdown with a borrow output, modelled on the 74LS193 counter chip.
Pick a slot, set it, or hold a button to clear it. The LEDs show which slot you’re on, and empty slots read 99 99 99.
When an alarm fires, the display flashes for five seconds. I wrapped the finished watch rather than editing it, so the working design stayed safe.
My watch, running in your browser with the same controls as the real board. Hold the buttons and flip the switches on the board, or use the ones beside it.
Watch
--:--:--
Modelled on the SystemVerilog from my report: the same switches, buttons and timings, including the 1 s hold to edit, auto-repeat at 10 Hz after 0.5 s, and the 5 s alarm flash. It starts at your local time rather than midnight.
Small modules, each tested on its own, then layered into a watch.
Quartus takes about 20 minutes to compile. My simulation tests run in around 5 seconds, so I could check each module over and over before it went near the board.
Each version of the watch wraps the last: timekeeping, then mode selection, then setting, then accurate setting. Alarms and brightness follow the same pattern.
I assumed my first sketches were right and paid for it in debugging. Next time I’ll draw the state machines and data paths before writing any code.