diff options
| author | Jim Lawson | 2016-08-16 11:08:32 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-08-16 11:08:32 -0700 |
| commit | a264157a47f56216cebf2d98c1c8118c344dad5f (patch) | |
| tree | 1724fe2900ce336822e73f9cae8280b8474f62ab /chiselFrontend/src/main/scala/chisel3/core/Bits.scala | |
| parent | 4ab2aa0e9209000fb0ba1299ac18db2e033f708f (diff) | |
| parent | ddb7278760029be9d960ba8bf2b06ac8a8aac767 (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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index 7a3962a0..c2621251 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala @@ -385,7 +385,7 @@ abstract trait Num[T <: Data] { sealed class UInt private[core] (width: Width, lit: Option[ULit] = None) extends Bits(width, lit) with Num[UInt] { - private[chisel3] override def cloneTypeWidth(w: Width): this.type = + private[core] override def cloneTypeWidth(w: Width): this.type = new UInt(w).asInstanceOf[this.type] private[chisel3] def toType = s"UInt$width" @@ -577,7 +577,7 @@ object UInt extends UIntFactory sealed class SInt private (width: Width, lit: Option[SLit] = None) extends Bits(width, lit) with Num[SInt] { - private[chisel3] override def cloneTypeWidth(w: Width): this.type = + private[core] override def cloneTypeWidth(w: Width): this.type = new SInt(w).asInstanceOf[this.type] private[chisel3] def toType = s"SInt$width" @@ -721,7 +721,7 @@ object SInt { /** A data type for booleans, defined as a single bit indicating true or false. */ sealed class Bool(lit: Option[ULit] = None) extends UInt(Width(1), lit) { - private[chisel3] override def cloneTypeWidth(w: Width): this.type = { + private[core] override def cloneTypeWidth(w: Width): this.type = { require(!w.known || w.get == 1) new Bool().asInstanceOf[this.type] } |
