Class

spinal.lib.fsm

StateMachine

Related Doc: package fsm

Permalink

class StateMachine extends Area with StateMachineAccessor with ScalaLocated

State machine

Example:
  1. val fsm = new StateMachine {
      val sIdle: State = StateEntryPoint{
        ...
      }
      val sState1: State = new State {
        whenIsActive{
          goto(sIdle)
        }
      }
      ...
    }
Linear Supertypes
StateMachineAccessor, Area, OverridedEqualsHashCode, ValCallbackRec, ValCallback, NameableByComponent, Nameable, ContextUser, ScalaLocated, GlobalDataUser, OwnableRef, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StateMachine
  2. StateMachineAccessor
  3. Area
  4. OverridedEqualsHashCode
  5. ValCallbackRec
  6. ValCallback
  7. NameableByComponent
  8. Nameable
  9. ContextUser
  10. ScalaLocated
  11. GlobalDataUser
  12. OwnableRef
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StateMachine()

    Permalink

Type Members

  1. abstract type RefOwnerType

    Permalink
    Definition Classes
    OwnableRef

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val _context: Capture

    Permalink
    Definition Classes
    Area
  5. def add(stateMachine: StateMachineAccessor): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  6. def add(state: State): Int

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  7. def always(doThat: ⇒ Unit): StateMachine.this.type

    Permalink
  8. val alwaysTasks: ArrayBuffer[() ⇒ Unit]

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. var autoStart: Boolean

    Permalink
  11. def build(): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  12. var builded: Boolean

    Permalink
  13. val cache: HashMap[Any, Any]

    Permalink
  14. def cacheGet(key: Any): Option[Any]

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  15. def cacheGetOrElseUpdate(key: Any, op: ⇒ Any): Any

    Permalink
    Definition Classes
    StateMachineAccessor
  16. def cachePut(key: Any, value: Any): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  17. def checkState(state: State): Unit

    Permalink
  18. def childNamePriority: Byte

    Permalink
    Definition Classes
    Area
  19. val childStateMachines: LinkedHashSet[StateMachineAccessor]

    Permalink
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  21. def component: Component

    Permalink
    Definition Classes
    ContextUser
  22. var corruptedState: Bool

    Permalink
  23. def disableAutoStart(): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  24. var entryState: State

    Permalink
  25. val enumDef: StateMachineEnum

    Permalink
  26. def enumOf(state: State): SpinalEnumElement[enumDef.type]

    Permalink
  27. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  29. def exitFsm(): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  30. def forceGoto(state: State): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  31. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Nameable
  32. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  33. def getDisplayName(): String

    Permalink
    Definition Classes
    Nameable
  34. def getEntry(): State

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  35. def getInstanceCounter: Int

    Permalink
    Definition Classes
    ContextUser
  36. def getMode: Byte

    Permalink
    Attributes
    protected
    Definition Classes
    Nameable
  37. def getName(default: String): String

    Permalink
    Definition Classes
    NameableByComponent → Nameable
  38. def getName(): String

    Permalink
    Definition Classes
    NameableByComponent → Nameable
  39. def getPartialName(): String

    Permalink
    Definition Classes
    Nameable
  40. def getRefOwnersChain(): List[Any]

    Permalink
    Definition Classes
    OwnableRef
  41. def getScalaLocationLong: String

    Permalink
    Definition Classes
    ScalaLocated
  42. def getScalaLocationShort: String

    Permalink
    Definition Classes
    ScalaLocated
  43. def getScalaTrace(): Throwable

    Permalink
    Definition Classes
    ScalaLocated
  44. val globalData: GlobalData

    Permalink
    Definition Classes
    GlobalDataUser
  45. def goto(state: State): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  46. def hashCode(): Int

    Permalink
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  47. implicit val implicitFsm: StateMachine

    Permalink
  48. def inCorruptedState(): Bool

    Permalink
  49. var inGeneration: Boolean

    Permalink
  50. def isActive(state: State): Bool

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  51. def isCompletelyUnnamed: Boolean

    Permalink
    Definition Classes
    Nameable
  52. def isEntering(state: State): Bool

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  53. def isExiting(state: State): Bool

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  54. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  55. def isNamed: Boolean

    Permalink
    Definition Classes
    NameableByComponent → Nameable
  56. def isPriorityApplicable(namePriority: Byte): Boolean

    Permalink
    Definition Classes
    Nameable
  57. def isRunning: Bool

    Permalink
  58. def isStarted: Bool

    Permalink
  59. def isStateNextBoot(): Bool

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  60. def isStateRegBoot(): Bool

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  61. def isStopped: Bool

    Permalink
  62. def isUnnamed: Boolean

    Permalink
    Definition Classes
    Nameable
  63. def killFsm(): Unit

    Permalink
  64. def makeInstantEntry(): State

    Permalink
  65. var name: String

    Permalink
    Definition Classes
    Nameable
  66. var nameableRef: Nameable

    Permalink
    Attributes
    protected
    Definition Classes
    Nameable
  67. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  68. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  69. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  70. def onStart(body: ⇒ Unit): State

    Permalink
  71. def overrideLocalName(name: String): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  72. var parentScope: ScopeStatement

    Permalink
    Definition Classes
    ContextUser
  73. var parentStateMachine: StateMachineAccessor

    Permalink
  74. def postBuild(body: ⇒ Unit): Unit

    Permalink
  75. val postBuildTasks: ArrayBuffer[() ⇒ Unit]

    Permalink
  76. var refOwner: RefOwnerType

    Permalink
    Definition Classes
    OwnableRef
  77. def reflectNames(): Unit

    Permalink
    Definition Classes
    Nameable
  78. def rework[T](body: ⇒ T): T

    Permalink
    Definition Classes
    Area
  79. var scalaTrace: Throwable

    Permalink
    Definition Classes
    ScalaLocated
  80. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  81. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  82. def setCompositeName(nameable: Nameable, postfix: String): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  83. def setCompositeName(nameable: Nameable, namePriority: Byte): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  84. def setCompositeName(nameable: Nameable, weak: Boolean): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  85. def setCompositeName(nameable: Nameable): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  86. def setEncoding(spec: (State, BigInt)*): Unit

    Permalink
  87. def setEncoding(encoding: SpinalEnumEncoding): Unit

    Permalink
  88. def setEntry(state: State): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  89. def setName(name: String, namePriority: Byte): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  90. def setName(name: String, weak: Boolean): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  91. def setName(name: String): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  92. def setNameAsWeak(): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  93. def setParentStateMachine(parent: StateMachineAccessor): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  94. def setPartialName(name: String, namePriority: Byte, owner: Any): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  95. def setPartialName(name: String, namePriority: Byte): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  96. def setPartialName(name: String, weak: Boolean): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  97. def setPartialName(owner: Nameable, name: String, namePriority: Byte): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  98. def setPartialName(owner: Nameable, name: String, weak: Boolean): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  99. def setPartialName(name: String): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  100. def setPartialName(owner: Nameable, name: String): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  101. def setRefOwner(that: Any): Unit

    Permalink
    Definition Classes
    OwnableRef
  102. def setScalaLocated(source: ScalaLocated): StateMachine.this.type

    Permalink
    Definition Classes
    ScalaLocated
  103. def setTransitionCondition(condition: Bool): Unit

    Permalink

    Set the condition for state transitions

    Set the condition for state transitions

    goto() will only have an effect, if condition is True

  104. def setWeakName(name: String): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  105. def startFsm(): Unit

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  106. var stateBoot: State

    Permalink
  107. var stateNext: StateMachineEnum.C

    Permalink
  108. var stateNextCand: StateMachineEnum.C

    Permalink
  109. var stateReg: StateMachineEnum.C

    Permalink
  110. val stateToEnumElement: HashMap[State, SpinalEnumElement[enumDef.type]]

    Permalink
  111. val states: ArrayBuffer[State]

    Permalink
  112. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  113. def toString(): String

    Permalink
    Definition Classes
    Area → Nameable → AnyRef → Any
  114. var transitionCond: Bool

    Permalink
  115. def unsetName(): StateMachine.this.type

    Permalink
    Definition Classes
    Nameable
  116. def valCallback[T](ref: T, name: String): T

    Permalink
    Definition Classes
    ValCallbackRec → ValCallback
  117. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit

    Permalink
    Definition Classes
    ValCallbackRec
  118. def valCallbackRec(obj: Any, name: String): Unit

    Permalink
    Definition Classes
    Area → ValCallbackRec
  119. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  120. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  121. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  122. val wantExit: Bool

    Permalink
    Definition Classes
    StateMachineStateMachineAccessor
  123. val wantKill: Bool

    Permalink
  124. val wantStart: Bool

    Permalink

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from StateMachineAccessor

Inherited from Area

Inherited from OverridedEqualsHashCode

Inherited from ValCallbackRec

Inherited from ValCallback

Inherited from NameableByComponent

Inherited from Nameable

Inherited from ContextUser

Inherited from ScalaLocated

Inherited from GlobalDataUser

Inherited from OwnableRef

Inherited from AnyRef

Inherited from Any

Ungrouped