c

spinal.lib.fsm

StateDelay

class StateDelay extends State with StateCompletionTrait

Allows you to create a state which waits for a fixed number of cycles before executing statements in whenCompleted {...}.

The preferred way to use it is:

Examples:
  1. val stateG : State = new StateDelay(cyclesCount=40) {
      whenCompleted {
        goto(stateH)
      }
    }

    It can also be written in one line:

  2. ,
  3. val stateG : State = new StateDelay(40) { whenCompleted(goto(stateH)) }
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StateDelay
  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 StateDelay(cyclesCount: UInt)(implicit stateMachineAccessor: StateMachineAccessor)
  2. new StateDelay(cyclesCount: CyclesCount)(implicit stateMachineAccessor: StateMachineAccessor)
  3. new StateDelay(time: TimeNumber)(implicit stateMachineAccessor: StateMachineAccessor)

    Create a StateDelay with a TimeNumber

  4. new StateDelay(cyclesCount: Int)(implicit stateMachineAccessor: StateMachineAccessor)
  5. new StateDelay(cyclesCount: BigInt)(implicit stateMachineAccessor: StateMachineAccessor)
  6. new StateDelay(cyclesCount: AnyRef, minWidth: Int)(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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val cache: StateMachineSharableRegUInt
  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. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. def getDisplayName(): String
    Definition Classes
    Nameable
  17. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  18. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  19. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  20. def getName(): String
    Definition Classes
    NameableByComponentNameable
  21. def getPartialName(): String
    Definition Classes
    Nameable
  22. def getPath(from: Component, to: Component): Seq[Component]
    Definition Classes
    NameableByComponent
  23. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  24. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  25. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  26. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  27. def getStateMachineAccessor(): StateMachineAccessor

    Used internally by the state machine library

    Used internally by the state machine library

    Definition Classes
    State
  28. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  29. 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)
        }
      }
  30. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  31. def innerFsm(that: ⇒ StateMachine): Unit

    Internal to the state machine library

    Internal to the state machine library

    Definition Classes
    State
  32. var innerFsm: ArrayBuffer[StateMachine]
    Definition Classes
    State
  33. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. final def isNamed: Boolean
    Definition Classes
    Nameable
  36. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  37. def isUnnamed: Boolean
    Definition Classes
    NameableByComponentNameable
  38. val name: String
    Definition Classes
    Nameable
  39. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  40. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  43. def onEntry(doThat: ⇒ Unit): StateDelay.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)
        }
      }
  44. val onEntryTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    State
  45. def onExit(doThat: ⇒ Unit): StateDelay.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
        }
      }
  46. val onExitTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    State
  47. def overrideLocalName(name: String): StateDelay.this.type
    Definition Classes
    Nameable
  48. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  49. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  50. def reflectNames(): Unit
    Definition Classes
    Nameable
  51. def rework[T](body: ⇒ T): T
    Definition Classes
    Area
  52. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  53. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): StateDelay.this.type
    Definition Classes
    Nameable
  54. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): StateDelay.this.type
    Definition Classes
    Nameable
  55. def setCompositeName(nameable: Nameable, postfix: String): StateDelay.this.type
    Definition Classes
    Nameable
  56. def setCompositeName(nameable: Nameable, namePriority: Byte): StateDelay.this.type
    Definition Classes
    Nameable
  57. def setCompositeName(nameable: Nameable, weak: Boolean): StateDelay.this.type
    Definition Classes
    Nameable
  58. def setCompositeName(nameable: Nameable): StateDelay.this.type
    Definition Classes
    Nameable
  59. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): StateDelay.this.type
    Definition Classes
    Nameable
  60. def setName(name: String, namePriority: Byte): StateDelay.this.type
    Definition Classes
    Nameable
  61. def setName(name: String, weak: Boolean): StateDelay.this.type
    Definition Classes
    Nameable
  62. def setName(name: String): StateDelay.this.type
    Definition Classes
    Nameable
  63. def setNameAsWeak(): StateDelay.this.type
    Definition Classes
    Nameable
  64. def setPartialName(name: String, namePriority: Byte, owner: Any): StateDelay.this.type
    Definition Classes
    Nameable
  65. def setPartialName(name: String, namePriority: Byte): StateDelay.this.type
    Definition Classes
    Nameable
  66. def setPartialName(name: String, weak: Boolean): StateDelay.this.type
    Definition Classes
    Nameable
  67. def setPartialName(owner: Nameable, name: String, namePriority: Byte): StateDelay.this.type
    Definition Classes
    Nameable
  68. def setPartialName(owner: Nameable, name: String, weak: Boolean): StateDelay.this.type
    Definition Classes
    Nameable
  69. def setPartialName(name: String): StateDelay.this.type
    Definition Classes
    Nameable
  70. def setPartialName(owner: Nameable, name: String): StateDelay.this.type
    Definition Classes
    Nameable
  71. def setPartialName(owner: Nameable): StateDelay.this.type
    Definition Classes
    Nameable
  72. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  73. def setScalaLocated(source: ScalaLocated): StateDelay.this.type
    Definition Classes
    ScalaLocated
  74. def setWeakName(name: String): StateDelay.this.type
    Definition Classes
    Nameable
  75. val stateId: Int
    Definition Classes
    State
  76. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  77. def toString(): String
    Definition Classes
    AreaNameable → AnyRef → Any
  78. def unsetName(): StateDelay.this.type
    Definition Classes
    Nameable
  79. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  80. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  81. def valCallbackRec(obj: Any, name: String): Unit
    Definition Classes
    AreaValCallbackRec
  82. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  83. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  84. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  85. val whenActiveTasks: ArrayBuffer[StateMachineTask]
    Definition Classes
    State
  86. def whenCompleted(doThat: ⇒ Unit): StateDelay.this.type
    Definition Classes
    StateCompletionTrait
  87. val whenCompletedTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    StateCompletionTrait
  88. val whenInactiveTasks: ArrayBuffer[() ⇒ Unit]
    Definition Classes
    State
  89. def whenIsActive(doThat: ⇒ Unit): StateDelay.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)
          }
        }
      }
  90. def whenIsActiveWithPriority(priority: Int)(doThat: ⇒ Unit): StateDelay.this.type

    Used internally by the state machine library

    Used internally by the state machine library

    Definition Classes
    State
    See also

    #whenIsActive()

  91. def whenIsInactive(doThat: ⇒ Unit): StateDelay.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
  92. def whenIsNext(doThat: ⇒ Unit): StateDelay.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
  93. 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