algorithm - Find Associativity of this Cache? -


given cache following characteristics:

main memory: 16 bit address cache size: 256 bytes cache block size: 8 bytes cache tag size: 11 bits 

what associativity of cache? n-way associative? if n? can please explain can understand it?

have @ nice illustration.

here how works: address size 16 bits, have 16 bits tag plus index plus offset within cache block. if assume want address single bytes in cache (which case), need 3 bits address 1 byte within block (since each cache block 8 = 2^3 bytes). leaves 16 - 3 - 11 = 2 bytes index. 2 bytes, can address 2^2 = 4 different sets. have 256 / 8 = 32 blocks in cache (size of cache / size of 1 block). 32 blocks split 4 sets, each set holds 8 cache blocks. cache 8-way associative.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -