Packages

class Counter extends BoundedCounter[UInt]

General-purpose binary counter on the inclusive range [start, end].

Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Counter
  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 Counter(start: BigInt, end: BigInt, direction: CounterDirection = CounterDirection.Up, upper: BoundaryPolicy = BoundaryPolicy.Wrap, lower: BoundaryPolicy = BoundaryPolicy.Wrap, handleOverflow: Boolean = true)

    start

    Lowest legal value (inclusive).

    end

    Highest legal value (inclusive); must be >= start.

    direction

    Allowed motion (CounterDirection.Up, Down, or Both).

    upper

    Policy applied at the upper boundary.

    lower

    Policy applied at the lower boundary.

    handleOverflow

    When true (default), the counter wraps at stateCount. Setting it to false only has an effect when direction is Both, both upper and lower are Wrap, start == 0, and the range is not a power of two: in that case the counter wraps at 2 ^ width instead of stateCount, saving comparator logic at the cost of a visible difference in behavior.

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

    Override the reset value of the underlying register.

  47. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  48. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  49. final def isNamed: Boolean
    Definition Classes
    Nameable
  50. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  51. def isUnnamed: Boolean
    Definition Classes
    NameableByComponentNameable
  52. 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
    CounterLike
  53. 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
    CounterCounterAddressable
  54. def loadOrdinal(index: BigInt): Unit

    Definition Classes
    CounterAddressable
    See also

    loadOrdinal(UInt)

  55. def loadOrdinal(index: Int): Unit

    Definition Classes
    CounterAddressable
    See also

    loadOrdinal(UInt)

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

    Total number of legal states the counter can occupy.

    Total number of legal states the counter can occupy.

    Definition Classes
    CounterCounterLike
  94. def stepOne(arith: UInt, boundary: Bool, policy: BoundaryPolicy, wrapTo: BigInt, pinTo: BigInt): Unit
  95. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  96. 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
  97. def toString(): String
    Definition Classes
    AreaNameable → AnyRef → Any
  98. def unsetName(): Counter.this.type
    Definition Classes
    Nameable
  99. val upper: BoundaryPolicy
    Definition Classes
    BoundedCounter
  100. def valCallback[T](ref: T, name: String): T
    Definition Classes
    ValCallbackRec → ValCallback
  101. def valCallbackOn(ref: Any, name: String, refs: Set[Any]): Unit
    Definition Classes
    ValCallbackRec
  102. def valCallbackRec(obj: Any, name: String): Unit
    Definition Classes
    AreaValCallbackRec
  103. val value: UInt

    Current registered counter value.

    Current registered counter value.

    Definition Classes
    CounterCounterLike
  104. val valueNext: UInt

    Combinational next value driven into the register this cycle.

    Combinational next value driven into the register this cycle.

    Definition Classes
    CounterCounterLike
  105. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  106. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  107. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. 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
  109. 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
  110. 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
  111. val willDecrement: Bool

    True on the cycle a decrement is requested.

    True on the cycle a decrement is requested.

    Definition Classes
    BoundedCounter
  112. val willIncrement: Bool

    True on the cycle an increment is requested.

    True on the cycle an increment is requested.

    Definition Classes
    BoundedCounter
  113. 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
  114. 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
  115. 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
    CounterBoundedCounter
  116. 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
  117. 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
    CounterBoundedCounter

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