-
Notifications
You must be signed in to change notification settings - Fork 52
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 Standard Library Revamp #1596
Comments
While we're considering breaking changes to the standard primitives, I'll also throw #497 in for consideration (as a potential breaking change to |
Absolutely! Do you want to take a shot at implementing a version that had both a start index and an end index? @andrewb1999 do you know if this matches the semantics of the CIRCT slice primitive? |
Just wanted to flag a little weirdness in the fixed point prims. There are exactly three comparison ops
There's no equality op (presumably since the std_eq works if we assume both fixed point numbers have the same fixed point, which is the operating assumption for all the fixed prims). It does seem a bit weird that we have a signed less than but no less than op (which of course can be realized with gt), probably we should either commit to a very minimal set of ops (removing slt) or we should make the full suite of standard comparisons for fixed point numbers if they're something we intend to provide as stable |
Follow up, why does |
@EclecticGriffin Agreed! This is weird. There should be exactly one equality and it should handle all these different formats. Also, yeah, each unsigned thing should have a signed counterpart. I'm not too worried about keeping it minimal so maybe we can add all the signed counterparts and remove the useless |
Awesome! This is very much a good plan. Just to iterate (i.e., bike-shed) on the details, here are a few assorted suggestions:
|
I think combinational multipliers are also not technically unsynthesizable but maybe a different point here is that unsynthesizable is a little strong; these modules are fine if you want to do modeling maybe? On the other hand, @paili0628 is currently working on dual ported memories as well which will go into their own file. Long term maybe we just want all the memories in one place?
Right! This can be a part of the modules discussion. We almost want a |
Summarizing discussion from our meeting today, we were trying to figure out what the right way to develop and integrate the Calyx standard library is. Specifically, we need to start caring about long-term stability and integration with CIRCT as top-level concerns for the library.
To summarize:
compile.futil
is the set of primitives needed to compile Calyx programs. They are long-term stable and ship with the compiler source.core.futil
contains a mishmash of unsigned arithmetic, logical operations, andstd_mem
math.futil
containssqrt
andpow
implementations which is kind of weirdbinary_operators.futil
contains signed arithmetic operators and sequential primitives like multipliers and dividerstcam.futil
contains the implementation for a TCAM which, again, is kind of weirdunsynthesizable.futil
contains unsynthesizable primitives that are useful for testingmemories.futil
contains sequential memories which are the long-term default memories we want to supportProposed Changes
Here is a couple of proposed changes for the primitives library:
std_mem
primitives out ofcore.futil
and intounsynthesizable.futil
(Deprecatestd_mem
#1261)comb.futil
andsequential.futil
instead.*_pipe
primitives to not have the suffix since they are not pipelined*_fp
primitives to use the suffix_fixed
instead sincefp
denotes floating-pointtcam.futil
andmath.futil
into another folder to denote that they are not considered for first-class support. Long-term, we want to replacemath.futil
with @bcarlet's numerics generator libraryThese changes will likely break code from all our frontends and so we need to coordinate with the Dahlia stuff and CIRCT before merging. Once done, we should do a new major release of the compiler
The text was updated successfully, but these errors were encountered: