Professional Documents
Culture Documents
FSM Design Example With Verilog
FSM Design Example With Verilog
Inputs / Outputs
NAME
TYPE
FUNCTION
activate (A)
input
Up_limit (UPL)
input
Dn_limit (DNL)
input
Motor_up (MU)
output
Motor_dn (MD)
output
Inputs / Outputs
NAME
TYPE
FUNCTION
activate (A)
input
Up_limit (UPL)
input
Dn_limit (DNL)
input
Motor_up (MU)
output
Motor_dn (MD)
output
reset
input
State Diagram
initial
UPL
UPL
A
dn
next
up
next
A
A DNL
moving
up
A DNL
moving
down
MD
MU
DNL
UPL
initial
UP
L
UPL
A
up
next
A
A
DNL
moving
up
MU
dn
next
moving
down
A
A
DNL
MD
DNL
UPL
initial
UP
L
UPL
A
up
next
A
A
DNL
moving
up
MU
dn
next
moving
down
A
DNL
MD
DNL
UPL
Behavior Continued
Simulation Results
In the test bench code, first initialize the circuit under test.
Select the sim instance tab in the source window to bring
up internal signals to be placed in the simulator
waveform.
Timers
Timer
time events
divide clock frequency
provide delay
Timer Simulation
Verilog Description
Test Fixture
Similation Results