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

[FSM]New builders for StateOp and TransitionOp. #6991

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

HahaLan97
Copy link
Contributor

@HahaLan97 HahaLan97 commented May 6, 2024

  1. Now there is a new builder for StateOp, which also takes a ValueRange and uses it to create the OutputOp with it.
  2. Change the first builder of TransitionOp to be able to take two std::function<void> as arguments, which are similar to the sv::IfOp and are by default null. Which means, this change doesn't affect anything already existed.

These are simple changes, but would be very helpful when creating these two ops. One doesn't have to always use ensureGuard and ensureAction to create the blocks and set the InsertionPoint. Don't mention that ensureGuard creates an empty ReturnOp, which in most cases need to be erased every time. The empty OutputOp created in StateOp is in most cases useless as well.

HahaLan97 and others added 4 commits May 3, 2024 17:45
1. Create an OutputOp inside a StateOp with the output values instead of an empty OutputOp, which needs to be erased after all.

2. Accept two functions as arguments to create the TransitionOp, which is similar to the creation of sv::IfOp. This would be helpful because one doesn't have to create the blocks and set the insertion point manually, which may cause errors sometime.
@HahaLan97 HahaLan97 changed the title [FSM]New builders for StateOp and TransitionOp. Fix FSMToSV pass. [FSM]New builders for StateOp and TransitionOp. May 6, 2024
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.

None yet

1 participant