In this reading we will begin our exploration of various organizations of hardware caches. The first organization we will look at is the direct-mapped cache. This type of cache is simple and fast to access but with some serious drawbacks that you will read about.
Sections 6.4.0 - 6.4.2 (pp. 614-624) from the course textbook.
Each student will be responsible for learning and demonstrating proficiency in the following objectives PRIOR to the class meeting. The reading quiz will test these objectives.
The following objectives should be mastered by each student DURING and FOLLOWING the class session through active work and practice.
These exercises are geared towards mastering the BASIC learning objectives listed above. You are expected to submit them before class and it is highly recommended that you complete them before attempting the reading quiz.
Assume you have a cache with the following set of parameters: (S, E, B, m) = (64, 4, 8, 32). Calculate the following parameters:
Assume you have the following direct-mapped cache.
Set | Valid | Tag | Block Contents |
000 |
1 |
110100 |
0x0000000000FFA01F |
001 |
0 |
000000 |
0x0000000000000000 |
010 |
1 |
110100 |
0xA1B2C3D4E5F60011 |
011 |
1 |
110101 |
0xFFAABBDD01234567 |
100 |
1 |
000011 |
0x1122334455667788 |
101 |
0 |
000000 |
0x0000000000000000 |
110 |
0 |
000000 |
0x0000000000000000 |
111 |
1 |
110100 |
0x0000F1BDC3D8910A |
For each of the following 12-bit addresses, indicate whether they are a hit or miss in the cache. For simplicity, assume that you are accessing only a single byte and that the contents of the cache never change.