COA Assignment
COA Assignment
A ) Store the numbers 1 to 4 at data memory location starting from 06h. Add
these 4 numbers and store the result at location 20h.
1) LDB 0006,R00 # Load byte data from memory location 0006 to R00 R00 will have 1.
2) LDB 0007,R01 # Load byte data from memory location 0007 to R01 R01 will have 2.
3) LDB 0008,R02 # Load byte data from memory location 0007 to R02 R02 will have 3.
4) LDB 0009,R03 # Load byte data from memory location 0009 to R03 R03 will have 4.
5) ADD R00,R01 # Add data from register R00 and R01 to R01 R01 will have (1+2=) 3
6) ADD R02,R03 # Add data from register R02 and R03 to R03 R03 will have (3+4=) 7
7) ADD R01,R03 # Add data from register R01 and R03 to R03 R03 will have (3+7=)10
8) STB R03,0020 # Store the byte from R03 to 0020 memory location
B ) Show, explain and justify with pipelining and without pipelining stages w.r.t
the below table parameters
C) Execute Program 3 Times. Show the contents of instruction cache after end of
every iteration in the table below (total 3 iterations) Show and explain misses Vs
cache size chart (graph) for instruction cache for block size =4 and cache size = 16
using direct mapping technique. Also explain the below table for each instruction
Iteration – 01
Address Instruction Hits Block Misses
1000 STB #01, 0006 - 0 1
1007 STB #02, 0007 1 0 1
1014 STB #03, 0008 1 0 1
1021 STB #04, 0009 1 0 1
1028 LDB 0006,R00 - 1 0
1034 LDB 0007,R01 1 1 0
1040 LDB 0008,R02 1 1 0
1046 LDB 0009,R03 1 1 0
1052 ADD R00,R01 - 2 0
1057 ADD R02,R03 1 2 0
1062 ADD R01,R03 1 2 0
1067 STB R03, 0020 1 2 0
1073 HLT 3
Iteration – 02