-
Notifications
You must be signed in to change notification settings - Fork 53
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
[Calyx-Backend] Use Morty to link external libraries #2378
Conversation
cdcfb9c
to
5c6d93e
Compare
5c6d93e
to
324a404
Compare
Also added HardFloat as a compilation library; as well as corresponding tests cases. Ready for another round of review, thanks! |
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.
Some questions / potential for improvement.
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.
All my comments have been addressed. We need to hear from @rachitnigam before this is merged, since it is a pretty major change to a part of the codebase that I am not familiar with.
sounds good, thank you! |
Hey @rachitnigam , could you review it when you are available? |
will try to take a look tonighta |
@@ -0,0 +1,97 @@ | |||
`ifndef __ADDFN_V__ |
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.
Why are these files committed to the repo? I thought there is a script below that will download the 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.
Yes, the scripts will download additions/multiplications in the "Recoded formats" (such as addRecFN.sv), which is not IEEE standard formats:
Rather than operate on the standard formats directly, HardFloat prefers to translate IEEE-encoded values into equivalent recoded formats and operate on those alternative representations instead. The main purpose of the recoding is to make subnormals be normalized, aligned with other floating-point values, thus reducing the complexity of floating-point operations.
New files like addFN.sv
is a wrapper for addRecFN
by doing internal format-transformations so that users can pass in standard IEEE formats.
@@ -0,0 +1,19 @@ | |||
#!/bin/bash |
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.
Can we add a documentation section under the standard library that tells people that they need to run this command to get the floating-point libraries?
Also, this will be tricky to make work with the Compiler release (cargo install calyx
) which essentially bundle all the Verilog files and save them on the user's computer. It might make sense to expose a subcommand to the calyx
binary to download these kinds of dependencies. Can you open an issue about this part (and add the documentation to this PR)?
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.
sure, no problem!
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 your hardwork on this @jiahanxie353! It is really cool to see this actually working so great work on getting the tricky parts of morty sorted out.
I've left a couple of top-level comments. @ekiwi can you shepherd them through and approve the merge when they are done?
ul, compare, and their corresponding tests
… case; change . to PWD
…elpful err message if build syntax tree fails
6004f59
to
74be94e
Compare
Thank you so much for the review @rachitnigam ! I have made changes based on the request, and ready for another round of review @ekiwi ! |
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.
LGTM
This patch is the first half of #1928
We use Morty: https://github.com/pulp-platform/morty to pickle Verilog/System Verilog files needed as libraries.
Acknowledgement to @evanmwilliams for the original implementation.