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

iNToRecFN num_zero_o fix width #11

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Conversation

tommydcjung
Copy link
Collaborator

@tommydcjung tommydcjung commented Nov 24, 2021

Fix synth issue:
Error: Width mismatch on port 'num_zero_o' of reference to 'bsg_counting_leading_zeros' in 'iNToRawFN_intWidth32'. (LINK-3)
Error: Unable to match ports of cell proc/h.z/vcore/fpu_float0/aux0/i2f/iNToRawFN/clz ('bsg_counting_leading_zeros') to 'bsg_counting_leading_zeros_width_p32'. (LINK-25)

@tommydcjung
Copy link
Collaborator Author

#10

@dpetrisko
Copy link
Collaborator

Should we merge this?

@taylor-bsg
Copy link
Contributor

What's the issue and resolution?

@dpetrisko
Copy link
Collaborator

dpetrisko commented Jan 5, 2022

This fixes a regression caused by #9.

If you use the current master of HardFloat, you get this width mismatch error:

Fix synth issue:
Error: Width mismatch on port 'num_zero_o' of reference to 'bsg_counting_leading_zeros' in 'iNToRawFN_intWidth32'. (LINK-3)
Error: Unable to match ports of cell proc/h.z/vcore/fpu_float0/aux0/i2f/iNToRawFN/clz ('bsg_counting_leading_zeros') to 'bsg_counting_leading_zeros_width_p32'. (LINK-25)

because bsg_counting_leading_zeros uses `BSG_WIDTH for the output where Hardfloat uses different widths for different contexts of CLZ: see: #10. This PR fixes the width mismatch for iNtoRecFN, allowing synthesis to proceed

@taylor-bsg
Copy link
Contributor

@stdavids Can you confirm that this fix looks correct, based on the other github issue discussion?

@tommydcjung
Copy link
Collaborator Author

Can you please merge with bespoke-silicon-group/bsg_manycore#608?

For int32 to float, you need 6-bits to represent the number of leading zeros, but you don't need to know if the input is 32'b0, in which case it will fall into the zero category anyway.

@stdavids
Copy link
Collaborator

stdavids commented Jan 6, 2022

This doesn't resolve #10 where the primary issue was that the semantics of the original countLeadingZeros and the bsg_priority_encode substitutes are different. It was mentioned, however, in #10 that there were some width mismatch issues in iNToRecFN and mulAddRecFN -- this PR does address the width mismatch issue in iNToRecFN and appears correct.

@taylor-bsg
Copy link
Contributor

taylor-bsg commented Jan 6, 2022 via email

@tommydcjung
Copy link
Collaborator Author

The first step would be to merge this. I haven't seen any problems with mulAddRecFN

@tommydcjung tommydcjung merged commit 0869552 into master Jan 12, 2022
@tommydcjung tommydcjung deleted the iNToRecFN_clz_width_fix branch January 12, 2022 18:50
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

Successfully merging this pull request may close these issues.

4 participants