1
0

make sure PTE cache is power of 2 in size to satisfy PseudoLRU requirement

This commit is contained in:
Howard Mao 2016-07-27 18:40:38 -07:00
parent dcfcac9530
commit bf35f980a6

View File

@ -98,7 +98,7 @@ class PTW(n: Int)(implicit p: Parameters) extends CoreModule()(p) {
}
val (pte_cache_hit, pte_cache_data) = {
val size = log2Up(pgLevels * 2)
val size = 1 << log2Up(pgLevels * 2)
val plru = new PseudoLRU(size)
val valid = Reg(init = UInt(0, size))
val tags = Reg(Vec(size, UInt(width = paddrBits)))