提交 28958354 编写于 作者: Z zhanglinjuan

bundle: re-define FetchPacket and CtrlFlow

上级 4b4e15d6
...@@ -9,20 +9,14 @@ import xiangshan.frontend.PreDecodeInfo ...@@ -9,20 +9,14 @@ import xiangshan.frontend.PreDecodeInfo
// Fetch FetchWidth x 32-bit insts from Icache // Fetch FetchWidth x 32-bit insts from Icache
class FetchPacket extends XSBundle { class FetchPacket extends XSBundle {
val instrs = Vec(FetchWidth, UInt(32.W)) val instrs = Vec(PredictWidth, UInt(32.W))
val mask = UInt((FetchWidth*2).W) val mask = UInt(PredictWidth.W)
val pc = UInt(VAddrBits.W) // the pc of first inst in the fetch group val pc = UInt(VAddrBits.W)
val pnpc = Vec(FetchWidth*2, UInt(VAddrBits.W)) val pnpc = Vec(PredictWidth, UInt(VAddrBits.W))
val hist = Vec(FetchWidth*2, UInt(HistoryLength.W)) val brInfo = Vec(PredictWidth, (new BranchInfo))
// val btbVictimWay = UInt(log2Up(BtbWays).W) val pd = Vec(PredictWidth, (new PreDecodeInfo))
val predCtr = Vec(FetchWidth*2, UInt(2.W))
val btbHit = Vec(FetchWidth*2, Bool())
val tageMeta = Vec(FetchWidth*2, (new TageMeta))
val rasSp = UInt(log2Up(RasSize).W)
val rasTopCtr = UInt(8.W)
} }
class ValidUndirectioned[T <: Data](gen: T) extends Bundle { class ValidUndirectioned[T <: Data](gen: T) extends Bundle {
val valid = Bool() val valid = Bool()
val bits = gen.asInstanceOf[T] val bits = gen.asInstanceOf[T]
...@@ -72,7 +66,6 @@ class Predecode extends XSBundle { ...@@ -72,7 +66,6 @@ class Predecode extends XSBundle {
val pd = Vec(FetchWidth*2, (new PreDecodeInfo)) val pd = Vec(FetchWidth*2, (new PreDecodeInfo))
} }
class BranchUpdateInfo extends XSBundle { class BranchUpdateInfo extends XSBundle {
// from backend // from backend
val pnpc = UInt(VAddrBits.W) val pnpc = UInt(VAddrBits.W)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册