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

Confusion about how LZA module works? #12

Open
qleenju opened this issue Sep 15, 2022 · 3 comments
Open

Confusion about how LZA module works? #12

qleenju opened this issue Sep 15, 2022 · 3 comments

Comments

@qleenju
Copy link

qleenju commented Sep 15, 2022

hello:
I have some questions about how LZA module works? As leading zero anticipator, it serves to predict the leading zero counts of result while adding, so that normalization can be directly implemented after addition is completed.
However, in the module "fmac.sv", the input of LZA is A_LZA_D and B_LZA_D, instead of Csa_sum_D and Csa_carry_D. What's more, the value of A_LZA_D is always consistent with Sum_pos_D, which is the sum of Csa_sum_D and Csa_carry_D, and the value of B_LZA_D is always 0. In this case, the leading zero anticipation can not play a role at all, even though the out of fmac is correct.
I would also like to ask about the exact role of "LZA" module, since I found that it is not always accurate in predicting the leading zero of the sum of two inputs.
Looking forward to your response.
Best wishes!
Qiong Li, a student from Nanjing University.

@qleenju
Copy link
Author

qleenju commented Sep 15, 2022

Regarding the LZA module, I have found that as long as the results do not overflow, the leading zero anticipation of the sum of two inputs is generally correct, with occasional deviations of 1, which can be corrected in the process of normalization.

@MaoPann
Copy link

MaoPann commented Apr 17, 2023

How did you correct it? I encountered the same problem, 37-11 * 3 calculation error。

@MaoPann
Copy link

MaoPann commented Apr 17, 2023

@qleenju

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

2 participants