diff options
| author | Jiuyang Liu | 2021-11-16 04:20:50 +0800 |
|---|---|---|
| committer | GitHub | 2021-11-16 04:20:50 +0800 |
| commit | 670c539110a599642d700323a34159be0f5abb12 (patch) | |
| tree | 79a969333c9af8fdd3208890bf4a419f4fc3b6d5 | |
| parent | 4606b30b02284ab82dd46f2345ecb96c39e57c99 (diff) | |
| parent | 8c24afd170bdc32e8220f493fc7c64b5e7bd01e8 (diff) | |
Merge pull request #2170 from chipsalliance/remove_toBools
Remove toBools
| -rw-r--r-- | core/src/main/scala/chisel3/Bits.scala | 6 | ||||
| -rw-r--r-- | src/main/scala/chisel3/compatibility.scala | 1 | ||||
| -rw-r--r-- | src/test/scala/chiselTests/CompatibilitySpec.scala | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/core/src/main/scala/chisel3/Bits.scala b/core/src/main/scala/chisel3/Bits.scala index 81b43483..58ec2585 100644 --- a/core/src/main/scala/chisel3/Bits.scala +++ b/core/src/main/scala/chisel3/Bits.scala @@ -310,12 +310,6 @@ sealed abstract class Bits(private[chisel3] val width: Width) extends Element wi def do_>> (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bits /** Returns the contents of this wire as a [[scala.collection.Seq]] of [[Bool]]. */ - final def toBools: Seq[Bool] = macro SourceInfoTransform.noArg - - @deprecated("Calling this function with an empty argument list is invalid in Scala 3. Use the form without parentheses instead", "Chisel 3.5") - final def toBools(dummy: Int*): Seq[Bool] = macro SourceInfoWhiteboxTransform.noArgDummy - - /** Returns the contents of this wire as a [[scala.collection.Seq]] of [[Bool]]. */ final def asBools: Seq[Bool] = macro SourceInfoTransform.noArg @deprecated("Calling this function with an empty argument list is invalid in Scala 3. Use the form without parentheses instead", "Chisel 3.5") diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala index ffbb7e27..d1e7b4f1 100644 --- a/src/main/scala/chisel3/compatibility.scala +++ b/src/main/scala/chisel3/compatibility.scala @@ -637,6 +637,7 @@ package object Chisel { final def toUInt(implicit compileOptions: CompileOptions): UInt = a.do_asUInt(DeprecatedSourceInfo, compileOptions) + final def toBools(implicit compileOptions: CompileOptions): Seq[Bool] = a.do_asBools(DeprecatedSourceInfo, compileOptions) } } diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala index ccf287a6..7ac67b7c 100644 --- a/src/test/scala/chiselTests/CompatibilitySpec.scala +++ b/src/test/scala/chiselTests/CompatibilitySpec.scala @@ -536,6 +536,9 @@ class CompatibiltySpec extends ChiselFlatSpec with ScalaCheckDrivenPropertyCheck info("toUInt works") s.toUInt shouldBe a [UInt] + + info("toBools works") + s.toBools shouldBe a [Seq[Bool]] } ChiselStage.elaborate(new Foo) |
