Packages

class OneHotCounter extends BoundedCounter[Bits]

One-hot encoded counter with stateCount states.

The register is stateCount bits wide and carries exactly one set bit. Increment rotates the hot bit toward the MSB; decrement rotates it toward the LSB.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OneHotCounter
  2. BoundedCounter
  3. CounterAddressable
  4. CounterLike
  5. ImplicitArea
  6. Area
  7. OverridedEqualsHashCode
  8. ValCallbackRec
  9. ValCallback
  10. NameableByComponent
  11. Nameable
  12. ContextUser
  13. ScalaLocated
  14. GlobalDataUser
  15. OwnableRef
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OneHotCounter(stateCount: BigInt, initialValue: BigInt = 0, direction: CounterDirection = CounterDirection.Up, upper: BoundaryPolicy = BoundaryPolicy.Wrap, lower: BoundaryPolicy = BoundaryPolicy.Wrap)

    stateCount

    Number of states (bit-width of the register).

    initialValue

    Index of the bit set after reset; must satisfy 0 <= initialValue < stateCount.

Type Members

  1. abstract type RefOwnerType
    Definition Classes
    OwnableRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. def !==(that: UInt): Bool
  3. def !==(that: BigInt): Bool
  4. def !==(that: Int): Bool
  5. def !==(that: Bits): Bool
  6. final def ##(): Int
    Definition Classes
    AnyRef → Any
  7. def =/=(that: UInt): Bool
  8. def =/=(that: BigInt): Bool
  9. def =/=(that: Int): Bool
  10. def =/=(that: Bits): Bool
  11. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def ===(that: UInt): Bool
  13. def ===(that: BigInt): Bool
  14. def ===(that: Int): Bool
  15. def ===(that: Bits): Bool
  16. val _context: Capture
    Definition Classes
    Area
  17. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  18. def childNamePriority: Byte
    Definition Classes
    Area
  19. def clear(): Unit

    Schedule a reset to the initial value on this cycle.

    Schedule a reset to the initial value on this cycle.

    Definition Classes
    CounterLike
  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  21. def component: Component
    Definition Classes
    ContextUser
  22. lazy val decOnly: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  23. def decrement(): Unit

    Schedule a decrement on this cycle.

    Schedule a decrement on this cycle. Requires direction to be Down or Both.

    Definition Classes
    BoundedCounter
  24. val direction: CounterDirection
    Definition Classes
    BoundedCounter
  25. lazy val effectiveDec: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  26. lazy val effectiveInc: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  27. def enableStandardPruning(): Unit
    Attributes
    protected
    Definition Classes
    BoundedCounter
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  30. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit
    Definition Classes
    Nameable
  31. def freeRun(): OneHotCounter.this.type

    Make this counter free-running upward (increments every cycle).

    Make this counter free-running upward (increments every cycle). Requires direction to be Up or Both.

    Definition Classes
    BoundedCounter
  32. def freeRunDown(): OneHotCounter.this.type

    Make this counter free-running downward (decrements every cycle).

    Make this counter free-running downward (decrements every cycle). Requires direction to be Down or Both.

    Definition Classes
    BoundedCounter
  33. def frozen: Bool

    True when the counter is currently latched at a BoundaryPolicy.Freeze boundary.

    True when the counter is currently latched at a BoundaryPolicy.Freeze boundary.

    Definition Classes
    BoundedCounterCounterLike
  34. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  35. def getDisplayName(): String
    Definition Classes
    Nameable
  36. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  37. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  38. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  39. def getName(): String
    Definition Classes
    NameableByComponentNameable
  40. def getPartialName(): String
    Definition Classes
    Nameable
  41. def getPath(from: Component, to: Component): Seq[Component]
    Definition Classes
    NameableByComponent
  42. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  43. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  44. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  45. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  46. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  47. val hasDown: Boolean
    Attributes
    protected
    Definition Classes
    BoundedCounter
  48. val hasUp: Boolean
    Attributes
    protected
    Definition Classes
    BoundedCounter
  49. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  50. def implicitValue: Bits
    Definition Classes
    OneHotCounterCounterLikeImplicitArea
  51. lazy val incOnly: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  52. def increment(): Unit

    Schedule an increment on this cycle.

    Schedule an increment on this cycle. Requires direction to be Up or Both.

    Definition Classes
    BoundedCounter
  53. def init(initValue: UInt): OneHotCounter.this.type

    Override the reset state with the one-hot encoding of initValue.

  54. def init(initValue: Bits): OneHotCounter.this.type

    Override the reset state to the given one-hot pattern (caller is responsible for one-hot validity).

  55. def init(initValue: BigInt): OneHotCounter.this.type

    Override the reset state to have bit initValue set.

  56. def init(initValue: Int): OneHotCounter.this.type

    Override the reset state to have bit initValue set.

  57. val initialValue: BigInt
  58. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  59. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  60. final def isNamed: Boolean
    Definition Classes
    Nameable
  61. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  62. def isUnnamed: Boolean
    Definition Classes
    NameableByComponentNameable
  63. def load(index: UInt): Unit

    Load with the bit at position index set.

  64. def load(index: Int): Unit

    Load with the bit at position index set.

  65. def load(raw: Bits): Unit

    Schedule loading raw into the counter on this cycle.

    Schedule loading raw into the counter on this cycle.

    Definition Classes
    CounterLike
  66. def loadOrdinal(index: UInt): Unit

    Load the counter into its index-th ordinal state.

    Load the counter into its index-th ordinal state. 0 is the start, stateCount - 1 is the end.

    Definition Classes
    OneHotCounterCounterAddressable
  67. def loadOrdinal(index: BigInt): Unit

    Definition Classes
    CounterAddressable
    See also

    loadOrdinal(UInt)

  68. def loadOrdinal(index: Int): Unit

    Definition Classes
    CounterAddressable
    See also

    loadOrdinal(UInt)

  69. val lower: BoundaryPolicy
    Definition Classes
    BoundedCounter
  70. val name: String
    Definition Classes
    Nameable
  71. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  72. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  73. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  74. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  75. def overrideLocalName(name: String): OneHotCounter.this.type
    Definition Classes
    Nameable
  76. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  77. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  78. def reflectNames(): Unit
    Definition Classes
    Nameable
  79. def rework[T](body: ⇒ T): T
    Definition Classes
    Area
  80. def saturatedHigh: Bool

    True when the counter is currently pinned at the upper boundary by BoundaryPolicy.Saturate; always false if upper is not Saturate.

    True when the counter is currently pinned at the upper boundary by BoundaryPolicy.Saturate; always false if upper is not Saturate.

    Definition Classes
    BoundedCounter
  81. def saturatedLow: Bool

    True when the counter is currently pinned at the lower boundary by BoundaryPolicy.Saturate; always false if lower is not Saturate.

    True when the counter is currently pinned at the lower boundary by BoundaryPolicy.Saturate; always false if lower is not Saturate.

    Definition Classes
    BoundedCounter
  82. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  83. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): OneHotCounter.this.type
    Definition Classes
    Nameable
  84. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): OneHotCounter.this.type
    Definition Classes
    Nameable
  85. def setCompositeName(nameable: Nameable, postfix: String): OneHotCounter.this.type
    Definition Classes
    Nameable
  86. def setCompositeName(nameable: Nameable, namePriority: Byte): OneHotCounter.this.type
    Definition Classes
    Nameable
  87. def setCompositeName(nameable: Nameable, weak: Boolean): OneHotCounter.this.type
    Definition Classes
    Nameable
  88. def setCompositeName(nameable: Nameable): OneHotCounter.this.type
    Definition Classes
    Nameable
  89. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): OneHotCounter.this.type
    Definition Classes
    Nameable
  90. def setName(name: String, namePriority: Byte): OneHotCounter.this.type
    Definition Classes
    Nameable
  91. def setName(name: String, weak: Boolean): OneHotCounter.this.type
    Definition Classes
    Nameable
  92. def setName(name: String): OneHotCounter.this.type
    Definition Classes
    Nameable
  93. def setNameAsWeak(): OneHotCounter.this.type
    Definition Classes
    Nameable
  94. def setPartialName(name: String, namePriority: Byte, owner: Any): OneHotCounter.this.type
    Definition Classes
    Nameable
  95. def setPartialName(name: String, namePriority: Byte): OneHotCounter.this.type
    Definition Classes
    Nameable
  96. def setPartialName(name: String, weak: Boolean): OneHotCounter.this.type
    Definition Classes
    Nameable
  97. def setPartialName(owner: Nameable, name: String, namePriority: Byte): OneHotCounter.this.type
    Definition Classes
    Nameable
  98. def setPartialName(owner: Nameable, name: String, weak: Boolean): OneHotCounter.this.type
    Definition Classes
    Nameable
  99. def setPartialName(name: String): OneHotCounter.this.type
    Definition Classes
    Nameable
  100. def setPartialName(owner: Nameable, name: String): OneHotCounter.this.type
    Definition Classes
    Nameable
  101. def setPartialName(owner: Nameable): OneHotCounter.this.type
    Definition Classes
    Nameable
  102. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  103. def setScalaLocated(source: ScalaLocated): OneHotCounter.this.type
    Definition Classes
    ScalaLocated
  104. def setWeakName(name: String): OneHotCounter.this.type
    Definition Classes
    Nameable
  105. val stateCount: BigInt

    Total number of legal states the counter can occupy.

    Total number of legal states the counter can occupy.

    Definition Classes
    OneHotCounterCounterLike
  106. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  107. def toFlow(): Flow[Bits]

    Stream the counter as a Flow whose payload carries value and whose valid follows willAdvance.

    Stream the counter as a Flow whose payload carries value and whose valid follows willAdvance.

    Definition Classes
    CounterLike
  108. def toString(): String
    Definition Classes
    AreaNameable → AnyRef → Any
  109. def unsetName(): OneHotCounter.this.type
    Definition Classes
    Nameable
  110. val upper: BoundaryPolicy
    Definition Classes
    BoundedCounter
  111. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  112. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  113. def valCallbackRec(obj: Any, name: String): Unit
    Definition Classes
    AreaValCallbackRec
  114. val value: Bits

    Current registered counter value.

    Current registered counter value.

    Definition Classes
    OneHotCounterCounterLike
  115. val valueNext: Bits

    Combinational next value driven into the register this cycle.

    Combinational next value driven into the register this cycle.

    Definition Classes
    OneHotCounterCounterLike
  116. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  117. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  118. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  119. lazy val willAdvance: Bool

    True on the cycle the counter is moving (incrementing or decrementing).

    True on the cycle the counter is moving (incrementing or decrementing).

    Definition Classes
    BoundedCounterCounterLike
  120. val willClear: Bool

    True on the cycle the counter is being reset to its initial value.

    True on the cycle the counter is being reset to its initial value.

    Definition Classes
    BoundedCounterCounterLike
  121. lazy val willComplete: Bool

    True on the cycle the counter is completing a wrap (overflow or underflow).

    True on the cycle the counter is completing a wrap (overflow or underflow).

    Definition Classes
    BoundedCounterCounterLike
  122. val willDecrement: Bool

    True on the cycle a decrement is requested.

    True on the cycle a decrement is requested.

    Definition Classes
    BoundedCounter
  123. val willIncrement: Bool

    True on the cycle an increment is requested.

    True on the cycle an increment is requested.

    Definition Classes
    BoundedCounter
  124. val willLoad: Bool

    True on the cycle the counter is being loaded from an external value.

    True on the cycle the counter is being loaded from an external value.

    Definition Classes
    BoundedCounterCounterLike
  125. lazy val willOverflow: Bool

    willOverflowIfInc qualified with willIncrement (and, in Both mode, gated by !willDecrement).

    willOverflowIfInc qualified with willIncrement (and, in Both mode, gated by !willDecrement).

    Definition Classes
    BoundedCounter
  126. val willOverflowIfInc: Bool

    True when the registered value sits at the upper boundary (i.e.

    True when the registered value sits at the upper boundary (i.e. an increment would overflow).

    Definition Classes
    OneHotCounterBoundedCounter
  127. lazy val willUnderflow: Bool

    willUnderflowIfDec qualified with willDecrement (and, in Both mode, gated by !willIncrement).

    willUnderflowIfDec qualified with willDecrement (and, in Both mode, gated by !willIncrement).

    Definition Classes
    BoundedCounter
  128. val willUnderflowIfDec: Bool

    True when the registered value sits at the lower boundary (i.e.

    True when the registered value sits at the lower boundary (i.e. a decrement would underflow).

    Definition Classes
    OneHotCounterBoundedCounter

Deprecated Value Members

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

Inherited from BoundedCounter[Bits]

Inherited from CounterAddressable[Bits]

Inherited from CounterLike[Bits]

Inherited from ImplicitArea[Bits]

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