Attached Files:

Staff: Mentor

common said:

yes , i hope you like this homework.
i've three weeks to complete this. i will share my solving progress with you if i advance anything

Say, common, I think you are the one who is supposed to do this homework, not us. If you get stuck on some aspect of it, please post your work and explain why you are stuck, and we'll try to help. Otherwise, get cranking!

Say, common, I think you are the one who is supposed to do this homework, not us. If you get stuck on some aspect of it, please post your work and explain why you are stuck, and we'll try to help. Otherwise, get cranking!

yes berkeman, i know that i'm the ONLY one who is supposed to do this homework. but i've only wanted to share a good question with anybody who is interested in logic design.

Thanks for sharing common. Berkeman is right, the proper format for the forum is to present your question, show what you have done, and where you're getting stuck. Then we can help steer you in a successful direction. During this effort, we may discuss ideas with you and with other helpers.
If you haven't read this sticky at the top of this topic, it would be a good idea to do that.Quote from sticky:

1) Did you show your work? Homework helpers will not assist with any questions until you've shown your own effort on the problem. Remember, we help with homework, we don't do your homework. We already passed those classes, it's your turn to do so.

Staff: Mentor

or is there anybody who can write "the whole command array" that solves this problem.?

Sure I can, but that's not going to help you learn very much, now is it?

common said:

is there anybody to give a reference that i can learn this programming from

What language are you programming in? What is your programming language reference guide? Is it something like Synario ABEL? Or Verilog? Have you learned how to code up state machines yet? Start with a hand sketch of the state diagram for your problem, and either code up the state machine directly, or figure out how to make your own state machine with in-line code.

Have you learned how to code up state machines yet? Start with a hand sketch of the state diagram for your problem, and either code up the state machine directly, or figure out how to make your own state machine with in-line code.

I'm really got stucked at that point. i'm really stressed, because i couldn't found any idea to start, in spite of i've think hard for the last 5-6 weeks. Really.... that's the truth berkeman....
i was too desirous in logic-designing, but i've lost my whole desire, at this moment... because my teacher didn't be a good teacher for us. and now she wants us to solve this problem...
and i've just learned that nobody in my class could solve....:grumpy:
now, i only request for help

Staff: Mentor

Well, if you teacher hasn't bothered to teach you yet about state machine design, it will be a little tough complete the assignment. BTW, the title of this thread is a bit misleading, since you are asked to design a simple state machine, and not a full CISC or RISC CPU.

Look in the tutorials for the Wincpul tool that you are using, and look for how they show coding up of state machines. Then you need to do as I mentioned, and turn the problem statement into a Moore state machine diagram. Once you have the diagram, the coding is straighforward.

Well, if you teacher hasn't bothered to teach you yet about state machine design, it will be a little tough complete the assignment. BTW, the title of this thread is a bit misleading, since you are asked to design a simple state machine, and not a full CISC or RISC CPU.
Look in the tutorials for the Wincpul tool that you are using, and look for how they show coding up of state machines. Then you need to do as I mentioned, and turn the problem statement into a Moore state machine diagram. Once you have the diagram, the coding is straighforward.

well, i don't want to learn programming first. i need the diagram firstly, as you said. i'm thinking hard for that diagram but there is no result...

Staff: Mentor

You basically need to take the problem statement, and convert it into a set of states. Like, the initial state is the one you go to first, like at a reset. Each state has a set of outputs (the outputs in the problem statement), and your input signals at each clock tick will cause your state machine to change to the appropriate state. Like out of the reset state, if you get an input changing to <something>, you might transition to state y where the outputs are different and appropriate for whatever the input change was.

Yes, berkeman is right -- this really is a state machine. What are you in, some sort of arch and org class? Your book should give you diagrams that are close enough for you to simply modify to fit your design. The "states" are simply your requirements -- if the previous input is zero, do this ... if it's one, do something else. If you thought about it a few minutes and looked through your book it really shouldn't be that difficult to draw a diagram -- your book should also have info and the most popular state machines -- Mealy and Moore. If you get stuck with a specific question people would be able to help you better.

yes, i know i must design a mealy machine... but my book or my teacher are not good sources for me. our teacher didn't solved complex problems like this, during her lessons... :grumpy:

and i'm not sure, how to start solving this.. because i couldn't decided which variables must be the states, and which must be the inputs...
if you help me at this point, i can draw the state diagram...

i thought that, M&B must be the states, and sensor must be the input...
but then, what will the R be? ... must i use two mealy machines?