Design a CPU for Photocopier: 5 Inputs, 5 Outputs

  • Thread starter Thread starter common
  • Start date Start date
  • Tags Tags
    cpu Design
AI Thread Summary
The discussion revolves around designing a CPU for a photocopier, focusing on five inputs and five outputs. The inputs include a 3-bit copy number, a start signal, and a sensor for detecting paper jams, while the outputs consist of remaining sheets, motor control, and print output. Participants emphasize the importance of creating a state machine diagram to facilitate the design process, suggesting that the original poster should first sketch the state diagram before diving into programming. There is a consensus that the assignment is more about state machine design than a full CPU design, and resources for learning state machine programming are recommended. The original poster expresses frustration over a lack of guidance from their teacher and seeks help in determining the appropriate states and inputs for the design.
common
Messages
11
Reaction score
0
hello ladies and gentlemen;
i've a more complex homework this time.

i'm writing my homework down:
"The design of central process unit of a photocopier is wanted."

The inputs of cpu are;
  • copy number in 3 bits,
  • "start copying" input,
  • the input of a sensor
    (the function of the sensor is to detect stucked papers -- but this function is not important in the design)
namely our cpu must have five inputs. and also five outputs which are;
  • 3 bit data which shows number of remaining sheets (R)
  • motor control (M),
  • Print output (B)
During copy process, the M and B outputs must be as shown in figure.
  1. to start copying, copy number is entered in 3 bits. then "start" input applies a pulse.
  2. remaining copy number = entered copy number
  3. after one pulse diagram shown in figure is intercepted, remaining number decreases 1
  4. if R isn't equal to zero, process will be repeated
  5. during copy process, if "stucked paper" input=0, then process will be stopped (M=0, B=0).
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 :smile:
 

Attachments

Last edited:
Physics news on Phys.org
in this design i will use "GAL22V10" and because of this, i need to learn PAL programming to solve this question.

is there anybody to give a reference that i can learn this programming from,
or is there anybody who can write "the whole command array" that solves this problem.?

i send its datasheet, in attachment. if anybody cares.
 

Attachments

Last edited:
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 :smile:
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!
 
berkeman said:
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.

ok, if everyone thinks like berkeman, this thread can be deleted.

no problem
 
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. :smile:
If you haven't read this https://www.physicsforums.com/showthread.php?t=94388 at the top of this topic, it would be a good idea to do that.:wink:
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.
common said:
hello men, I've a more complex homework this time.
I hope you didn't mean to excude ladies from this discussion.:rolleyes:
 
Last edited:
common said:
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? :rolleyes:

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.
 
want to design a cpu?

No.
______________
 
berkeman said:
What language are you programming in?
I've just learned that I must use Wincupl...
berkeman said:
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...o:)
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... :mad:
and I've just learned that nobody in my class could solve...
now, i only request for help
 
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.
 
  • #10
berkeman said:
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...:frown:

if I've the diagram, i can dissolve the programming ...
 
  • #11
I did a quick google, and here's a tutorial on state machines. There are lots of them on the web:

http://web.cs.mun.ca/~paul/cs3724/material/web/notes/node25.html

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.
 
Last edited by a moderator:
  • #12
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.
 
  • #13
thank for your interests...

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...

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?
 
Back
Top