Unit- 5
Sequential Logic
Circuits
Unit- 5
Sequential
Combinationa l circuits z The outputs are entirely dependent on the current inputs Sequential circuits
z z
Storage/memory elements
z z z
Consists of a combinational circuit to which storage elements are connected to form a feedback path z Outputs are a function of both the current inputs and the present state of the storage elements capable of storing binary information defining the state of the sequential circuit Next state is a function of external inputs and current state
Instability problem: may become unstable at times May be regarded as a combinational circuit with feedback
Clocked sequential circuits (CSC) z Synchronous sequential circuits that use clock pulses
in the inputs of storage elements z Synchronization is achieved by a master-clock generator to generate a periodic train of clock pulses z most commonly used, no instability problems
major differences in the number of inputs they possess and in the manner in which the inputs affect the binary
state
The outputs can come either from the combinational circuit or from the flip-flops or both The flip-flops receive their inputs from the combinational circuit and also from a clock signal with pulse that occurs at fixed intervals of time
z
The flip-flop cannot change and the feedback loop is broken when a clockoutputs pulse is not active
5-2 Latches
capable of storing binary information, impractical for use in synchronous sequential circuits
SR Latch
z
Two states: Set and Reset states z an asynchronous sequential circuit with two cross-coupled NOR gates
z
S-R Latch
Determines when the state of the latch can be changed eliminate undesirable condition of indeterminate state in
D Latch
z
SR latch
10
SR Latch
Two inputs labeled S for set and R for reset
(S,R)=(1,0): set (Q=1, the set state) (S,R)=(0,1): reset (Q=0, the reset/clear state) (S,R)=(0,0): normal condition
z z
no operation, in either the set or the reset state depending on which input was most recently at 1 consider (S,R) = (1,1) (0,0)
unpredictable next state when both inputs return to 0 (depend on which input returns to 0 first) Q = [R+(S+Q)] = R(S+Q) Q = [S+(R+Q)] = S(R+Q)
11
(S+Q) (R+Q)
12
13
14
S_ 1/S'
0/1
R_ 1/R'
16
D Latch
S=D and R=D
Ensure S and R are never equal to 1 at the same time z Eliminate the undesirable conditions of the indeterminate state in the RS latch
z
Q=D Q = no change
11
12
5-3 Flip-Flops
Types of triggers
z
The transition it causes is said to trigger the flip-flop Level triggered latches
D latch is triggered every time the pulse stays at logic 1 level. Be used as a temporary storage between a unit and its environment If level-triggered flip-flops are used, the feedback path may cause instability problem as long as the clock pulse stays in the active level triggered only during a signal transition (01 or 10)
13
Edge-triggered D flip-flop
Store binary info during transition Method 1: Master-slave D flip-flop
z
a slave flip-flop (negative-level triggered) change only during negative edge of clock
z
longer
propagation delay
14
CLK=positive transition Q=D (state changes once) D=0 when CLK becomes 1 R=1 to 0 D changes further, no effect D=1 when CLK becomes 1 R=stay 1 D changes further, no effect CLK=negative transition or 1 quiescent condition (state holds)
(RD) S [S(RD)] S (RD) R R=CLK+S+RD (RD) [S(RD)]=S+RD S=CLK+S(RD)
Q=R Q=D
15
(RD) S
[S(RD)]=S+RD S=CLK+S(RD)
D=0
S=CLK+S R=CLK+S
D=1
S=CLK+SR CLK=0 S=R=1 D= 0 Q=Q S=R=1 D= 1 Q=Q R=CLK+(SR) [S(RD)] S (RD ) R R=C LK+ S+ RD =C LK + [S( R D) ]
R=(SR)
(R
D)
t
12 20 28 30
5 6 7 8 9 10 14 22 16 24 18 26
maintained at a constant value (or be ready) prior to the occurrence of the clock transition data to the internal latch
Hold time
a minimum time for which the D input must not changes after the application of the positive transition of the clock clock to the internal latch
Graphic Symbols
18
JK Flip-Flop
Edge-triggered D flip-flop
z z z
Store binary information during edge trigger Require the smallest number of gates Other types of flip-flops can be constructed using it Q no change Q =0 reset to 0 J=1, K=0: D=1 Q =1 set to 1 J=1, K=1: D=Q Q =Q complement output
JK Flip-Flop: D=JQ'+K'Q
J=0, K=0: D=Q J=0, K=1: D=0
19
T Flip-Flop
T (toggle) flip-flop: D = TQ = TQ'+T'Q
T=0: D=Q, no change T=1: D=Q' Q=Q'
20
T flop-flop
Q(t+1) = TQ = TQ + TQ
21
Direct Inputs
preset/direct set: the inputs that sets the flip-flop to 1 clear/direct reset: the inputs that clears the flip-flop to 0
asynchronous reset
22
35
state table state equation CSC diagram Four sections: present state, input, next state and output List all possible binary combinations of present state and inputs
Determine next states and outputs from the logic diagram or from the state equations
A(t+1)=Ax+
36
37
Given one input, there are two possible next states and outputs for each present state
38
input/output x/y
A(t+1)=Ax+Bx
B(t+1)= Ax y=(A+B
)x
Input/Output Equations
output equations: the circuit that generates external outputs z input equations: the circuit that generates inputs to flip-flops
output equations input state equations characteristic equations (or excitation equations) equations
Symbol
41
convention: DQ = x + y an OR y gate with inputs x and y connected to the D input of a flip-flop whose output is labeled with the symbol Q
42
(1) Flipequation
(2) State
(3)
(4)
30
equation: Q(t+1)=TQ=TQ+TQ Input equations and output equation: T =Bx; A TB=x; y=AB State equations A(t+1)=(Bx)A+(Bx)A=AB+Ax+ABx B(t+1)=xB
31
The outputs may change if the inputs change during the clock cycle The outputs may have momentary false values due to delay To synchronize, the outputs must be sampled only during the clock edge
Mealy finite state machine (FSM, machine): the Mealy model of a sequential circuit example: Fig. 5-15 (D)
Moore model
Moore finite state machine (FSM, machine): the Moore model of a sequential circuit example: Figure 5-19 (JK), 5-20 (T)
50
starts from a circuit diagram and culminates in a state table or state diagram starts from a set of specifications and culminates in a logic diagram
State reduction problem: reduction of the number of flip-flops in a sequential circuit, while keeping the external input-output requirements unchanged
m
z z
51
State Reduction
Given a state table or state diagram Find ways of reducing the number of states without altering the input-output relationships
52
Test sequence
Initial state: a Input sequence: 01010110100
53
State Equivalence
State equivalence: Two states are equivalent if, for each member of the set of inputs, they
give exactly the same output and send the circuit either to the same state or to an equivalent state
2.Remove one of the equivalent state and replace by the other state each time it occurs in the table
Another approach: systematic reduction with an implication table
54
55
36
State Assignment
In order to design a sequential circuit with physical components A circuit with m states need n bits where 2n >= m To distinguish it from a stable table with symbolic names for states
37
Tasks
z z
starts from a set of specifications obtains a state table/diagram (or equivalences) first culminates in a logic diagram (or a list of Boolean functions) Choosing the flip-flops
Determined from the number of states needed Derived from the state table by evaluating the flip-flop input equations and output equations
Synthesis
Summarized procedure
most challenging
38
62
63
Step 2-4: Assign binary codes and list state table (Table 5-11) Step 5:Choose type of flip-flops Step 6:Derive simplified input and output equations
0 1 2 3
4 5 6 7
64
65
66
(1) Input/output equations (2) state equations (3) State table (4) State diagram
?
present states input equations
42
Excitation Tables
The input equations for the circuit using flip-flops other than the D type, i.e. JK and T types, must be derived indirectly from the state table Excitation table: list the required inputs for a given
change of state
43
The input equations must be evaluated from the present-state to next-state transition derived from the excitation table
(1) (2)
44
JA=Bx
A=Bx
JB=x
KB=(A x)
45
(2)
46
(3)
TA2=A1A0
75
TA1=A0
TA0=1
Summary
Chapter 5 Synchronous Sequential Logic 5-1 Sequential Circuits 5-2 Latches
5-3 Flip-Flops
5-4 Analysis of Clocked Sequential Circuits 5-5 HDL for Sequential Circuits 5-6 State Reduction and Assignment 5-7 Design Procedure
circuit diagraminput equationstate equationstate tablestate diagram