diff options
| author | ducky | 2018-05-11 15:49:03 -0700 |
|---|---|---|
| committer | Richard Lin | 2018-07-04 18:39:28 -0500 |
| commit | 0d157633104cdd96b881726802c7691783aeb7e6 (patch) | |
| tree | c23419f3999010a97b83757adcf9d375f3bce0eb /src | |
| parent | 6ff91db33279c9f3ccbafe993cf4abee0542298a (diff) | |
broken
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/chiselTests/LiteralExtractorSpec.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/scala/chiselTests/LiteralExtractorSpec.scala b/src/test/scala/chiselTests/LiteralExtractorSpec.scala index 5ccc6f91..e7a05a22 100644 --- a/src/test/scala/chiselTests/LiteralExtractorSpec.scala +++ b/src/test/scala/chiselTests/LiteralExtractorSpec.scala @@ -59,16 +59,16 @@ class LiteralExtractorSpec extends ChiselFlatSpec { // the future. import chisel3.core.BundleLitBinding import chisel3.internal.firrtl.{ULit, Width} - def Lit(aVal: BigInt, bVal: Boolean): MyBundle = { + def Lit(aVal: UInt, bVal: Bool): MyBundle = { val clone = cloneType clone.selfBind(BundleLitBinding(Map( - clone.a -> ULit(aVal, Width()), - clone.b -> ULit(if (bVal) 1 else 0, Width(1))) - )) + clone.a -> aVal.elementLitArg.get, + clone.b -> bVal.elementLitArg.get + ))) clone } } - val myBundleLiteral = (new MyBundle).Lit(42, true) + val myBundleLiteral = (new MyBundle).Lit(42.U, true.B) assert(myBundleLiteral.a.litToBigInt == 42) assert(myBundleLiteral.b.litToBigInt == 1) assert(myBundleLiteral.b.litToBoolean == true) |
