-
Notifications
You must be signed in to change notification settings - Fork 119
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
Float: Introduce floating point api eq #567
Float: Introduce floating point api eq #567
Conversation
Incarnation-p-lee
commented
Jun 3, 2024
•
edited
Loading
edited
- The eq(equal) api(s) introduced.
- Add new type fp_bits_x2.
- Add new type fp_bool_and_flags.
- Overload operator == for test to compare fp_bool_and_flags tuple.
- Add test cases for half, single and double floating point.
- Add eq(equal) to interface.
* The eq(equal) api(s) introduced. * Add new type fp_bits_x2. * Add new type fp_bool_and_flags. * Add new operator ==_t to compare fp_bool_and_flags tuple. * Add test cases for half, single and double floating point. * Add eq(equal) to interface. Signed-off-by: Pan Li <[email protected]>
I'm away today, but it shouldn't be a problem for me to do a rebase before merging when I'm back. |
No hurry and take your time. You can review #565 first and then I can do the rebase anyway. I am afraid that you may review these 2 PR(s) and then merge. Then you may need to resolve the conflict, which is my duty. |
lib/float/common.sail
Outdated
@@ -74,4 +77,13 @@ function float_decompose(op) = { | |||
} | |||
} | |||
|
|||
/* Floating point operator implementations */ | |||
infix 2 ==_t /* The suffix _t indicates tuple */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are bad for readability and it would be better to just spell it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just scoped to the test file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within a test file you could do $include <generic_equality.sail>
and use ==
, but it shouldn't be included in ordinary library code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for comments, that make sense to me, will update it after #565 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase and updated.
Signed-off-by: Pan Li <[email protected]>
Kindly ping for this PR, thanks! |