05.08.2014 Views

Lecture Notes for Computer Architecture II - St. Cloud State University

Lecture Notes for Computer Architecture II - St. Cloud State University

Lecture Notes for Computer Architecture II - St. Cloud State University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Alu controller design<br />

Single cycle<br />

Implemented using combinational logic - no flipflops<br />

Truthtable logic equation draw circuit<br />

Inputs<br />

-2 bits from main controller<br />

aluop1, aluop2<br />

Page | 154<br />

-function field 0~5 bits<br />

Outputs<br />

5 low level instructions to represent 10 MIPS instructions<br />

Add represented by 010<br />

Sub - 110<br />

And - 000<br />

Or - 001<br />

Set less than - 111<br />

From main controller<br />

input 0~5 bitsFunction field ALUOP2<br />

ALUOP1<br />

ALU controller<br />

ALU controller<br />

or<br />

ALU<br />

outputs<br />

Inputs<br />

Alu Alu F 5 F 4 F 3 F 2 F 1 F 0 Designed ALU<br />

Action<br />

OP1 OP0 X Y Z<br />

0) 1w 0 0 X X X X X X 0 1 0 Add<br />

1) sw 0 0 X X X X X X 0 1 0 Add<br />

2) beq 0 1 X X X X X X 1 1 0 Sub<br />

3)add R-type 1 0 1 0 0 0 0 0 0 1 0 Add<br />

4) Sub 1 0 1 0 0 0 1 0 1 1 0 Sub<br />

5) AND 1 0 1 0 0 1 0 0 0 0 0 AND<br />

6) OR 1 0 1 0 0 1 0 1 0 0 1 OR<br />

7) Slt 1 0 1 0 1 0 1 0 1 1 1 Slt<br />

Logic equations -- -- -- -- -- -- -- -- -- --<br />

X = 2 + 4 + 7 = op1.op0 + op1.op0.F5.F4.F3.F2.F1.F0 + op1.op0.F5.F4.F3.F2.F1.F0<br />

Y = 0 + 1+ 2 + 3 + 4 + 7<br />

Z = 6 + 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!