Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.
-
Upload
melinda-slaton -
Category
Documents
-
view
228 -
download
1
Transcript of Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.
![Page 1: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/1.jpg)
Lecture 6
CES 522Latches and Flip-Flops
Jack Ou, Ph.D.
![Page 2: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/2.jpg)
Sequential Circuits
• New output are dependent on the inputs and the preceding values of outputs.
• Characteristic: output nodes are intentionally connected back to inputs.
• Basic sequential circuits:– Level Sensitive Circuits– Edge Sensitive Circuits
![Page 3: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/3.jpg)
Small Perturbation to a Basic Inverter
![Page 4: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/4.jpg)
Large Perturbation to a Basic Inverter
![Page 5: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/5.jpg)
Application: SRAM
is pulled below VS to force the cell to switch via regenerative action.
![Page 6: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/6.jpg)
Metastable Point
![Page 7: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/7.jpg)
Small Perturbation from the Metastable Point
![Page 8: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/8.jpg)
Intel’s Random Bit Generator
![Page 9: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/9.jpg)
Latches
• Latches are level sensitive.• Latches propagate values from input to output
continuously.• S sets Q =1; R sets Q=1– Active low inputs are enabled by 0s.– Active high inputs are enabled by 1s.
![Page 10: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/10.jpg)
SR Latch with NOR Gates
tPDSQ=2 NOR gate delays.tPDRQ_=1 NOR gate delay
Forbidden State
SR are trigger pulses which can return to zero once Q is set.
Active High inputs
![Page 11: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/11.jpg)
SR Latch with NAND Gates
Active lowinputs
![Page 12: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/12.jpg)
D Latch
![Page 13: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/13.jpg)
D-latch Operation
![Page 14: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/14.jpg)
D-Latch (CK=0)
0
D
DB
0
0
![Page 15: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/15.jpg)
D-Latch (CK=1)
1
D
DB
D
DB D
DB
![Page 16: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/16.jpg)
Analyze D Latch Using Boolean Algebra
𝐷 ∙𝐶𝐾
𝐷 ∙𝐶𝐾
𝐷 ∙𝐶𝐾 +𝑄
𝑄=𝐷 ∙𝐶𝐾 +𝑄
![Page 17: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/17.jpg)
Transistor Level Implementation of D-Latch
𝐷 ∙𝐶𝐾 +𝑄𝐷 ∙𝐶𝐾 +𝑄
![Page 18: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/18.jpg)
D-Latch (CLK=1,D=1)
VDD
VDD
0
![Page 19: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/19.jpg)
Standard Library D LatchCLK=VDD (Q=D)
𝐷
𝐷 𝐷𝑄=𝐷
![Page 20: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/20.jpg)
Standard Library D LatchCLK=0V (Hold State)
𝐷
𝑄 𝑄𝑄
![Page 21: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/21.jpg)
JK Flip-Flop
![Page 22: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/22.jpg)
JK Flip Flop (CK=0)
0
1
1𝑄
𝑄
![Page 23: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/23.jpg)
JK Flip Flop (CK=1,J=K=0)
1
1
1𝑄
𝑄0
0
![Page 24: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/24.jpg)
JK Flip Flop (CK=1,J=K=1)
1
1
1
If CK is on for a long time, the output of this JK flip flip will toggle!The pulse width of CK must be less than the propagationdelay time through the loop.
![Page 25: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/25.jpg)
JK Flip Flop (CK=1,J=0→1,K=0)
1
1
𝑄=1
𝑄=00
1
𝑄=0
1
𝑄=1
Current: Next:
0
![Page 26: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/26.jpg)
JK Flip Flop (CK=1,J=0 → 1,K=0)
1
1
𝑄=0→1
𝑄=1→00
𝑄=1→0
1
𝑄=0→1
Current: Next:
1
0
![Page 27: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/27.jpg)
CK=1, J=0 → 1, K=0
• Regardless of initial value of Q, – CK=1, J= → 1, K=0 will set the updated value of Q
to a 1.
![Page 28: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/28.jpg)
JK Flip Flop (CK=1,J=0,K= 0→ 1)
1
1
𝑄=0
𝑄=1
0
1
𝑄=1
1
𝑄=0
Current: 0Next:
0
![Page 29: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/29.jpg)
JK Flip Flop (CK=1,J=0,K= 0→ 1)
11→0 →1
𝑄=1→0
1
0
1
𝑄=0→1
1
𝑄=1→0
Current: Next: 0
0
![Page 30: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/30.jpg)
CK=1, J=0, K=0 → 1
• Regardless of initial value of Q, – CK=1, J= 0, K=0 → 1 will set the updated value of
Q to a 0.
![Page 31: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/31.jpg)
JK Flip-Flop
J=1, K=1 can lead tooscillation if the width of CK is longer than propagation delay.
![Page 32: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/32.jpg)
JK Master-Slave Flip-Flop
1
0
1
1
The slave latch is insulated from changes of J and K when CK=1 Q holds its current value.
The Q of the master latch is updated when CK=1.
![Page 33: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/33.jpg)
JK Master-Slave Flip-Flop (CK=1)
1
0
1
1
𝑋
𝑋
J K
0 0
![Page 34: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/34.jpg)
JK Master-Slave Flip-Flop (CK=1)
1
0
1
1
𝑋
𝑋
J K
1 1
1
1
𝑄
𝑄 𝑄
𝑄
![Page 35: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/35.jpg)
JK Master-Slave Flip-Flop (CK=1)
1
0
1
1
J K
0 1 (Q=0)0(Q=1)
(Q=0)1(Q=1)
0
1
𝑄
𝑄 𝑄
1
![Page 36: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/36.jpg)
JK Master-Slave Flip-Flop (CK=1)
1
0
1
1
J K
1 0 (Q=1) (Q=0)
(Q=1) (Q=0)
1
0
𝑄
𝑄
𝑄
1
![Page 37: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/37.jpg)
JK Master-Slave Flip-Flop (CK=1)
J K
0 0
1 1
0 1 (Q=0)0(Q=1)
(Q=0)1(Q=1)
1 0 (Q=1) (Q=0)
(Q=1) (Q=0)
![Page 38: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/38.jpg)
JK Master-Slave Flip-Flop (CK=1)
![Page 39: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/39.jpg)
JK Master-Slave Flip-Flop (CK=1)
J K
0 0
1 0 (Q=1) (Q=0)
(Q=1) (Q=0)
0 0 (1 in this example)
(0 in this example)
If J catches a glitch, it is stuck the master latch!
1
0
![Page 40: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/40.jpg)
Edge Sensitive Circuits
![Page 41: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/41.jpg)
JK Negative Edge-Triggered Flip-Flop
1
𝐽𝑄
Active-Low Devices
1
1
Disabled
𝐾𝑄
“hold” mode
![Page 42: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/42.jpg)
JK Negative Edge-Triggered Flip-Flop
0
1
1
Active-Low Devices
1
1
“hold” modeenabled
![Page 43: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/43.jpg)
JK Negative Edge-Triggered Flip-Flop
1
1
“hold” mode
enabled →disabled
1 𝑡𝑃𝐷→
𝐽 𝑄
![Page 44: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/44.jpg)
JK Negative Edge-Triggered Flip-Flop
1
1→ 1
disabled→enabled disabled
1hold→update hold
CK
CK
The NAND latch is only updated for a short interval immediately after the negative edge, before being set to the hold.
1→1
![Page 45: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/45.jpg)
Update
Jn Kn S= R= Qn+1
0 0 1 1
0 1 1
1 1
1 0 1
![Page 46: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/46.jpg)
J=0; K=1Jn Kn S= R= Qn+1
0 1 1 0
0 1 1 0
0 1 1
![Page 47: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/47.jpg)
J=1; K=0Jn Kn S= R= Qn+1
1 0 Q 1 1
0 1 Qn=0S=0
1 1
0 1 Qn=1S=1
1 Qn=1Qn+1=1
![Page 48: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/48.jpg)
Negative Edge Triggered Flip-FLop
Jn Kn S= R= Qn+1
0 0 1 1
0 1 1 0
1 1
1 0 Q 1 1
![Page 49: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/49.jpg)
D Flip-Flop
![Page 50: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/50.jpg)
D-Flop
1 2
CK of latch 2
CK of latch 1
X
OUT=X
X=IN
1: Hold
2: Track
2:hold
1:track
OUT samples IN at the positive edge of the clock
![Page 51: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/51.jpg)
Timing Diagram
![Page 52: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/52.jpg)
Definition
• Setup time: the time that the incoming data must be stable before the clock arrives
• Hold time: the length of time that the data remains stable after the clock arrives for proper operation
• If the data is stable before the setup time and continues to be stable after the hold time, the flop will work properly.
• If the data arrives within the period designated by the setup and hold times, the flop may or may not capture the correct value.
![Page 53: Lecture 6 CES 522 Latches and Flip-Flops Jack Ou, Ph.D.](https://reader034.fdocuments.net/reader034/viewer/2022051401/56649ca65503460f94968bc4/html5/thumbnails/53.jpg)
CLK-Q
• The delay from the time that the clock arrives to the point that the output stabilizes.
• In reality the data must arrive at the setup time before the clock hits and the output is valid after the CLK-Q delay.