intel / rohd

The Rapid Open Hardware Development (ROHD) framework is a framework for describing and verifying hardware in the Dart programming language.
https://intel.github.io/rohd-website
BSD 3-Clause "New" or "Revised" License
374 stars 67 forks source link

`StateMachine` abstraction should expose mapping of identifiers to state index #409

Closed mkorbel1 closed 1 year ago

mkorbel1 commented 1 year ago

Motivation

The StateMachine maps different StateIdentifiers to indices to minimize the state space of the state (currentState and nextState). This index does not necessarily correspond to any meaningful number related to the identifier. Sometimes logic outside the state machine is interested in the state or next state, but there's not a reliable or easy way to map that.

Desired solution

Add an API to StateMachine that exposes the mapping from identifier to state index.

Alternatives considered

No response

Additional details

No response