diff options
| author | Jack Koenig | 2018-12-04 13:53:36 -0800 |
|---|---|---|
| committer | GitHub | 2018-12-04 13:53:36 -0800 |
| commit | 83f2a65a3ab1d21258883c0b113406ef9900a57f (patch) | |
| tree | c21edf9bc9c5f2f42ec5716a829145024bb82862 /src/test/scala/cookbook | |
| parent | ab951049c2c60402e2318ba863520d4a16c8288d (diff) | |
| parent | 3db21bd8e5a32c29efa55494d180dac4d22589e5 (diff) | |
Merge pull request #950 from freechipsproject/as-bools
asBools, asBool, and chained apply on asBools
Diffstat (limited to 'src/test/scala/cookbook')
| -rw-r--r-- | src/test/scala/cookbook/UInt2VecOfBool.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/scala/cookbook/UInt2VecOfBool.scala b/src/test/scala/cookbook/UInt2VecOfBool.scala index f69c483a..10250ad5 100644 --- a/src/test/scala/cookbook/UInt2VecOfBool.scala +++ b/src/test/scala/cookbook/UInt2VecOfBool.scala @@ -6,13 +6,13 @@ import chisel3._ /* ### How do I create a Vec of Bools from a UInt? * - * Use the builtin function [[chisel3.core.Bits.toBools]] to create a Scala Seq of Bool, + * Use the builtin function [[chisel3.core.Bits.asBools]] to create a Scala Seq of Bool, * then wrap the resulting Seq in Vec(...) */ class UInt2VecOfBool extends CookbookTester(1) { // Example val uint = 0xc.U - val vec = VecInit(uint.toBools) + val vec = VecInit(uint.asBools) printf(p"$vec") // Vec(0, 0, 1, 1) // Test |
