From 0273a53ea272f39205ada96f45e66fa559ff8693 Mon Sep 17 00:00:00 2001 From: Ma-YX Date: Tue, 3 Sep 2024 16:50:32 +0800 Subject: [PATCH] fix(TP): fix hardcoding issues in Common.scala to support sv48 replace magic numbers(hardcoding issues) with variable in calss TPmetaReq & TPmetaResp; support sv48(avoid assertion fail) --- src/main/scala/huancun/Common.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/huancun/Common.scala b/src/main/scala/huancun/Common.scala index f6356c54..3d423bd2 100644 --- a/src/main/scala/huancun/Common.scala +++ b/src/main/scala/huancun/Common.scala @@ -240,13 +240,13 @@ class PrefetchRecv extends Bundle { class TPmetaReq(implicit p: Parameters) extends HuanCunBundle { // FIXME: parameterize the hard code val hartid = UInt(hartIdLen.W) - val set = UInt(32.W) + val set = UInt(32.W) // determined by TP val way = UInt(4.W) val wmode = Bool() - val rawData = Vec(16, UInt((36-6).W)) + val rawData = Vec(16, UInt((fullAddressBits - offsetBits).W)) } class TPmetaResp(implicit p: Parameters) extends HuanCunBundle { val hartid = UInt(hartIdLen.W) - val rawData = Vec(16, UInt((36-6).W)) + val rawData = Vec(16, UInt((fullAddressBits - offsetBits).W)) }