diff options
| author | Jack Koenig | 2018-11-21 14:08:32 -0800 |
|---|---|---|
| committer | Jack Koenig | 2018-12-04 13:13:13 -0800 |
| commit | 121635ed26c8a9852c827d6c0729515337604d08 (patch) | |
| tree | 108b4ef217b89cd308ec27ec4e314b400fb369ad /chiselFrontend/src/main | |
| parent | 277b3979912db443aef4e1aad741ac2b3c07f42f (diff) | |
Add asBools, deprecate toBools
Diffstat (limited to 'chiselFrontend/src/main')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Bits.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala index ffde7c87..b7c303f0 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Bits.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Bits.scala @@ -364,7 +364,15 @@ sealed abstract class Bits(private[chisel3] val width: Width) extends Element wi final def toBools(): Seq[Bool] = macro SourceInfoTransform.noArg /** @group SourceInfoTransformMacro */ - def do_toBools(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Seq[Bool] = + @chiselRuntimeDeprecated + @deprecated("Use asBools instead", "3.2") + def do_toBools(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Seq[Bool] = do_asBools + + /** Returns the contents of this wire as a [[scala.collection.Seq]] of [[Bool]]. */ + final def asBools(): Seq[Bool] = macro SourceInfoTransform.noArg + + /** @group SourceInfoTransformMacro */ + def do_asBools(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Seq[Bool] = Seq.tabulate(this.getWidth)(i => this(i)) /** Reinterpret this $coll as a [[SInt]] |
