riscv-isa-sim icon indicating copy to clipboard operation
riscv-isa-sim copied to clipboard

Custom Instruction MAC issue

Open TVS2004Chaitanya opened this issue 1 year ago • 0 comments

WRITE_RD(sext_xlen(RS1*RS2 + READ_REG(insn.rd())));

I am trying to create a custom instruction mac(multiply and accumulate) where I multiply the two operands and add the result with the destination register and store it back in the destination register. When I am trying to do the same by defining the mac instuction in riscv-isa-sim/riscv/insn/mac.h by using the above line I am getting som floating values as output instead of rs1*rs2 + rd. What am I doing wrong?

TVS2004Chaitanya avatar Feb 05 '25 15:02 TVS2004Chaitanya