|
State Machine based solution |
The
functionality of the Stopwatch now defined by a FSM
(Final State Machine) with 5 or more states.
|
|
[Btn0] = Start / Stop
- Will control the Stopwatch. |
|
[Btn1] = Lap time
/ Clear - Will show Lap when running or
Clear if stopped (examine the state diagram
for more details) |
|
[Btn3] = Reset
- Used only in case of
problems with the state machine |
|
|
|
|
|
|
|
|
|
|
Consider your own state diagram
design or try the State Diagram below and implement as STATEM1 |
(1) Write your own code for the
STATEM1
(2) Create a Test Bench which performs a complete test of all
states and transitions.
(3) Synthesize the version 2 of the stopwatch and download to
the kit for testing.
|
|
|
|
|
|
|