889 views
3 votes
3 votes
Consider a memory system that uses a 32-bit address to address at the byte level, plus a cache that uses a 64-byte line size. Assume a four-way set-associative cache with a tag field in the address of 9 bits. The total number of cache lines/ blocks in the cache are_____

 

1 Answer

Best answer
3 votes
3 votes

Given,

line size = Block size (Bs) = $64$ Byte = $2^{6}$ Byte

Physical Address (PA) = $32$ bits

Tag = $9$ bits

4-way set associative


PA (32)
Tag(9) SLO(x) BO(6)

Here,

set line offset (SLO) = $log_{2}(Total sets)$

Block offset (BO) = $log_{2}(BS)$ = $log_{2}(2^{6})$ = $6$ bits


SLO = $32 – (9 + 6)$ = $17$ bits

$log_{2} (Total sets)$ = 17

Total sets = $2^{17}$ 

$\frac{Total\ CMblock}{4\ way\ set \ associative}$ =  $2^{17}$ 

$\frac{Total\ CMBlock}{4}$ = $2^{17}$ 

Total CM Block = $2^{17} * 4$ =  $2^{19}$  = $512$ K Blocks present

edited by

Related questions

1 votes
1 votes
1 answer
1
2 votes
2 votes
2 answers
3
LRU asked Nov 5, 2021
511 views
Consider the following memories with their miss rates and hit times Then the average memory access time is ______ (in ns)
1 votes
1 votes
0 answers
4
LRU asked Jan 14, 2022
353 views
Consider a memory system that uses a 32-bit address to address at the byte level, plus a cache that uses a 64-byte line size. Assume a four-way set-associative cache with...