summaryrefslogtreecommitdiff
path: root/core/src/main/scala/chisel3/Num.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/scala/chisel3/Num.scala')
-rw-r--r--core/src/main/scala/chisel3/Num.scala26
1 files changed, 12 insertions, 14 deletions
diff --git a/core/src/main/scala/chisel3/Num.scala b/core/src/main/scala/chisel3/Num.scala
index 59f6db76..fc796352 100644
--- a/core/src/main/scala/chisel3/Num.scala
+++ b/core/src/main/scala/chisel3/Num.scala
@@ -4,8 +4,6 @@ package chisel3
import chisel3.internal.firrtl.{BinaryPoint, KnownBinaryPoint}
-import chisel3.internal.sourceinfo.SourceInfo
-
// REVIEW TODO: Further discussion needed on what Num actually is.
/** Abstract trait defining operations available on numeric-like hardware data types.
@@ -40,7 +38,7 @@ trait Num[T <: Data] {
* $maxWidth
* @group Arithmetic
*/
- def +(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
+ def +(that: T): T
/** Multiplication operator
*
@@ -50,7 +48,7 @@ trait Num[T <: Data] {
* $singleCycleMul
* @group Arithmetic
*/
- def *(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
+ def *(that: T): T
/** Division operator
*
@@ -60,7 +58,7 @@ trait Num[T <: Data] {
* @todo full rules
* @group Arithmetic
*/
- def /(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
+ def /(that: T): T
/** Modulo operator
*
@@ -69,7 +67,7 @@ trait Num[T <: Data] {
* $singleCycleDiv
* @group Arithmetic
*/
- def %(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
+ def %(that: T): T
/** Subtraction operator
*
@@ -78,7 +76,7 @@ trait Num[T <: Data] {
* $maxWidthPlusOne
* @group Arithmetic
*/
- def -(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
+ def -(that: T): T
/** Less than operator
*
@@ -86,7 +84,7 @@ trait Num[T <: Data] {
* @return a hardware [[Bool]] asserted if this $coll is less than `that`
* @group Comparison
*/
- def <(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool
+ def <(that: T): Bool
/** Less than or equal to operator
*
@@ -94,7 +92,7 @@ trait Num[T <: Data] {
* @return a hardware [[Bool]] asserted if this $coll is less than or equal to `that`
* @group Comparison
*/
- def <=(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool
+ def <=(that: T): Bool
/** Greater than operator
*
@@ -102,7 +100,7 @@ trait Num[T <: Data] {
* @return a hardware [[Bool]] asserted if this $coll is greater than `that`
* @group Comparison
*/
- def >(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool
+ def >(that: T): Bool
/** Greater than or equal to operator
*
@@ -110,7 +108,7 @@ trait Num[T <: Data] {
* @return a hardware [[Bool]] asserted if this $coll is greather than or equal to `that`
* @group Comparison
*/
- def >=(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool
+ def >=(that: T): Bool
/** Absolute value operator
*
@@ -122,7 +120,7 @@ trait Num[T <: Data] {
"Calling this function with an empty argument list is invalid in Scala 3. Use the form without parentheses instead",
"Chisel 3.5"
)
- def abs(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
+ def abs: T
/** Minimum operator
*
@@ -131,7 +129,7 @@ trait Num[T <: Data] {
* $maxWidth
* @group Arithmetic
*/
- def min(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T =
+ def min(that: T): T =
Mux(this < that, this.asInstanceOf[T], that)
/** Maximum operator
@@ -141,7 +139,7 @@ trait Num[T <: Data] {
* $maxWidth
* @group Arithmetic
*/
- def max(that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T =
+ def max(that: T): T =
Mux(this < that, that, this.asInstanceOf[T])
}