Fix minor bug in JAL instruction specification

master
Donald Sebastian Leung 2020-09-15 16:12:34 +08:00
parent 0f4a2a76bd
commit c4daa89a88
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ This should run in the order of a few hours.
### Progress
- [ ] Instruction Checks (mostly passing)
- [ ] JAL failing at line 202
- [x] JAL failing at line 202
- [ ] LB, LH, LW, LBU, LHU, SB, SH, SW: Parser error - invalid slice
- [ ] SRL failing at line 201
- [x] PC forward checks

View File

@ -22,7 +22,7 @@ class InsnJal(Insn):
m.d.comb += self.ialign16.eq(0)
next_pc = Signal(self.params.xlen)
m.d.comb += next_pc.eq(self.rvfi_rs1_rdata + self.insn_imm)
m.d.comb += next_pc.eq(self.rvfi_pc_rdata + self.insn_imm)
m.d.comb += self.spec_valid.eq(self.rvfi_valid & (~self.insn_padding) & (self.insn_opcode == 0b1101111))
m.d.comb += self.spec_rd_addr.eq(self.insn_rd)
m.d.comb += self.spec_rd_wdata.eq(Mux(self.spec_rd_addr, self.rvfi_pc_rdata + 4, 0))