Lab 4
60 minutes

Your job is to create a VHDL program that displays four digits of a seven digit timer. The seven digit timer will maintain minutes, seconds, tenths of seconds, hundredths of seconds and milliseconds, formatted "". The maximum time of the timer is 60 minutes: 60.00.000. As there are only four digits in our seven segment display block, switches zero and one indicate which four of the seven digits to display: "00" indicates "", "01" indicates "", "10" indicates "ss.dh", and "11" indicates "s.dhm".

BTN1 will be used to control the timer. The timer is in one of three states: 'init', 'running' and 'stopped'. In state 'init' the timer is set to 00.00.000. In state 'running' the timer increments. In state 'stopped' the timer displays the time at which it stopped. The reset button brings the timer to the 'init' state. Pressing BTN1 in the 'init' state will bring the timer in the 'running' state; pressing BTN1 in the 'running' state will bring it in the 'stopped' state. Pressing it in the 'stopped' state will bring it back to the 'init' state. If the timer reaches 60 minutes in the 'running' state, it will automatically go to the 'stopped' state.

Switch two will control the speed of the timer. When the switch is off, the timer runs in "real time" i.e. it increments each millisecond (50000 50Mhz clock cycles). When the switch is on, the timer runs in "hyper speed" mode, incrementing every 2 microseconds (500 times faster, 100 50Mhz clock cycles). This allows you to get to 60 minutes faster (in 7.2 seconds) to test and demo your design.

Your program will use the following inputs and outputs:

How to get there

We suggest that you build this design in stages.
Grading will be done by you presenting your work and answering our questions in the lab on or before the due date.