You are on page 1of 26

Assignment 1:

Sensitivity: Internal & Restricted


3

4.

Sensitivity: Internal & Restricted


5.

7.

Sensitivity: Internal & Restricted


8.

9.

Sensitivity: Internal & Restricted


10.

11.

Sensitivity: Internal & Restricted


12.

13.

Sensitivity: Internal & Restricted


14.

Sensitivity: Internal & Restricted


Assignment 2:

1.

2.
3.
4.
5.
6.
ASSIGNME
NT – 3

1. Enter the following source code, compile it and load in simulator’s memory:}

Program Ex1
for n = 1 to 20
p=p+1
next end
2. Open the CPU pipeline window and list the names of stages here.

3. Check the box titled Stay on top and make sure No instruction pipeline check box is selected. And
run the program. Run the program and observe the pipeline. Wait for the program to complete. Now
make a note of the following values
Verify that Instruction count= Clocks / CPI

i.e, Instruction Count = 846 / 5.04

4. Next, uncheck the No instruction pipeline checkbox, reset and run the above program again and
wait for it to complete.
5. Note down your observation on how the pipeline visually behaved differently

Check the No instruction pipeline checkbox Uncheck the No instruction pipeline checkbox

6. Now make a note of the following values CPI , SF, Inst counts, Clks:-
CPI𝑝𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑 = 5.04;
𝐶𝑃𝐼un𝑃𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑 = 1.92;
SF = 2.6;
Inst counts = 166;
Clks = 316
Verify that Instruction count and SF:-

Inst Count = Clks / CPI

= 318/1.92 = 165.

And

𝑆𝐹 = 𝐶𝑃𝐼𝑝𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑 / 𝐶𝑃𝐼un𝑃𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑

= 5.0/1.92 = 2.6

7. Briefly explain why you think there is a difference in the two sets of values

//need to write difference of 5th and 6th question

8. Enter the following program and compile it with ONLY the Enable optimizer and Remove
redundant code check boxes selected. Load the compiled program in the CPU.

Program jmpprdct
i = 0 for p = 1 to 40
i=i+1
if i = 10 then
i=0r=i
end if
next
end

9. Run the program and make a note of the following pipeline stats: CPI, SF, Inst counts, Clks
10. Now, in the pipeline window select the Enable jump prediction check box. Reset the program and run it
again. Make a note of the following pipeline stats: CPI, SF, Inst counts, Clks
12. Show the jump table and explain the terms JInstAddr, JTarget, PStat, Count

You might also like