Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4...
-
Upload
evelyn-smith -
Category
Documents
-
view
215 -
download
0
Transcript of Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4...
![Page 1: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/1.jpg)
Lecture 13
Flip-FlopsSection 5.4
![Page 2: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/2.jpg)
Schedule3/10
Monday Latches (1) 5.1-5.3
3/12
Wednesday Flip-flops 5.4
3/13
Thursday Flip-flops, D-latch
3/17
Monday Spring break
3/19
Wednesday Spring break
3/20
Thursday Spring break
3/24
Monday Analysis of clocked sequential circuit (1) 5.5
3/26
Wednesday Analysis of clocked sequential circuit (2) 5.5
3/27
Thursday Clocked sequential circuit
Please bring a functional random number generator to class on Thursday(3/13).
![Page 3: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/3.jpg)
Outline
• Review– D latch
• Applications• Flip-flops– D flip-flops• Reset
– JK flip-flops– T flip-flop
![Page 4: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/4.jpg)
D Latch
![Page 5: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/5.jpg)
Using a Latch as a Memory Element
Caution for a D latch: once a clock enables a D latch, the outputchanges as soon as the input changes – this is not desirable if you do notwant the output to change continuously and all the latches use a common clock.
![Page 6: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/6.jpg)
Uses of Flip-flops
![Page 7: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/7.jpg)
D Flip-Flop
![Page 8: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/8.jpg)
Negative Edge triggered D Flip-FlopClk=1
1 0
Y=D
hold
![Page 9: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/9.jpg)
Negative Edge triggered D Flip-FlopClk=0
0 1
Q=Yhold
![Page 10: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/10.jpg)
Negative Edge triggered D Flip-FlopClk=1
1 0
Y=1
hold
1 0
![Page 11: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/11.jpg)
Negative Edge triggered D Flip-FlopClk=0
0 1
Q=Yhold
1 0->1
![Page 12: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/12.jpg)
Verilog Modeling
I1 I2
𝐶𝑙𝑘𝑏
![Page 13: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/13.jpg)
Positive Edge Triggered D Flip-flop
I1 I2
𝐶𝑙𝑘𝑏
![Page 14: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/14.jpg)
D-Type Positive Edge Triggered Flip-Flop (CLK=0)
0
0
1
1
CLK =0, maintain the present state
![Page 15: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/15.jpg)
D-Type Positive Edge Triggered Flip-Flop
0
0→ 1
1
1 → 0
Q changes to 01
10
D=0 as Clk=0→ 1
![Page 16: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/16.jpg)
D-Type Positive Edge Triggered Flip-Flop
1
0→ 1
1 → 0
1 → 1
Q changes 10
01
D=1 as Clk=0→ 1
![Page 17: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/17.jpg)
D-Type Positive Edge Triggered Flip-Flop
0 → 1
1
S
The flip-flop is unresponsive to changes in D1
1
D=0→ 1 as Clk=1
S’
S’
Please explore different possible value of S on your own.This will work even for S=R=1 and S=R=0.revise
![Page 18: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/18.jpg)
Symbol of D Flip-Flops
![Page 19: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/19.jpg)
reset and preset
• When power is first turned on, the state of the flip-flops is unknwon.– Reset is used to initialize the output to a
0.– Preset is used to initialize the output to
a 1.
![Page 20: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/20.jpg)
Reset Feature
0
1
1
0
0
When Reset is 0, Q is set to 0.
![Page 21: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/21.jpg)
D Flip-flop with reset
Typo in the book. Should be 1 instead.
![Page 22: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/22.jpg)
JK Flip-FlopsD=JQ’+K’Q
The next value of D is determined by JQ’+K’Q.At the rising edge of D Flip-flop, Q is updated with the value of D.
Positive edge D flip-flop
![Page 23: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/23.jpg)
D=JQ’+K’Q
• J=1,K=1→D=Q’• J=0, K=0 →D=Q• J=0, K=1 →D=0• J=1, K=0 →D=Q’+Q=1
![Page 24: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/24.jpg)
Verilog Implementation
![Page 25: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/25.jpg)
T Flip-Flop
![Page 26: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/26.jpg)
T Flip-Flop from D Flip-Flop
D=TQ’+T’Q
If T=1, D=Q’If T=0, D=Q.
Q is updated with D at the next rising edge.
𝑄DT
rst
![Page 27: Lecture 13 Flip-Flops Section 5.4. Schedule 3/10MondayLatches (1)5.1-5.3 3/12WednesdayFlip-flops5.4 3/13ThursdayFlip-flops, D-latch 3/17MondaySpring break.](https://reader036.fdocuments.net/reader036/viewer/2022062516/56649da95503460f94a97535/html5/thumbnails/27.jpg)
Verilog Implementation of a T-FF
𝑄DT
rst