in CO and Architecture retagged by
960 views
1 vote
1 vote

A computer uses a small direct-mapped cache between the main memory and the processor. The cache has four 16-bit words, and each word has an associated 13-bit tag, as shown in Figure P5.2a. When a miss occurs during a read operation, the requested word is read from the main memory and sent to the processor. At the same time, it is copied into the cache, and its block number is stored in the associated tag. Consider the following loop in a program where all instructions and operands are 16 bits long:

LOOP Add (R1)+,

R0 Decrement R2

BNE LOOP

Assume that, before this loop is entered, registers R0, R1, and R2 contain 0, 054E, and 3, respectively. Also assume that the main memory contains the data shown in Figure P5.2b, where all entries are given in hexadecimal notation. The loop starts at location LOOP = 02EC

 (a)Show the contents of the cache at the end of each pass through the loop.

(b) Assume the access time of main memory is $10\tau$ and that of the cache is $1\tau$. Calculate the execution time for each pass. Ignore the time taken by the processor between memory cycles.

in CO and Architecture retagged by
960 views

4 Comments

Can someone tell me how BNe instruciton works?
0
0
tag =0000010101001

data=A03D..

and this entry will be in line no. 3...

is it correct??..
0
0

No.solution manual- http://pencilji.com/note/list/21892352

See solution 5.7a.Please post your own answer if you are able to understand

0
0
that link doesnt display any solution

can u please check and said the link of the solution
0
0

1 Answer

0 votes
0 votes

Hi I will like to discuss this problem anyone able to understand solution? Please reply back

Here is solution if aanyoa can explain in more detail please reply

edited by

1 comment

My first doubt is why ADD instruction is stored on address 4 in first pass?
0
0

Related questions