Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

Chapter 18

FUNDAMENTAL
MODE SEQUENTIAL
CIRCUITS

Lesson 4

Race Free Assignments

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

Outline
Race Free Assignment
Circuit Implementation

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

xQ and xQ differing in more than one


latch during a transition
Memory (or delay) section next-state
variables when have the bits differing
by more than one during a transition,
the critical (indeterminate time for
stable state) and non-critical
(deterministic) races occur.
Critical type of race must not occur in
asynchronous sequential circuit.
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

Race free assignment


Race free assignment is an assignment
of state variables such that next-state
variables when have the bits differing
by one during a transition.
Recall the bit changes in adjacent cells
in a Karnaugh map.
Only a single bit changes between two
adjacent cells
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

Finding Non-Adjacencies in Transitions


for Different Input Conditions
Step 1: Build a Karnaugh map type
table for each set of X in a State table
Draw adjacency map for the
assignments of present and next state
variables for X = 0 and X =1,
respectively. It shows in a cell the
present state by 0 (no change) and next
state (change) by 1
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

Map for X = 0 Using a flow Table

S (xQ)
S (xQ)

S0

S1

00

01

S0 00

S1 01

S3 11
S2 10

S3
11

S2

10

1
1

0
0

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

Map for X = 1 using the flow table

S (xQ)
S (xQ)

S0

S1

00

01

S0 00

10
1
1

S1 01

S3 11
S2 10

S2

S3
11

0
1

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

Observation
It is observed that for the present state S2,
the transition to S1 is not to the adjacent
cell. S2 and S1 have to be the neighbors
It is observed that for the present state S3,
the transition to S0 is not to the adjacent
cell. S3 and S0 have to be the neighbors

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

Number of Races
Number of critical + non-critical races
=3

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

10

Map for X = 00 Two inputs Using for another


circuit flow table

S (xQ)
S (xQ)

S0

S1

00

01

S0 00

S1 01

S3 11
S2 10

S3
11

S2

10

01
01
1

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

11

Map for X = 01 using another circuit flow


table

S (xQ)
S (xQ)

S0

S1

00

01

S0 00

01

S1 01

S3 11
S2 10

S3
11

S2

10

01
1
1

0
0

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

12

Map for X = 11 Using for another circuit


flow table

S (xQ)
S (xQ)

S0

S1

00

01

S0 00

S1 01

S3 11
S2 10

S3
11

S2

10
1

1
0

1
0

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

13

Map for X = 10 using another circuit flow table

S (xQ)
S (xQ)

S0

S1

00

01

S0 00

S1 01

S3 11
S2 10

S3
11

S2

10
-

0
01
01

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

14

Observation
It is observed for X =01that for a present
state S2, the transition to S1 is not to the
adjacent cell. S2 and S1 have to be the
neighbors
It is observed for X =11 that for the present
state S1, the transition to S2 is not to the
adjacent cell. S1 and S2 have to be the
neighbors
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

15

Observation
It is observed for X =11 that for a
present state S0, the transition is non
existent due to two input changes and
is leading to unstable intermediate
states

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

16

Number of races
It is observed for X =11 that for a
present state S0, the transition is non
existent due to two input changes and
is leading to unstable intermediate
states

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

17

Finding Race free State assignments for


Different Input Conditions
Step 2:
Method 1 Replacement of an
unstable non-adjacent state by another
adjacent state in flow table so that in
the next cycle the stable state is
obtained.

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

18

Finding Race free State assignments for


Different Input Conditions

Modification of flow table is permitted


if it does not change the result finally
achieved

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

19

Example 1: Flow Table for Y = X. xq2 +


xq1; xq1 =D and xq2 = xqn+1 = J. xq n +
K. xq n
State
(yq)
S0

Next State-Transition Outputs YO


[xq]X=0
S0

[xq]X=1
S3

X=0 X =1

0 -

S2
S1
S3
0
S3
S1
S0
1
YO is present output state after the xq outputs
but before transition yq next state

1
1
20

Map for X = 0 Using a modified flow Table


with new variable assignments .

S (xQ)
S (xQ)

S0

S1

011

101

S0 011

S1 101

S3 111
S2 110

S3
111

