Stopwatch with Lap Register

Hard VHDL FSM Asked at Garmin
Solve this problem

Build a stopwatch that counts hundredths of a second up to 59.99 and can capture a lap time without stopping the running count.

Constraints

  • Inputs: start_stop, lap and reset.
  • Display shows the lap value while a lap is held, otherwise the live count.
  • Rolls over from 59.99 to 00.00.
  • start_stop toggles running on each press.
  • Reset works whether running or stopped.
  • Debouncing is assumed to be done externally.
Starter codeVHDL
1library ieee;2use ieee.std_logic_1164.all;3use ieee.numeric_std.all;4 5entity stopwatch is6    port (7        clk_100hz : in  std_logic;8        rst       : in  std_logic;9        start_stop: in  std_logic;10        lap       : in  std_logic;11        display   : out std_logic_vector(12 downto 0)12    );13end stopwatch;