330 likes | 499 Views
Latches CS370 –Spring 2003. Section 4-2 Mano & Kime. Sequential Logic. Combinational Logic Output depends only on current input Sequential Logic Output depends not only on current input but also on past input values Need some type of memory to remember the past input values.
E N D
LatchesCS370 –Spring 2003 Section 4-2 Mano & Kime
Sequential Logic • Combinational Logic • Output depends only on current input • Sequential Logic • Output depends not only on current input but also on past input values • Need some type of memory to remember the past input values
Circuits that we have learned so far Information Storing Circuits Timed “States”
Storing Information Inverters Buffers
!S Q !Q !R !S-!R Latch !S !R Q !Q 1 0 0 0 0 1 1 0 1 1 1 1 0 1 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 0 0 0 0 0 1 1 0 1 1 1 1 0 1 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 0 1 0 0 0 1 1 0 1 1 1 1 0 1 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 0 1 0 0 0 1 1 0 1 1 1 0 Set 0 1 0 1 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 1 1 0 0 0 1 1 0 1 1 1 0 Set 0 1 0 1 Store 1 0 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 1 1 0 0 0 1 1 0 1 1 1 0 Set 0 0 0 1 Store 1 0 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 1 1 0 0 0 1 1 0 1 1 1 0 Set 1 0 0 1 Store 1 0 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 1 0 0 0 0 1 1 0 1 1 1 0 Set 0 1 Reset 1 0 0 1 Store 1 0 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 1 0 0 0 0 1 1 0 1 1 1 0 Set 0 1 Reset 1 1 0 1 Store 1 0 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 0 1 0 0 0 1 1 0 1 1 1 1 Disallowed 1 0 Set 0 1 Reset 1 0 0 1 Store 1 0 Q0 !Q0 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
!S Q !Q !R !S-!R Latch !S !R Q !Q 1 0 0 0 0 1 1 0 1 1 1 1 Disallowed 1 0 Set 0 1 Reset 1 1 0 1 Store 1 0 Q0 !Q0 X Y nand 0 0 1 0 1 1 1 0 1 1 1 0
S CLK R S R CLK !S !R Q !Q S-R Latch !S Q !Q !R 0 0 1 1 1 Q0 !Q0 Store 0 1 1 1 0 0 1 Reset 1 0 1 0 1 1 0 Set 1 1 1 0 0 1 1 Disallowed X X 0 1 1 Q0 !Q0 Store
D S R CLK Q !Q D CLK Q !Q 0 0 1 Q0 !Q0 Store 0 1 1 0 1 Reset 1 0 1 1 0 Set 1 1 1 1 1 Disallowed X X 0 Q0 !Q0 Store 0 1 0 1 1 1 1 0 X 0 Q0 !Q0 D Latch S !S Q CLK !Q !R R
D CLK Q !Q 0 1 0 1 1 1 1 0 X 0 Q0 !Q0 D Latch S !S D Q CLK !Q !R R Note that Q follows D when the clock in high, and is latched when the clock goes to zero.
Does NOT latch z = z $ x = 0 $ 1 = 1 D Latch Latches on following edge of clock y CLK D x Q z x E CLK y z
D Latch Use narrow pulse y CLK D x Q z x E CLK y z Does latch z = z $ x = 0 $ 1 = 1 If x remains high, successive clock pulses will toggle z
D Pulse-narrowing circuit CLK D NCK Q !Q D CLK Q !Q 0 1 0 1 1 1 1 0 X 0 Q0 !Q0 0 0 1 1 1 0 X 0 Q0 !Q0 D Flip-Flop S !S Q NCK !Q !R R
D Q CLK !Q D CLK Q !Q 0 0 1 1 1 0 X 0 Q0 !Q0 D Flip-Flop Positive edge triggered D gets latched to Q on the rising edge of the clock.
D Q CLK !Q D Flip-Flop pulse width CLK setup time hold time y z propagation delay
SR Master-Slave Flip-Flop S R CLK Q !Q 0 0 1 Q0 !Q0 Store 0 1 1 0 1 Reset 1 0 1 1 0 Set 1 1 1 1 1 Disallowed X X 0 Q0 !Q0 Store
J-K Flip-Flop J K CLK Q !Q 0 0 Q0 !Q0 0 1 0 1 1 0 1 0 1 1 Toggle X X 0 Q0 !Q0 J Q CLK !Q K