




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















MemoryAddress^0
Index
Index^012
Docsity.com
ByteAddress 0
BlockAddress belongs in cacheblock 2, since6 mod 4 = 2.• This corresponds
Index 0 1 2
-^ This^ correspondsto placing datafrom memory^ byte^ addresses
Index^0123 2 3 4 12 and 13 intocache block 2.
Docsity.com
block
13
d^ t^ th^
bl^ k^ dd^!
-^ Note byte address 13 corresponds to the
same^ memory block address! So a read from address 13 will also cause memory block 6 (addresses12 and 13) to be loaded into cache block 2.• To make things simpler byte
i^ of a memory block is always stored in To make things simpler, byte
i^ of a memory block is always stored in byte^ i^ of the corresponding cache block.^ Byte^
Cache Address^1213
BlockByte 1^2 Byte 0
Add^ (4 bit )^
Bl^ k^ ff^ t Tag^ Index (2 bits)^1
Address (4 bits)
Block offset 1 10 2 Index^ Tag^01
Data Valid 2 3 8^ =
8 1010 Mux^8
Hit^ Data
n Address (4 bits)^
Block offset Tag^ Index (2 bits)n^ nn^2 I d T^ DV lid
Index^ Tag^012
Data Valid^10 0xCA^11101
0xFE0xDE 0xAD0xBE 0xEF0 FE 0 ED 0
1 0xFE^ 0xED^8 810 Mux 0
Mux 8
Hit^ Data
Address (32 bits)
2 bits
y bit memory addresses.^ I d^
D t V lid
Index^ Tag^0123
Data Valid (^3) ... ... (^102210231023) Tag^ =
8 8 8 8 Mux
Hit^
(^8) Data
Address (32 bits)
Index^ Tag^ ...^512 ...
Data Valid Tag^ =
8 8 8 8 Mux
Hit^
(^8) Data
of a memory block is stored into byte
i^ of the
Memory address
Decimal 00 00..01 1000000000 00
6144 01 00..01 1000000000 01
6145 10 00..01 1000000000 10
6146 11 00..01 1000000000 11
6147 Index^ Tag^
Data Valid