StateMachine<StateIdentifier> class
Simple class for FSM StateMachine.
Abstraction for representing Finite state machines (FSM). Contains the logic for performing the state transitions.
Constructors
-
StateMachine(Logic clk, Logic reset, StateIdentifier resetState, List<
State< _states)StateIdentifier> > -
Constructs a simple FSM, using the clk and reset signals. Also accepts
the reset state to transition to resetState along with the List of
_states
of the FSM.
Properties
- clk → Logic
-
The clock signal to the FSM.
final
- currentState → Logic
-
The current state of the FSM.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- nextState → Logic
-
The next state of the FSM.
final
- reset → Logic
-
The reset signal to the FSM.
final
- resetState → StateIdentifier
-
The reset state of the FSM to default to when the reset signal is high.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
states
→ List<
State< StateIdentifier> > -
List containig objects of class
State
.read-only
Methods
-
generateDiagram(
{String outputPath = 'diagram_fsm.md'}) → void -
Generate a FSM state diagram
_MermaidStateDiagram
. Check on https://mermaid.js.org/intro/ to view the diagram generated. If you are using vscode, you can download the mermaid extension. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited