Transformation between Mealy and Moore Machines
description
Transcript of Transformation between Mealy and Moore Machines
![Page 1: Transformation between Mealy and Moore Machines](https://reader036.fdocuments.us/reader036/viewer/2022082506/55cf925d550346f57b95e1fb/html5/thumbnails/1.jpg)
CS 140L Lecture 7Transformation between Mealy
and Moore MachinesProfessor CK Cheng
CSE Dept.
UC San Diego
![Page 2: Transformation between Mealy and Moore Machines](https://reader036.fdocuments.us/reader036/viewer/2022082506/55cf925d550346f57b95e1fb/html5/thumbnails/2.jpg)
Outlines
• Framework
• Procedure
• Example: Transform
• Example: State Diagram
• Example: Output Sequence
![Page 3: Transformation between Mealy and Moore Machines](https://reader036.fdocuments.us/reader036/viewer/2022082506/55cf925d550346f57b95e1fb/html5/thumbnails/3.jpg)
Transform from Mealy to Moore Machine
Mealy Machine: y(t) = f(x(t), s(t))Moore Machine: y(t) = f(s(t))
s(t+1) = g(x(t), s(t))
C1 C2
CLK
x(t)
y(t)
Mealy Machine
C1 C2
CLK
x(t) y(t)
Moore Machine
s(t) s(t)
3
![Page 4: Transformation between Mealy and Moore Machines](https://reader036.fdocuments.us/reader036/viewer/2022082506/55cf925d550346f57b95e1fb/html5/thumbnails/4.jpg)
Transform from Mealy to Moore Machine
1) For each NS, z = Si,yj create a state Si(j)
2) For each new state Si(j), repeat the row PS = Si
3) Replace NS, z = Si,yj with state Si(j).
Set output z = yj for row PS = Si(j)
AlgorithmInput: State Table of Mealy machine
![Page 5: Transformation between Mealy and Moore Machines](https://reader036.fdocuments.us/reader036/viewer/2022082506/55cf925d550346f57b95e1fb/html5/thumbnails/5.jpg)
Mealy Machine:
Example
PS A B
00 A,0A,1
01A,1B,0
10B,0B,0
(x,y)
(NS, z)
PS A0A1B
00 A0A0A1
01A1A1B
Moore Machine:10BBB
(x,y) z 0 1 0
![Page 6: Transformation between Mealy and Moore Machines](https://reader036.fdocuments.us/reader036/viewer/2022082506/55cf925d550346f57b95e1fb/html5/thumbnails/6.jpg)
Mealy Machine
A0/0
A1/1
B/010
10
00
1001
01
00
0001
A10/0 B
00/1
00/0, 01/1 10/0, 01/0
Moore Machine
State Diagram
![Page 7: Transformation between Mealy and Moore Machines](https://reader036.fdocuments.us/reader036/viewer/2022082506/55cf925d550346f57b95e1fb/html5/thumbnails/7.jpg)
Timing Diagrams
Time step x y S z
S z
0
00
A0
A00
1
01
A1
A00
2
10
A0
A11
3
00
B1
B0
4
01
A1
A11
5
01
A1
A11
Mealy
Moore
The output shifts by one clock from Mealy to Moore machine
A
A11