Академический Документы
Профессиональный Документы
Культура Документы
ADDRESS
MAPPING
4/25 /12
4/25 /12
block as well as other information such as the valid bit and tag bits.
in direct-mapped caches consist of a single line. Set in fully associative and set associative caches consists of multiple lines.
4/25 /12
4/25 /12
DirectMapping
Each cache slot corresponds to an explicit set of main memory. In our example we have 4096 memory blocks and 128 cache slots. 128 blocks of main memory save in 1 block of cache memory. It is simplest mapping technique. It is easy to implement.
4/25 /12
Advantages:
4/25 /12
The tag memory is much smaller than in associative mapped cache. It is less costly compare to other mapping technique. It is not flexible.
Disadvantages:
Associative
Mapping
4/25 /12
The mapping from main memory blocks to cache slots is performed by partitioning an address into fields. There is no fix block, the memory address has only two fields : Tag & Word.
4/25 /12
Advantage:
4/25 /12
Disadvantage:
Slow or expensive.
Set-Associative Mapping
4/25 /12
Combines the simplicity of direct mapping with the flexibility of associative mapping. For this example, two slots make up a set. Since there are 214 slots in the cache, there are 214/2 =213 sets.
When an address is mapped to a set, the direct mapping scheme is used, and then associative mapping is used within a set.
4/25 /12
The format for an address has 13 bits in the set field, which identifies the set in which the addressed word will be found. Five bits are used for the word field and 14-bit tag field.
Advantages:
4/25 /12
In our example the tag memory increases only slightly from the direct mapping and only two tags need to be searched for each memory reference. The set-associative cache is widely used in todays microprocessors.
4/25 /12
Thank You