

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for a practice set in computer system organization (cs433g) related to loop unrolling and scheduling for a vliw processor. Students are required to unroll a loop body four times, eliminate stalls, and indicate which operation issues in each clock cycle. Additionally, they must consider data dependences and reordering instructions in four given code fragments.
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Please refer to the newsgroup message for instructions on obtaining EXTRA CREDIT for this homework.
Problem 1 Consider a loop that implements the vector computation Y = aX + Y (commonly known as DAXPY). Here is the code:
foo: L.D F2, 0(R1) ; load X(i) MULT.D F4, F2, F0 ; multiply aX(i) L.D F6, 0(R2) ; load Y(i) ADD.D F6, F4, F6 ; add aX(i) + Y(i) S.D 0(R2), F6 ; store Y(i) DADDUI R1, R1, #8 ; increment Y index DADDUI R2, R2, #8 ; increment X index DSGTUI R3, R1, #800 ; set if greater than (test if done) BEQZ R3, foo ; loop if not done
Consider a VLIW processor and make the following assumptions:
You are required to unroll the above loop body four times and then schedule the unrolled loop for the above VLIW processor, eliminating as many stalls as possible. Show the unrolled loop as part of your solution. For the final answer, indicate which operation will issue (to its execution unit) in each clock cycle by filling in the table given below. Calculate the CPI for the four iterations.
Issue Cycle Memory reference 1
Memory reference 2
FP operation 1
FP operation 2
Integer op/branch 1
2
3
Problem 2
Consider the following four code fragments, each containing two instructions: i. ADD R1, R1 # LW R2, 7(R1)
ii. ADD R3, R1, R SW 7(R1), R
iii. SW 7(R1), R SD 200(R7), F iv. BEZ R1, place SW 7(R1), R
(a) yes