summaryrefslogtreecommitdiff
path: root/src/test/scala/cookbook/VecOfBool2UInt.scala
diff options
context:
space:
mode:
authorJim Lawson2016-12-12 09:14:33 -0800
committerGitHub2016-12-12 09:14:33 -0800
commitb581a24728bfba0c39ed2c032fd86f628a1e1a50 (patch)
treef625219f936d39e760192aa69df17e776b95dd56 /src/test/scala/cookbook/VecOfBool2UInt.scala
parent0bd9ae059368570dc72f25f7939afa5cfe5fd06e (diff)
parentad53161bbb9f67e16b88ca7a508a537f88d77e05 (diff)
Merge branch 'master' into buildinfousepackageaspath
Diffstat (limited to 'src/test/scala/cookbook/VecOfBool2UInt.scala')
-rw-r--r--src/test/scala/cookbook/VecOfBool2UInt.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/scala/cookbook/VecOfBool2UInt.scala b/src/test/scala/cookbook/VecOfBool2UInt.scala
index 5852120c..531e4e68 100644
--- a/src/test/scala/cookbook/VecOfBool2UInt.scala
+++ b/src/test/scala/cookbook/VecOfBool2UInt.scala
@@ -10,7 +10,7 @@ import chisel3._
*/
class VecOfBool2UInt extends CookbookTester(0) {
// Example
- val vec = Vec(Bool(true), Bool(false), Bool(true), Bool(true))
+ val vec = Vec(true.B, false.B, true.B, true.B)
val uint = vec.asUInt
printf(p"$uint") // 13
@@ -18,7 +18,7 @@ class VecOfBool2UInt extends CookbookTester(0) {
*
* (remember leftmost Bool in Vec is low order bit)
*/
- assert(UInt(0xd) === uint)
+ assert(0xd.U === uint)
}
class VecOfBool2UIntSpec extends CookbookSpec {