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

Do a Better Job At Removing Default Zero Assignments #2011

Open
andrewb1999 opened this issue Apr 22, 2024 · 0 comments
Open

Do a Better Job At Removing Default Zero Assignments #2011

andrewb1999 opened this issue Apr 22, 2024 · 0 comments
Labels
AMC Needed for Andrew's memory compiler

Comments

@andrewb1999
Copy link
Collaborator

As extensively discussed in #922, Calyx often defaults unassigned values to zero. The verilog backend has some optimizations for @data ports that is able to optimize these assignments away, but I argue we need to be more aggressive with taking advantage of undefined behavior to remove zero assignments. This is mostly motivated by my discovery that these additional assignments can easily impact the maximum frequency of a given design. Each of these assignments can also add 1-2 LUTs in area which adds up quickly.

Essentially this optimization should make the default value of guards 'x whenever possible. One possible way to do this is to mark as many primitives with @data as possible. I'm not really sure what determines whether a primitive can be marked @data. We should also think about whether we can be more careful about not generating default zero assignment during FSM generation when they're not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMC Needed for Andrew's memory compiler
Projects
None yet
Development

No branches or pull requests

1 participant