Num

chisel3.Num
See theNum companion object
trait Num[T <: Data]

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

Type parameters

T

the underlying type of the number

Attributes

Companion
object
Source
Num.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SInt
class UInt
class Bool

Members list

Grouped members

Arithmetic

Arithmetic hardware operators

def %(that: T): T

Modulo operator

Modulo operator

Value parameters

that

a $numType

Attributes

Returns

the remainder of this $coll divided by that $singleCycleDiv

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def *(that: T): T

Multiplication operator

Multiplication operator

Value parameters

that

a $numType

Attributes

Returns

the product of this $coll and that $sumWidth $singleCycleMul

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def +(that: T): T

Addition operator

Addition operator

Value parameters

that

a $numType

Attributes

Returns

the sum of this $coll and that $maxWidth

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def -(that: T): T

Subtraction operator

Subtraction operator

Value parameters

that

a $numType

Attributes

Returns

the difference of this $coll less that $maxWidthPlusOne

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def /(that: T): T

Division operator

Division operator

Value parameters

that

a $numType

Attributes

Returns

the quotient of this $coll divided by that $singleCycleDiv

Todo

full rules

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def abs: T

Absolute value operator

Absolute value operator

Attributes

Returns

a $numType with a value equal to the absolute value of this $coll $unchangedWidth

Deprecated
[Since version Chisel 3.5] Calling this function with an empty argument list is invalid in Scala 3. Use the form without parentheses instead
Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def max(that: T): T

Maximum operator

Maximum operator

Value parameters

that

a $numType

Attributes

Returns

a $numType with a value equal to the maximum value of this $coll and that $maxWidth

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def min(that: T): T

Minimum operator

Minimum operator

Value parameters

that

a hardware $coll

Attributes

Returns

a $numType with a value equal to the minimum value of this $coll and that $maxWidth

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala

Comparison

Comparison hardware operators

def <(that: T): Bool

Less than operator

Less than operator

Value parameters

that

a $numType

Attributes

Returns

a hardware Bool asserted if this $coll is less than that

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def <=(that: T): Bool

Less than or equal to operator

Less than or equal to operator

Value parameters

that

a $numType

Attributes

Returns

a hardware Bool asserted if this $coll is less than or equal to that

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def >(that: T): Bool

Greater than operator

Greater than operator

Value parameters

that

a hardware component

Attributes

Returns

a hardware Bool asserted if this $coll is greater than that

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala
def >=(that: T): Bool

Greater than or equal to operator

Greater than or equal to operator

Value parameters

that

a hardware component

Attributes

Returns

a hardware Bool asserted if this $coll is greather than or equal to that

Inherited from:
NumIntf (hidden)
Source
NumIntf.scala