Question

Given the following cache specifications: (S, E, B, m) = (4, 2, 2, 6) Construct a...

Given the following cache specifications: (S, E, B, m) = (4, 2, 2, 6)

  1. Construct a block diagram of a two-way set-associative cache. Each block is 1 byte deep.
  2. Identify the tag bits, set bits and block offset bits for the address field.
  3. The cache replacement policy is: Last-in First-out.

Step 1: Initial State

Define the initial structure and state of the cache as done in class. The # of rows in the table below must be changed to fit your cache model.

Set

Line

Valid

Tag

Block 0

Block 1

Step 2: Read Address 0

Show how the cache contents change as the processer requests data from the following memory locations: 0, 32, 17, 33, 22, 9. Comment whether you have a cache hit/miss after each read.

Data at Address xis referred to as m[x]

If a cache line has to be overwritten, cross out the old line and write the new one or draw a new table.

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Given the following cache specifications: (S, E, B, m) = (4, 2, 2, 6) Construct a...
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
  • Given the following cache specifications: (S, E, B, m) = (4, 2, 2, 6) where S...

    Given the following cache specifications: (S, E, B, m) = (4, 2, 2, 6) where S is the number of sets, E is the number of lines per set, B is the number of blocks per line, and m is the memory address length. a. Construct a block diagram of the cache. b. Identify the tag bits, set bits and block offset bits for the address field. c. The cache replacement policy is: Last-in First-out. Show how the cache contents...

  • 7. In a cache system we have the following attributes: 4 GB of DRAM 256 MB...

    7. In a cache system we have the following attributes: 4 GB of DRAM 256 MB of physical memory space 2 MB of cache IKB per cache line Determine number of lines in cache. a) Determine the number of address bits out of the processor. b) c) Determine the number of bits needed for the block offset section of the address. If our cache is 8-way set associative, how many sets are there in the cache? d) How many bits...

  • 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...

  • 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...

  • Assume the following about a computer with a cache: .. The memory is byte addressable. •...

    Assume the following about a computer with a cache: .. The memory is byte addressable. • Memory accesses are to 1-byte words (not to 4-byte words). .. Addresses are 8 bits wide. .. The cache is 2-way associative cache (E=2), with a 2-byte block size (B=2) and 4 sets (5=4). • The cache contents are as shown below (V="Valid"): Set #Way #0 Way #1 V=1;Tag=0x12; Data = v=1;Tag=0x10; Data = Ox39 0x00 0x26 Ox63 V=1;Tag=0x09; Data = v=1;Tag=0x11; Data =...

  • Assume a 16-way set associative cache that holds 4096 bytes, where each block is 16 bytes....

    Assume a 16-way set associative cache that holds 4096 bytes, where each block is 16 bytes. Assuming an address is 32 bits and that cache is initially empty complete the table below. (You should use hexadecimal numbers for all answers.) Address TAG Cache location (block) | Offset within block OxOFFOFABA 0x00000011 0xOFFFFFFE 0x23456719 OxCAFEBABE Which, if any of the addresses will cause a collision (forcing the block that was just brought in to be overwritten) if they are accessed one...

  • 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...

  • Consider a 2-way set associative cache consisting of 8 blocks total of byte-addressable memory with 4...

    Consider a 2-way set associative cache consisting of 8 blocks total of byte-addressable memory with 4 bytes per block. Assume that the cache is initially empty. Given the following address sequence, fill in the table below. Time Access Tag Set Offset 3 10010001 11001001 10110110 10101011 10110010

  • A 2-way set associative cache consists of four sets 0, 1, 2, 3. The main memory...

    A 2-way set associative cache consists of four sets 0, 1, 2, 3. The main memory is word addressable (i.e. treat the memory as an array of words indexed by the address). It contains 2048 blocks 0 through 2047, and each block has eight words. (a) How many bits are needed to address the main memory? (b) Show how a main memory address will be translated into a tag, a set number, and an offset within a block. Illustrate this...

  • 3. 12+2-4 points] We are comparing the two caches in Problem 1 and Problem 2. Suppose both caphes have a hit time of 2 cycles. The cache in Problem 1 has a miss penalty of 15 cycles. The o...

    3. 12+2-4 points] We are comparing the two caches in Problem 1 and Problem 2. Suppose both caphes have a hit time of 2 cycles. The cache in Problem 1 has a miss penalty of 15 cycles. The one in Problem 2 has a miss penalty of 25 cycles. Calculate the total time taken (in cycles) for all accesses, for each cache. Which cache is better- the one in Problem 1 or Problem 2? 3. 12+2-4 points] We are comparing...

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