darbaria / axiomise-warpv-formal-6-stage

1 stars 0 forks source link

MULHU Instruction not working properly #22

Open shivanishah269 opened 3 years ago

shivanishah269 commented 3 years ago

According to RISCV ISA definition of MULH Instruction, MULHU performs an XLEN-bit×XLEN-bit of unsignedxunsigned multiplication and places the upper XLEN bits in the destination register.

According to my observation, data flow of rs1 and rs2 content is as follows, Design signal(FETCH_Instr_mul_in1/2_a5) --> pcpi_rs1/2 --> mul.rs1/2 --> mul.rs1/2_q. Similar to MUL, here also the multiplication is executed based on contents of rs1_q and rs2_q which are uninitialized values.

Also, the updated result in axiomise_regfile[31] (which is wrong) is the lower half of mul.rd instead of the upper half.

Check the screenshot attached.

MULHU_fail