Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Cache Memory PPT
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Cache Memory

[attachment=49236]

So, what is cache memory?

We want to minimize memory accesses by processor.
Cache memory is just like regular memory, only it has faster access time of ~ 10 ns.
Constructed using static RAM or associative memory  more expensive then RAM.

How is Data stored in Cache?

Find data with 1010 as four high-order bits.
CPU loads 1111 0000 0000 0000 to mask register and 1010 XX XX XX to data register.
Find matches.

Associative Mapping

First 16 bits = memory address
Last 8 bits = the actual data stored in that memory address
CPU outputs 16-bit address to be accessed and 8-bit “don’t cares” into data register and the value
1111 1111 1111 1111 0000 0000
to mask register.

Result:

Entire block is copied to cache.
Next instruction is likely to already be in cache.
No need for main memory access.

Direct Mapping

Can be larger than Associative cache but still cheaper.
10 Low-order bits (index) = specific location in cache to store data (1-1 relation).
High-order bits (tag) = same as high-order bits of original main memory address.

Set-Associative Mapping

Each address in cache contains several data values – an n-way set-associative cache contains n values.
Tag field is same as in Direct Mapping but has one extra bit (9 bits for location, 7 bits for tag).