From d77fcf0478047fb61521fbe4b4a5a59a64b8445d Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Tue, 12 Oct 2021 01:30:25 +0800 Subject: remove_toBools --- core/src/main/scala/chisel3/Bits.scala | 6 ------ 1 file changed, 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 @@ -309,12 +309,6 @@ sealed abstract class Bits(private[chisel3] val width: Width) extends Element wi /** @group SourceInfoTransformMacro */ 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 -- cgit v1.2.3 From d4aa92cef6b067ef6c1c37fc7fde467f0c815767 Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Sun, 14 Nov 2021 04:29:00 +0800 Subject: add toBools to compatibility layer. --- src/main/scala/chisel3/compatibility.scala | 1 + 1 file changed, 1 insertion(+) 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) } } -- cgit v1.2.3 From 00b6a9a9ef398320fc6ffe451b0a757f69aae7bd Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Sun, 14 Nov 2021 04:30:13 +0800 Subject: add tests. --- src/test/scala/chiselTests/CompatibilitySpec.scala | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3