Question

Question 33 10 pts For a direct mapped cache of 4 blocks with a cache block size of 1 byte, in which cache block will each me

10. Assume a 16-bit address space. Show all work (calculations) and clearly indicate how you calculate the index and tag. Mem

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

Please give thumbs up if you like it.I have completed the problem

Step 1 :-

Data given is

Direct mapped cache

=>Cache Block Size is 1Byte

So,Block offset will be = log 1 = 0 bits

=> Number of Blocks are = 4

Sp,Index bits will be = log 4 = 2 bits

=> Total bits of References is 12 bits

So,Tag bits will be = (12 - 2)= 10bits

Step 2 :-

We will check all references whether it is hit or miss by checking tag bit of particular index if its matches then it is hit otherwise there is miss

Every Memory references shown below and showed about hit/miss,tag and index

OPERATION MEMORY LOCATION BINARY NUMBER HIT/MISS CACHE INDEX TAG
1 0x0012 0000000000010010 MISS 10(2ND INDEX) 00000000000100
2 0x0022 0000000000100010 MISS 10(2ND INDEX) 00000000001000
3 0xFF12 1111111100010010 MISS 10(2ND INDEX) 11111111000100
4 0x0012 0000000000010010 MISS 10(2ND INDEX) 00000000000100
5 0x0012 0000000000010010 HIT 10(2ND INDEX) 00000000000100
6 0xEDFE 1110101111111110 MISS 10(2ND INDEX) 11101011111111
7 0x0012 0000000000010010 MISS 10(2ND INDEX) 00000000000100
Add a comment
Know the answer?
Add Answer to:
Question 33 10 pts For a direct mapped cache of 4 blocks with a cache block...
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
  • Question 3: Consider a 32-bit physical address memory system with block size 16 bytes and a...

    Question 3: Consider a 32-bit physical address memory system with block size 16 bytes and a 32 blocks direct mapped cache. The cache is initially empty. The following decimal memory addresses are referenced 1020, 1006, 1022, 5106, 994, and 2019 Map the addresses to cache blocks and indicate whether hit or miss. Note: You must use the hexadecimal approach in solving this question. You must also show the computations of dividing the memory address into tag bits, cache index bits,...

  • Consider a direct-mapped cache with 32 blocks Cache is initially empty, Block size = 16 bytes...

    Consider a direct-mapped cache with 32 blocks Cache is initially empty, Block size = 16 bytes The following memory addresses (in hexadecimal) are referenced: 0x2B4, 0x2B8, 0x2BC, 0x3E8, 0x3EC,0x4F0, 0x8F4, 0x8F8, 0x8FC. Map addresses to cache blocks and indicate whether hit or miss

  • 6. (30) Consider a 64B direct-mapped cache with 16B blocks and 4 sets for an 8-bit architecture (...

    6. (30) Consider a 64B direct-mapped cache with 16B blocks and 4 sets for an 8-bit architecture (i.e., 256 bytes of memory): a. (5) Write a C function unsigned char getTag(unsigned char address) that returns the cache tag for the specified address using bitwise operators: b. (5) Write a C function unsigned char getSet(unsigned char address) that returns the cache set for the specified address using bitwise operators: c. (10) Considering the following sequence of memory addresses, which addresses will...

  • For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram....

    For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram. Indicate the block size, number of blocks, and address field decomposition (block offset, index, and tag bit width) assuming a 32-bit memory address.

  • Targeted Course Learning Outcomes: CLO 2.1 Question 1: Using the “Direct Mapped Cache”, assume that 4-blocks,...

    Targeted Course Learning Outcomes: CLO 2.1 Question 1: Using the “Direct Mapped Cache”, assume that 4-blocks, 1 word/block, direct mapped Initial state is empty as shown below. Index V Tag Data 00 N 01 N 10 N 11 N And the following addresses have been requested in the following sequences: Request 1: Word Addresses 4, 5 and 7 Request 2: Word Addresses 0, 1 and 3 Request 3: Word Addresses 1, 2 and 3 Request 4: Word Addresses 3, 4...

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

  • Example on Cache Placement & Misses - Can someone explain to me how this is done....

    Example on Cache Placement & Misses - Can someone explain to me how this is done. Solution is posted Consider a small direct-mapped cache with 32 blocks - Cache is initially empty, Block size = 16 bytes - The following memory addresses (in decimal) are referenced: 0x3E8, 0x3EC, 0x3F0, 0x9F4, 0x9F8. 0x9FC. - Map addresses to cache blocks and indicate whether hit or miss Solution - 0x3E8 cache index = 0x1 E Miss (first access) - 0x3EC cache index =...

  • Example 4.2 For all three cases, the example includes the following elements: The cache can hold...

    Example 4.2 For all three cases, the example includes the following elements: The cache can hold 64 Kbytes. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K = 214 lines of 4 bytes each. The main memory consists of 16 Mbytes, with each byte directly addressable by a 24-bit address (24 = 16M). Thus, for mapping purposes, we can consider main memory to consist of...

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

  • Consider an L1 cache that has 8 sets, is direct-mapped (1-way), and supports a block size...

    Consider an L1 cache that has 8 sets, is direct-mapped (1-way), and supports a block size of 64 bytes. For the following memory access pattern (shown as byte addresses), show which accesses are hits and misses. For each hit, indicate the set that yields the hit. (30 points) 0, 48, 84, 32, 96, 360, 560, 48, 84, 600, 84, 48.

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