Professional Documents
Culture Documents
http://www.comp.nus.edu.sg/~cs1104
"dge-$riggered Flip-flops
*s!nchronous Inputs
CS1104-11 Lecture 11: Sequential Logic: Latches & Flip-flops 2
,ntroduction
* sequential circuit consists of a feedback path,
and e plo!s so e memory elementsCo .inational outputs Me or! outputs
Co .inational logic
"/ternal inputs
,ntroduction
$here are t2o t!pes of sequential circuits:
synchronous: outputs change onl! at specific ti e asynchronous: outputs change at an! ti e
5ista.le logic de6ices: latches and flip-flops Latches and flip-flops differ in the ethod used for
changing their stateCS1104-11 Introduction 4
-emor! ."ements
Memory element: a de6ice 2hich can re e .er
6alue indefinitel!, or change 6alue on co fro its inputsco and Me or! ele ent Q
and
stored 6alue
Characteristic ta.le:
Co and 3at ti e t4 Set %eset Me orise 9 :o Change
CS1104-11
Q(t) 8 8 0 1
Q(t+1) 1 0 0 1
-emor! ."ements
Me or! ele ent 2ith cloc<- Flip-flops are e or!
ele ents that change state on cloc< signalsco and Me or! ele ent Q stored 6alue
cloc<
#ositi6e edges
CS1104-11
:egati6e edges
Me or! "le ents ;
-emor! ."ements
$2o t!pes of triggering9acti6ation:
pulse-triggered edge-triggered
#ulse-triggered
latches >: 0 1, >FF 0 0
"dge-triggered
flip-flops positi6e edge-triggered 3>: 0 fro
S+/ 'atch
Complementary outputs: Q and Q' Ahen Q is BI&B, the latch is in S ! state Ahen Q is L>A, the latch is in " S ! state For active-#$%# input S-% latch 3also <no2n as :>%
gate latch4, "0BI&B 3and S0L>A4 %"S"$ state S0BI&B 3and "0L>A4 S"$ state .oth inputs L>A no change .oth inputs BI&B Q and Q' .oth L>A 3in6alid4C
CS1104-11
S-% Latch
S+/ 'atch
For active-&'( input SE-%E latch 3also <no2n as :*:'
gate latch4, "'0L>A 3and S'0BI&B4 %"S"$ state S'0L>A 3and "'0BI&B4 S"$ state .oth inputs BI&B no change .oth inputs L>A Q and Q' .oth BI&B 3in6alid4C
CS1104-11
S-% Latch
S+/ 'atch
Characteristics ta.le for acti6e-high input S-% latch:
S 0 1 0 1 R 0 0 1 1 Q NC 1 0 0 Q' NC 0 1 0 No change. Latch remained in present state. Latch SET. Latch RESET. In alid condition.
S R Q Q'
CS1104-11
S-% Latch
10
S+/ 'atch
*cti6e-BI&B input S-% latch
10 100 " Q 11000 Q' 0 0 1 1 0
S 1 0 0 0 1 " 0 0 1 0 1 Q Q' 1 0 initial 1 0 3afer S01, "004 0 1 0 1 3after S00, "014 0 0 in6alidC
10 001 S
S'
Q Q'
S-% Latch
"'
CS1104-11
S' "' 1 0 1 1 0 1 1 1 0 0
S EN R
Q Q'
CS1104-11
12
Gnder 2hat condition does the in6alid state occurH Characteristic ta.le:
EN!1
Q(t) 0 0 0 0 1 1 1 1 S 0 0 1 1 0 0 1 1 R 0 1 0 1 0 1 0 1 Q(t+1) 0 0 1 indeterminate 1 0 1 indeterminate
S R 0 0 1 1 0 1 0 1
CS1104-11
0ated 1 'atch
Ma<e " input equal to S' *ated , latch+ , latch eli inates the undesira.le condition of in6alid
state in the S-" latch, ) Q'
D EN
Q Q'
CS1104-11
14
0ated 1 'atch
Ahen ) is BI&B,
,0BI&B latch is S"$ ,0L>A latch is %"S"$
Characteristic ta.le:
EN 1 1 0 D 0 1 " Q(t+1) 0 1 Q(t) Reset Set No change
CS1104-11
17
inputs are gated directl! to the output J- $hus, an! change in the e/citation input i ediatel! causes a change in the latch outputcontrol signal called a clock to restrict the ti es at 2hich the states of the e or! ele ents a! changeele ents called flip-flops-
.dge+Triggered *"ip+#"ops
.lip-flops: s!nchronous .ista.le de6ices >utput changes state at a specified point on a
triggering input called the clock-
CS1104-11
"dge-$riggered Flip-flops
1=
.dge+Triggered *"ip+#"ops
S-%, ' and (-) edge-triggered flip-flops- :ote the KLM
s! .ol at the cloc< inputS C R Q' Q D C Q' Q J C K Q' Q
S+/ *"ip+#"op
S-% flip-flop: on the triggering edge of the cloc< pulse,
S0BI&B 3and "0L>A4 S"$ state "0BI&B 3and S0L>A4 %"S"$ state .oth inputs L>A no change .oth inputs BI&B in6alid
" ! irrele ant #$don%t care&' ! cloc( transition L)* to +I,+ CS1104-11 S% Flip-flop 1D
S+/ *"ip+#"op
It co prises + parts:
a .asic )/), latch a pulse-steerin* circuit a pulse transition detector 3or ed*e detector4 circuit
CS1104-11
S% Flip-flop
20
S+/ *"ip+#"op
$he pulse transition detectorS CLK .ulse transition detector R Q
Q'
1 *"ip+#"op
' flip-flop: single input , 3data4
,0BI&B S"$ state ,0L>A %"S"$ state
Q follo2s , at the cloc< edge Con6ert S-% flip-flop into a ' flip-flop: add an in6erterD CLK S C R Q' Q
D 1 0 CLK Q(t+1) 1 0 Comments Set Reset
* positi6e edge-triggered ' flipflop for ed 2ith an S-% flip-flopCS1104-11 ' Flip-flop 22
1 *"ip+#"op
*pplication: 0arallel data transfer$o transfer logic-circuit outputs 1, 2, 3 to flip-flops Q1, Q4 and Q5 for storageD CLK X Q Q' Q Q' Q Q' Q3 ! Z* Q2 ! Y* Q1 ! X*
Y Z
D CLK
D Transfer CLK
3+4 *"ip+#"op
(-) flip-flop: J and JE are fed .ac< to the pulsesteering :*:' gates-
:o in6alid state Include a to**le state 60BI&B 3and 70L>A4 S"$ state 70BI&B 3and 60L>A4 %"S"$ state .oth inputs L>A no change .oth inputs BI&B toggle
CS1104-11
(-) Flip-Ffop
24
3+4 *"ip+#"op
(-) flip-flopJ CLK K .ulse transition detector Q
Q'
Characteristic ta.leJ 0 0 1 1 K 0 1 0 1 CLK Q(t+1) Q(t) 0 1 Q(t)' Comments No change Reset Set Toggle
Q 0 0 0 0 1 1 1 1
J K 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
Q(t+1) 0 0 1 1 1 0 1 0 27
T *"ip+#"op
$ flip-flop: single-input 6ersion of the (-) flip flop,
for ed .! t!ing .oth inputs togetherT CLK .ulse transition detector Q
T CLK
J C K
Q Q'
Q'
2;
T *"ip+#"op
*pplication: .re8uency division+igh J CLK C K CLK Q CLK QA Q Q CLK +igh J C K QA +igh J C K Q
As!nchronous ,nputs
S-%, ' and (-) inputs are s!nchronous inputs, as
data on these inputs are transferred to the flip-flopFs output onl! on the triggered edge of the cloc< pulseindependent of the cloc<? e/a ple: preset 30" 4 and clear 3C&"4 Nor direct set 3S,4 and direct reset 3",4O
Ahen 0" 0BI&B, Q is i ediatel! set to BI&B Ahen C&"0BI&B, Q is i ediatel! cleared to L>A Flip-flop in nor al operation ode 2hen .oth 0"
and C&" are L>A-
CS1104-11
*s!nchronous Inputs
2@
As!nchronous ,nputs
* (-) flip-flop 2ith acti6e-L>A preset and clear inputs!RE !RE J Q .ulse transition detector Q'
J C K
CLR CLK !RE CLR
Q
CLK
Q'
K CLR
6 0 7 0 BI&B
CS1104-11
Toggle
Clear 2D
End o1 segment