170 likes | 296 Vues
This tutorial explores solutions for a direct mapped cache with 16 lines, where each line contains 4 words, each one-byte. It covers bit calculations for the offset, index, and tag fields based on a 16-bit address bus. Specifically, it provides answers to key questions: how many bits are needed for the offset (2), index (4), and tag (10), and the total data storage capacity of the cache (64 bytes). Additionally, it addresses whether specific read accesses result in a cache hit or miss.
E N D
COMPSCI 210Semester 1 - 2014 Tutorial 11 Cache
Exercise 11.1 Solution • A direct mapped cache with 16 cache lines. Each line has 4 words, and each word is one byte. The address bus is 16 bits. • (a) How many bits are needed for representing the offset within a cache line (answer: 2) • (b) How many bits are needed for the index field (answer 4) • (c) How many bits are there in the tag field (answer 10) • (d) How much data can be held in the cache (answer 64 bytes) • (e) Figure out whether each of the following read accesses is a hit or a miss