📜  门| GATE-CS-2015(Set 3)|第65章

📅  最后修改于: 2021-06-29 20:47:39             🧑  作者: Mango

考虑一台机器,其字节可寻址主存储器为2 20字节,块大小为16字节,并且具有2条12条高速缓存行的直接映射的高速缓存。设主存储器中两个连续字节的地址为(E201F) 16和(E2020) 16主存储器地址(E201F)16的标签和高速缓存行地址(以十六进制表示)是什么?
(A) E,201
(B) 201
(C) E,E20
(D) 2、01F答案: (A)
解释:

Block Size = 16 bytes
Block Offset = 4 

No. of sets or cache lines = 212
Number of index bits = 12

Size of main memory = 220
Number of tag bits = 20 - 12 - 4 = 4 

Let us consider the hex address E201F
Tag lines = First 4 bits = E (in hex)
Cache lines = Next 12 bits  = 201 (In Hex) 

请参阅http://virtual-labs.ac.in/labs/cse10/dmc.html

这个问题的测验