Problem 5.7 (from textbook)A computer uses a small direct mapped cache between the main memoryA 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 below. When a miss occurs during a read operation, the requested word is read from the main memoryduring 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. 13 bits16 bitsTagContentaddress 0address 2address 4address 6
Consider the following loop in a program where all instructions and operands are 16 bits long and the code starts at address02EC:operands are 16 bits long and the code starts at address LOOP: ADD(R1)+,R002ECDECRR202EEBNELOOP02F0Assume that, before this loop is entered, registers R0, R1 and R2 contain:R0 = 0, R1 = 054E, R2 = 3. Also assume that main memory contains the data as shown below:A03C054EShow the contents of the cache at the end of each pass through the loop.05D9055010D70552
has intentionally blurred sections.
Sign up to view the full version.