Log In
16 votes
  • What is the size of $MUX$ needed in direct mapped cache ?

For ex :- | Tag = $17$ | line = $10$ | word = $5$ |

Diagram Reference :-  Direct mapped cache with multi word block 

  • In set associative cache, Do MUX and OR gate work in parallel,i.e

What i mean to ask that data is loaded in MUX and OR checks for hit/Miss parallely ? If hit, then data is given . Then, shouldn't this be a disadvantage for set associative cache ? 

  • Also, if MUX and OR gate work parallely, then Hit latency includes both delays ?

Diagram Reference :- 

  • Also, any reason/explaination regarding below image ?

in CO and Architecture
retagged by
for direct mapped cache,since we need to select a particular line in which are dazta is residing,we need to give number of lines as input to th MUX.
so here 2^10 : 1 MUX will be required,and further ,after selecting a line,it will compare its tag with the address one comparator is enough.
and in set associitve,i think since we need to check a aprticular set,so we need MUX of size k:1.and number of comparators will be k only,as the set being selected has k lines.

I have read those questions. These questions are made from those questions only.

yes roughly we can say MUX and OR gate works parallely in cache memory . OR gate used to TAG comparison to select set, while MUX is used for select which data bits are valid.

In hit data is present in cache . So, why do u think it is disadvantage of set associative cache?

If data already present in cache, then just read the data once, and valid bit will be 0. But u have to go perticular set and get the data. Moreover if data is not present in data buffer , u have to  check different policy - either write back or write through policy, to see which is better to get data in less time.

Another one thing is, write allocate and write not allocate

If data is already stored, but not loaded yet - and we are getting hit- then we can say it is write not allocate.

Otherwise if we need to load data everytime to get a hit, that is write allocate.

In all these cases we have to include MUX and OR gate delay too, because those are tools select lines , as per given policy. So, if both delays are given then must have to include them.

yes in full associtive cache no indexing is required. Data can place anywhere in cache. No perticular arrangement is there. But TAG and word bit are there. Means MUX and OR bit used here too. Moreover they are interrelated. Selected bit of MUX is used in OR gate to get which data is hit and which one miss.



What about $1$st question ?

Thanks for other two questions. I got it :)

it requires MUX of size 1: 2^10 because these number of lines has to be looked for comparison with tag field 

Please log in or register to answer this question.

Related questions

0 votes
1 answer
A : LRU replacement policy is not applicable to direct mapped caches B : A unique memory page is associated with every cache page in direct mapped caches Options: 1) Both True 2) Both False 3) A is True and B is false 4) B is True and A is false
asked Dec 6, 2018 in CO and Architecture jatin khachane 1 738 views
3 votes
1 answer
The statement " Direct mapped cache, may produce more misses if programs refers to memory words that occupy a same tag value." is true or false ?
asked Dec 31, 2017 in CO and Architecture ashish pal 577 views
0 votes
2 answers
Assume a cache of $2K$ blocks ( 1 block size = 4 words= 16 bytes) and $32-bit$ address. Assume this machine is byte addressable. What is the bit length of each field in direct mapped? $(A).\space 19,11,2$ $(B).\space 20,11,2$ $(C).\space 21,9,2$ $(D). \text{none of these}$
asked Jun 14, 2017 in CO and Architecture Satyajeet Singh 560 views
1 vote
2 answers
Consider the direct mapped cache organization which consists of m-lines with a line size of 2w words/ bytes. Main memory address can be viewed as consisting of three fields. The least significant w-bits identify a unique word within the block of main memory. The remaining S' bits specify one of ... - 1) i thought answer would be 1,2,3, ... (m-1) but now i am confused what is asked in this ques.
asked Jan 21, 2016 in CO and Architecture khushtak 473 views