Question

Assume the following about a computer with a cache: .. The memory is byte addressable. • Memory accesses are to 1-byte words

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

Memory address size = 8 bits

Cache associativity = 2

#sets in cache = 4

Cache block size = 2 bytes

So, cache block offset = log2(block size) = log2(2) = 1 bit

Cache Set Index = log2(number of sets)= log2(4) = 2 bits

Cache tag = Address size - block offset - set index = 8 - 1 - 2 = 5 bits

Memory Address is represented as below

Tag Set Index Block Offset
5 2 1

memory address = 0x4a = 0100 1010

  • Cache Tag = 01001 = 0x09
  • Cache Set index = 01 = 0x1
  • Cache block offset = 0 = 0x0
  • Cache hit = Yes
    • All entries in Set index 1 is looked for any matche with tag value 0x9. If found e check for valid bit V. if V=1 data is returned based on block offset.
  • Cache byte returned = 0xe8
    • ​​​​​​​Each cache entry contains 2 byte. as block offset is 0, 0th byte is returned.

Add a comment
Know the answer?
Add Answer to:
Assume the following about a computer with a cache: .. The memory is byte addressable. •...
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
  • Assume the following: . . The memory is byte addressable. .. Memory accesses are to 1-byte...

    Assume the following: . . The memory is byte addressable. .. Memory accesses are to 1-byte words (not to 4-byte words). .. Addresses are 10 bits wide. .. The cache is 4-way associative cache (E=4), with a 4-byte block size (B=4) and 8 sets (5=8). • The cache contents are as shown below Set #Way #0 Way # 1 W ay #2 Way #3 V=1;Tag=0x1d; Data = v=1;Tag=0x00; Data = v=1;Tag=0xOf; Data = |V=0;Tag=0x1e: Data 0x21 Oxd9 Ox3e Ox3d Joxdc...

  • Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a...

    Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a cache of 1024 blocks, where each cache block contains 32 bytes. a. How many blocks of main memory are there? b. What is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, block, and offset fields? c.To which cache block will the memory address 0x000063FA map?

  • Memory Hierarchy and Cache Consider a computer with byte-addressable memory. Addresses are 24-bits. The cache is...

    Memory Hierarchy and Cache Consider a computer with byte-addressable memory. Addresses are 24-bits. The cache is capable of storing a total of 64KB of data, and frames of 32 bytes, Show the format of a 24-bit memory address for: a- Direct mapped cache b- 2-way associative cache c- 4-way associative cache d- For each type of cache above, indicate where would the reference memory address 0DEFB6 map

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

  • ) 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 byte-addressable computer with a cache that holds 8 blocks of 4 bytes...

    Suppose we have a byte-addressable computer with a cache that holds 8 blocks of 4 bytes each. Assuming that each memory address has 8 bits and cache is originally empty, for the cache mapping technique, two-way set associative, trace how cache is used when a program accesses the following series of addresses in order: 0x01, 0x04, 0x09, 0x05, 0x14, 0x21, and 0x01.

  • 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

  • Line 1 Set index 2-way set associative cache Line 0 Tag Valid Byte 0 Byte 1...

    Line 1 Set index 2-way set associative cache Line 0 Tag Valid Byte 0 Byte 1 Byte 2 Byte 3 Tag Valid Byte 0 Byte 1 Byte 2 Byte 3 091 86 30 3F 10 000 - 45 1 604FEO 23 38 1 00 BC OB 37 EB 0 OB 0 - 06 0 32 1 12 08 7B AD c 06 78 07 06 05 1 40 67 C2 3B 711 6E 0 911 AO B7 26 2DFO 0...

  • Question 28 7 pts Consider a byte-addressable computer with 24-bit addresses, a cache capable of storing...

    Question 28 7 pts Consider a byte-addressable computer with 24-bit addresses, a cache capable of storing a total of 64K bytes of data, and blocks of 32 bytes. If the computer uses direct mapping, the format of the memory address is as follows: bits for the tag field, bits for the cache block number, and bits for the block offset.

  • Assume the cache can hold 64 kB. Data are transferred between main memory and the cache...

    Assume the cache can hold 64 kB. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K=2^14 lines of 4 bytes each. The main memory consists of 16 MB, with each byte directly addressable by a 24-bit address (2^24 =16M). Thus, for mapping purposes, we can consider main memory to consist of 4M blocks of 4 bytes each. Please show illustrations too for all work. Part...

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