Packages

trait Num[T <: Data] extends AnyRef

Abstract trait defining operations available on numeric-like hardware data types.

T

the underlying type of the number

Self Type
Num[T]
Source
Num.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Num
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def do_%(that: T)(implicit sourceInfo: SourceInfo): T

  2. abstract def do_*(that: T)(implicit sourceInfo: SourceInfo): T

  3. abstract def do_+(that: T)(implicit sourceInfo: SourceInfo): T

  4. abstract def do_-(that: T)(implicit sourceInfo: SourceInfo): T

  5. abstract def do_/(that: T)(implicit sourceInfo: SourceInfo): T

  6. abstract def do_<(that: T)(implicit sourceInfo: SourceInfo): Bool

  7. abstract def do_<=(that: T)(implicit sourceInfo: SourceInfo): Bool

  8. abstract def do_>(that: T)(implicit sourceInfo: SourceInfo): Bool

  9. abstract def do_>=(that: T)(implicit sourceInfo: SourceInfo): Bool

  10. abstract def do_abs(implicit sourceInfo: SourceInfo): T

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final macro def %(that: T): T

    Modulo operator

    Modulo operator

    that

    a hardware type

    returns

    the remainder of this numeric-like type divided by that

    Note

    This method generates a fully combinational divider which can result in significant cycle time and area costs.

  4. final macro def *(that: T): T

    Multiplication operator

    Multiplication operator

    that

    a hardware type

    returns

    the product of this numeric-like type and that

    Note

    The width of the returned hardware type is width of this + width of that.

    ,

    This method generates a fully combinational multiplier which can result in significant cycle time and area costs.

  5. final macro def +(that: T): T

    Addition operator

    Addition operator

    that

    a hardware type

    returns

    the sum of this numeric-like type and that

    Note

    The width of the returned hardware type is max(width of this, width of that).

  6. final macro def -(that: T): T

    Subtraction operator

    Subtraction operator

    that

    a hardware type

    returns

    the difference of this numeric-like type less that

    Note

    The width of the returned hardware type is max(width of this, width of that) + 1.

  7. def ->[B](y: B): (Num[T], B)
    Implicit
    This member is added by an implicit conversion from Num[T] toArrowAssoc[Num[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  8. final macro def /(that: T): T

    Division operator

    Division operator

    that

    a hardware type

    returns

    the quotient of this numeric-like type divided by that

    To do

    full rules

    Note

    This method generates a fully combinational divider which can result in significant cycle time and area costs.

  9. final macro def <(that: T): Bool

    Less than operator

    Less than operator

    that

    a hardware type

    returns

    a hardware Bool asserted if this numeric-like type is less than that

  10. final macro def <=(that: T): Bool

    Less than or equal to operator

    Less than or equal to operator

    that

    a hardware type

    returns

    a hardware Bool asserted if this numeric-like type is less than or equal to that

  11. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. final macro def >(that: T): Bool

    Greater than operator

    Greater than operator

    that

    a hardware component

    returns

    a hardware Bool asserted if this numeric-like type is greater than that

  13. final macro def >=(that: T): Bool

    Greater than or equal to operator

    Greater than or equal to operator

    that

    a hardware component

    returns

    a hardware Bool asserted if this numeric-like type is greather than or equal to that

  14. final macro def abs: T

    Absolute value operator

    Absolute value operator

    returns

    a hardware type with a value equal to the absolute value of this numeric-like type

    Note

    The width of the returned hardware type is unchanged, i.e., the width of this.

  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  17. def do_max(that: T)(implicit sourceInfo: SourceInfo): T

  18. def do_min(that: T)(implicit sourceInfo: SourceInfo): T

  19. def ensuring(cond: (Num[T]) => Boolean, msg: => Any): Num[T]
    Implicit
    This member is added by an implicit conversion from Num[T] toEnsuring[Num[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (Num[T]) => Boolean): Num[T]
    Implicit
    This member is added by an implicit conversion from Num[T] toEnsuring[Num[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: => Any): Num[T]
    Implicit
    This member is added by an implicit conversion from Num[T] toEnsuring[Num[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): Num[T]
    Implicit
    This member is added by an implicit conversion from Num[T] toEnsuring[Num[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. final macro def max(that: T): T

    Maximum operator

    Maximum operator

    that

    a hardware type

    returns

    a hardware type with a value equal to the minimum value of this numeric-like type and that

    Note

    The width of the returned hardware type is max(width of this, width of that).

  30. final macro def min(that: T): T

    Minimum operator

    Minimum operator

    that

    a hardware numeric-like type

    returns

    a hardware type with a value equal to the minimum value of this numeric-like type and that

    Note

    The width of the returned hardware type is max(width of this, width of that).

  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Shadowed Implicit Value Members

  1. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Num[T] toany2stringadd[Num[T]] performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (num: any2stringadd[Num[T]]).+(other)
    Definition Classes
    any2stringadd

Deprecated Value Members

  1. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Num[T] toStringFormat[Num[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  2. def [B](y: B): (Num[T], B)
    Implicit
    This member is added by an implicit conversion from Num[T] toArrowAssoc[Num[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromNum[T] to any2stringadd[Num[T]]

Inherited by implicit conversion StringFormat fromNum[T] to StringFormat[Num[T]]

Inherited by implicit conversion Ensuring fromNum[T] to Ensuring[Num[T]]

Inherited by implicit conversion ArrowAssoc fromNum[T] to ArrowAssoc[Num[T]]

Arithmetic

Arithmetic hardware operators

Comparison

Comparison hardware operators

SourceInfoTransformMacro

Ungrouped