Professional Documents
Culture Documents
R Q R S Q Q S
En
R S
R S
Q Q
R
Clock Signal Level-sensitive R-S Latch
Q
En Q
Latches-1
R S
R S
Q Q(regular) Q En
R S
R
S
Q Q(enabled)
En Q
S R En Q
(regular)
Set Reset
Set Reset
Set
Q
(enabled)
Enabled latch only changes when enable is asserted Seattle Pacific University EE 1210 - Logic System Design Latches-2
R S
Q Q
En Q
S
R Q
Set
Set
A clocked R-S latch follows the R/S inputs when the clock is asserted. A clocked R-S latch stores the value when the clock goes low when the clock is not asserted.
Seattle Pacific University EE 1210 - Logic System Design Latches-3
D-Latches (gated)
D C clk D R S Q
En Q
In a D-latch, the output follows the input when the clock is high.
When the clock is low, the output remains what it was on the falling edge of the clock.
clk
Clock D Q
Latches-4
Edge-triggering
D The carrot symbol means edge-triggered Q clk
In a positive edge-triggered D FlipFlop, the output looks at the input only during the instant that the clock changes from low to high.
Clock D
Latches-5
Negative Edge-triggering
D Q
In a negative edge-triggered D FlipFlop, the output looks at the input only on the falling edge of the clock.
clk
Clock
D
Negative Edge-triggered D Flip-flop: Every falling edge, output is set to the input
Latches-6
J-K Flip-Flops
We want to eliminate the forbidden state of the R-S Latch (when R and S are both 1). Alternative option: Q, Q are always different. Use them to control the input. R S Q Q clk Q
K J
Jt 0 0 0 0 1 1 1 1
Kt 0 0 1 1 0 0 1 1
Qt 0 1 0 1 0 1 0 1
Qt+1 0 1 0 0 1 1 1 0
Hold Reset Set Toggle J, K act just like Set and Reset, except: When theyre both 1, we get a toggle.
Latches-7
Latches-8
Latches-9
Toggle Flip-Flops
Build a flip-flop that toggles its state on each clock edge when it is enabled (T is the enable). T Q Q T J K Q Q Q
Q+ is the Q output after the clock changes
Q
clk
T 0 0 1 1
Q 0 1 0 1
Q+ 0 1 1 0
Clock T Q
Latches-10
Clk Clk D
D is changing during the rising edge of Clk. Is a 1 or 0 clocked in? D is changing right after the rising edge of Clk. Is a 1 or 0 clocked in?
Latches-11
Setup Time: How long a signal must be stable preceding the clock edge Hold Time: How long a signal must be stable after the clock edge
Clk
Latches-12
Setup time 20ns Hold time 5ns Propagation delays - Low to High 23 ns - High to Low 40 ns
Seattle Pacific University EE 1210 - Logic System Design Latches-13
Latches-14
The normal data inputs to a flip flop (D, S and R, or J and K) are referred to as synchronous inputs because they have effect on the outputs (Q and not-Q) only in step, or in sync, with the clock signal transitions. These extra inputs that I now bring to your attention are called asynchronous because they can set or reset the flip-flop regardless of the status of the clock signal. Typically, they're called preset and clear
Latches-15
Latches-16
Latches-17
Latches-18
Latches-19