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 "mm.ss.dhm".
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 "mm.ss", "01" indicates
"m.ss.d", "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
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:
- The Clk50Mhz.
- BTN0 will be used as reset.
- Switches 0 and 1 will be used to indicate which digits to display
- Switch 2 will be used to control the timer speed.
- BTN1 will be used to start, stop and clear the timer.
- The block of 7 segment displays will be used for output.
How to get there
We suggest that you build this design in stages.
- Stage 1. Draw a decimal number on the 7 seg block..
- Stage 2. Build a 4 digit decimal incrementer writing to the 7 seg block.
- Stage 3. Do the full design.
Grading will be done by you presenting your work and
answering our questions in the lab on or before the