1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Wanna design a cpu?

  1. Dec 14, 2005 #1
    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:
     

    Attached Files:

    Last edited: Dec 14, 2005
  2. jcsd
  3. Dec 14, 2005 #2
    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.
     

    Attached Files:

    Last edited: Dec 14, 2005
  4. Dec 14, 2005 #3

    berkeman

    User Avatar

    Staff: Mentor

    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!
     
  5. Dec 14, 2005 #4
    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
     
  6. Dec 14, 2005 #5

    Ouabache

    User Avatar
    Science Advisor
    Homework Helper

    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 sticky at the top of this topic, it would be a good idea to do that.:wink:
    Quote from sticky:
    I hope you didn't mean to excude ladies from this discussion.:uhh:
     
    Last edited: Dec 14, 2005
  7. Dec 14, 2005 #6

    berkeman

    User Avatar

    Staff: Mentor

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

    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.
     
  8. Dec 14, 2005 #7
    No.
    ______________
     
  9. Jan 18, 2006 #8
    I've just learned that I must use Wincupl...
    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....:grumpy:
    now, i only request for help
     
  10. Jan 18, 2006 #9

    berkeman

    User Avatar

    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.
     
  11. Jan 18, 2006 #10
    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 ...
     
  12. Jan 18, 2006 #11

    berkeman

    User Avatar

    Staff: Mentor

    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.
     
  13. Jan 20, 2006 #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.
     
  14. Jan 21, 2006 #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... :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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Wanna design a cpu?
  1. 3-bus CPU (Replies: 13)

  2. Performance of the CPU (Replies: 7)

  3. RISC CPU question (Replies: 2)

Loading...