{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_004s09_lec10 - MIT OpenCourseWare http/ocw.mit.edu...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
MIT OpenCourseWare http://ocw.mit.edu For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms . 6.004 Computation Structures Spring 2009
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Instruction Sets 1 6.004 – Spring 2009 3/10/09 Designing an Instruction Set Nerd Chef at work. move flour,bowl add milk,bowl add egg,bowl move bowl,mixer rotate mixer ... Quiz 2 FRIDAY Instruction Sets 2 6.004 – Spring 2009 3/10/09 Let’s Build a Simple Computer Data path for computing N*(N-1) * L.E. A L.E. B 1 N -1 0 1 0 1 A SEL B SEL B LE A LE ANSWER L.E. = load enable. Register only loads new value when LE=1 Instruction Sets 3 6.004 – Spring 2009 3/10/09 A Programmable Control System Computing N*(N-1) with this data path is a multi-step process. We can control the processing at each step with a FSM. If we allow different control sequences to be loaded into the control FSM, then we allow the machine to be programmed. Control FSM A LE B LE A SEL B SEL A 1 A A * B B B - 1 B N A A * B Instruction Sets 4 6.004 – Spring 2009 3/10/09 A First Program A 1 A A * B B B - 1 B N A A * B S0 S1 S2 S3 S4 Once more, writing a control program is nothing more than filling in a table: 4 S N S N+1 A sel A LE B sel B LE 0 1 1 1 0 1 1 2 0 1 0 0 2 3 0 0 1 1 3 4 0 1 0 0 4 4 0 0 0 0
Image of page 2
Instruction Sets 5 6.004 – Spring 2009 3/10/09 An Optimized Program A 1 A A * B B B - 1 B N A A * B S0 S1 S2 S3 Some parts of the program can be computed simultaneously: S N S N+1 A sel A LE B sel B LE 0 1 1 1 0 1 1 2 0 1 1 1 2 3 0 1 0 0 3 3 0 0 0 0 Instruction Sets 6 6.004 – Spring 2009 3/10/09 Computing Factorial L.E. L.E. * A B 1 N -1 0 1 0 1 A SEL B SEL B LE A LE ANSWER =0? Control FSM A sel B sel A le B le The advantage of a programmable control system is that we can reconfigure it to compute new functions. In order to compute N! we will need to add some new logic and an input to our control FSM: Instruction Sets 7 6.004 – Spring 2009 3/10/09 Control Structure for Factorial A A * B B B - 1 B N A 1 Z=0 Z=1 DONE S0 S1 S2 Programmability allows us to reuse data paths to solve new problems. What we need is a general purpose data path, which can be used to efficiently solve most problems as well as an easier way to control it. Z S N S N+1 A sel A LE B sel B LE - 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 2 0 1 1 1 - 2 2 0 0 0 0 Instruction Sets 8 6.004 – Spring 2009 3/10/09 A Programmable Engine We’ve used the same data paths for computing N*(N-1) and Factorial; there are a variety of other computations we might implement simply by re-programming the control FSM. Although our little machine is programmable, it falls short of a practical general-purpose computer – and fails the Turing Universality test – for three primary reasons: 1. It has very limited storage: it lacks the “expandable” memory resource of a Turing Machine. 2. It has a tiny repertoire of operations. 3. The “program” is fixed. It lacks the power, e.g., to generate a new program and then execute it.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern