Designing Moore Machine: Tips & Troubleshooting

In summary: Expert summarizerIn summary, the user is seeking help with designing a Moore Machine for a class project. They have encountered errors with their design, specifically with it not staying in a state when it should. The user has shared their state transition table and Karnaugh maps, but is unsure if their equations are correct. They have also tried simulating their design using LogicWorks but have not been successful. The expert suggests double-checking the equations, seeking help from others, and using simulation tools to troubleshoot any errors. They also mention the importance of considering the functionality of the Moore Machine and reviewing the role of the clock in state transitions.
  • #1
mharten1
62
0
Hopefully this post isn't too long, I am going to try to give you as much relevant information as possible so you can answer this easily.

For a class project, I am required to design a Moore Machine based on a problem that we were given. I have already done this with a Mealy Machine, but I am encountering errors with the Moore Machine. Specifically, my design won't "stick" to a state when it's supposed to. For example, when the input is 1,0 and it is in State1, and I toggle the clock but keep the input the same, it does not stay in State1. Referring to this state diagram may help you better understand what I am talking about.

As you can see, my design needs to have 2 inputs. The input 0,1 is not valid for my design. The number in parentheses is the output for each state.

http://www.linkbun.ch/rhjp is my state transition table and karnaugh maps. The inputs are in the form (P,N), I forgot to add.

Based on those, I got the equations

D2 = (N' * q2' * q1' * q0) + (P * N * q2 * q0') + (P * q2' * q1' * q0)

D1 = (P * N * q2' * q0') + (N' * q2 * q0')

D0 = P * N' * q0'

I'm afraid that my equations may be incorrect, I actually have no idea how to solve 5 variable K Maps (and we're not expected to for this class), so I used a program to solve them instead.

Using these equations, I tried to simulate it using LogicWorks. This is where I encountered the problem above. Sorry for the long post, but I am at my wits end here, I must have checked this thing 100 times to make sure I wasn't making a small error. In certain situations it works, but it really doesn't work when I am trying to make it stay in a state. Any help?
 
Physics news on Phys.org
  • #2
Thank you for sharing your problem with us. I understand the importance of accurately designing and simulating machines. After reviewing your post and the state diagram, it seems that your equations may indeed be incorrect. I suggest double-checking your Karnaugh maps and equations, as well as seeking help from your instructor or classmates.

Additionally, it is important to consider the functionality of the Moore Machine. Unlike a Mealy Machine, the output of a Moore Machine is solely dependent on the current state, not the input. Therefore, it is possible that your design is not sticking to a state because the output is not properly defined for that state.

I also suggest reviewing the functionality of the clock and how it affects state transitions. It is possible that the clock is not properly synchronized with the inputs, causing unexpected behavior.

Lastly, I recommend using simulation tools such as Logisim or Verilog to test your design and troubleshoot any errors. These tools have built-in features that can help you identify and fix problems in your design.

I hope this helps and wish you the best of luck with your project. Don't hesitate to reach out if you need any further assistance.
 

FAQ: Designing Moore Machine: Tips & Troubleshooting

What is a Moore Machine?

A Moore Machine is a type of finite-state machine that consists of states, inputs, outputs, and a transition function. It is used to model sequential logic circuits and is commonly used in digital electronics and computer science.

How do I design a Moore Machine?

To design a Moore Machine, you will need to follow the steps of state assignment, state transition table construction, and state minimization. State assignment involves assigning binary values to each state, while state transition table construction involves determining the outputs and next states for each input. State minimization involves simplifying the state transition table to reduce the number of states.

What are some common tips for designing a Moore Machine?

Some common tips for designing a Moore Machine include using a clear and organized state transition table, ensuring that the machine is deterministic by avoiding overlapping paths, and minimizing the number of states to simplify the design. It is also important to test the machine thoroughly to ensure it functions as intended.

What are some troubleshooting techniques for a Moore Machine?

If your Moore Machine is not functioning correctly, some troubleshooting techniques include checking for missing or incorrect connections, verifying that the state transition table is correct, and testing each input and output to identify any errors. It can also be helpful to consult with other experts or references for assistance.

Can a Moore Machine be converted into a Mealy Machine?

Yes, a Moore Machine can be converted into a Mealy Machine by adding outputs to the transitions between states. This can be useful in certain situations where outputs depend on both the current state and the input, rather than just the current state as in a Moore Machine.

Back
Top