asynchronous fsm . verilog - wakerly chapter_07.pptweb.cecs.pdx.edu/~mperkows/class_17… · ppt...

29
Asynchronous Asynchronous FSMs and FSMs and Verilog Verilog

Upload: trinhdien

Post on 28-Apr-2018

232 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Asynchronous Asynchronous FSMs and FSMs and

VerilogVerilog

Page 2: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

PLD registered outputPLD registered output

Page 3: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Outputs selection capability Outputs selection capability in CPLDin CPLD

Page 4: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

State Machine with Moore outputState Machine with Moore output

Page 5: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

State State Machine Machine with with Embedded Embedded Mealy Mealy output output definitions definitions (7.28)(7.28)

Page 6: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Table 7.29. FSM with pipelined output definitions

Page 7: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Test VectorsTest Vectors

Page 8: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Test Vectors continuedTest Vectors continued

Page 9: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Table for example state machineTable for example state machine

Page 10: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

FFs in librariesFFs in libraries

Page 11: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Behavioral Verilog for Behavioral Verilog for DFFDFF

Page 12: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Verilog for D FFVerilog for D FF

Page 13: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Verilog for D FFVerilog for D FF

Page 14: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Clock generation within a Clock generation within a test benchtest bench

Page 15: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Moore FSM implied by Moore FSM implied by Verilog coding styleVerilog coding style

Page 16: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Table for example Table for example FSMFSM

Page 17: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Table 7.58. Table 7.58. Verilog Verilog

Program for Program for FSM FSM

exampleexample

Page 18: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Synchronous and Asynchronous Synchronous and Asynchronous reset for FSMs in Verilogreset for FSMs in Verilog

Page 19: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Verilog code for pipelined Verilog code for pipelined outputoutput

Page 20: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Verilog FSM with pipelined Verilog FSM with pipelined outputsoutputs

Page 21: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Table 7.61. Table 7.61. Simplified Simplified

Verilog Verilog FSM FSM

designdesign

Page 22: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Table 7.62. Alternative Verilog for Table 7.62. Alternative Verilog for ones-counting machineones-counting machine

Page 23: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Ones-Counting MachineOnes-Counting Machine

Page 24: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Fastest and smallest Verilog Fastest and smallest Verilog counting logic for ones-counting counting logic for ones-counting

machinemachine

Page 25: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Memory for lock machineMemory for lock machine

Page 26: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Explicit FF instantiation in Explicit FF instantiation in Verilog Verilog

Page 27: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

One-Hot encodingOne-Hot encoding

Page 28: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

Table 7.68. Table 7.68. Test Bench Test Bench for FSM of for FSM of Table 7.58 Table 7.58

(with (with synchronous synchronous reset added) reset added) or Table 7.60, or Table 7.60, 7.61, 7.66 or 7.61, 7.66 or

7.577.57

Page 29: Asynchronous FSM . Verilog - Wakerly Chapter_07.pptweb.cecs.pdx.edu/~mperkows/CLASS_17… · PPT file · Web view · 2009-05-13FSM with pipelined output definitions Test Vectors

SR latchSR latch