diff options
| author | Jim Lawson | 2016-07-25 13:37:53 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-07-25 13:37:53 -0700 |
| commit | 3624751e2e63ba9f107c795529edfe48cf8340b2 (patch) | |
| tree | 951deec27b8a75d9d9c0eec0aee6fa08f80f9ae0 /chiselFrontend/src/main/scala/chisel3/core/Bits.scala | |
| parent | 50518f43cbd9c783633714a26ecdb0f2f18a1142 (diff) | |
| parent | 54cd58cbb435170dd2ed67dafe1cb1d769a799e8 (diff) | |
Merge branch 'master' into sdtwigg_connectwrap_renamechisel3
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Bits.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Bits.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index 07c113fd..20ac0e4a 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala @@ -36,6 +36,7 @@ abstract class Element(private[core] val width: Width) extends Data { def dir: Direction = binding.direction.get private[chisel3] final def allElements: Seq[Element] = Seq(this) + def widthKnown: Boolean = width.known } /** A data type for values represented by a single bitvector. Provides basic @@ -521,7 +522,7 @@ private[core] sealed trait UIntFactory { /** Create a UInt port with specified width. */ def width(width: Width): UInt = new UInt(width) /** Create a UInt with a specified width - compatibility with Chisel2. */ - def apply(dummy: Direction, width: Int): UInt = apply(Width(width)) + def apply(dummy: Option[Direction] = None, width: Int): UInt = apply(Width(width)) /** Create a UInt literal with fixed width. */ def apply(value: BigInt, width: Int): UInt = Lit(value, Width(width)) /** Create a UInt literal with inferred width. */ |
