



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




University of Pennsylvania Department of Electrical and System Engineering Computer Organization
Due: Monday, January 29, 12:00pm
Everyone should do all problems.
We saw in lecture how to build various adders. In this problem, We’re asking you to review or develop various techniques for building multipliers.
FA FA FA FA
A[3] B[3] C[3] A[2] B[2] C[2] A[1] B[1] C[1] A[0] B[0] C[0]
S0[4] S1[3] S0[3] S1[2] S0[2] S1[1] S0[1] S0[0]
Here, A and B will be your normal two inputs to the adder. S0 and S1 together store the sum.
(a) What is the latency of a single w-bit delayed addition? (b) How can the C input to the delayed adder be used? (c) Use these delayed-addition adders to build a spatial multipler. The two input- operands to the adder are in standard form. Output values are represented as two numbers (i.e. S0, S1 form shown above). Show the resulting, spatial multi- plier which starts with numbers in standard form, but uses these delayed adders internally.
(d) What do you need to do to the multiplier output to convert the result back into normal form? (Hint: Remember, S0 and S1 jointly encode the final result) Can we further reduce the latency of the multiplier? (i.e. How do we implement the final format conversion efficiently?) (e) What is the final area and latency of this multiplier?
(a) How many partial-product bits do you start with? (b) What reduction do you get with a single stage of full adders? (c) How deep is the full reduce tree? (d) Show the resulting multipler. (e) What is the final area and latency of this multiplier?
(a) Don’t worry about writing any special code for overflow. Just show the basic computation code for the multiply. (b) Turnin your microcode for multiplication (c) What is the area and latency for this multiplier (assume the datapath is widenned with w; give latency in the same units as before (not in cycles, but in time))?
(a) Describe how the datapath would need to change. (we are not asking for the implementation; just write text and, if appropriate, provide a diagram.) (b) What impact would this have on the datapath cycle time? (under what situations would this be beneficial?) (c) What is the area and latency for this multiplier?
aluop write input output
address_input program_counter
PC Decode
op
in1 in
out
writep
dst
ALU
Register File Instruction Store
clock
nextPC ifetch idecode rf_read eval rf_write
Control
branch_addr
branch^ op
test
branch branch_addr
BU
reset
dst
src
src
dst
src
src
The basic processor organization is as shown above. Non-branching instructions are of the form:
bits 13:10 9 8:6 5:3 2: field op w src1 src2 dst
For branch operations, the branch addr is the low 6 bits of the instruction; that is, it is in the same place we would have placed src2 and dst in a normal, ALU operation.
bits 13:10 9 8:6 5: field BNZ 0 src1 branch addr
Generally, on each cycle the processor performs:
op,w,src1,src2,dst = instruction store[pc] ...,branch addr = instruction store[pc] in1=register file[src1] in2=register file[src2] if (w==1) register file[dst]←(in1 op in2) if ((op==BNZ) && (in1!=0)) pc←branch addr else pc←pc+
A special “done” operation indicates the computation is done and the program counter should stop incrementing. A reset signal tells the program counter to set its value to zero and begin computation.
The following ops are defined:
aluop operation ADD dst← src1+src INV dst← ∼(src1) SUB dst← src1-src XOR dst← src1∧src OR dst← src1—src INCR dst← src1+ AND dst← src1&src BNZ if (src1!=0) pc←branch addr SRA dst← src1>>1; dst[31]=src1[31] SRL dst← src1>>1; dst[31]= SLA dst← src1<< 1 SLL dst← src1<< 1 DONE stop execution