StateMachine<StateIdentifier> class Null safety

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<StateIdentifier>> _states)
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited