diff options
| author | ducky | 2016-11-18 13:15:46 -0800 |
|---|---|---|
| committer | ducky | 2016-11-21 13:32:47 -0800 |
| commit | 70161db5b6ae88b4ba1edfd8032e6ed381734dab (patch) | |
| tree | b6e30c0b0b6609dd8b9e77f4afa2ae9dc2baefbd /src | |
| parent | 6b7acc715010b14c22e15f5084efb11862151a47 (diff) | |
Convert rest of tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/chiselTests/BlackBox.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/scala/chiselTests/BlackBox.scala b/src/test/scala/chiselTests/BlackBox.scala index 8b4cf157..7fcba766 100644 --- a/src/test/scala/chiselTests/BlackBox.scala +++ b/src/test/scala/chiselTests/BlackBox.scala @@ -89,25 +89,25 @@ class BlackBoxConstant(value: Int) extends BlackBox( Map("VALUE" -> value, "WIDTH" -> log2Up(value + 1))) { require(value >= 0, "value must be a UInt!") val io = IO(new Bundle { - val out = UInt(width = log2Up(value + 1)).asOutput + val out = UInt(log2Up(value + 1).W).asOutput }) } class BlackBoxStringParam(str: String) extends BlackBox(Map("STRING" -> str)) { val io = IO(new Bundle { - val out = UInt(width = 32) + val out = UInt(32.W) }) } class BlackBoxRealParam(dbl: Double) extends BlackBox(Map("REAL" -> dbl)) { val io = IO(new Bundle { - val out = UInt(width = 64) + val out = UInt(64.W) }) } class BlackBoxTypeParam(w: Int, raw: String) extends BlackBox(Map("T" -> RawParam(raw))) { val io = IO(new Bundle { - val out = UInt(width = w) + val out = UInt(w.W) }) } @@ -127,7 +127,7 @@ class BlackBoxWithParamsTester extends BasicTester { assert(blackBoxFour.io.out === 4.U) assert(blackBoxStringParamOne.io.out === 1.U) assert(blackBoxStringParamTwo.io.out === 2.U) - assert(blackBoxRealParamOne.io.out === 0x3ff0000000000000L.U) + assert(blackBoxRealParamOne.io.out === BigInt(0x3ff0000000000000L).U) assert(blackBoxRealParamNeg.io.out === BigInt("bff0000000000000", 16).U) assert(blackBoxTypeParamBit.io.out === 1.U) assert(blackBoxTypeParamWord.io.out === "hdeadbeef".U(32.W)) |
