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

[Calyx to FSM]Fix the bug when calyx multi-component design lower to fsm. #5341

Merged
merged 2 commits into from
Jun 8, 2023

Conversation

linuxlonelyeagle
Copy link
Member

I found this problem while learning circt during this time, and I have solved it.You can see it here.The names of the state machines generated in the calyx-to-fsm pass are all called control. This leads to a problem when designing with multiple components, where components may instantiate the state machines of other components.

@linuxlonelyeagle
Copy link
Member Author

@rachitnigam 😃Hi, I have found the problem and fixed it.

Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for working on this! I think this solution makes sense. @mortbopet I believe you initially implemented this. Any concerns?

Copy link
Contributor

@mortbopet mortbopet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, thank you for finding and fixing the bug!

@linuxlonelyeagle
Copy link
Member Author

@mikeurbach Thank you!I remember that you answered my question last year.:smiley:

@linuxlonelyeagle
Copy link
Member Author

@mikeurbach @mortbopet I should modify the test case again.

@mikeurbach
Copy link
Contributor

@linuxlonelyeagle looks like some tests will need to be updated. For example, this name will need to be updated:

// CHECK: fsm.machine @control()

You can run the tests with ninja check-circt to try it out.

@linuxlonelyeagle
Copy link
Member Author

@linuxlonelyeagle looks like some tests will need to be updated. For example, this name will need to be updated:

// CHECK: fsm.machine @control()

You can run the tests with ninja check-circt to try it out.

Thank you.

@linuxlonelyeagle
Copy link
Member Author

I have modified the test and run ninja check-circt on my own machine.I also tested ninja check-circt-integration.There are two error, but this error was already there,not related to the patch.You can view the results below.

Failed Tests (2):
  CIRCT :: Dialect/FSM/variable/top.mlir
  CIRCT :: ESI/system/basic.mlir


Testing Time: 5.65s
  Unsupported: 44
  Passed     : 33
  Failed     :  2

@mikeurbach
Copy link
Contributor

Great. Assuming the tests pass in CI I will merge it.

@rachitnigam
Copy link
Contributor

Awesome, thanks for fixing this @linuxlonelyeagle

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.

4 participants