summaryrefslogtreecommitdiff
path: root/src/test/scala/cookbook/Bundle2UInt.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/Bundle2UInt.scala
parent0bd9ae059368570dc72f25f7939afa5cfe5fd06e (diff)
parentad53161bbb9f67e16b88ca7a508a537f88d77e05 (diff)
Merge branch 'master' into buildinfousepackageaspath
Diffstat (limited to 'src/test/scala/cookbook/Bundle2UInt.scala')
-rw-r--r--src/test/scala/cookbook/Bundle2UInt.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/scala/cookbook/Bundle2UInt.scala b/src/test/scala/cookbook/Bundle2UInt.scala
index d74218a8..cb9498d1 100644
--- a/src/test/scala/cookbook/Bundle2UInt.scala
+++ b/src/test/scala/cookbook/Bundle2UInt.scala
@@ -11,17 +11,17 @@ import chisel3._
class Bundle2UInt extends CookbookTester(0) {
// Example
class MyBundle extends Bundle {
- val foo = UInt(width = 4)
- val bar = UInt(width = 4)
+ val foo = UInt(4.W)
+ val bar = UInt(4.W)
}
val bundle = Wire(new MyBundle)
- bundle.foo := UInt(0xc)
- bundle.bar := UInt(0x3)
+ bundle.foo := 0xc.U
+ bundle.bar := 0x3.U
val uint = bundle.asUInt
printf(p"$uint") // 195
// Test
- assert(uint === UInt(0xc3))
+ assert(uint === 0xc3.U)
}
class Bundle2UIntSpec extends CookbookSpec {