Overview of Direct Memory Mapping
Overview of Direct Memory Mapping
- The session focuses on different cache memory mapping techniques, starting with direct
memory mapping.
- The organization of cache memory and main memory is similar, with main memory parts
termed as blocks and cache parts as lines.
Conclusion
- The session concludes with an assurance of a clear understanding of direct memory
mapping, with future sessions planned to solve numerical problems related to the
concept.
01:27
Memory units are divided into words, with byte-addressable memory indicating each word size as one
byte. A main memory of 64 words organized into blocks of 4 results in 16 blocks, numbered from 0 to 15.
Addressing these locations requires bit placements, where one bit can address two locations, two bits
can address four, and further expansion allows for addressing more memory cells.
02:43
Memory Organization
In a memory system addressing 0 to 63 words, 6 physical address (PA) bits are required, derived from log
64 base 2. These 6 bits are divided with the most significant 4 bits identifying one of the 16 blocks, while
the least significant 2 bits specify the word within each block. For instance, the PA of 000111 gives a
block identifier of 7, demonstrating the importance of this bit allocation.
04:00
Analyzing the generated physical address reveals that the last word of block seven corresponds to the
value 31. In a cache of 16 words with a block size of four words, there are four lines, requiring two bits to
identify them. However, since not all main memory blocks can be assigned to cache lines simultaneously,
a round-robin mapping is utilized.
05:19
Blocks are mapped to cache lines in a straightforward manner, with the first four blocks assigned to the
corresponding lines. When additional blocks exceed available lines, a round robin approach allows for
mapping the fourth block back to the zeroth line, continuing this cycle for subsequent blocks. The least
significant two bits of the block number determine the cache line assignment, following a many-to-one
relationship, with the offset bits specifying individual words within each block or line.
06:43
Mapping Process
In the context of direct memory mapping, the last two bits of block numbers function as line numbers,
indicating which cache line a specific block will map onto, while the remaining bits are known as tag bits.
For example, analyzing block number 3 reveals its contents and corresponding tag bits, which identify
the blocks mapped onto the same cache line, demonstrating how the tags facilitate the tracking of
cached data. Ultimately, these patterns of tag bits help pinpoint which block is currently present in the
cache.
08:05
08:05
Direct mapping is a technique where main memory blocks are assigned directly to specific cache lines,
with a strict mapping procedure. The session concludes with an assurance of a clearer understanding of
the concept, leading into upcoming sessions focused on numerical problems related to this technique.