Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MULH Instruction not working properly #21

Open
shivanishah269 opened this issue Jun 3, 2021 · 0 comments
Open

MULH Instruction not working properly #21

shivanishah269 opened this issue Jun 3, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@shivanishah269
Copy link
Collaborator

According to RISCV ISA definition of MULH Instruction,
MULH performs an XLEN-bit×XLEN-bit of signedxsigned 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.

Apart from this, I also observe that mul.rs1 and mul.rs2 are unsigned values at cycle 22 instead of signed values according to the definition. Also, the updated result in axiomise_regfile[10] (which is wrong) is the lower half of mul.rd instead of the upper half.

Check the screenshot attached.

MULH_fail

@shivanishah269 shivanishah269 added the bug Something isn't working label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants