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

any idea about the hardware implementation of vgmul instruction? #392

Open
Lucas-Wye opened this issue Sep 6, 2024 · 0 comments
Open

any idea about the hardware implementation of vgmul instruction? #392

Lucas-Wye opened this issue Sep 6, 2024 · 0 comments

Comments

@Lucas-Wye
Copy link

As specified in the adocs, the vgmul instruction requires a very complex implementation:

for (int bit = 0; bit < 128; bit++) {
if bit_to_bool(Y[bit])
Z ^= H
bool reduce = bit_to_bool(H[127]);
H = H << 1; // left shift H by 1
if (reduce)
H ^= 0x87; // Reduce using x^7 + x^2 + x^1 + 1 polynomial
}

If we utilize pipeline, there would be around 128 stages, however, it is not efficient at all.

Any suggestion about the implementation of it?
Thx.

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