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

Fixed Point Logic and Fixed Point to Floating Point Conversion #116

Merged
merged 15 commits into from
Nov 1, 2024

Conversation

soneryaldiz
Copy link
Contributor

@soneryaldiz soneryaldiz commented Oct 25, 2024

Description & Motivation

This PR introduces a new signal type FixedPoint for fixed point arithmetic, and adds a generic module that can convert a fixed-point input to floating-point output with rounding to nearest even.

Related Issue(s)

Testing

Testing includes:

  • Exhaustive conversion from signed Q4.4 to E3M2.
  • Exhaustive conversion from unsigned Q4.4 to E3M2.
  • Exhaustive conversion from signed Q0.8 to E3M2 (shrinking precision).
  • Exhaustive conversion from signed Q0.3 to E5M6 (expanding precision).

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

Not a braking change.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

Documentation added to fixed_point.md.

@mkorbel1 mkorbel1 requested a review from desmonddak October 28, 2024 20:19
@soneryaldiz
Copy link
Contributor Author

The component supports both normal and subnormal now. I will continue with documentation and configuration.

@soneryaldiz soneryaldiz marked this pull request as ready for review October 31, 2024 17:02
Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!! Few small things then ready to merge I think

lib/src/arithmetic/fixed_to_float.dart Show resolved Hide resolved
test/arithmetic/fixed_to_float_test.dart Outdated Show resolved Hide resolved
test/arithmetic/fixed_to_float_test.dart Show resolved Hide resolved
@soneryaldiz
Copy link
Contributor Author

Resolved comments.

@soneryaldiz
Copy link
Contributor Author

PR ready to merge.

Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@mkorbel1 mkorbel1 merged commit a66bcda into intel:main Nov 1, 2024
4 checks passed
@soneryaldiz soneryaldiz deleted the fixed_to_float branch November 1, 2024 18:53
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.

2 participants