Floating-point constants
Opened this issue · 3 comments
rachitnigam commented
@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.
jiahanxie353 commented
These two commits:
- json and data parsing;
- frontend parsing
supports the feature.
rachitnigam commented
Thanks @jiahanxie353! Can you open a PR for these two commits so we can start the review?
jiahanxie353 commented
Sure, just created it!