diff options
| author | Schuyler Eldridge | 2019-07-31 14:27:21 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-07-31 15:53:26 -0400 |
| commit | d6bbbf664fa15e85132e33b42e64d4e37483a514 (patch) | |
| tree | 6d77f1411f9189c2612664c00df5b11630e46394 | |
| parent | cb7bd3e70f2864d233a32e9935af4b7a829ff0af (diff) | |
Add Wire deprecated compatibility tests
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
| -rw-r--r-- | src/test/scala/chiselTests/CompatibilitySpec.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala index 2fa936ed..81c97ee9 100644 --- a/src/test/scala/chiselTests/CompatibilitySpec.scala +++ b/src/test/scala/chiselTests/CompatibilitySpec.scala @@ -481,4 +481,26 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks elaborate(new Foo) } + behavior of "Wire" + + it should "support legacy methods" in { + class Foo extends Module { + val io = IO(new Bundle{}) + + info("apply[T <: Data](dummy: Int = 0, init: T): T works") + val first = Wire(init=UInt("hdeadbeef")) + first shouldBe a [UInt] + + info("apply[T <: Data](t: T, init: T): T works") + val second = Wire(SInt(), SInt(-100)) + second shouldBe a [SInt] + + info("apply[T <: Data](t: T, init: DontCare.type): T works") + val third = Wire(UInt(), chisel3.DontCare) + third shouldBe a [UInt] + } + + elaborate(new Foo) + } + } |
