Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 3 A. Design a 64KB 16-way set associative cache that has 64 words per bl

ID: 3704550 • Letter: P

Question

Problem 3 A. Design a 64KB 16-way set associative cache that has 64 words per blocks and 4 bytes per word (MIPS type). Assume a 32 bit address. Calculate the following: a) How many bits are used for the byte offset? b) How many bits are used for the set (index) field? c) How many bits are used for the tag? Design a 64KB direct mapped cache that has 64 words per blocks and 4 bytes per word (MIPS type). Assume a 32 bit address. Calculate the following: B. a) How many bits are used for the byte offset?

Explanation / Answer

A.

Cache size=64 KB=26*210 B=216B

Words per block=64=26

Bytes per word=4=22

Block size=Words per block *Bytes per word

=26*22

=28 B

Address size=32

So, Number of blocks=cachesize/ block size=216/28=28

Cache is 16-way set associatative i.e. 16 blocks per one set.

So, Number of sets=Number of blocks/set size=28/16=24

Now ,Number of bits used for byte offset=log2(Block size)=log2(28)=8 bits

Number of bits used for set field=log2(Number of sets)=log2(24)=4 bits

Rest bits are used for tag=32-(8+4)=20

a)Number of bits used for byte offset=8.

b)  Number of bits used for set field=4.

c) Number of bits are used for tag=20.

B.

Cache size=64 KB=26*210 B=216B

Words per block=64=26

Bytes per word=4=22

Block size=Words per block *Bytes per word

=26*22

=28 B

Address size=32

So, Number of blocks=cachesize/ block size=216/28=28

Now ,Number of bits used for byte offset=log2(Block size)=log2(28)=8 bits

Number of bits used for block frame field=log2(Number of blocks)=log2(28)=8 bits

Rest bits are used for tag=32-(8+8)=16 bits

a)Number of bits used for byte offset=8.

b)  Number of bits used for block frame=8.

c) Number of bits are used for tag=16.

20-bits 4-bits 8-bits
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote