summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/chisel3/compatibility.scala11
-rw-r--r--src/main/scala/chisel3/package.scala13
-rw-r--r--src/test/scala/chiselTests/BlackBox.scala2
3 files changed, 14 insertions, 12 deletions
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala
index ff627c1e..51176d9d 100644
--- a/src/main/scala/chisel3/compatibility.scala
+++ b/src/main/scala/chisel3/compatibility.scala
@@ -164,11 +164,12 @@ package object Chisel { // scalastyle:ignore package.object.name
val when = chisel3.core.when
type WhenContext = chisel3.core.WhenContext
- implicit class fromtIntToLiteral(override val x: Int) extends chisel3.core.fromIntToLiteral(x)
- implicit class fromBigIntToLiteral(override val x: BigInt) extends chisel3.core.fromBigIntToLiteral(x)
- implicit class fromStringToLiteral(override val x: String) extends chisel3.core.fromStringToLiteral(x)
- implicit class fromBooleanToLiteral(override val x: Boolean) extends chisel3.core.fromBooleanToLiteral(x)
- implicit class fromIntToWidth(override val x: Int) extends chisel3.core.fromIntToWidth(x)
+ implicit class fromBigIntToLiteral(val x: BigInt) extends chisel3.core.fromBigIntToLiteral(x)
+ implicit class fromtIntToLiteral(val x: Int) extends chisel3.core.fromIntToLiteral(x)
+ implicit class fromtLongToLiteral(val x: Long) extends chisel3.core.fromLongToLiteral(x)
+ implicit class fromStringToLiteral(val x: String) extends chisel3.core.fromStringToLiteral(x)
+ implicit class fromBooleanToLiteral(val x: Boolean) extends chisel3.core.fromBooleanToLiteral(x)
+ implicit class fromIntToWidth(val x: Int) extends chisel3.core.fromIntToWidth(x)
type BackendCompilationUtilities = chisel3.BackendCompilationUtilities
val Driver = chisel3.Driver
diff --git a/src/main/scala/chisel3/package.scala b/src/main/scala/chisel3/package.scala
index 44d1f6c1..449f4ea5 100644
--- a/src/main/scala/chisel3/package.scala
+++ b/src/main/scala/chisel3/package.scala
@@ -204,12 +204,13 @@ package object chisel3 { // scalastyle:ignore package.object.name
implicit def string2Printable(str: String): Printable = PString(str)
- implicit class fromtIntToLiteral(override val x: Int) extends chisel3.core.fromIntToLiteral(x)
- implicit class fromBigIntToLiteral(override val x: BigInt) extends chisel3.core.fromBigIntToLiteral(x)
- implicit class fromStringToLiteral(override val x: String) extends chisel3.core.fromStringToLiteral(x)
- implicit class fromBooleanToLiteral(override val x: Boolean) extends chisel3.core.fromBooleanToLiteral(x)
- implicit class fromDoubleToLiteral(override val x: Double) extends chisel3.core.fromDoubleToLiteral(x)
- implicit class fromIntToWidth(override val x: Int) extends chisel3.core.fromIntToWidth(x)
+ implicit class fromBigIntToLiteral(val x: BigInt) extends chisel3.core.fromBigIntToLiteral(x)
+ implicit class fromtIntToLiteral(val x: Int) extends chisel3.core.fromIntToLiteral(x)
+ implicit class fromtLongToLiteral(val x: Long) extends chisel3.core.fromLongToLiteral(x)
+ implicit class fromStringToLiteral(val x: String) extends chisel3.core.fromStringToLiteral(x)
+ implicit class fromBooleanToLiteral(val x: Boolean) extends chisel3.core.fromBooleanToLiteral(x)
+ implicit class fromDoubleToLiteral(val x: Double) extends chisel3.core.fromDoubleToLiteral(x)
+ implicit class fromIntToWidth(val x: Int) extends chisel3.core.fromIntToWidth(x)
implicit class fromUIntToBitPatComparable(val x: UInt) {
import scala.language.experimental.macros
diff --git a/src/test/scala/chiselTests/BlackBox.scala b/src/test/scala/chiselTests/BlackBox.scala
index 7fcba766..d42cd791 100644
--- a/src/test/scala/chiselTests/BlackBox.scala
+++ b/src/test/scala/chiselTests/BlackBox.scala
@@ -127,7 +127,7 @@ class BlackBoxWithParamsTester extends BasicTester {
assert(blackBoxFour.io.out === 4.U)
assert(blackBoxStringParamOne.io.out === 1.U)
assert(blackBoxStringParamTwo.io.out === 2.U)
- assert(blackBoxRealParamOne.io.out === BigInt(0x3ff0000000000000L).U)
+ assert(blackBoxRealParamOne.io.out === 0x3ff0000000000000L.U)
assert(blackBoxRealParamNeg.io.out === BigInt("bff0000000000000", 16).U)
assert(blackBoxTypeParamBit.io.out === 1.U)
assert(blackBoxTypeParamWord.io.out === "hdeadbeef".U(32.W))