Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15339 Discussions

Verilog - Mealy To Moore And State Diagram

VerilogStudent
526 Views

Hey, i got a question and i want to know if i did right.

This is the Verilog code and i need to show the state diagram. this is what i did.

THE CODETHE CODE

And this is the state. I think.

 

Q1 mealy.jpg

 

 

and the next question is, how can i convert this code from Mealy to Moore?

a clue please. a reference to youtube video or article. TY.

 

EDIT

This is the Moore code

can someone tall me if this is correct?

mooree.PNG

 

0 Kudos
1 Solution
VerilogStudent
482 Views

Ok i see. And i`m doing this because this is the work we asked to do.

So i added the Moore Diagram, is this ok? and now i can convert it?qmoore.jpg

View solution in original post

4 Replies
sstrell
Honored Contributor III
498 Views

Looking at your Moore code, you shouldn't have two matching entries in a case statement, which Verilog might let you get away with, but you shouldn't do it.

But the design is inherently a Mealy state machine (dependent on the state and x), so I'm not sure why you want/need to turn it into a Moore machine.

#iwork4intel

VerilogStudent
492 Views

What do you mean by "two matching entries"?     you mean when i write

begin y = 0

and then y=1 for example? if does, how can i fix it?

sstrell
Honored Contributor III
487 Views

No, I mean you shouldn't have two identical entries in a case statement (two s1, two s2, two s3).  

But as I said, there's no good way to fix this because the basic design is inherently a Mealy machine.  What is your goal here and why do you want to change it into a Moore machine?

#iwork4intel

VerilogStudent
483 Views

Ok i see. And i`m doing this because this is the work we asked to do.

So i added the Moore Diagram, is this ok? and now i can convert it?qmoore.jpg

Reply