I have a direct mapped cache of size S with the line size L. The cache is physically indexed and tagged. The physical address is 50 bits, numbered from 0 to 49 (with 0 being the least significant bit). The machine has a word size of 4 bits and the memory is byte-addressable. Which bits of the 50 bits are compared with the address tag?
Which are the spec bits in this cache
cachecomputer-architecturecomputers
Related Topic
- Electronic – How many bits are used for the tag, block, and offset fields for the representation of a memory address
- Electronic – Three way set associative cache with LRU replacement
- Direct cache vs. associative cache
- What are the bits for this cache
- What are the meanings of the fields of this cache memory
Best Answer
In a direct-mapped cache, each location in memory has exactly one place in which it can be stored in the cache. So, assuming S is given in bytes, this means that the lower log2S bits of the address are used to locate the data in the cache. The rest of the address bits become the tag.