提交 e201dec9 编写于 作者: Y YikeZhou

backend/decode/Decoder.scala: modify `isBr` to include jal and jalr

上级 e4104fa4
......@@ -21,8 +21,10 @@ class Decoder extends XSModule with HasInstrType {
val decodeList = ListLookup(instr, Instructions.DecodeDefault, Instructions.DecodeTable)
val instrType :: fuType :: fuOpType :: Nil = decodeList
// todo: remove this when fetch stage can decide if an instr is br
io.out.cf.isBr := (instrType === InstrB)
// todo: remove this when fetch stage can decide if an instr is br/jmp
io.out.cf.isBr := (instrType === InstrB ||
(fuOpType === BRUOpType.jal && instrType === InstrJ && fuType === FuType.bru) ||
(fuOpType === BRUOpType.jalr && instrType === InstrI && fuType === FuType.bru))
// val isRVC = instr(1, 0) =/= "b11".U
// val rvcImmType :: rvcSrc1Type :: rvcSrc2Type :: rvcDestType :: Nil =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册