0% found this document useful (0 votes)
9 views

Its112-Teston Fa2.3

The document discusses different cache memory addressing formats including direct mapped, fully associative, and 4-way set associative. It provides the memory address format for each case including the number of bits used for the tag, index, offset, and set size. An example memory reference is also converted to tag and offset values for a direct mapped cache.

Uploaded by

John Teston
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Its112-Teston Fa2.3

The document discusses different cache memory addressing formats including direct mapped, fully associative, and 4-way set associative. It provides the memory address format for each case including the number of bits used for the tag, index, offset, and set size. An example memory reference is also converted to tag and offset values for a direct mapped cache.

Uploaded by

John Teston
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

a.

Number of blocks in main memory:


2^24 / 64 = 2^18 blocks

b. Format of a memory address in the cache:


- Word size: 64 words
- Cache block size: 64 words
- Number of blocks in main memory: 2^18 blocks

Memory Address Format:


- Tag: 18 bits (for uniquely identifying each block in main memory)
- Word: 6 bits (to specify one of the 64 words within a block)

c. Cache block for memory reference 01D872v16:


- Convert memory address to binary: 0000 0001 1101 1000 0111 0010 (24 bits)
- Tag: 0000 0001 1101 1000 01 (18 bits)
- Word: 1001 1000 0111 0010 (6 bits)
- The memory reference maps to the cache block identified by the tag 0000 0001 1101
1000 01.
a.Direct Mapped:
- Cache Size: 64K bytes
- Block Size: 32 bytes
- Number of Blocks in Cache: 64K / 32 = 2K blocks

Memory Address Format:


- Block Offset: log2(32) = 5 bits
- Cache Index: log2(2K) = 11 bits
- Tag: 24 - 5 - 11 = 8 bits

Memory Address Format (Direct Mapped): Tag (8 bits) | Cache Index (11 bits) | Block
Offset (5 bits)

b. Fully Associative (Associative):


- Cache Size: 64K bytes
- Block Size: 32 bytes

Memory Address Format:


- Block Offset: log2(32) = 5 bits
- Tag: 24 - 5 = 19 bits

Memory Address Format (Fully Associative): Tag (19 bits) | Block Offset (5 bits)
c. 4-Way Set Associative:
- Cache Size: 64K bytes
- Block Size: 32 bytes
- Number of Sets: 2K / 4 = 512 sets

Memory Address Format:


- Block Offset: log2(32) = 5 bits
- Cache Index (Set Index): log2(512) = 9 bits
- Tag: 24 - 5 - 9 = 10 bits

Memory Address Format (4-Way Set Associative): Tag (10 bits) | Cache Index (9 bits) |
Block Offset (5 bits)

You might also like