Packages

class GrayCounter extends BoundedCounter[UInt]

Gray-coded counter with 2 ^ width states.

Adjacent states differ by exactly one bit, including across the wrap. The counter is bidirectional via a parity flip: increment XORs the lowest set bit of (1, gray[w-3:0], even), decrement XORs the lowest set bit of (1, gray[w-3:0], !even).

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GrayCounter
  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 GrayCounter(width: Int, direction: CounterDirection = CounterDirection.Up, upper: BoundaryPolicy = BoundaryPolicy.Wrap, lower: BoundaryPolicy = BoundaryPolicy.Wrap)

    width

    Width of the underlying register; total state count is 2 ^ width. Must be at least 2.

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. def childNamePriority: Byte
    Definition Classes
    Area
  7. 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
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  9. def component: Component
    Definition Classes
    ContextUser
  10. lazy val decOnly: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  11. 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
  12. val direction: CounterDirection
    Definition Classes
    BoundedCounter
  13. lazy val effectiveDec: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  14. lazy val effectiveInc: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  15. def enableStandardPruning(): Unit
    Attributes
    protected
    Definition Classes
    BoundedCounter
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  18. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit
    Definition Classes
    Nameable
  19. def freeRun(): GrayCounter.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
  20. def freeRunDown(): GrayCounter.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
  21. 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
  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  23. def getDisplayName(): String
    Definition Classes
    Nameable
  24. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  25. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  26. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  27. def getName(): String
    Definition Classes
    NameableByComponentNameable
  28. def getPartialName(): String
    Definition Classes
    Nameable
  29. def getPath(from: Component, to: Component): Seq[Component]
    Definition Classes
    NameableByComponent
  30. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  31. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  32. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  33. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  34. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  35. val hasDown: Boolean
    Attributes
    protected
    Definition Classes
    BoundedCounter
  36. val hasUp: Boolean
    Attributes
    protected
    Definition Classes
    BoundedCounter
  37. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  38. def implicitValue: UInt
    Definition Classes
    CounterLikeImplicitArea
  39. lazy val incOnly: Bool
    Attributes
    protected
    Definition Classes
    BoundedCounter
  40. 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
  41. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  42. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  43. final def isNamed: Boolean
    Definition Classes
    Nameable
  44. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  45. def isUnnamed: Boolean
    Definition Classes
    NameableByComponentNameable
  46. def load(raw: UInt): Unit

    Schedule loading raw into the counter on this cycle.

    Schedule loading raw into the counter on this cycle.

    Definition Classes
    GrayCounterCounterLike
  47. 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
    GrayCounterCounterAddressable
  48. def loadOrdinal(index: BigInt): Unit

    Definition Classes
    CounterAddressable
    See also

    loadOrdinal(UInt)

  49. def loadOrdinal(index: Int): Unit

    Definition Classes
    CounterAddressable
    See also

    loadOrdinal(UInt)

  50. val lower: BoundaryPolicy
    Definition Classes
    BoundedCounter
  51. val name: String
    Definition Classes
    Nameable
  52. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  53. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  54. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  55. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  56. def overrideLocalName(name: String): GrayCounter.this.type
    Definition Classes
    Nameable
  57. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  58. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  59. def reflectNames(): Unit
    Definition Classes
    Nameable
  60. def rework[T](body: ⇒ T): T
    Definition Classes
    Area
  61. 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
  62. 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
  63. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  64. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): GrayCounter.this.type
    Definition Classes
    Nameable
  65. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): GrayCounter.this.type
    Definition Classes
    Nameable
  66. def setCompositeName(nameable: Nameable, postfix: String): GrayCounter.this.type
    Definition Classes
    Nameable
  67. def setCompositeName(nameable: Nameable, namePriority: Byte): GrayCounter.this.type
    Definition Classes
    Nameable
  68. def setCompositeName(nameable: Nameable, weak: Boolean): GrayCounter.this.type
    Definition Classes
    Nameable
  69. def setCompositeName(nameable: Nameable): GrayCounter.this.type
    Definition Classes
    Nameable
  70. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): GrayCounter.this.type
    Definition Classes
    Nameable
  71. def setName(name: String, namePriority: Byte): GrayCounter.this.type
    Definition Classes
    Nameable
  72. def setName(name: String, weak: Boolean): GrayCounter.this.type
    Definition Classes
    Nameable
  73. def setName(name: String): GrayCounter.this.type
    Definition Classes
    Nameable
  74. def setNameAsWeak(): GrayCounter.this.type
    Definition Classes
    Nameable
  75. def setPartialName(name: String, namePriority: Byte, owner: Any): GrayCounter.this.type
    Definition Classes
    Nameable
  76. def setPartialName(name: String, namePriority: Byte): GrayCounter.this.type
    Definition Classes
    Nameable
  77. def setPartialName(name: String, weak: Boolean): GrayCounter.this.type
    Definition Classes
    Nameable
  78. def setPartialName(owner: Nameable, name: String, namePriority: Byte): GrayCounter.this.type
    Definition Classes
    Nameable
  79. def setPartialName(owner: Nameable, name: String, weak: Boolean): GrayCounter.this.type
    Definition Classes
    Nameable
  80. def setPartialName(name: String): GrayCounter.this.type
    Definition Classes
    Nameable
  81. def setPartialName(owner: Nameable, name: String): GrayCounter.this.type
    Definition Classes
    Nameable
  82. def setPartialName(owner: Nameable): GrayCounter.this.type
    Definition Classes
    Nameable
  83. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  84. def setScalaLocated(source: ScalaLocated): GrayCounter.this.type
    Definition Classes
    ScalaLocated
  85. def setWeakName(name: String): GrayCounter.this.type
    Definition Classes
    Nameable
  86. def stateCount: BigInt

    Total number of legal states the counter can occupy.

    Total number of legal states the counter can occupy.

    Definition Classes
    GrayCounterCounterLike
  87. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  88. def toFlow(): Flow[UInt]

    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
  89. def toString(): String
    Definition Classes
    AreaNameable → AnyRef → Any
  90. def unsetName(): GrayCounter.this.type
    Definition Classes
    Nameable
  91. val upper: BoundaryPolicy
    Definition Classes
    BoundedCounter
  92. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  93. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  94. def valCallbackRec(obj: Any, name: String): Unit
    Definition Classes
    AreaValCallbackRec
  95. val value: UInt

    Current registered counter value.

    Current registered counter value.

    Definition Classes
    GrayCounterCounterLike
  96. val valueNext: UInt

    Combinational next value driven into the register this cycle.

    Combinational next value driven into the register this cycle.

    Definition Classes
    GrayCounterCounterLike
  97. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  99. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  100. val width: Int
  101. 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
  102. 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
  103. 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
  104. val willDecrement: Bool

    True on the cycle a decrement is requested.

    True on the cycle a decrement is requested.

    Definition Classes
    BoundedCounter
  105. val willIncrement: Bool

    True on the cycle an increment is requested.

    True on the cycle an increment is requested.

    Definition Classes
    BoundedCounter
  106. 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
  107. 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
  108. 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
    GrayCounterBoundedCounter
  109. 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
  110. 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
    GrayCounterBoundedCounter

Deprecated Value Members

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

Inherited from BoundedCounter[UInt]

Inherited from CounterAddressable[UInt]

Inherited from CounterLike[UInt]

Inherited from ImplicitArea[UInt]

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