fix(id): 修复lui译码信号错

This commit is contained in:
Liphen 2023-11-26 15:06:51 +08:00
parent fbeb9413ab
commit 10cca9929b
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class Decoder extends Module with HasInstrType {
io.out.inst_info.valid := false.B
io.out.inst_info.inst_legal := instrType =/= InstrN
io.out.inst_info.reg1_ren := src1Type === SrcType.reg
io.out.inst_info.reg1_ren := src1Type === SrcType.reg || inst(6, 0) === "b0110111".U // fix LUI
io.out.inst_info.reg1_raddr := Mux(src1Type === SrcType.reg, rs, 0.U)
io.out.inst_info.reg2_ren := src2Type === SrcType.reg
io.out.inst_info.reg2_raddr := Mux(src2Type === SrcType.reg, rt, 0.U)