fundamentals of computer systems - columbia...
TRANSCRIPT
![Page 1: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/1.jpg)
Fundamentals of Computer SystemsSequential Logic
Stephen A. Edwards
Columbia University
Fall 2012
![Page 2: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/2.jpg)
State-Holding Elements
![Page 3: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/3.jpg)
Bistable Elements
Q Q
Q
Q
Equivalent circuits; right is more traditional.
Two stable states:
0
1
1
0
![Page 4: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/4.jpg)
A Bistable in the Wild
This “debounces” the coin switch.
Breakout, Atari 1976.
![Page 5: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/5.jpg)
SR Latch
R
S
Q
Q
Q
Q
S
R
![Page 6: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/6.jpg)
SR Latch
0R
1S
1 Q
0 Q
Q
Q
S
R
R
S
Q
QSet
![Page 7: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/7.jpg)
SR Latch
0R
0S
1 Q
0 Q
Q
Q
S
R
R
S
Q
QHold, State 1
![Page 8: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/8.jpg)
SR Latch
1R
0S
0 Q
1 Q
Q
Q
S
R
R
S
Q
QReset
![Page 9: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/9.jpg)
SR Latch
0R
0S
0 Q
1 Q
Q
Q
S
R
R
S
Q
QHold, State 0
![Page 10: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/10.jpg)
SR Latch
1R
1S
0 Q
0 Q
Q
Q
S
R
R
S
Q
QHuh?
![Page 11: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/11.jpg)
SR Latch
0R
1S
1 Q
0 Q
Q
Q
S
R
R
S
Q
QSet
![Page 12: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/12.jpg)
SR Latch
0R
0S
1 Q
0 Q
Q
Q
S
R
R
S
Q
QHold, State 1
![Page 13: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/13.jpg)
SR Latch
1R
1S
0 Q
0 Q
Q
Q
S
R
R
S
Q
QHuh?
![Page 14: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/14.jpg)
SR Latch
0R
0S
X Q
X Q
Q
Q
S
R
R
S
Q
QUndefined
![Page 15: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/15.jpg)
SR Latches in the Wild
Generates horizontal and vertical synchronizationwaveforms from counter bits.Stunt Cycle, Atari 1976.
![Page 16: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/16.jpg)
D Latch
Q
Q
D
CQ
Q
D
C
inputs outputs
C D Q Q
0 X Q Q1 0 0 11 1 1 0
![Page 17: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/17.jpg)
A Challenge
A simple traffic light controller.
Want the lights to cycle green-yellow-red.
DC
Q
DC
Q
DC
Q
R
Y
G
Does this work?
![Page 18: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/18.jpg)
![Page 19: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/19.jpg)
![Page 20: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/20.jpg)
![Page 21: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/21.jpg)
![Page 22: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/22.jpg)
![Page 23: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/23.jpg)
![Page 24: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/24.jpg)
![Page 25: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/25.jpg)
![Page 26: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/26.jpg)
![Page 27: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/27.jpg)
![Page 28: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/28.jpg)
![Page 29: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/29.jpg)
![Page 30: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/30.jpg)
Positive-Edge-Triggered D Flip-Flop
Master Slave
DC
Q DC
Q
C
DCM CS
D′ Q D Q
C
D
CM
D′
CS
Q
transparent
opaque
![Page 31: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/31.jpg)
Positive-Edge-Triggered D Flip-Flop
Master Slave
DC
Q DC
Q
C
DCM CS
D′ Q D Q
C
D
CM
D′
CS
Q
transparent
opaque
![Page 32: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/32.jpg)
Positive-Edge-Triggered D Flip-Flop
Master Slave
DC
Q DC
Q
C
DCM CS
D′ Q D Q
C
D
CM
D′
CS
Q
transparent
opaque
opaque
transparent
![Page 33: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/33.jpg)
Positive-Edge-Triggered D Flip-Flop
Master Slave
DC
Q DC
Q
C
DCM CS
D′ Q D Q
C
D
CM
D′
CS
Q
transparent
opaque
opaque
transparent
![Page 34: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/34.jpg)
Positive-Edge-Triggered D Flip-Flop
Master Slave
DC
Q DC
Q
C
DCM CS
D′ Q D Q
C
D
CM
D′
CS
Q
transparent
opaque
opaque
transparent
transparent
opaque
![Page 35: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/35.jpg)
Positive-Edge-Triggered D Flip-Flop
Master Slave
DC
Q DC
Q
C
DCM CS
D′ Q D Q
C
D
CM
D′
CS
Q
transparent
opaque
opaque
transparent
transparent
opaque
opaque
transparent
![Page 36: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/36.jpg)
The Traffic Light Controller: A second tryLet’s try this again with D flip-flops.
D Q
D Q
D Q
CLK
R
Y
G
CLK
R
Y
G
![Page 37: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/37.jpg)
The Traffic Light Controller: A second tryLet’s try this again with D flip-flops.
D Q
D Q
D Q
CLK
R
Y
G
CLK
R
Y
G
![Page 38: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/38.jpg)
The Traffic Light Controller: A second tryLet’s try this again with D flip-flops.
D Q
D Q
D Q
CLK
R
Y
G
CLK
R
Y
G
![Page 39: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/39.jpg)
The Traffic Light Controller: A second tryLet’s try this again with D flip-flops.
D Q
D Q
D Q
CLK
R
Y
G
CLK
R
Y
G
![Page 40: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/40.jpg)
The Traffic Light Controller: A second tryLet’s try this again with D flip-flops.
D Q
D Q
D Q
CLK
R
Y
G
CLK
R
Y
G
![Page 41: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/41.jpg)
The Traffic Light Controller with Reset
D Q
D Q
D Q
CLK
RESET
R
Y
G
CLK
RESET
R
Y
G
![Page 42: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/42.jpg)
The Traffic Light Controller with Reset
D Q
D Q
D Q
CLK
RESET
R
Y
G
CLK
RESET
R
Y
G
![Page 43: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/43.jpg)
The Traffic Light Controller with Reset
D Q
D Q
D Q
CLK
RESET
R
Y
G
CLK
RESET
R
Y
G
![Page 44: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/44.jpg)
The Traffic Light Controller with Reset
D Q
D Q
D Q
CLK
RESET
R
Y
G
CLK
RESET
R
Y
G
![Page 45: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/45.jpg)
The Traffic Light Controller with Reset
D Q
D Q
D Q
CLK
RESET
R
Y
G
CLK
RESET
R
Y
G
![Page 46: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/46.jpg)
The Traffic Light Controller with Reset
D Q
D Q
D Q
CLK
RESET
R
Y
G
CLK
RESET
R
Y
G
![Page 47: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/47.jpg)
D Flip-Flop with Enable
D Q Q01D
C
E
C E D Q
↑ 0 X Q↑ 1 0 0↑ 1 1 10 X X Q1 X X Q
D QEC
DQ
What’s wrong with thissolution?
![Page 48: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/48.jpg)
Asynchronous Preset/Clear
D QPRE
CLR
CLK
D
PRE
CLR
Q
![Page 49: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/49.jpg)
The Traffic Light Controller w/ Async. Reset
D QPRE
CLR
D QPRE
CLR
D QPRE
CLR
CLKR
Y
G
RESET
![Page 50: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/50.jpg)
The Synchronous Digital Logic Paradigm
Gates and Dflip-flops only
Each flip-flopdriven by thesame clock
Every cyclicpath containsat least oneflip-flop
CLSTATE
NEXT STATE
INPUTS OUTPUTS
CLOCK
![Page 51: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/51.jpg)
Cool Sequential Circuits: Shift Registers
A
Q0 Q1 Q2
Q3
CLK
A Q0Q1Q2Q3
0 X X X X1 0 X X X1 1 0 X X0 1 1 0 X1 0 1 1 00 1 0 1 10 0 1 0 10 0 0 1 01 0 0 0 10 1 0 0 0
![Page 52: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/52.jpg)
Universal Shift Register
S1S0
0123
D0Q0
0123
D1Q1
0123
D2Q2
0123
D3Q3
CLK
R
L
S1 S0 Q3 Q2 Q1 Q0
0 0 R Q3 Q2 Q10 1 D3 D2 D1 D01 0 Q3 Q2 Q1 Q01 1 Q2 Q1 Q0 L
S1 S0 Operation
0 0 Shift right0 1 Load1 0 Hold1 1 Shift left
![Page 53: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/53.jpg)
Cool Sequential Circuits: Counters
Cycle through sequences of numbers, e.g.,
00 01 10 11
![Page 54: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/54.jpg)
The 74LS163 Synchronous Binary Counter
![Page 55: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/55.jpg)
Timing in Synchronous Circuits
CL· · · · · ·Q D
CLK
CLK
Q
D
tc
tc: Clock period. E.g., 10 ns for a 100 MHz clock
![Page 56: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/56.jpg)
Timing in Synchronous Circuits
CL· · · · · ·Q D
CLK
CLK
Q
D
tp(min,FF) tp(min,CL)
Sufficient Hold Time?
Hold time constraint: how soon after the clock edge canD start changing? Min. FF delay + min. logic delay
![Page 57: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/57.jpg)
Timing in Synchronous Circuits
CL· · · · · ·Q D
CLK
CLK
Q
D
tp(max,FF)tp(max,CL)
Sufficient Setup Time?
Setup time constraint: when before the clock edge is Dguaranteed stable? Max. FF delay + max. logic delay
![Page 58: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/58.jpg)
Clock Skew: What Really Happens
CL· · · · · ·Q D
CLK1
CLK
CLK2
CLK1
CLK2
Q
Dtp(min,FF) tp(min,CL)
tskew
Sufficient Hold Time?
CLK2 arrives late: clock skew reduces hold time
![Page 59: Fundamentals of Computer Systems - Columbia Universitysedwards/classes/2012/3827-fall/sequential.pdfA Bistable in the Wild This “debounces” the coin switch. Breakout, Atari 1976](https://reader035.vdocuments.net/reader035/viewer/2022080721/5f7a7ca6e7dc8b4a580a8e4d/html5/thumbnails/59.jpg)
Clock Skew: What Really Happens
CL· · · · · ·Q D
CLK1
CLK
CLK2
CLK1
CLK2
Q
Dtp(max,FF) tp(max,CL)
tskew
Sufficient Setup Time?
CLK1 arrives early: clock skew reduces setup time