Docsity

State Assignment and Mealy State Machines in Digital Logic, Slides of Digital Logic Design and Programming

Toggle sidebar
bg1
1
Dr. D. J. Jackson Lecture 29-1Electrical & Computer Engineering
ECE380 Digital Logic
Synchronous Sequential Circuits:
State Assignment Problem,
Mealy State Machines
Dr. D. J. Jackson Lecture 29-2Electrical & Computer Engineering
State assignment problem
• For the sequential circuit examples shown thus far,
we have considered only a simple, straightforward
state assignment
• Could another, different state assignment lead to a
simpler solution?
A/z=0w=0
reset
B/z=0
w=1
C/z=1
w=1w=0
w=0
w=1
C
B
A
Y2Y1
Y2Y1
Next state
1100010
ddddd11
0100001
0010000
w=1w=0 Output
z
Present
state
y2y1
pf3
pf4
pf5
pf8

Partial preview of the text

Download State Assignment and Mealy State Machines in Digital Logic and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 29-

ECE380 Digital Logic

Synchronous Sequential Circuits:

State Assignment Problem,

Mealy State Machines

State assignment problem

  • For the sequential circuit examples shown thus far,

we have considered only a simple, straightforward

state assignment

  • Could another, different state assignment lead to a

simpler solution?

w=0 A/z=

reset

B/z=

w=

C/z=

w=0 w=

w=

w=

C

B

A

Y 2 Y 1 Y 2 Y 1

Next state

11 dd dd d

w=0 w= Output z

Present state y 2 y (^1)

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 29-

Alternate state assignment

• If we change the state assignment for the

previous problem such that A=00, B=01,

C=11 and 10 is the unused state, the state

assigned state table becomes the following

C

B

A

Y 2 Y 1 Y 2 Y 1

Next state

10 dd dd d

w=0 w= Output z

Present state y 2 y (^1)

C A C 1

B A C 0

A A B 0

w=0 w=

Output z

Present Next state state

Simplified circuit implementation

D Q

Q

D Q

Q

Y 2

Y 1

w

Clock

z

y 1

y 2

Resetn

Y1 =D 1 =w

Y2 =D 2 =wy 1

z=y 2

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 29-

State assignment guidelines

1. States that have the

same next state for a

given input should be

given adjacent

assignments

2. States that are the

next state of the same

state should be given

adjacent assignments

A

B

C

W=

W=

A

W=1 C

W=0 B

State assignment guidelines

• Keep the following in mind:

1. Assign the starting state to the ‘0’ cell on the

map (i.e. the starting state has all flip-flop

outputs=0)

2. Satisfy guideline 1 and multiple occurrences of

guideline 2 first

3. If the guidelines require that 3 or 4 states be

adjacent, place these states within a group of 4

adjacent squares on the map

4. Guideline 3 is less important than 1 or 2 unless

the circuit is to have multiple outputs

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 29-

Example Moore state diagram

A/

B/

C/

D/

W=

W=

W=

W=

W=

W=

W=

W=

reset

Detects 101 sequence

Example state assignment

  • Two state variables y 1 y 0
  • According to guidelines
  • A=
  1. {A,D}, {B,D}, {A,C}
  2. {A,D}, {B,C}
  3. {A,B,C}

A/

B/

C/

D/

W=

W=

W=

W=

W= W=

W=

W=

reset

D B

A C

y (^0) y (^1)

A=

B=

C=

D=

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 29-

Mealy state diagram

• For the Mealy model, outputs are no longer

associated with a particular state

  • Outputs are associated with transitions between

states

• Typical Mealy model state diagram

  • Detects w=11 sequence

A B

w=1/z=

w=0/z=

w=0/z=0 w=1/z=

reset

Mealy model state table

• The state table for a Mealy model FSM differs

from the Moore model FSM only in how the

outputs are viewed

Present Next state^ Output^ z state (^) w = 0 w = 1 w = 0 w = 1

A A B 0 0 B A B 0 1

A B

reset

w/z

Electrical & Computer Engineering Dr. D. J. Jackson Lecture 29-

State-assigned state table

Present Next state^ Output state (^) w = 0 w = 1 w = 0 w = 1

y Y Y z z A 0 0 1 0 0 B 1 0 1 0 1

Clock

Resetn

D Q

Q

w

z

y

Design example

• Construct a Mealy state diagram for a

sequence detector that detects the input

sequence w=