L11-4up

# L11-4up - Designing an Instruction Set Nerd Chef at work....

This preview shows pages 1–3. Sign up to view the full content.

Instruction Sets 1 6.004 – Fal 2010 10/14/10 Designing an Instruction Set Nerd Chef at work. move flour,bowl add milk,bowl add egg,bowl move bowl,mixer rotate mixer ... Quiz 2 tomorrow in section Instruction Sets 2 6.004 – Fal 2010 10/14/10 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 – Fal 2010 10/14/10 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 di f erent 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 – Fal 2010 10/14/10 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 ±lling in a table: 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

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

View Full Document
Instruction Sets 5 6.004 – Fal 2010 10/14/10 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 – Fal 2010 10/14/10 Computing Factorial L.E. L.E. * A B 1 N -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 recon±gure 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 – Fal 2010 10/14/10 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 e f ciently 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 – Fal 2010 10/14/10 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 ±xed. It lacks the power, e.g., to generate a new program and then execute it. Control FSM A LE B LE A SEL B SEL L.E. L.E. * A B 1 N -1 0 1 A SEL B SEL B LE A LE ANSWER =0?
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 03/07/2011.

### Page1 / 7

L11-4up - Designing an Instruction Set Nerd Chef at work....

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

View Full Document
Ask a homework question - tutors are online