c

spinal.lib.fsm

StateParallelFsm

class StateParallelFsm extends State with StateCompletionTrait

Allows you to handle multiple nested state machines.

When all nested state machine are done, statements in whenCompleted { ... } are executed.

Example:
  1. val stateD = new StateParallelFsm (internalFsmA(), internalFsmB()) {
      whenCompleted {
        goto(stateE)
      }
    }
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StateParallelFsm
  2. StateCompletionTrait
  3. State
  4. Area
  5. OverridedEqualsHashCode
  6. ValCallbackRec
  7. ValCallback
  8. NameableByComponent
  9. Nameable
  10. ContextUser
  11. ScalaLocated
  12. GlobalDataUser
  13. OwnableRef
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StateParallelFsm(_fsms: StateMachineAccessor*)(implicit stateMachineAccessor: StateMachineAccessor)

Type Members

  1. abstract type RefOwnerType
    Definition Classes
    OwnableRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val _context: Capture
    Definition Classes
    Area
  5. val _fsms: StateMachineAccessor*
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def childNamePriority: Byte
    Definition Classes
    Area
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  9. def component: Component
    Definition Classes
    ContextUser
  10. def doWhenCompletedTasks(): Unit
    Attributes
    protected
    Definition Classes
    StateCompletionTrait
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  13. def exit(): Unit

    Schedules the state machine to be in the boot state the next cycle (or, in StateFsm, to exit the current nested state machine).

    Schedules the state machine to be in the boot state the next cycle (or, in StateFsm, to exit the current nested state machine).

    Definition Classes
    State
  14. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit
    Definition Classes
    Nameable
  15. val fsms: Seq[StateMachineAccessor]
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. def getDisplayName(): String
    Definition Classes
    Nameable
  18. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  19. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  20. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  21. def getName(): String
    Definition Classes
    NameableByComponentNameable
  22. def getPartialName(): String
    Definition Classes
    Nameable
  23. def getPath(from: Component, to: Component): Seq[Component]
    Definition Classes
    NameableByComponent
  24. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  25. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  26. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  27. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  28. def getStateMachineAccessor(): StateMachineAccessor

    Used internally by the state machine library

    Used internally by the state machine library

    Definition Classes
    State
  29. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  30. def goto(state: State): Unit

    Schedules the state machine to be in the provided State the next cycle.

    Schedules the state machine to be in the provided State the next cycle.

    state

    State to transition to.

    Definition Classes
    State
    Example:
    1. val pingState: State = new State with EntryPoint {
        whenIsActive {
          goto(pongState)
        }
      }
      val pongState: State = new State {
        whenIsActive {
          goto(pingState)
        }
      }
  31. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  32. def innerFsm(that: ⇒ StateMachine): Unit

    Internal to the state machine library

    Internal to the state machine library

    Definition Classes
    State
  33. var innerFsm: ArrayBuffer[StateMachine]
    Definition Classes
    State
  34. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. final def isNamed: Boolean
    Definition Classes
    Nameable
  37. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  38. def isUnnamed: Boolean
    Definition Classes
    NameableByComponentNameable
  39. val name: String
    Definition Classes
    Nameable
  40. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  44. def onEntry(doThat: ⇒ Unit): StateParallelFsm.this.type

    Defines statements to apply when the state machine is not in this state but will be in it during the next cycle.

    Defines statements to apply when the state machine is not in this state but will be in it during the next cycle.

    doThat

    hardware statement(s)

    Definition Classes
    State
    Example:
    1. val stateA: State = new State with EntryPoint {
        onEntry {
          counter := 0
          io.led := True
        }
        whenIsActive {
          goto(stateB)
        }
      }
  45. val onEntryTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    State
  46. def onExit(doThat: ⇒ Unit): StateParallelFsm.this.type

    Defines statements applied when the state machine is in this state and will be in another state the next cycle.

    Defines statements applied when the state machine is in this state and will be in another state the next cycle.

    doThat

    Hardware statement(s)

    Definition Classes
    State
    Example:
    1. val stateA: State = new State with EntryPoint {
        whenIsActive {
          goto(stateB)
        }
        onExit {
          io.result := True
          io.led := False
        }
      }
  47. val onExitTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    State
  48. def overrideLocalName(name: String): StateParallelFsm.this.type
    Definition Classes
    Nameable
  49. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  50. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  51. def reflectNames(): Unit
    Definition Classes
    Nameable
  52. def rework[T](body: ⇒ T): T
    Definition Classes
    Area
  53. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  54. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): StateParallelFsm.this.type
    Definition Classes
    Nameable
  55. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): StateParallelFsm.this.type
    Definition Classes
    Nameable
  56. def setCompositeName(nameable: Nameable, postfix: String): StateParallelFsm.this.type
    Definition Classes
    Nameable
  57. def setCompositeName(nameable: Nameable, namePriority: Byte): StateParallelFsm.this.type
    Definition Classes
    Nameable
  58. def setCompositeName(nameable: Nameable, weak: Boolean): StateParallelFsm.this.type
    Definition Classes
    Nameable
  59. def setCompositeName(nameable: Nameable): StateParallelFsm.this.type
    Definition Classes
    Nameable
  60. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): StateParallelFsm.this.type
    Definition Classes
    Nameable
  61. def setName(name: String, namePriority: Byte): StateParallelFsm.this.type
    Definition Classes
    Nameable
  62. def setName(name: String, weak: Boolean): StateParallelFsm.this.type
    Definition Classes
    Nameable
  63. def setName(name: String): StateParallelFsm.this.type
    Definition Classes
    Nameable
  64. def setNameAsWeak(): StateParallelFsm.this.type
    Definition Classes
    Nameable
  65. def setPartialName(name: String, namePriority: Byte, owner: Any): StateParallelFsm.this.type
    Definition Classes
    Nameable
  66. def setPartialName(name: String, namePriority: Byte): StateParallelFsm.this.type
    Definition Classes
    Nameable
  67. def setPartialName(name: String, weak: Boolean): StateParallelFsm.this.type
    Definition Classes
    Nameable
  68. def setPartialName(owner: Nameable, name: String, namePriority: Byte): StateParallelFsm.this.type
    Definition Classes
    Nameable
  69. def setPartialName(owner: Nameable, name: String, weak: Boolean): StateParallelFsm.this.type
    Definition Classes
    Nameable
  70. def setPartialName(name: String): StateParallelFsm.this.type
    Definition Classes
    Nameable
  71. def setPartialName(owner: Nameable, name: String): StateParallelFsm.this.type
    Definition Classes
    Nameable
  72. def setPartialName(owner: Nameable): StateParallelFsm.this.type
    Definition Classes
    Nameable
  73. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  74. def setScalaLocated(source: ScalaLocated): StateParallelFsm.this.type
    Definition Classes
    ScalaLocated
  75. def setWeakName(name: String): StateParallelFsm.this.type
    Definition Classes
    Nameable
  76. val stateId: Int
    Definition Classes
    State
  77. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  78. def toString(): String
    Definition Classes
    AreaNameable → AnyRef → Any
  79. def unsetName(): StateParallelFsm.this.type
    Definition Classes
    Nameable
  80. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  81. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  82. def valCallbackRec(obj: Any, name: String): Unit
    Definition Classes
    AreaValCallbackRec
  83. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  84. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  85. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  86. val whenActiveTasks: ArrayBuffer[StateMachineTask]
    Definition Classes
    State
  87. def whenCompleted(doThat: ⇒ Unit): StateParallelFsm.this.type
    Definition Classes
    StateCompletionTrait
  88. val whenCompletedTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    StateCompletionTrait
  89. val whenInactiveTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    State
  90. def whenIsActive(doThat: ⇒ Unit): StateParallelFsm.this.type

    Defines statements applied when the state machine is in this state.

    Defines statements applied when the state machine is in this state.

    doThat

    hardware statement(s)

    Definition Classes
    State
    Example:
    1. val stateA: State = new State with EntryPoint {
        whenIsActive {
          counter := counter + 1
          when(counter === 10) {
            goto(stateB)
          }
        }
      }
  91. def whenIsActiveWithPriority(priority: Int)(doThat: ⇒ Unit): StateParallelFsm.this.type

    Used internally by the state machine library

    Used internally by the state machine library

    Definition Classes
    State
    See also

    #whenIsActive()

  92. def whenIsInactive(doThat: ⇒ Unit): StateParallelFsm.this.type

    Defines statements applied when the state machine is not in this state.

    Defines statements applied when the state machine is not in this state.

    doThat

    hardware statement(s)

    Definition Classes
    State
  93. def whenIsNext(doThat: ⇒ Unit): StateParallelFsm.this.type

    Defines statements applied when the state machine will be in state the next cycle (even if it is already in it).

    Defines statements applied when the state machine will be in state the next cycle (even if it is already in it).

    Definition Classes
    State
  94. val whenIsNextTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    State

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from StateCompletionTrait

Inherited from State

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