search
Log In
1 vote
299 views

in CO and Architecture
edited by
299 views
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

2 Answers

7 votes
 
Best answer
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 by
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 :)
0 votes

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

0 votes
2 answers
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.
asked Jan 14, 2016 in CO and Architecture Tushar Shinde 373 views
3 votes
1 answer
4
520 views
Consider a n-way cache with 'x blocks of 64 words each. The main memory of the system is having 8 million words. Size of the tag field is 16 bits and additional memory required for tags is 1024 bytes. What will be the values of n and x respectively? Answer 256 512
asked Jan 30, 2019 in CO and Architecture Ram Swaroop 520 views
...