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 with transition to nonexistent state should not elaborate #315

Closed
awygle opened this issue Jan 28, 2020 · 1 comment
Closed

FSM with transition to nonexistent state should not elaborate #315

awygle opened this issue Jan 28, 2020 · 1 comment
Milestone

Comments

@awygle
Copy link
Contributor

awygle commented Jan 28, 2020

M(ish)CVE: https://gist.github.com/awygle/00cca56b2d58185f3ab7112739588882

Basically, if you have an FSM transition to a state which doesn't have a corresponding with m.State("NAME") statement, I'd expect it to fail to elaborate.

I'm admittedly very new to nmigen so it's possible I am doing something wrong here, but this seems sufficiently intuitive that even if it's not the intended behavior, I'd argue that perhaps it ought to be.

@whitequark
Copy link
Member

It's a bit of an edge case; in Migen, this construct would fail to synthesize correctly (!), IIRC the offending edge would just act as if it does not exist. In nMigen this implicitly creates a state, but I agree this might not be desirable.

@whitequark whitequark added this to the 0.2 milestone Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants