Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 9. [8 marks] Here is an example of how the cache works: A computer uses a small direct-mapped cache between the main memory and
Question 9. [8 marks] Here is an example of how the cache works: 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 the figure on the right, where, however, the tag has been ignored for this task. 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. 16 bit content address 0 address 2 address 4 address 6 Consider the following loop in a program where all instructions and operands are 16 bits long and the code starts at address 0x02EC: LOOP: ADD (R1) +,RO 02EC DECR R2 02EE BNE LOOP 02FO Assume that, before this loop is entered, registers RO, R1 and R2 contain: R0-0, RI = 0x054E, R2 3. Also assume that main memory contains the data as shown on the right memory 16 bit content address 054E 0550 0552 A03C 05D9 10D7 Question 9. [8 marks] Here is an example of how the cache works: 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 the figure on the right, where, however, the tag has been ignored for this task. 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. 16 bit content address 0 address 2 address 4 address 6 Consider the following loop in a program where all instructions and operands are 16 bits long and the code starts at address 0x02EC: LOOP: ADD (R1) +,RO 02EC DECR R2 02EE BNE LOOP 02FO Assume that, before this loop is entered, registers RO, R1 and R2 contain: R0-0, RI = 0x054E, R2 3. Also assume that main memory contains the data as shown on the right memory 16 bit content address 054E 0550 0552 A03C 05D9 10D7
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started