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

Explicit dyn fsm compilation #2395

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

parthsarkar17
Copy link
Contributor

Introduces an option to tdcc ( -x tdcc:infer-fsms ) that creates an explicit Calyx FSM construct for each dynamic FSM within a schedule. When compiled with the Verilog backend, each FSM construct compiles to a separate FSM module, which is then instantiated exactly once in the module for the Calyx component itself. The benefit of this modularization is that the Vivado toolchain can infer that an FSM has been created and optimize the hardware based on this knowledge.

To-do's before merging:

  • Verify that the FSM is indeed optimized by Vivado (we know it is inferred, but want to make sure the resources and/or clock period goes down)
  • Finish implementing the allocation of these new FSM constructs for par blocks. A small bug exists right now

- consolidated explicit fsm construction with inlined fsm construction
- added an option to explicitly construct fsm
- need to implement this for par blocks
- can most likely get rid of dyn-fsm-allocation now
@rachitnigam
Copy link
Contributor

Cool stuff! Incredibly dumb nit but is there a good reason to keep this logic within tdcc instead of separating it out into a different lowering pass that can just be run in a different pass pipeline? This would also make it easier to define an alias (all-with-fsm) that we can use to run all of the regression tests and make sure it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants