# MadeEasy Test Series: CO & Architecture - Cache Memory

1 vote
299 views edited
0

case size 1024B= 10+tagbits =16 bits without associativity

but given =10+9 =19

so ans =19-16 =3 bits extra i.e 23 =8 way -associativity

Number of address bits = 16.

#Tag bits = 9.

#Offset bits = 3 (block/line size is 8 bytes and byte-addressing assumed).

So, number of set bits = 16 - 9 - 3 = 4.

Number of sets $=2^4=16$.

No. of cache blocks/lines $=\frac{\text{Cache size}}{\text{Block size}} \\=\frac{1024}{8} = 128.$

So, we have 128 cache blocks and 16 sets meaning $\frac{128}{16} = 8$ way associative cache.

selected
0
How cache memory size and main memory size same here?

Isnot question incomplete?
1
No, cache size is 1024 bytes and memory size is $2^{16} = 64K$ bytes. Question says cache is "addressed with" - means the physical memory size or virtual memory size depending on the cache addressing policy.
0
ok, thank u :)

Cache size=2^10 Byte

Block Size=2^3 Byte

Format of address split in set associativity

 Tag=9bits Set number=4 bits Block Offset=3 bits

Lines=CS/BS

Lines=2^7

clear

number of sets=Lines/2^3=2^4 =4bits

Therefore it is 8 way set associativity.

## Related questions

1
373 views
Assume that 16 bit cache address memory with cache size 1024 bytes. Block size of cache memory is 8 bytes and tag size is 9 bits. What is the associativity of cache memory? I am getting 8-way but answer is given as 4.
1 vote