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

Add IDX_SIZE information to .yxi outputs. #1751

Closed
nathanielnrn opened this issue Oct 23, 2023 · 1 comment · Fixed by #1964
Closed

Add IDX_SIZE information to .yxi outputs. #1751

nathanielnrn opened this issue Oct 23, 2023 · 1 comment · Fixed by #1964
Labels
C: FPGA Changes for the FPGA backend

Comments

@nathanielnrn
Copy link
Contributor

Currently yxi outputs only names, data width of the memory, and size of the memory in cells.
We should add IDX_SIZE information to this as well, as this is required when defining Calyx stdlib memories and we shouldn't be inferring idx sizes when such a value is explicitly defined.

@nathanielnrn nathanielnrn added the C: FPGA Changes for the FPGA backend label Oct 23, 2023
@sampsyo
Copy link
Contributor

sampsyo commented Oct 25, 2023

It's a tricky question, I think… the weird thing is that, in an ideal world, Calyx memories would have their index size inferred (as ceil(log2(count-1)), I believe). We can't do that easily in real Calyx right now because there's no way to compute one width based on another; the only way to have any port width be parameterized is to have it be exactly equal to a parameter. So we're forced to have the user provide two parameters (element count & index width) when one "should" be enough.

So it might actually just be simpler to say that we only support memories with "typical" index sizes, and you shouldn't use an artificially large/small one that's not what you'd expect from the element count?

@nathanielnrn nathanielnrn linked a pull request Mar 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: FPGA Changes for the FPGA backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants