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

M-extension issue (multiplication exceeds 64-bits) #344

Open
AhmedAmrAbdellatif1 opened this issue Feb 8, 2024 · 0 comments
Open

M-extension issue (multiplication exceeds 64-bits) #344

AhmedAmrAbdellatif1 opened this issue Feb 8, 2024 · 0 comments

Comments

@AhmedAmrAbdellatif1
Copy link

Hello everyone,
I was trying to use ripes to verify my multiplier design unit, by trying to perform a calculation that exceed 64-bit to verify the implementation of mulh instruction.
So, i used the following assembly:

li x8, 11
slli x8, x8, 35
ori x8, x8, 254

li x9, 23
slli x9, x9, 35
ori x8, x8, 424

mul x10, x8, x9
mulh x11, x8, x9
mulhu x12, x8, x9
mulhsu x13, x8, x9

I'm trying to perform a multiplication between (377957122558) and (790273982464) the result should be (2.986896804445448e+23)
which in hexadecimal --> 0000000000003F40 00016E9000000000 ''calculated using MATLAB''

so the result of using mul should be 00016E9000000000
and the result of using mulh should be 0000000000003F40

So, we can conclude that ripes calculate it wrong
image

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