MIT6_004s09_lec10

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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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 1N -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: S N S N+1 A sel A LE B sel B LE 0 1 2 3 4 N N+1 A A LE 11101 20100 30011 40100 40000
Background 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 11101 1 20111 2 30100 3 30000 Instruction Sets 6 6.004 – Spring 2009 3/10/09 Computing Factorial L.E. L.E. * AB 1N -1 0 1 0 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 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 01 11 -2 Z A A LE B sel B LE 10111 20000 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 li±le 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.
Background image of page 3

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

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

Page1 / 8

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

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online