Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.
-
Upload
stuart-holland -
Category
Documents
-
view
215 -
download
1
Transcript of Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.
![Page 1: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/1.jpg)
Lecture 5 Key Locker using FPGA
2007/10/05
Prof. C.M. Kyung
![Page 2: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/2.jpg)
2/17
Key Locker Design Using FPGA
1. GOAL is ~
(1) Understanding of FSM and Its Sequential Behaviors
(2) Understanding of the Design Procedure for FSM
(3) Design of the FSM for Key Locker and Implementation on FPGAs
![Page 3: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/3.jpg)
3/17
Key Locker Design Using FPGA
2. Review of Sequential Logic Circuits
(1) Sequential Systems
- Having memory.- The current state is “held” in memory and the next state is computed based on the current state and the current inputs.- Clock orchestrates the sequence of events
![Page 4: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/4.jpg)
4/17
Key Locker Design Using FPGA
2. Review of Sequential Logic Circuits
(1) Basic Building Blocks for Sequential Systems
- D Flip Flop
- T Flip Flop
![Page 5: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/5.jpg)
5/17
Key Locker Design Using FPGA
3. Design Procedure for State Machines
(1) Description of SM - State diagram, SM chart, …
(2) State Optimization - Elimination of redundant states, …
(3) State Encoding - Gray, One-hot, Thermometer, …
(4) Logic Minimization - K-MAP, Quine-Mckluskey Method, …
In modern design flows, these are usually done easily with CAD tools
![Page 6: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/6.jpg)
6/17
Key Locker Design Using FPGA
4. State Machine Design
(1) State Graph, State Table
![Page 7: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/7.jpg)
7/17
Key Locker Design Using FPGA
4. State Machine Design
(2) No state machine optimization(3) State encoding
![Page 8: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/8.jpg)
8/17
Key Locker Design Using FPGA
4. State Machine Design
(4) Result of Logic Minimization
![Page 9: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/9.jpg)
9/17
Key Locker Design Using FPGA
5. Practical Design of FSM
(1) In good design, data path and control path are clearly separated
![Page 10: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/10.jpg)
10/17
Key Locker Design Using FPGA
(2) Example description of FSM in Verilog HDL
![Page 11: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/11.jpg)
11/17
Key Locker Design Using FPGA
(3) Timing Constraints for Sequential Logics- Set-up time (Tsu)
Input should be “set-up” early enough before the clocking event.
- Hold time (Th)
Input should be “held” at least some time after the clocking event.
![Page 12: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/12.jpg)
12/17
Key Locker Design Using FPGA(4) Synchronizations of External Inputs - Bouncing
- In mechanical switching, any two metal contacts generate multiple signals as the contacts close or open.
- This should be prohibited for properly working in the digital logic circuits.
![Page 13: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/13.jpg)
13/17
Key Locker Design Using FPGA
(5) De-bouncing Technique
- RC De-bouncer
- Flip-Flop Based De-bouncer
- Software Based De-bouncer
switch signal
CLK
![Page 14: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/14.jpg)
14/17
Key Locker Design Using FPGA
6. Problem statement(1) Key Locker System
- Given the *XXXXX* as the password input,
the electric locker will be open or not.- Illegal password input should be handled gracefully.- Design should be implemented and verified within EPLD.
![Page 15: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/15.jpg)
15/17
Key Locker Design Using FPGA
6. Problem statement(2) Key-Pad Circuit
![Page 16: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/16.jpg)
16/17
Key Locker Design Using FPGA
6. Problem statement(3) Finite State Machine for Key Locker
- Input from key-pad should be de-bounced
- For each input from the key-pad circuit, the internal state in the FSM should be transit properly.
- Password checking including illegal password handling.
![Page 17: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/17.jpg)
17/17
Key Locker Design Using FPGA
7. Experiment Requirements (1) Equipment
- Breadboard- KeyLocker Machine- DC Power Supply
(2) Component- Switch
(3) TTL IC’s- 7400 (2 input NAND gate)- 7404 (Inverter)- 7408 (2 input AND gate)- 7410 (3 input NAND gate)- 74LS73 ( Dual J-K flip-flop )- 74LS74 ( Dual D-Type flip-flop )
![Page 18: Lecture 5 Key Locker using FPGA 2007/10/05 Prof. C.M. Kyung.](https://reader035.fdocuments.net/reader035/viewer/2022062718/56649e725503460f94b712c3/html5/thumbnails/18.jpg)
18/17
Key Locker Design Using FPGA8. References
(1) Textbook- Contemporary Logic Design - Katz
- Fundamentals of Logic Design - Roth
(2) 5st Week T.A. E-mail [email protected] [email protected]
(3) Lecture Homepage http://wink.kaist.ac.kr/course/ee306/