This issue affects the MULH instruction when multiplying large negative numbers. The issue is that the whole 33-bit multiplicant gets copied, which is incorrect while using negative numbers.
This fix allows large negative numbers to be multiplied by each other in a correct manner. By not copying the whole 33 bit multiplicant but limiting it to 32 bits the issue is resolved.
This change is made to the MulDiv.scala file in the plugins folder.
The RISC-V tests ran with make -C tests CORE=riscv.CoreExtMem still returns All tests passed
This issue was not caught by the RISC-V tests because it only affects these high, negative numbers, which are not tested in the test suite.
This issue affects the MULH instruction when multiplying large negative numbers. The issue is that the whole 33-bit multiplicant gets copied, which is incorrect while using negative numbers.
This fix allows large negative numbers to be multiplied by each other in a correct manner. By not copying the whole 33 bit multiplicant but limiting it to 32 bits the issue is resolved.
This change is made to the MulDiv.scala file in the plugins folder.
The RISC-V tests ran with
make -C tests CORE=riscv.CoreExtMem
still returnsAll tests passed
This issue was not caught by the RISC-V tests because it only affects these high, negative numbers, which are not tested in the test suite.