提交 c778d2af 编写于 作者: L LinJiawei

[WIP] update frontend interface

上级 f606cf17
...@@ -196,10 +196,13 @@ class FtqEntry extends XSBundle { ...@@ -196,10 +196,13 @@ class FtqEntry extends XSBundle {
val rasTop = new RASEntry() val rasTop = new RASEntry()
val metas = Vec(PredictWidth, new BpuMeta) val metas = Vec(PredictWidth, new BpuMeta)
val brMask = UInt(PredictWidth.W) val brMask = Vec(PredictWidth, Bool())
val jalMask = UInt(PredictWidth.W) val jalMask = Vec(PredictWidth, Bool())
val mispred = UInt(PredictWidth.W) // backend update
val mispred = Vec(PredictWidth, Bool())
val taken = Vec(PredictWidth, Bool())
val jalr_target = UInt(VAddrBits.W)
} }
...@@ -285,8 +288,7 @@ class Redirect extends XSBundle { ...@@ -285,8 +288,7 @@ class Redirect extends XSBundle {
val roqIdx = new RoqPtr val roqIdx = new RoqPtr
val level = RedirectLevel() val level = RedirectLevel()
val interrupt = Bool() val interrupt = Bool()
val pc = UInt(VAddrBits.W) val cfiUpdate = new CfiUpdateInfo
val target = UInt(VAddrBits.W)
def isUnconditional() = RedirectLevel.isUnconditional(level) def isUnconditional() = RedirectLevel.isUnconditional(level)
def flushItself() = RedirectLevel.flushItself(level) def flushItself() = RedirectLevel.flushItself(level)
...@@ -377,8 +379,8 @@ class FrontendToBackendIO extends XSBundle { ...@@ -377,8 +379,8 @@ class FrontendToBackendIO extends XSBundle {
val cfVec = Vec(DecodeWidth, DecoupledIO(new CtrlFlow)) val cfVec = Vec(DecodeWidth, DecoupledIO(new CtrlFlow))
val fetchInfo = DecoupledIO(new FtqEntry) val fetchInfo = DecoupledIO(new FtqEntry)
// from backend // from backend
val redirect_cfiUpdate = Flipped(ValidIO(new CfiUpdateInfo)) val redirect_cfiUpdate = Flipped(ValidIO(new Redirect))
val commit_cfiUpdate = Flipped(Vec(CommitWidth, ValidIO(new CfiUpdateInfo))) val commit_cfiUpdate = Flipped(ValidIO(new FtqEntry))
} }
class TlbCsrBundle extends XSBundle { class TlbCsrBundle extends XSBundle {
......
...@@ -166,7 +166,7 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper { ...@@ -166,7 +166,7 @@ class CtrlBlock extends XSModule with HasCircularQueuePtrHelper {
fpBusyTable.io.pregRdy <> dispatch.io.fpPregRdy fpBusyTable.io.pregRdy <> dispatch.io.fpPregRdy
roq.io.redirect <> backendRedirect roq.io.redirect <> backendRedirect
roq.io.exeWbResults.take(roqWbSize-1).zip( roq.io.exeWbResults.zip(
io.fromIntBlock.wbRegs ++ io.fromFpBlock.wbRegs ++ io.fromLsBlock.stOut io.fromIntBlock.wbRegs ++ io.fromFpBlock.wbRegs ++ io.fromLsBlock.stOut
).foreach{ ).foreach{
case(x, y) => case(x, y) =>
......
...@@ -37,12 +37,12 @@ class Ftq extends XSModule with HasCircularQueuePtrHelper with NeedImpl { ...@@ -37,12 +37,12 @@ class Ftq extends XSModule with HasCircularQueuePtrHelper with NeedImpl {
val enqPtr = Output(new FtqPtr) val enqPtr = Output(new FtqPtr)
// roq commit, read out fectch packet and deq // roq commit, read out fectch packet and deq
val roq_commits = Vec(CommitWidth, ValidIO(new RoqCommitInfo)) val roq_commits = Vec(CommitWidth, ValidIO(new RoqCommitInfo))
val commit_cfiUpdate = Vec(CommitWidth, ValidIO(new CfiUpdateInfo)) val commit_ftqEntry = ValidIO(new FtqEntry)
// redirect, reset enq ptr // redirect, reset enq ptr
val redirect = Input(ValidIO(new Redirect)) val redirect = Input(ValidIO(new Redirect))
// exu write back, update info // exu write back, update info
val exuWriteback = Vec(exuParameters.JmpCnt + exuParameters.AluCnt, Flipped(ValidIO(new ExuOutput))) val exuWriteback = Vec(exuParameters.JmpCnt + exuParameters.AluCnt, Flipped(ValidIO(new ExuOutput)))
// pc read reqs (1 for load replay / exceptions, 1 for jump/auipc, 1 for misprediction) // pc read reqs (0: jump/auipc 1: redirect 2: load replay / exceptions)
val ftqRead = Vec(3, Flipped(new FtqRead)) val ftqRead = Vec(3, Flipped(new FtqRead))
}) })
...@@ -58,4 +58,7 @@ class Ftq extends XSModule with HasCircularQueuePtrHelper with NeedImpl { ...@@ -58,4 +58,7 @@ class Ftq extends XSModule with HasCircularQueuePtrHelper with NeedImpl {
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册