Appendix D: ImplementingState Machines using VerilogBehavioural ModeD
1INTRODUCTIONIn Chapters 1–5, state machines have been implemented using the equations obtained from thestate diagram
This approach ensures that the logic for the state machine is under completecontrol of the designer
However, if the state machine is implemented using behavioural mode, the Verilog compilerwill optimize the design
There is a very close relationship between the state diagram and the behavioural Verilogdescription that allows a direct translation from the state diagram to the Verilog code
2THE SINGLE-PULSE/MULTIPLE-PULSE GENERATOR WITH MEMORYFINITE-STATE MACHINE REVISITEDIn this system there are two inputs: s to start the system and x to choose either single-pulse ormultiple-pulsemode
Insingle-pulsemode,