diff options
| author | Schuyler Eldridge | 2019-07-31 13:58:04 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-07-31 15:53:26 -0400 |
| commit | 43146ebc08716b06f63f1965e698d9f0d9a4f40c (patch) | |
| tree | 54ce8856e30c5b28f54135435c1b0880a223fc83 /src/test/scala/chiselTests | |
| parent | 09254342f9bb95c23a094c156bd15e2f5af9ee9d (diff) | |
Add Mem/SeqMem deprecated compatibility tests
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/test/scala/chiselTests')
| -rw-r--r-- | src/test/scala/chiselTests/CompatibilitySpec.scala | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala index d9f4ccdb..3cc8fb89 100644 --- a/src/test/scala/chiselTests/CompatibilitySpec.scala +++ b/src/test/scala/chiselTests/CompatibilitySpec.scala @@ -414,4 +414,40 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks elaborate(new Foo) } + behavior of "Mem" + + it should "support deprecated apply methods" in { + class Foo extends Module { + val io = IO(new Bundle{}) + + info("apply[T <: Data](t: T, size: BigInt): Mem[T] works") + val memBigInt = Mem(UInt(), 8: BigInt) + memBigInt shouldBe a [Mem[UInt]] + + info("apply[T <: Data](t: T, size: Int): Mem[T] works") + val memInt = Mem(SInt(), 16: Int) + memInt shouldBe a [Mem[SInt]] + } + + elaborate(new Foo) + } + + behavior of "SeqMem" + + it should "support deprecated apply methods" in { + class Foo extends Module { + val io = IO(new Bundle{}) + + info("apply[T <: Data](t: T, size: BigInt): SeqMem[T] works") + val seqMemBigInt = SeqMem(UInt(), 8: BigInt) + seqMemBigInt shouldBe a [SeqMem[UInt]] + + info("apply[T <: Data](t: T, size: Int): SeqMem[T] works") + val seqMemInt = SeqMem(UInt(), 16: Int) + seqMemInt shouldBe a [SeqMem[UInt]] + } + + elaborate(new Foo) + } + } |
