Fundamentals of Computer Systems Sequential Logic Stephen A. Edwards Columbia University Fall 2012
State-Holding Elements
Bistable Elements Equivalent circuits; right is more traditional. Two stable states: 0 1 1 0
A Bistable in the Wild This debounces the coin switch. Breakout, Atari 1976.
S Latch S S
S Latch 0 1 S 1 0 S S Set
S Latch 0 1 S 0 0 S S Hold, State 1
S Latch 1 0 S 0 1 S S eset
S Latch 0 0 S 0 1 S S Hold, State 0
S Latch 1 0 S 1 0 S S Huh?
S Latch 0 1 S 1 0 S S Set
S Latch 0 1 S 0 0 S S Hold, State 1
S Latch 1 0 S 1 0 S S Huh?
S Latch 0 X S 0 X S S Undefined
S Latches in the Wild Generates horizontal and vertical synchronization waveforms from counter bits. Stunt Cycle, Atari 1976.
Latch C C inputs outputs C 0 X 1 0 0 1 1 1 1 0
A Challenge A simple traffic light controller. Want the lights to cycle green-yellow-red. C C Y C G oes this work?
Positive-Edge-Triggered Flip-Flop C M Master C Slave C S C C C C M transparent C S opaque
Positive-Edge-Triggered Flip-Flop C M Master C Slave C S C C C C M transparent C S opaque
Positive-Edge-Triggered Flip-Flop C M Master C Slave C S C C C C M C S transparent opaque opaque transparent
Positive-Edge-Triggered Flip-Flop C M Master C Slave C S C C C C M C S transparent opaque opaque transparent
Positive-Edge-Triggered Flip-Flop C M Master C Slave C S C C C C M transparent opaque transparent C S opaque transparent opaque
Positive-Edge-Triggered Flip-Flop C M Master C Slave C S C C C C M transparent opaque transparent opaque C S opaque transparent opaque transparent
The Traffic Light Controller: A second try Let s try this again with flip-flops. Y G Y G
The Traffic Light Controller: A second try Let s try this again with flip-flops. Y G Y G
The Traffic Light Controller: A second try Let s try this again with flip-flops. Y G Y G
The Traffic Light Controller: A second try Let s try this again with flip-flops. Y G Y G
The Traffic Light Controller: A second try Let s try this again with flip-flops. Y G Y G
The Traffic Light Controller with eset ESET Y G ESET Y G
The Traffic Light Controller with eset ESET Y G ESET Y G
The Traffic Light Controller with eset ESET Y G ESET Y G
The Traffic Light Controller with eset ESET Y G ESET Y G
The Traffic Light Controller with eset ESET Y G ESET Y G
The Traffic Light Controller with eset ESET Y G ESET Y G
Flip-Flop with Enable 0 1 E C C E 0 X 1 0 0 1 1 1 0 X X 1 X X E C What s wrong with this solution?
Asynchronous Preset/Clear PE CL PE CL
The Traffic Light Controller w/ Async. eset ESET PE CL PE CL Y PE CL G
The Synchronous igital Logic Paradigm Gates and flip-flops only INPUTS OUTPUTS Each flip-flop driven by the same clock STATE C L Every cyclic path contains at least one flip-flop CLOCK NEXT STATE
Cool Sequential Circuits: Shift egisters A 0 1 2 3 A 0 1 2 3 0 X X X X 1 0 X X X 1 1 0 X X 0 1 1 0 X 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0
Universal Shift egister L 3 2 0 0 1 0 3 2 1 1 1 0 3 2 2 2 1 0 3 2 3 3 1 0 S 1 S0 S 1 S 0 3 2 1 0 0 0 3 2 1 0 1 3 2 1 0 1 0 3 2 1 0 1 1 2 1 0 L S 1 S 0 Operation 0 0 Shift right 0 1 Load 1 0 Hold 1 1 Shift left
Cool Sequential Circuits: Counters Cycle through sequences of numbers, e.g., 00 01 10 11
The 74LS163 Synchronous Binary Counter
Timing in Synchronous Circuits C L t c t c : Clock period. E.g., 10 ns for a 100 MHz clock
Timing in Synchronous Circuits C L Sufficient Hold Time? t p(min,ff) t p(min,cl) Hold time constraint: how soon after the clock edge can start changing? Min. FF delay + min. logic delay
Timing in Synchronous Circuits C L t p(max,ff) Sufficient Setup Time? t p(max,cl) Setup time constraint: when before the clock edge is guaranteed stable? Max. FF delay + max. logic delay
Clock Skew: What eally Happens C L 1 2 Sufficient Hold Time? 1 2 t skew t p(min,ff) t p(min,cl) 2 arrives late: clock skew reduces hold time
Clock Skew: What eally Happens C L 1 2 Sufficient Setup Time? 1 2 t skew t p(max,ff) t p(max,cl) 1 arrives early: clock skew reduces setup time