Modify MUL instruction to use alternative operations
This commit is contained in:
parent
dec39cb11d
commit
c72205d433
|
@ -67,8 +67,10 @@ class rvfi_insn_mul(Elaboratable):
|
|||
m.d.comb += misa_ok.eq(1)
|
||||
|
||||
# MUL instruction
|
||||
altops_bitmask = Signal(64)
|
||||
m.d.comb += altops_bitmask.eq(0x2cdf52a55876063e)
|
||||
result = Signal(self.RISCV_FORMAL_XLEN)
|
||||
m.d.comb += result.eq(self.rvfi_rs1_rdata * self.rvfi_rs2_rdata)
|
||||
m.d.comb += result.eq((self.rvfi_rs1_rdata + self.rvfi_rs2_rdata) ^ altops_bitmask)
|
||||
m.d.comb += self.spec_valid.eq(self.rvfi_valid & (~insn_padding) & (insn_funct7 == 0b0000001) & (insn_funct3 == 0b000) & (insn_opcode == 0b0110011))
|
||||
m.d.comb += self.spec_rs1_addr.eq(insn_rs1)
|
||||
m.d.comb += self.spec_rs2_addr.eq(insn_rs2)
|
||||
|
|
Loading…
Reference in New Issue