1
1

S2

110

Neighbors
101 and
110
0

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

21

Map for X = 1 Using a modified flow Table


with new variable assignments

S (xQ)
S (xQ)

S0

S1

011

101

S0 011

Neighbors
111 and
011

S1 101

S3 111
S2 110

S3
111

S2

110
1
1

0
1

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

22

Finding Race free State assignments for


Different Input Conditions
Example 1: S1 present state is
unresponsive to any input condition.
So S1 can be assigned three state
variables, (xq0, xq1, xq2) = 101, in place
of 01. S3 to S0 transition in flow table,
means 111 to 110, transition, and that
means only one variable change. S0 =
011, S3 = 111 are also neighbors.
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

23

Race Free Assignment


Race condition will not now exist and
after intermediate cycles the state will
become same as when race sets in due
to two or ore variable changes with
mismatched delays

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

24

Finding Race free State assignments for


Different Input Conditions
Step 2:
Method 2A systematic method,
called one-hot method of race free
state assignments

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

25

Action 1
Let number of rows in flow table = n. Use n
state variables. Assign each row (xq0, xq1,
, xqn--1) in sequence as 0001, 00. 10,
, 10 00. In k-th row the k-th state
variable is 1. For example, if there are four
rows in the flow table, S0, S1, S2 and S3,
assign 1000, 0100, 0010 and 0001,
respectively to (xq0, xq1, , xqn--1) with m
= 4.
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

26

Action 2
Fill present state column 1 contains the
states as per new state variable
assignments

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

27

Action 3
Assign the stable state variables to the
state variable as per corresponding
state variables used in present state
column and leave presently unstable
state as such

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

28

Example 2: Flow Table Actions 1 to 3


State Transition Outputs (xq0, xq1)
(xq0, xq1) X=00 01 10
S0 1000

S1 1000

S1 0100

0100 S1

S2 0010

S3

S3 0001

0001

11

X=00 01 10

11

S1

S0 S2

S1 0100 0100
S1 0001 S2

0
1

Row 2 column 5 0100 S1 is final state


after intermediate feedback cycles]
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

29

Action 4
:For unstable state, now write the
assignment after ORing with the
assignment for its next cycle transition.

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

30

Action 5
Add extra row for those next state,
which have two variables as 1s. The
assignment for the same vertical
column of the state with two variable
1s can now be done so that next state
transition occurs to the same next state
occurs which was ORed with the
unstable state assignment before. .
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

31

Example 2: Flow Table Actions 4 and 5


State Transition Outputs (xq0, xq1)
(xq0, xq1) X=00 01 10

11

X=00 01 10

0100b

S0 1000

0100 1000 -

S1 0100

0100 0100 1010a 0110c 1

1
0

S2 0010

0001 0100 0010 0100b

0 -

S3 0001

0001 0100 0001 0110 1

S4 1010a

0010

S5 0110c

11

1
0
1
1

0100b

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

32

New States

New assignment to unstable state after


ORing with its next cycle state assignment
in column 1 for present states
b New assignment to unstable state after
ORing with its next cycle state assignment
in column 5 for present states
c New row addition for an unstable state
assignment in row-2
Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,
2006

33

Action 6
Change the output column entry for the
state assigned two variables as 1s. Put
the next cycle stable state. This is to
prevent two times changes in an output
when adding another extra row in the
flow table.

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

34

Example 2: Flow Table Action 6


State Transition Outputs (xq0, xq1)
(xq0, xq1) X=00 01 10

11

X=00 01 10

S0 1000

0100 1000 -

S1 0100

0100 0100 1010e 0110 1

0100

0
-

S2 0010

0001 0100 0010 0100b

0 -

S3 0001

0001 0100 0001 0110 1

S4 1010a

0010

S5 0110c

11

0d

1d

0
0

1
1

0100b

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

35

New Outputs
d New output entry
e Now it has next cycle stable state
output entry

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

36

Summary

Using Karnaugh map concept, we find


the number of races
By reassigning the state variables, we
get race free assignments

End of Lesson 4

Race Free Assignments

THANK YOU

Ch18L4- "Digital Principles and Design", Raj Kamal, Pearson Education,


2006

40

You might also like