COA Lab Assignment WIMS & WASE 2021 (Oct21-April22)
COA Lab Assignment WIMS & WASE 2021 (Oct21-April22)
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 2021 (Oct21-April22)
LDB 45, R04
LDB 48, R05
LDB 53, R06
Now configure the same as in assignment 3 and fill the above table.
7. Why there is the difference in hit rate of question 4, 5 & 6? Briefly explain your observation
between them. below.
3. Assignment [ 12 X 0.4+0.2 = 5]
1. An IT company has decided to fabricate a data analytics processor to handle certain number
crunching applications. It is desirable to ensure that no data hazard occurs and pipelining.
The maximum pipeline depth should be of about 5 stages. The program that would be
executed on the processor would rule based strategy. A small sample code snippet is given
below:
COA Lab Assignment WIMS & WASE 2021 (Oct21-April22)
program Sample
n1=5
n2=3
val1 = 4
val2=6
If ((val1=4) and (val2=6)) then
Else
2. 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
COA Lab Assignment WIMS & WASE 2021 (Oct21-April22)
3. Next, uncheck the No instruction pipeline checkbox, reset and run the above program again and
wait for it to complete.
4. Note down your observation on how the pipeline visually behaved differently
CPI
SF
Inst counts
Clks
𝐶𝑃𝐼𝑢𝑛𝑝𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑
Verify that Instruction count= CPI X clks And 𝑆𝐹 =
𝐶𝑃𝐼𝑃𝑖𝑝𝑒𝑙𝑖𝑛𝑒𝑑
COA Lab Assignment WIMS & WASE 2021 (Oct21-April22)
6. Briefly explain why you think there is a difference in the two sets of values:
7. 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
8. Run the program and make a note of the following pipeline stats:
CPI
SF
Inst counts
Clks
9. 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
COA Lab Assignment WIMS & WASE 2021 (Oct21-April22)
Inst counts
Clks
V
JInstAddr
JTarget
PStat
Count