Assignment Coa Wase Wims2019
Assignment Coa Wase Wims2019
Remove the LABEL and instead edit the instruction JEQ and write the destination address and
then execute the program
Configure the instruction cache as given below
Block Size = 8
Cache Type = Fully associative
Cache Size = 16
Write Policy = FIFO, RAM Speed: super fast
Mapping Cache Block %Hit %miss Questions to be answered
size size
7 Fully 16 8 Compare between 5 and explain for
associative the observation
3. Now insert the following code below the instruction JMP TRANS: in the above code:
Block Size = 4
Cache Type = Direct Mapped
Cache Size = 16
Write Policy = Write-Back
Execute all the instructions one by one and fill in the following table
5. Now the instruction below the jump instruction by following instruction and execute them
maintaining the same cache configuration
LDB 40, R03
COA Lab Assignment WIMS & WASE 2019 (Oct20-April21)
LDB 45, R04
LDB 48, R05
LDB 53, R06
7. Why there is the difference in hit rate of 5 & 6? Briefly explain your observation between them.
below.
3. Assignment [ 12 X 0.4+0.2 = 5]
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
COA Lab Assignment WIMS & WASE 2019 (Oct20-April21)
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
CPI
SF
Inst counts
Clks
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
CPI
SF
COA Lab Assignment WIMS & WASE 2019 (Oct20-April21)
Inst counts
Clks
𝐶𝑃𝐼𝑢𝑛𝑝𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑
Verify that Instruction count= CPI X clks And 𝑆𝐹 =
𝐶𝑃𝐼𝑃𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑
7. Briefly explain why you think there is a difference in the two sets of values:
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=0
r=i
end if
next
end
9. Run the program and make a note of the following pipeline stats:
CPI
SF
Inst counts
Clks
COA Lab Assignment WIMS & WASE 2019 (Oct20-April21)
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
V
JInstAddr
JTarget
PStat
Count