Question

10. A 64 K cache has lines that are 128 bytes long, and is 4-way set associative. The cache is in a computer with a 32-bit ad

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-

(A) Cache is partitioned into lines.

Given: Each line is 128 bytes long.

Cache size=64 K=64*1024 bytes

Number of lines=Cache Size/Line size

=(64*1024)/128

=512

No. of lines in given Cache=512

(B) Given 4-way Associative Mapping

4 Lines form a Set

Total no. of Sets= (No. of Lines)/4 = 512/4 =128

(C) No. of Tags=No. of Lines=512

(D)

TAG

INDEX OFFSET

MEMORY ADDRESS

Given 32 bit address

No. of Sets= 27

Index=7 bits

Block Size=128=27

Offset=7 bits

Tag Size=32-7-7=18 bits

(E) Each set has 4 Lines as it is 4-way Set Associative Cache

For LRU set replacement algorithm 4 extra bits are required.

Add a comment
Know the answer?
Add Answer to:
10. A 64 K cache has lines that are 128 bytes long, and is 4-way set...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. A cache holds 64 words where each word is 4 bytes. Assume a 32 bit...

    1. A cache holds 64 words where each word is 4 bytes. Assume a 32 bit address. There are four different caches a. A direct-mapped cache with block size = 16 words b. 2-way set-associative cache with block size = 8 words c. 4-way set-associative cache with block size=4 words d. A fully associative cache with block size = 16 words. Complete the table for each cache. Cache a Cache be Cache Cache de 16 Number of bits needed for...

  • Cache question computer architecture A cache holds 128 words where each word is 4 bytes. Assuming...

    Cache question computer architecture A cache holds 128 words where each word is 4 bytes. Assuming a 32-bit address, for each of the following organizations, complete the table. a.A direct-mapped cache with block size = 16words b.2-way set-associative cache with block size = 8words c.4-way set-associative cache with block size = 4words d.A fully associative cache with block size = 2words. Cache a Cache b Cache c Cache d total # bits for word & byte displacement # bits in...

  • A 256kiB (2^18 bytes) cache has a block size of 32 bytes and is 32-way set-associative....

    A 256kiB (2^18 bytes) cache has a block size of 32 bytes and is 32-way set-associative. How many bits of a 32-bit address will be in the Tag, Index, and Bock Offset?

  • ) Consider an 8-way associative 64 Kilo Byte cache with 32 byte cache lines. Assume memory...

    ) Consider an 8-way associative 64 Kilo Byte cache with 32 byte cache lines. Assume memory addresses are 32 bits long. a). Show how a 32-bit address is used to access the cache (show how many bits for Tag, Index and Byte offset). b). Calculate the total number of bits needed for this cache including tag bits, valid bits and data c). Translate the following addresses (in hex) to cache set number, byte number and tag (i) B2FE3053hex (ii) FFFFA04Ehex...

  • Suppose we have a 32-bit MIPS processor, which includes a 2-way set associative data cache with...

    Suppose we have a 32-bit MIPS processor, which includes a 2-way set associative data cache with capacity 16384 bytes, 16 bytes block, and a least recently used (LRU) replacement policy. Assume that the cache is empty (all valid bits are 0) before the following code is executed. lw $t1, 0x1040($0) lw $t2, 0x2044($0) lw $t3, 0x3048($0) lw $t4, 0x1044($0) lw $t5, 0x504c($0) lw $t6, 0x3040($0) For each of the six assembly instructions above, state i) the set field value for...

  • Q2. Consider a four-way set associative cache with a data size of 64 KB. The CPU...

    Q2. Consider a four-way set associative cache with a data size of 64 KB. The CPU generates a 32-bit byte addressable memory address. Each memory word contains 4 bytes. The block size is 16 bytes. Show the logical partitioning of the memory address into byte offset, cache index, and tag components.

  • a) Suppose we have a 64 KB, direct-mapped cache with 8-word blocks. Determine how many bits...

    a) Suppose we have a 64 KB, direct-mapped cache with 8-word blocks. Determine how many bits are required for the tag, index, and offset fields for a 32-bit memory address. b) If instead, we use a 64 KB, 4-way set-associative cache with 8-word blocks, how many bits will be required for the tag, index, and offset fields for a 32-bit address? c) What type of cache is shown in problem 2? How many bits are required for this cache’s tag,...

  • question 2 and 3 2. Determine how many sets of cache blocks will be there for...

    question 2 and 3 2. Determine how many sets of cache blocks will be there for the following Cache memory size (in bytes) Direct Mapped Blocks Size (in bits) 32 64 218 2-way Set Associative Block Size (in bits) 32 64 A 2A6 [0.5 * 16 = 8] 4-way Set Associative Block Size (in bits) 32 64 SK 64K 256K 3. The physical memory address generated by a CPU is converted into cache memory addressing scheme using the following mapping...

  • Suppose a computer using a fully associative cache has 232 bytes of byte-addressable main memory and...

    Suppose a computer using a fully associative cache has 232 bytes of byte-addressable main memory and a cache of 1024 blocks, were each cache block contains 32 bytes. Consider a memory address as seen by the cache. How many bits are in the tag field?

  • Computer architecture How many SRAM bits are needed to implement an 8KB two-way set associative cache...

    Computer architecture How many SRAM bits are needed to implement an 8KB two-way set associative cache with 64B block size? Assume that each line (entry) has a single valid bit and no dirty bits. There is one bit per set for true LRU. Assume that the address size of the machine is 32-bits and that the machine allows for byte addressing.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT