未验证 提交 5197bac8 编写于 作者: Z Ziyue-Zhang 提交者: GitHub

l2tlb: fix ecc width (#1584)

上级 e5f1252b
......@@ -639,9 +639,9 @@ class PTWEntriesWithEcc(eccCode: Code, num: Int, tagLen: Int, level: Int, hasPer
val data = entries.asUInt()
val res = Wire(Vec(ecc_info._3 + 1, Bool()))
for (i <- 0 until ecc_info._3) {
res(i) := eccCode.decode(Cat(ecc((i+1)*ecc_info._2-1, i*ecc_info._2), data((i+1)*ecc_block-1, i*ecc_block))).error
res(i) := {if (ecc_info._2 != 0) eccCode.decode(Cat(ecc((i+1)*ecc_info._2-1, i*ecc_info._2), data((i+1)*ecc_block-1, i*ecc_block))).error else false.B}
}
if (ecc_info._4 != 0) {
if (ecc_info._2 != 0 && ecc_info._4 != 0) {
res(ecc_info._3) := eccCode.decode(
Cat(ecc(ecc_info._1-1, ecc_info._2*ecc_info._3), data(data.getWidth-1, ecc_info._3*ecc_block))).error
} else { res(ecc_info._3) := false.B }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册