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

Floating-point constants #2061

Open
rachitnigam opened this issue May 27, 2024 · 3 comments
Open

Floating-point constants #2061

rachitnigam opened this issue May 27, 2024 · 3 comments
Assignees
Labels
C: Calyx Extension or change to the Calyx IL S: Discussion needed Issues blocked on discussion

Comments

@rachitnigam
Copy link
Contributor

@jiahanxie353 has proposed adding floating-point constants to the CIRCT frontend in llvm/circt#7086. I think this is particularly interesting because we'd have to figure out how to represent these constants in Calyx. Verilog itself (AFAIK) does not support IEEE-754 constants and so we'd have to generate the right bit-patterns.

One possible approach is adding this capability to calyx-frontend but the IR only ever sees bit-patterns for the numbers. In this case from_ast becomes responsible for transforming a floating-point constant string into the correct bit-pattern.

@rachitnigam rachitnigam added S: Discussion needed Issues blocked on discussion C: Calyx Extension or change to the Calyx IL labels May 27, 2024
@jiahanxie353 jiahanxie353 self-assigned this Jun 13, 2024
@jiahanxie353
Copy link
Collaborator

These two commits:

@rachitnigam
Copy link
Contributor Author

Thanks @jiahanxie353! Can you open a PR for these two commits so we can start the review?

@jiahanxie353
Copy link
Collaborator

Sure, just created it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Calyx Extension or change to the Calyx IL S: Discussion needed Issues blocked on discussion
Projects
None yet
Development

No branches or pull requests

2 participants