feat: 下一步添加cache

This commit is contained in:
Liphen 2023-12-13 19:54:44 +08:00
parent 6f065a9c67
commit ef9db0c29d
1 changed files with 1 additions and 2 deletions

View File

@ -39,8 +39,7 @@ class BranchCtrl extends Module {
io.out.pred_fail := io.in.pred_branch =/= io.out.branch
io.out.branch := (LookupTree(BRUOpType.getBranchType(op), table) ^
BRUOpType.isBranchInvert(op)) & valid
io.out.target := MuxCase(
io.in.pc + 4.U, // 默认顺序运行吧
io.out.target := Mux1H(
Seq(
(io.out.pred_fail && io.out.branch) -> io.in.branch_target,
(io.out.pred_fail && !io.out.branch) -> (io.in.pc + 4.U),