summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/package.scala
diff options
context:
space:
mode:
authorducky2016-11-17 11:33:20 -0800
committerducky2016-11-21 13:31:12 -0800
commitcd904da0aa0e96ba679906a3ee5dbdc068eace48 (patch)
tree120ab95b40a749a98b571ee862d950b443b652b5 /src/main/scala/chisel3/package.scala
parentb0cc0c93a80aec5bed54cfb11923636c09b7e180 (diff)
Restyle Bool constructors, move compatibility deprecations into compatibility package object
Diffstat (limited to 'src/main/scala/chisel3/package.scala')
-rw-r--r--src/main/scala/chisel3/package.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/scala/chisel3/package.scala b/src/main/scala/chisel3/package.scala
index 1a100480..8ac76867 100644
--- a/src/main/scala/chisel3/package.scala
+++ b/src/main/scala/chisel3/package.scala
@@ -93,6 +93,13 @@ package object chisel3 { // scalastyle:ignore package.object.name
def Lit(value: BigInt, width: Int): SInt = Lit(value, Width(width))
}
+ trait BoolFactory extends chisel3.core.BoolFactory {
+ /** Creates Bool literal.
+ */
+ @deprecated("chisel3, will be removed by end of 2016, use x.B")
+ def apply(x: Boolean): Bool = Lit(x)
+ }
+
object Bits extends UIntFactory
type Num[T <: Data] = chisel3.core.Num[T]
type UInt = chisel3.core.UInt
@@ -102,7 +109,7 @@ package object chisel3 { // scalastyle:ignore package.object.name
type FixedPoint = chisel3.core.FixedPoint
val FixedPoint = chisel3.core.FixedPoint
type Bool = chisel3.core.Bool
- val Bool = chisel3.core.Bool
+ object Bool extends BoolFactory
val Mux = chisel3.core.Mux
type BlackBox = chisel3.core.BlackBox