summaryrefslogtreecommitdiff
path: root/chiselFrontend
diff options
context:
space:
mode:
authorJim Lawson2016-10-24 10:54:14 -0700
committerGitHub2016-10-24 10:54:14 -0700
commitae62ebe5e826c55eacaeaa83a4e6db975ab5d8a1 (patch)
tree1393bbb14303af86aeb5e5ed0375f302864b8307 /chiselFrontend
parent5df30b390ae5817c4793c6d4e0c5466d96d241f1 (diff)
parentb0b5fd3140186651eb558bd6f4ca51c618deacc9 (diff)
Merge pull request #212 from ucb-bar/tobits-deprecation
Tobits deprecation
Diffstat (limited to 'chiselFrontend')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala2
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Bits.scala3
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Data.scala2
3 files changed, 3 insertions, 4 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala
index 9d8a9061..5e88560c 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Aggregate.scala
@@ -19,6 +19,8 @@ sealed abstract class Aggregate extends Data {
private[core] def width: Width = flatten.map(_.width).reduce(_ + _)
private[core] def legacyConnect(that: Data)(implicit sourceInfo: SourceInfo): Unit =
pushCommand(BulkConnect(sourceInfo, this.lref, that.lref))
+
+ override def do_asUInt(implicit sourceInfo: SourceInfo): UInt = SeqUtils.do_asUInt(this.flatten)
}
object Vec {
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala
index c4161a32..a5d954b6 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala
@@ -282,9 +282,6 @@ sealed abstract class Bits(width: Width, override val litArg: Option[LitArg])
pushOp(DefPrim(sourceInfo, UInt(w), ConcatOp, this.ref, that.ref))
}
- @deprecated("Use asUInt, which does the same thing but makes the reinterpret cast more explicit", "chisel3")
- override def toBits: UInt = do_asUInt(DeprecatedSourceInfo)
-
override def do_fromBits(that: Bits)(implicit sourceInfo: SourceInfo): this.type = {
val res = Wire(this, null).asInstanceOf[this.type]
res := that
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala
index bd2e9065..86858e5d 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala
@@ -254,7 +254,7 @@ abstract class Data extends HasId {
*
* This performs the inverse operation of fromBits(Bits).
*/
- @deprecated("Use asUInt, which does the same thing but makes the reinterpret cast more explicit", "chisel3")
+ @deprecated("Best alternative, .toUInt() or if Bits really needed, .toUInt().toBits()", "chisel3")
def toBits(): UInt = SeqUtils.do_asUInt(this.flatten)(DeprecatedSourceInfo)
/** Reinterpret cast to UInt.