Chapter-5-Synchronous Sequential Logic PDF
Chapter-5-Synchronous Sequential Logic PDF
Chapter 5
Synchronous S e q u e n t i a l
Logic
gürtaçyemişçioğlu
2
OUTLINE OF CHAPTER 5
Design Procedure
SEQUENTIAL CIRCUITS
• Every digital system is likely to have combinational circuits.
Inputs Outputs
Combinational
Circuit
Memory
Elements
SEQUENTIAL CIRCUITS
• The storage elements are devices capable of storing binary
information.
• The binary information stored in these elements at any given
time defines the state of the sequential circuit at that time.
• The sequential circuit receives binary information from external
inputs.
• These inputs, together with the present state of the storage
elements, determine the binary value of the outputs.
SEQUENTIAL CIRCUITS
• They also determine the condition for changing the state in the
storage elements.
SEQUENTIAL CIRCUITS
• There are two main types of sequential circuits.
Synchronous Asynchronous
Sequential
Circuit
SEQUENTIAL CIRCUITS
• Asynchronous Sequential Circuit
Inputs Outputs
Combinational
Circuit
Memory
Elements
– The behaviour of the circuit depends upon the input signals at any
instant of time and the order in which the inputs change.
SEQUENTIAL CIRCUITS
• Asynchronous Sequential Circuit
– In gate – type asynchronous systems, the storage elements consist
of logic gates whose propagation delay provides the required
storage.
SEQUENTIAL CIRCUITS
• Synchronous Sequential Circuit
Inputs Outputs
Combinational
Circuit
Flip-flops
Clock
SEQUENTIAL CIRCUITS
• Synchronous Sequential Circuit
– Employs signals that affect the storage elements only at discrete
instants of time.
• Clock pulses are distributed throughout the system in such a way that
storage elements are affected only with the arrival of each pulse.
SEQUENTIAL CIRCUITS
• Synchronous Sequential Circuit
• In practice, the clock pulses are applied with other signals that specify
the required change in the storage elements.
– Circuits that use clock pulses in the inputs of storage elements are
called clocked sequential circuits.
– The storage elements used in clocked sequential circuits are called
flip – flops.
– A flip – flop is a binary storage device capable of storing one bit of
information.
L ATC H E S
• Latches are the basic circuits from which all flip – flops are
constructed.
L ATC H E S
• SR Latch
S R Q Q’
1 0 1 0 Set State
Reset (R) 1
0 0
1
Q Hold
0 0 1 0 State
0 1 Reset
0 1
State
Set (S) 1 Q 0 0 0 1
Hold
0 0 State
Invalid
1 1 0 0
State
L ATC H E S
• SR Latch
S R Q
R Q 0 0 Q0 No change
0 1 0 Reset
1 0 1 Set
S Q 1 1 Q=Q’=0 Invalid
S Q S R Q
0 0 Q=Q’=1 Invalid
0 1 1 Set
R Q 1 0 0 Reset
1 1 Q0 No change
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
17
L ATC H E S
• SR Latch with Control Input
R R S S
Q Q
C C
R Q
S Q R
S
C S R Q
0 X X HOLD No change
1 0 0 HOLD No change
1 0 1 Q=0 Reset
1 1 0 Q=1 Set
1 1 1 Q = Q’ Invalid
L ATC H E S
• D Latch (D = Data)
– One way to eliminate the undesirable condition of the indeterminate
state in the SR latch is to ensure that inputs S and R are never equal
to 1 at the same time.
• C (control)
L ATC H E S
Timing Diagram
• D Latch (D = Data)
D S C
Q
C D
R Q
Q
C D Q t
0 X HOLD No change
1 0 Q=0 Reset Output may
1 1 Q=1 Set change
L ATC H E S
Timing Diagram
• D Latch (D = Data)
D S C
Q
C D
R Q
Q
C D Q
0 X HOLD No change
Output may
1 0 Q=0 Reset
change
1 1 Q=1 Set
L ATC H E S
• D Latch (D = Data)
– The D latch has an ability to hold data in its internal storage.
F L I P – F LO P S
• Flip – flops are constructed in such a way to make D latches operate
properly when they are part of a sequential circuit that employs a
common clock.
• The problem with the latch is that
– It responds to a change in the level of a clock pulse.
• Positive level response in the control input allows changes, in the output
when the D input changes while the control pulse stays at logic 1.
F L I P – F LO P S
• Controlled latches are level – triggered
F L I P – F LO P S
• There are two ways that a latch can be modified to form a flip –
flop.
1. Employ two latches in a special configuration that
• isolates the output of the flip – flop from being affected while its input is
changing.
F L I P – F LO P S
• Master – Slave D flip – flops
D D Q D Q Q
D Latch D Latch
(Master) (Slave)
C C
Master Slave
CLK
CLK
Looks like it is negative D
edge-triggered
QMaster
QSlave
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
27
F L I P – F LO P S
• Edge-Triggered D Flip – Flop • Two latches respond to the
external D (data) and CLK (clock
inputs).
S
Q • Third latch provides the outputs
CLK for the flip – flop.
R Q
F L I P – F LO P S
• Edge-Triggered D Flip – Flop I. When CLK = 0, S = 1 and R =
1.Output = present state.
3. Q = 0.
F L I P – F LO P S
• Edge-Triggered D Flip – Flop III. If D changes when CLK = 1 then
1. R remains at 0.
2. Flip – flop is locked out
F L I P – F LO P S
• Edge-Triggered D Flip – Flop V. If D = 1 when CLK = 0 1,
1. S changes to 0.
F L I P – F LO P S
• Edge-Triggered D Flip – Flop • When CLK in the positive-edge-
triggered flip – flop
– Makes positive transition
S • The value of D is transferred
Q
to Q.
CLK
– Makes negative transition
R Q
• Does not affect the output.
– Steady CLK 1 or 0
D • Does not affect the output.
F L I P – F LO P S
• Edge-Triggered D Flip – Flop
– The timing of the response of a flip – flop to input data and clock
must be taken into consideration when using edge – triggered flip -
flops.
• There is a minimum time, called setup time, for which the D input must
be maintained at a constant value prior to the occurrence of the clock
transition.
• There is a minimum time, called hold time, for which the D input must
not change after the application of the positive transition of the clock.
F L I P – F LO P S
• Edge-Triggered D Flip – Flop
D Q
Q
Q Positive Edge
CLK Dynamic
Q input
D Q
Q
D
Negative Edge
F L I P – F LO P S
• The most economical and efficient flip – flop constructed is the
edge – triggered D flip – flop.
– It requires smallest number of gates.
– T flip - flops
F L I P – F LO P S
• There are three operations that can be performed with a flip –
flop:
– Set it to 1
– Reset it to 0
F L I P – F LO P S
• JK Flip – Flop • When J = 1, sets the flip – flop
– Performs all three operations. to 1.
D = JQ’ + K’Q
F L I P – F LO P S
• JK Flip – Flop Operation 1
• When J = 1 and K = 0,
– D = 1.Q’ + 1.Q (Post2b)
J
D Q Q – D = Q’ + Q (Post5a)
K
CLK Q Q – D=1
D = JQ’ + K’Q to 1.
F L I P – F LO P S
• JK Flip – Flop Operation 2
• When J = 0 and K = 1,
– D = 0.Q’ + 0.Q (Theo2b)
J
D Q Q – D=0+0
K
CLK Q Q – D=0
D = JQ’ + K’Q to 0.
F L I P – F LO P S
• JK Flip – Flop Operation 3
• When J = 1 and K = 1,
– D = 1.Q’ + 0.Q (Post2b)
J
D Q Q – D = Q’ + 0 .Q (Theo2b)
K
CLK Q Q – D = Q’ + 0 (Post2a)
– D = Q’
F L I P – F LO P S
• JK Flip – Flop • When J = 0 and K = 0,
– D = 0.Q’ + 1.Q (Theo2b)
– D = 0 + 1 .Q (Post2b)
J – D=0+Q (Post2a)
D Q Q
K
– D=Q
CLK Q Q
– Next clock edge the output is
unchanged.
D = JQ’ + K’Q
F L I P – F LO P S
• JK Flip – Flop
J
J Q
D Q Q
K
CLK Q Q
K Q
D = JQ’ + K’Q
F L I P – F LO P S
• T (toggle) Flip – Flop
– Complementing flip – flop.
F L I P – F LO P S
• T (toggle) Flip – Flop
– When T = 0 (J = K = 0)
F L I P – F LO P S
• T (toggle) Flip – Flop
– Can be constructed with a D
flip – flop and an XOR gate.
D Q
– When T = 0 then D = Q T
• No change in the output.
C Q
– When T = 1 then D = Q’
• Output complements
D = TQ’ + T’Q = T Q
F L I P – F LO P S
• T (toggle) Flip – Flop
T J Q
D Q T Q
T
C
K Q C Q C Q
(a) From JK Flip – Flop (b) From D Flip – Flop (c) Graphic Symbol
F L I P – F LO P S
• Flip – Flop Characteristics Table
D Q D Q (t+1)
0 0 Reset
1 1 Set
Q
Q(t+1) = D
F L I P – F LO P S
• Flip – Flop Characteristics Table
J K Q (t+1)
J Q 0 0 Q(t) No change
0 1 0 Reset
1 0 1 Set
K Q
1 1 Q’(t) Toggle
F L I P – F LO P S
• Flip – Flop Characteristics Table
T Q T Q (t+1)
0 Q(t) No change
1 Q’(t) Toggle
Q
Q(t+1) = T Q
F L I P – F LO P S
• Some flip – flops have asynchronous inputs that are used to
force the flip – flop to a particular state independent of the
clock.
• The input that sets the flip – flop to 1 is called preset.
• The input that clears the flip – flop to 0 is called clear or direct
reset.
• When power is on in a digital system, the state of the flip flop is
unknown.
F L I P – F LO P S
• When power is on in a digital system, the state of the flip flop is
unknown.
• The direct inputs are useful for bringing all flip – flops in the
system to a known starting state prior to the clocked operation.
F L I P – F LO P S
• Asynchronous Reset
R’ D CLK Q(t+1)
D Q
0 x x 0
Q
R
Reset
F L I P – F LO P S
• Asynchronous Reset
R’ D CLK Q(t+1)
D Q
0 x x 0
Q 1 0 ↑ 0
1 1 ↑ 1
R
Reset
F L I P – F LO P S
• Asynchronous Preset and Clear
Preset
D Q 1 0 x x 0
Q
CLR
Reset
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
54
F L I P – F LO P S
• Asynchronous Preset and Clear
Preset
PR’ CLR’ D CLK Q(t+1)
PR
D Q 1 0 x x 0
0 1 x x 1
Q
CLR
Reset
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
55
F L I P – F LO P S
• Asynchronous Preset and Clear
Preset
PR’ CLR’ D CLK Q(t+1)
PR
D Q 1 0 x x 0
0 1 x x 1
Q 1 1 0 ↑ 0
CLR 1 1 1 ↑ 1
Reset
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
5.4 ANALYSIS OF CLOCKED
SEQUENTIAL CIRCUITS
57
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
– The outputs
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
• Outputs
• Internal states
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
State Equations
• The behaviour of a clocked sequential circuit can be described
algebraically by means of state equations (transition equations).
– Inputs
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
Q – An output y.
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
Consider: • Similarly,
D Q B
CLK Q B’
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
Consider: • A(t+1) = A . x + B . x
• B(t+1) = A’ . x
x
D Q A
• y = (A + B) x’
Q A’
D Q B
CLK Q B’
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
State Table
• The time sequence of inputs, outputs and flip – flop can be enumerated
in state table (transition table).
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
0 1 1 0 1 0 Q A’
1 0 0 0 0 1
D Q B
1 0 1 1 0 0
CLK Q B’
1 1 0 0 0 1
y
1 1 1 1 0 0
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
11 00 10 1 0 D Q B
CLK Q B’
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
State Diagram
• The information available in a state table can be represented graphically
in the form of a state diagram.
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
11 00 10 1 0
01 11
AB input/output
1/0
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
70
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
01,10 1 0 0 1
1 0 1 0
1 1 0 0
00,11 0 1 00,11
1 1 1 1
01,10
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
71
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
CLK
= B’x’ + ABx + A’Bx’
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
Analysis with JK Flip – Flops
Present Next Flip – Flop
I/P
• JA = B KA = B x’ State State Inputs
A B x A B JA KA JB KB
• JB = x’ KB = A x
0 0 0 0 1 0 0 1 0
0 0 1 0 0 0 0 0 1
• A(t+1) = JA Q’A + K’A QA 0 1 0 1 1 1 1 1 0
= A’B + AB’ + Ax 0 1 1 1 0 1 0 0 1
1 0 0 1 1 0 0 1 1
• B(t+1) = JB Q’B + K’B QB 1 0 1 1 0 0 0 0 0
= B’x’ + ABx + A’Bx’ 1 1 0 0 0 1 1 1 1
1 1 1 1 1 1 0 0 0
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
0 0 0 0 1 0 0 1 0
00 11
0 0 1 0 0 0 0 0 1
0 1 0 1 1 1 1 1 0
x=0
x =0 x=0 0 1 1 1 0 1 0 0 1
1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 0 0 0
01 10
1 1 0 0 0 1 1 1 1
x=1
1 1 1 1 1 1 0 0 0
x=1
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
74
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
11/1 10/0 1 0 1 1 1 0 1 0
x=0 x=0 1 1 0 1 1 0 0 1
x=1
1 1 1 0 0 1 1 1
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
Mealy and Moore Models
• The most general model of a sequential circuit has:
– Inputs
– Outputs
– Internal states.
• Sequential circuits are divided into two (they differ in the way output is
generated:
– Mealy model
– Moore model
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
• Mealy model:
– The output is a function of both the present state and input.
– The outputs may change if the inputs change during the clock pulse period.
• The outputs may have momentary false values unless the inputs are
synchronized with the clocks.
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
Moore Machine
A N A LY S I S O F C L O C K E D S E Q U E N T I A L C I R C U I T S
Mealy Moore
Present Next Present Next
I/P O/P I/P O/P
State State State State
A B x A B y A B x A B y
0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 1 0 1 0
0 1 0 0 0 1 0 1 0 0 1 0
0 1 1 1 1 0 0 1 1 1 0 0
1 0 0 0 0 1 1 0 0 1 0 0
1 0 1 1 0 0 1 0 1 1 1 0
1 1 0 0 0 1 1 1 0 1 1 1
1 1 1 1 0 0 1 1 1 0 0 1
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• The analysis of sequential circuits
– starts from a circuit diagram and
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• State – reduction algorithms are concerned with procedures for
reducing the number of states in a state table, while keeping the
external input – output requirements unchanged.
• Since m flip – flops produce 2m states,
– a reduction in the number of states may (or may not) result in a reduction in
the number of flip – flops.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Consider a sequential circuit 0/0
0/0 0/0
• There are infinite number of b c
1/0
input sequence that may be 1/0
0/0
applied to the circuit; g d e
1/1 1/1
– Each results in a unique output
0/0 1/1
sequence. f
1/1
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Consider input sequence 0/0
– 01010110100 a
0/0 0/0
– Starting from the initial state a. 1/0
0/0 0/0
– Each input of 0/1 produces an b c
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Consider input sequence 0/0
– 01010110100 a
0/0 0/0
1/0
0/0
state
a a b c d e f f g f g a 0/0 b c
1/0
1/0
input
0 1 0 1 0 1 1 0 1 0 0 0/0
g d e
1/1 1/1
output
0 0 0 0 0 1 1 0 1 0 0 0/0 1/1
f
1/1
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Two circuits are equivalent
– Have identical outputs for all input sequences;
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Equivalent States
– Two states are said to be equivalent if,
• For each member of the set of inputs,
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Reduce the number of states 0/0
a
– Draw a state table 0/0 0/0
1/0
Next state Output
0/0 0/0
Present state x=0 x=1 x=0 x=1 b c
a a b 0 0 1/0
1/0
b c d 0 0
0/0
c a d 0 0 g d e
d 1/1 1/1
e f 0 1
e 0/0 1/1
a f 0 1
f
f g f 0 1
1/1
g a f 0 1
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
91
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Reduce the number of states
– e = g (remove g)
Present Next state Output
– The row g is removed. state x=0 x=1 x=0 x=1
a a b 0 0
– State g is replaced by state e
b c d 0 0
each time it occurs in the c a d 0 0
next – state columns. d e f 0 1
e a f 0 1
f g f 0 1
g a f 0 1
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Reduce the number of states
– Present state f has now next
Present Next state Output
states e and f and outputs 0 state x=0 x=1 x=0 x=1
and 1 for x = 0 and x = 1. a a b 0 0
b c d 0 0
– Then, d = f (remove f)
c a d 0 0
– The row f is removed. d e f 0 1
e a f 0 1
– The state f is replaced by
f e f 0 1
state d.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Reduce the number of states
– Final table
Present Next state Output
– This table satisfies the state x=0 x=1 x=0 x=1
sequence.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Reduce the number of states
0/0
e d
a d 0 1
1/1
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Reduce the number of states
– The checking of each pair of states for possible equivalence can be
done systematically using Implication Table.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
– The state-reduction procedure for completely specified state tables is based
on the algorithm that two states in a state table can be combined into one if
they can be shown to be equivalent. There are occasions when a pair of
states do not have the same next states, but, nonetheless, go to equivalent
next states. Consider the following state table:
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
– Consider the following state Present Next state Output
state x=0 x=1 x=0 x=1
table:
a c b 0 1
– (a, b) imply (c, d) and (c, d) imply
b d a 0 1
(a, b). Both pairs of states are c a d 1 0
equivalent; i.e., a and b are d b d 1 0
equivalent as well as c and d.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
– The checking of each pair of states for possible equivalence in a table with a
large number of states can be done systematically by means of an
implication table. This a chart that consists of squares, one for every
possible pair of states, that provide spaces for listing any possible implied
states. Consider the following state table:
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
– Consider the following state table: Implication table:
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
– On the left side along the vertical are listed all the states defined in the state
table except the last, and across the bottom horizontally are listed all the
states except the last.
– The states that are not equivalent are marked with a ‘x’ in the corresponding
square, whereas their equivalence is recorded with a ‘√’.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
– Some of the squares have entries of implied states that must be further
investigated to determine whether they are equivalent or not.
2. Enter in the remaining squares the pairs of states that are implied by the pair of states
representing the squares. We do that by starting from the top square in the left
column and going down and then proceeding with the next column to the right.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
3. Make successive passes through the table to determine whether any
additional squares should be marked with a ‘x’. A square in the table is crossed
out if it contains at least one implied pair that is not equivalent.
4. Finally, all the squares that have no crosses are recorded with check marks.
The equivalent states are: (a, b), (d, e), (d, g), (e, g).
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• Implication Table (extra reading)
– We now combine pairs of states into larger groups of equivalent
states. The last three pairs can be combined into a set of three
equivalent states (d, e,g) because each one of the states in the
group is equivalent to the other two. The final partition of these
states consists of the equivalent states found from the implication
table, together with all the remaining states in the state table that
are not equivalent to any other state:
– (a, b) (c) (d, e, g) (f)
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• State Assignment
– In order to design a sequential circuit with physical components, it is
necessary to assign coded binary values to the states.
– For a circuit with m states, the codes must contain n bits where 2n =
≥ m.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• State Assignment
– If the state table1 is used, we must assign binary values to 7 states.
• Remaining state is unused.
– If the state table2 is used, only five states need binary assignment.
• Remaining 3 state is unused.
• Unused states treated as don’t care conditions.
• Since don’t care conditions usually help in obtaining a simpler circuit, it is
more likely that the circuit with five states will require fewer
combinational gates than the one with seven states.
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• State Assignment
Present Assignment 1 Assignment 2 Assignment 3
state Binary Gray Code One-hot
a 000 000 00001
b 001 001 00010
c 010 011 00100
d 011 010 01000
e 100 110 10000
S TAT E R E D U C T I O N A N D A S S I G N M E N T
• State Assignment
Present Next state Output
– Any binary number state x=0 x=1 x=0 x=1
assignment is satisfactory as 000 000 001 0 0
DESIGN PROCEDURE
• The design of a clocked sequential circuit starts from
– a set of specifications and
DESIGN PROCEDURE
1. Derive a state diagram for the circuit from the word description.
DESIGN PROCEDURE
• Example: We wish to design a circuit that detects three or more
consecutive 1’s in a string of bits coming through an input line.
0 1
• State diagram:
S0 / 0 S1 / 0
0
0 1
0
S3 / 1 S2 / 0
1
1
23 December, 2016 INTRODUCTION TO LOGIC DESIGN
112
DESIGN PROCEDURE
• This is a Moore model
0 1
sequential circuit since the
S0 / 0 S1 / 0
output is 1 when the circuit is
0
in State3 and 0 otherwise.
0 1
0
State A B
S0 0 0
S3 / 1 S2 / 0 S1 0 1
1
1 S2 1 0
S3 1 1
DESIGN PROCEDURE
Present Next
I/P O/P
0 State State
1
A B x A B y
S0 / 0 S1 / 0 0 0 0 0 0 0
0 0 0 1 0 1 0
0 1 0 0 0 0
0 1
0 0 1 1 1 0 0
1 0 0 0 0 0
S3 / 1 S2 / 0 1 0 1 1 1 0
1
1 1 1 0 0 0 1
1 1 1 1 1 1
DESIGN PROCEDURE
• To implement the circuit,
– Two D flip-flops are chosen to represent the four states and label
their outputs A and B.
DESIGN PROCEDURE
Present Next
• To implement the circuit, I/P O/P
State State
– The flip – flop input equations A B x A B y
can be obtained directly from 0 0 0 0 0 0
DESIGN PROCEDURE
• Synthesis using D Flip - flops • DA’s K - Map
– A(t+1) = DA(A,B,x) = ∑ (3, 5, 7)
DA = Ax + Bx
DESIGN PROCEDURE
• Synthesis using D Flip – flops • DB’s K - Map
– A(t+1) = DA(A,B,x) = ∑ (3, 5, 7)
DA = Ax + B’x
DESIGN PROCEDURE
• Synthesis using D Flip – flops • y’s K - Map
– A(t+1) = DA(A,B,x) = ∑ (3, 5, 7)
m4 m5 m7 M6
A 1
1 1
y = AB
DESIGN PROCEDURE
• Synthesis using D Flip – flops • Logic Diagram of Sequence
– DA = Ax + Bx Detector
– DB = Ax + B’x
x D Q A
– y = AB
Q
y
D Q B
CLK Q
DESIGN PROCEDURE
• When – D type flip-flops are employed, the input equations are obtained
directly from the next state.
• This is not the case for the JK and T types of flip-flops. In order to
determine the input equations for these flip flops, it is necessary to
derive a functional relationship between the state table and the input
equations.
DESIGN PROCEDURE
• During the design process we usually know the transition from present
state to the next state and wish to find the flip – flop input conditions
that will cause the required transition.
• For this reason, we need a table that lists the required inputs for a given
change of state. Such table is called an excitation table.
DESIGN PROCEDURE
• D Flip – Flop Excitation table
1 1 0 1 1
1 0 0
Q(t+1) = D
1 1 1
DESIGN PROCEDURE
• JK Flip – Flop Excitation table
DESIGN PROCEDURE
• T Flip – Flop Excitation table
0 Q(t) 0 0 0
1 Q’(t) 0 1 1
1 0 1
Q(t+1) = T Q 1 1 0
DESIGN PROCEDURE
• Synthesis Using JK Flip – Flops: Detect 3 or more consecutive 1’s
0 1
S0 / 0 S1 / 0
0
0 1
0
S3 / 1 S2 / 0
1
1
DESIGN PROCEDURE
• Synthesis Using JK Flip – Flops: Detect 3 or more consecutive 1’s
Present Next Flip-Flop
Input
State State Inputs
A B x A B JA KA JB KB
0 0 0 0 0 0 X 0 X JA (A, B, x) = ∑ (3, 4, 5, 6, 7)
0 0 1 0 1 0 X 1 X
KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6)
0 1 0 0 0 0 X X 1
0 1 1 1 0 1 X X 1 JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7)
1 0 0 0 0 X 1 0 X KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6)
1 0 1 1 1 X 0 1 X
1 1 0 0 0 X 1 X 1
1 1 1 1 1 X 0 X 0
DESIGN PROCEDURE
• Synthesis Using JK Flip – Flops: • JA’s K-Map
Detect 3 or more consecutive 1’s
– JA (A, B, x) = ∑ (3, 4, 5, 6, 7) Bx B
A 00 01 11 10
– KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6)
m0 m1 m3 m2
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0
1
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6) m4 m5 m7 m6
A 1
X X X X
JA = Bx
DESIGN PROCEDURE
• Synthesis Using JK Flip – Flops: • KA’s K-Map
Detect 3 or more consecutive 1’s
– JA (A, B, x) = ∑ (3, 4, 5, 6, 7) Bx B
A 00 01 11 10
– KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6)
m0 m1 m3 m2
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0
X X X X
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6) m4 m5 m7 M6
A 1
1 1
KA = x’
DESIGN PROCEDURE
• Synthesis Using JK Flip – Flops: • JB’s K-Map
Detect 3 or more consecutive 1’s
– JA (A, B, x) = ∑ (3, 4, 5, 6, 7) Bx B
A 00 01 11 10
– KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6)
m0 m1 m3 m2
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0
1 X X
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6) m4 m5 m7 M6
A 1
1 X X
JB = x
DESIGN PROCEDURE
• Synthesis Using JK Flip – Flops: • KB’s K-Map
Detect 3 or more consecutive 1’s
– JA (A, B, x) = ∑ (3, 4, 5, 6, 7) Bx B
A 00 01 11 10
– KA (A, B, x) = ∑ (0, 1, 2, 3, 4, 6)
m0 m1 m3 m2
– JB (A, B, x) = ∑ (1, 2, 3, 5, 6, 7) 0
X X 1 1
– KB (A, B, x) = ∑ (0, 1, 2, 3, 4, 5, 6) m4 m5 m7 m6
A 1
X X 1
KB = A’ + x’
DESIGN PROCEDURE
• Synthesis Using JK Flip – Flops: • Logic Diagram of Sequence
Detect 3 or more consecutive 1’s Detector
– JA = Bx
– KA = x’ J Q A
– JB = x
x K Q y
– KB = A’ + x’
J Q B
K Q
CLK
DESIGN PROCEDURE
• Synthesis Using T Flip – Flops: 3-bit Counter. An n-bit binary
counter consists of n flip – flops that can count in binary from 0
to 2n – 1. 000
111 001
110 010
101 011
100
DESIGN PROCEDURE
• Synthesis Using T Flip – Flops: 3-bit Counter.
Present Next Flip-Flop
State State Inputs
A2 A1 A0 A2 A1 A0 TA2 TA1 TA0
0 0 0 0 0 1 0 0 1 TA2 (A2, A1, A0) = ∑ (3, 7)
0 0 1 0 1 0 0 1 1
TA1 (A2, A1, A0) = ∑ (1, 3, 5, 7)
0 1 0 0 1 1 0 0 1
0 1 1 1 0 0 1 1 1 TA0 (A2, A1, A0) = ∑ (0, 1, 2, 3, 4, 5, 6, 7)
1 0 0 1 0 1 0 0 1
1 0 1 1 1 0 0 1 1
1 1 0 1 1 1 0 0 1
1 1 1 0 0 0 1 1 1
DESIGN PROCEDURE
• Synthesis Using T Flip – Flops: 3- • TA2’s K-Map
bit Counter.
– TA2 (A2, A1, A0) = ∑ (3, 7) A1A0 A1
A2 00 01 11 10
– TA1 (A2, A1, A0) = ∑ (1, 3, 5, 7)
m0 m1 m3 m2
– TA0 (A2, A1, A0) = ∑ (0, 1, 2, 3, 4, 5, 0
1
6, 7) m4 m5 m7 m6
A 1
1
A0
TA2 = A1A0
DESIGN PROCEDURE
• Synthesis Using T Flip – Flops: 3- • TA1’s K-Map
bit Counter.
– TA2 (A2, A1, A0) = ∑ (3, 7) A1A0 A1
A2 00 01 11 10
– TA1 (A2, A1, A0) = ∑ (1, 3, 5, 7)
m0 m1 m3 m2
– TA0 (A2, A1, A0) = ∑ (0, 1, 2, 3, 4, 5, 0
1 1
6, 7) m4 m5 m7 m6
A 1
1 1
A0
TA1 = A0
DESIGN PROCEDURE
• Synthesis Using T Flip – Flops: 3- • TA0’s K-Map
bit Counter.
– TA2 (A2, A1, A0) = ∑ (3, 7) A1A0 A1
A2 00 01 11 10
– TA1 (A2, A1, A0) = ∑ (1, 3, 5, 7)
m0 m1 m3 m2
– TA0 (A2, A1, A0) = ∑ (0, 1, 2, 3, 4, 5, 0
1 1 1 1
6, 7) m4 m5 m7 m6
A 1
1 1 1 1
A0
TA0 = 1
DESIGN PROCEDURE
• Synthesis Using T Flip – Flops: 3- • Logic Diagram of 3-bit Binary
bit Counter. Counter
– TA2 = A1A0 T Q A2
– TA1 = A0 Q
– TA0 = 1
T Q A1
1 T Q A0
CLK
THANK YOU!
GOOD LUCK!