提交 0655b1a0 编写于 作者: X Xuan Hu

backend: update print info

上级 d387a573
......@@ -21,11 +21,16 @@ import xiangshan.mem.{LqPtr, LsqEnqIO, SqPtr}
class Backend(val params: BackendParams)(implicit p: Parameters) extends LazyModule
with HasXSParameter {
println("[Backend] ExuConfigs:")
for (exuCfg <- params.allExuParams) {
val fuConfigs = exuCfg.fuConfigs
val wbPortConfigs = exuCfg.wbPortConfigs
val immType = exuCfg.immType
println(s"exu: ${fuConfigs.map(_.name)}, wb: ${wbPortConfigs}, imm: ${immType}")
println("[Backend] " +
s"${exuCfg.name}: " +
s"${ fuConfigs.map(_.name).mkString("fu(s): {", ",", "}") }, " +
s"${ wbPortConfigs.mkString("wb: {", ",", "}") }, " +
s"${ immType.map(SelImm.mkString(_)).mkString("imm: {", "," , "}") }")
require(wbPortConfigs.collectFirst { case x: IntWB => x }.nonEmpty ==
fuConfigs.map(_.writeIntRf).reduce(_ || _),
"int wb port has no priority" )
......@@ -34,9 +39,6 @@ class Backend(val params: BackendParams)(implicit p: Parameters) extends LazyMod
"vec wb port has no priority" )
}
println(s"Function Unit: Alu(${params.AluCnt}), Brh(${params.BrhCnt}), Jmp(${params.JmpCnt}), " +
s"Ldu(${params.LduCnt}), Sta(${params.StaCnt}), Std(${params.StdCnt})")
for (cfg <- FuConfig.allConfigs) {
println(s"[Backend] $cfg")
}
......
......@@ -15,6 +15,17 @@ object WbConfig {
def writeInt = dataCfg == IntData()
def writeFp = dataCfg == FpData()
def writeVec = dataCfg == VecData()
override def toString: String = {
var res = dataCfg match {
case IntData() => "I"
case FpData() => "F"
case VecData() => "V"
case _ => "?"
}
res += s"($port)"
res
}
}
sealed abstract class ExuWB extends WbConfig
......
......@@ -566,6 +566,24 @@ package object xiangshan {
def X = BitPat("b0000")
def apply() = UInt(4.W)
def mkString(immType: UInt) : String = {
val strMap = Map(
IMM_S.litValue -> "S",
IMM_SB.litValue -> "SB",
IMM_U.litValue -> "U",
IMM_UJ.litValue -> "UJ",
IMM_I.litValue -> "I",
IMM_Z.litValue -> "Z",
IMM_B6.litValue -> "B6",
IMM_OPIVIS.litValue -> "VIS",
IMM_OPIVIU.litValue -> "VIU",
IMM_VSETVLI.litValue -> "VSETVLI",
IMM_VSETIVLI.litValue -> "VSETIVLI",
INVALID_INSTR.litValue -> "INVALID",
)
strMap(immType.litValue)
}
}
object UopSplitType {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册