Master

Submitted by: Submitted by

Views: 139

Words: 637

Pages: 3

Category: Science and Technology

Date Submitted: 10/29/2013 12:33 PM

Report This Essay

CSEE 3827: Problem Set 8

Complete the following problems. Be sure to show your work for partial credit.

Solutions

1. Answer the following questions regarding pipelined execution of this instruction sequence: lw $1,40($6) add $6,$2,$2 sw $6,50($1) (a) Indicate dependences and their type. There are two data dependencies: on $6 between the sw and the add, and on $1 between the sw and the lw. (b) Assume there is no forwarding in this pipelined processor. Indicate hazards and add nop instructions to eliminate them. Instr lw add nop nop sw CC1 F CC2 D F CC3 X D CC4 M X CC5 W M F CC6 W D CC7 CC8 CC9

X

M

W

(c) Assume there is full forwarding. Indicate hazards and add nop instructions to eliminate them. Instr lw add sw CC1 F CC2 D F CC3 X D F CC4 M (→ sw X) X (→ sw X) D CC5 W M X CC6 W M CC7

W

(d) Assuming the following clock cycle times, ClockP eriodwithout−f orwarding = 300ps, ClockP eriodwith−f ull−f orwarding = 400ps, ClockP eriodwith−alu−alu−f orwarding−only = 360ps What is the total execution time of this instruction sequence without forwarding and with full forwarding? What is the speedup achieved by adding full forwarding to a pipeline that had no forwarding? with no forwarding: 9CC × 300ps = 2700ps with full forwarding: 7CC × 400ps = 2800ps speedup = .96 (really a slowdown) (e) Add nop instructions to this code to eliminate hazards if there is ALU-ALU forwarding only (no forwarding from the WB stage, i.e., results of the MEM stage, to the EX stage). Instr lw add sw CC1 F CC2 D F CC3 X D F CC4 M X D CC5 W M D (can’t get $1 from lw-W) CC6 W D (can’t get $6 from add-W) CC7 CC8 CC9

X

M

W

1

(f) What is the total execution time of this instruction sequence with only ALU-ALU forwarding? What is the speedup over a no-forwarding pipeline? with no forwarding: 9CC × 300ps = 2700ps with ALU-ALU forwarding only: 9CC × 360ps = 3240ps speedup = .83 (again, really a slowdown) 2. Assume that the instructions executed by a pipelined processor...