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

Custom Instruction MAC issue #1909

Open
TVS2004Chaitanya opened this issue Feb 5, 2025 · 0 comments
Open

Custom Instruction MAC issue #1909

TVS2004Chaitanya opened this issue Feb 5, 2025 · 0 comments

Comments

@TVS2004Chaitanya
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant