diff --git a/src/main/scala/xiangshan/transforms/PrintModuleName.scala b/src/main/scala/xiangshan/transforms/PrintModuleName.scala index ad31f786a6..37b12c9010 100644 --- a/src/main/scala/xiangshan/transforms/PrintModuleName.scala +++ b/src/main/scala/xiangshan/transforms/PrintModuleName.scala @@ -17,6 +17,8 @@ package xiangshan.transforms +import utility.XSLog + class PrintModuleName extends firrtl.options.Phase { override def invalidates(a: firrtl.options.Phase) = false @@ -33,7 +35,7 @@ class PrintModuleName extends firrtl.options.Phase { def onStmt(s: firrtl.ir.Statement): firrtl.ir.Statement = s match { case firrtl.ir.Print(info, firrtl.ir.StringLit(string), args, clk, en) => - firrtl.ir.Print(info, firrtl.ir.StringLit(string.replace(utility.XSLog.MagicStr, "%m")), args, clk, en) + firrtl.ir.Print(info, firrtl.ir.StringLit(XSLog.replaceFIRStr(string)), args, clk, en) case other: firrtl.ir.Statement => other.mapStmt(onStmt) } diff --git a/src/test/scala/top/SimTop.scala b/src/test/scala/top/SimTop.scala index 029a206944..e1631d7fd6 100644 --- a/src/test/scala/top/SimTop.scala +++ b/src/test/scala/top/SimTop.scala @@ -26,7 +26,7 @@ import difftest._ import freechips.rocketchip.amba.axi4.AXI4Bundle import freechips.rocketchip.diplomacy.{DisableMonitors, LazyModule} import freechips.rocketchip.util.HeterogeneousBag -import utility.{ChiselDB, Constantin, FileRegisters, GTimer} +import utility.{ChiselDB, Constantin, FileRegisters, GTimer, XSLog} import xiangshan.DebugOptionsKey import system.SoCParamsKey @@ -100,10 +100,7 @@ class SimTop(implicit p: Parameters) extends Module { val clean = if (hasPerf) WireDefault(difftest.perfCtrl.clean) else WireDefault(false.B) val dump = if (hasPerf) WireDefault(difftest.perfCtrl.dump) else WireDefault(false.B) - dontTouch(timer) - dontTouch(logEnable) - dontTouch(clean) - dontTouch(dump) + XSLog.collect(timer, logEnable, clean, dump) } object SimTop extends App {