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

Parameter-dependent attribute values #1915

Open
rachitnigam opened this issue Feb 13, 2024 · 0 comments
Open

Parameter-dependent attribute values #1915

rachitnigam opened this issue Feb 13, 2024 · 0 comments
Labels
C: Calyx Extension or change to the Calyx IL Status: Discussion needed Issues blocked on discussion

Comments

@rachitnigam
Copy link
Contributor

I think we should add the ability to specify the value of an attribute using a parameter. The classic example of this is a multiplier with a parameter-defined latency:

primitive mult[W, L](@go @static(L) go: 1, ...) -> (@done done: 1)

This will become useful if/when we want to define memories with parameter-defined read and write latencies and other parameterized pipelined components.

The implementation challenge is exposing this nicely in the IR. Currently, we just query the underlying primitive object and read off it's attribute field. With this change, we'll also need to resolve the parameter value. However, this logic also exists for PortDefs since primitive ports can have parameter-defined bitwidths.

@rachitnigam rachitnigam added Status: Discussion needed Issues blocked on discussion C: Calyx Extension or change to the Calyx IL labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Calyx Extension or change to the Calyx IL Status: Discussion needed Issues blocked on discussion
Projects
None yet
Development

No branches or pull requests

1 participant