Skip to content

Commit

Permalink
fix(TP): fix hardcoding issues in Common.scala to support sv48 (#180)
Browse files Browse the repository at this point in the history
replace magic numbers(hardcoding issues) with variable in calss TPmetaReq & TPmetaResp; support sv48(avoid assertion fail)
  • Loading branch information
Ma-YX authored Sep 3, 2024
1 parent f9dffb2 commit fcc4278
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/huancun/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

0 comments on commit fcc4278

Please sign in to comment.