summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorducky2016-05-20 19:50:05 -0700
committerducky2016-06-08 16:22:27 -0700
commit671117f3332ac10d1e7c5cc4f4cb5278f72ed6ab (patch)
tree6cdeb0d67501838641694fb35c7db7791a3e3e29 /src
parent65df106578e12e8bd71f9775e0435bbe107ee4da (diff)
Add implicit xToLiteral, add Element, use internal package object
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/chisel/compatibility.scala23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/main/scala/chisel/compatibility.scala b/src/main/scala/chisel/compatibility.scala
index 80936a42..fd45987b 100644
--- a/src/main/scala/chisel/compatibility.scala
+++ b/src/main/scala/chisel/compatibility.scala
@@ -26,6 +26,7 @@ package object Chisel {
val BitPat = chisel.BitPat
type BitPat = chisel.BitPat
+ type Element = chisel.Element
type Bits = chisel.Bits
val Bits = chisel.Bits
type Num[T <: Data] = chisel.Num[T]
@@ -64,6 +65,12 @@ package object Chisel {
val throwException = chisel.throwException
+ object testers {
+ type BasicTester = chisel.testers.BasicTester
+ val TesterDriver = chisel.testers.TesterDriver
+ }
+
+
val log2Up = chisel.log2Up
val log2Ceil = chisel.log2Ceil
val log2Down = chisel.log2Down
@@ -129,11 +136,15 @@ package object Chisel {
val Valid = chisel.Valid
val Pipe = chisel.Pipe
type Pipe[T <: Data] = chisel.Pipe[T]
-}
-package Chisel {
- package object testers {
- type BasicTester = chisel.testers.BasicTester
- val TesterDriver = chisel.testers.TesterDriver
- }
+
+ import chisel.internal.firrtl.Width
+ implicit def fromBigIntToLiteral(x: BigInt): chisel.fromBigIntToLiteral =
+ new chisel.fromBigIntToLiteral(x)
+ implicit def fromIntToLiteral(x: Int): chisel.fromIntToLiteral=
+ new chisel.fromIntToLiteral(x)
+ implicit def fromStringToLiteral(x: String): chisel.fromStringToLiteral=
+ new chisel.fromStringToLiteral(x)
+ implicit def fromBooleanToLiteral(x: Boolean): chisel.fromBooleanToLiteral=
+ new chisel.fromBooleanToLiteral(x)
}