-
Notifications
You must be signed in to change notification settings - Fork 8
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
Idea to support for Records in the Calyx Backend #424
Comments
Yeah, this sounds like a fun idea! Basically, we'd be implementing a array-of-struct to struct-of-array transformation. From the language semantics perspective, it enables parallel access to different fields at different indices (which is more powerful than what the type system allows for). A possible alternative is concating the various fields together and extracting them through bit slicing if that makes sense. The upside with this is that we only allocate one memory. I'm not particularly leaning towards either one; just wanted to highlight the space of options. Regarding Vivado backend: if you implement this as a lower pass, we can just disable it for Vivado like we do with unrolling. |
I also thought about the slicing idea, though I'm not sure how that will scale/work out with the number of fields in the record (during synthesis, I suspect synthesis tools messing with generated Verilog). The AoS to SoA transform seems quite elegant and simple. I'm going to try a Proof of Concept |
Btw, https://capra.cs.cornell.edu/fuse/docs/overview/ is out of date Can you publish the updated docs. |
Hm, the website publishing flow is currently broken. Could you open an issue about it? I think we'll need to host it using Github pages. We might as well use mdbook which is more lightweight than docusaurus. |
Idea 1: Records are lowered to separate variables
Currently the
Lower unroll and bank
pass lowers arraysafter lowering
Similarly a record can be lowered
to something like this
Cons:
Idea 2: Calyx specific
std_reg
orseq_mem
of given widthLet me know your thoughts @rachitnigam
The text was updated successfully, but these errors were encountered: