From fcc42787984d2204b7a30a87d806c1f1c08b7562 Mon Sep 17 00:00:00 2001 From: Ma-YX <71326427+Ma-YX@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:13:53 +0800 Subject: [PATCH] fix(TP): fix hardcoding issues in Common.scala to support sv48 (#180) 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)) }