I found two problems in signed multiplication and division.
Problem 1 -- multiplying a negative number by zero gives an incorrect answer. Example: -1 * 0 I expect: 0 Plasma gives: -0x100000000 I think sign_reg should be '0' when either of the operands is zero.
Problem 2 -- a division with a negative dividend gives a positive remainder. Example: -6 % 12 I expect: -6 Plasma gives: 6 I think resulting upper_reg should be negated in this case.
Thank you for your consideration.
Thank you for reporting the bugs. I modified mult.vhd as you suggested and added test cases in opcodes.asm. Now "0 * -1" should equal 0 and "-5 % 12" should equal -5.