retagged by
28,069 views
39 votes
39 votes

A block-set associative cache memory consists of $128$ blocks divided into four block sets. The main memory consists of $16, 384$ blocks and each block contains $256$ eight bit words.

  1. How many bits are required for addressing the main memory?
  2. How many bits are needed to represent the TAG, SET and WORD fields?
retagged by

1 Answer

Best answer
59 votes
59 votes

For main memory, there are $2^{14}$ blocks and each block size is $2^8$ bytes (A byte is an eight-bit word)

  1. Size of main memory $=2^{14}\times 2^8=4MB$ ( $22-\text{bits}$ required for addressing the main memory).
  2. For WORD field, we require $8-\text{bits}$, as each block contains $2^8 $ words.

As there are $4$ blocks in $1$ set, $32$ sets will be needed for $128$ blocks. Thus SET field requires $5- \text{bits}$.

Then, TAG field requires $22-(5+8)= 9- \text{bits}$

$$\begin{array}{|c|c|c|} \hline \text {9-bits (for tag)} &  \text{5- bits (for set)}& \text{8-bits (for word)} \\\hline  \end{array}$$

edited by
Answer:

Related questions

4 votes
4 votes
0 answers
1
makhdoom ghaya asked Nov 23, 2016
2,766 views
State whether the following statements are TRUE or FALSE with reason:Transferring data in blocks from the main memory to the cache memory enables an interleaved main memo...
9 votes
9 votes
3 answers
3
makhdoom ghaya asked Nov 23, 2016
3,212 views
State whether the following statements are TRUE or FALSE with reason:The flags are affected when conditional CALL or JUMP instructions are executed.
19 votes
19 votes
4 answers
4
makhdoom ghaya asked Nov 23, 2016
7,555 views
State whether the following statements are TRUE or FALSE with reason:The data transfer between memory and I/O devices using programmed I/O is faster than interrupt-driven...