Last Lecture: Introduction To Sequential Logic and Systems
Last Lecture: Introduction To Sequential Logic and Systems
Last Lecture: Introduction To Sequential Logic and Systems
CSE370, Lecture 14
The D latch
! Output depends on clock " Clock high: Input passes to output " Clock low: Latch holds its output ! Latch are level sensitive and
Input D Q Q CLK Output Output
transparent
CLK D Qlatch
CSE370, Lecture 14
The D flip-flop
! Input sampled at clock edge " Rising edge: Input passes to output " Otherwise: Flip-flop holds its output ! Flip-flops are rising-edge triggered,
Input D Q Q CLK Output Output
CSE370, Lecture 14
Positive D latch
Input D Q Q Output Output
Negative D latch
Input D Q Q CLK
4
Output Output
Output Output
CLK D
CLK D Q Q CLK
Qff Qlatch
behavior is the same unless input changes while the clock is high
CSE370, Lecture 14
The master-slave D
Master D latch
Input D Q
Slave D latch
D Q Output
CLK
master-slave D flip-flop
CSE370, Lecture 14
Flip-flop timing
"
"
Setup time tsu: Amount of time the input must be stable before the clock transitions high (or low for negative-edge triggered FF) Hold time th: Amount of time the input must be stable after the clock transitions high (or low for negative-edge triggered FF)
data D Q D Q
data clock
tsu th
clock
There is a timing "window" around the clock edge during which the input must remain stable
CSE370, Lecture 14
changing
Q Q
CLK
CLK
CSE370, Lecture 14
CLK D
CLK
Qff
Q Q
Qlatch
behavior is the same unless input changes while the clock is high
CLK
CSE370, Lecture 14
The master-slave D
Master D latch
Input D Q
Slave D latch
D Q Output
CLK
master-slave D flip-flop
CSE370, Lecture 14
10
"load"
"stored bit"
11
W X Q Clk Y D Z Q
CSE370, Lecture 14
12
T flip-flop
! Full name: Toggle flip-flop ! Output toggles when input is asserted " If T=1, then Q ! Q' when CLK " " If T=0, then Q ! Q when CLK "
Input
T Q >
Input(t) 0 0 1 1
Q(t) 0 1 0 1
Q(t + #t) 0 1 1 0
CLK
CSE370, Lecture 14
13
The SR latch
! Cross-coupled NOR gates " Can set (S=1, R=0) or reset (R=1, S=0) the output
R Q Q'
! Cross-coupled NAND gates " Can set (S=1, R=0) or reset (R=1, S=0) the output
S' Q Q'
14
R'
CSE370, Lecture 14
SR latch behavior
! Truth table and timing
R Q Q' Hold Set S 0 0 1 1 Reset Set R 0 1 0 1 Q hold 0 1 disallow Race
S Reset R S Q Q'
CSE370, Lecture 14
100
15
R S
Q Q'
CSE370, Lecture 14
16
! Preset or Set the state to logic 1 " Synchronous: Q=1 when next clock edge arrives " Asynchronous: Q=1 when reset is asserted
# Doesn't wait for clock # Quick but dangerous
CSE370, Lecture 14
17