diff options
| author | Jack | 2022-11-11 06:53:04 +0000 |
|---|---|---|
| committer | Jack | 2022-11-11 06:53:04 +0000 |
| commit | 3ce953c81f06519351c48277e3474b5720ec07ff (patch) | |
| tree | ac79dcb80d0528c2ae86ca21da4cf424715ab645 /src/test/scala/chiselTests/ExtModule.scala | |
| parent | adccde9998c91875e5490cff6d5822ffacc593ed (diff) | |
| parent | c8046636a25474be4c547c6fe9c6d742ea7b1d13 (diff) | |
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'src/test/scala/chiselTests/ExtModule.scala')
| -rw-r--r-- | src/test/scala/chiselTests/ExtModule.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/ExtModule.scala b/src/test/scala/chiselTests/ExtModule.scala index b5a8ff7c..3ab4cc32 100644 --- a/src/test/scala/chiselTests/ExtModule.scala +++ b/src/test/scala/chiselTests/ExtModule.scala @@ -88,6 +88,17 @@ class ExtModuleWithFlatIOTester extends Module { io <> inst.badIO } +class ExtModuleInvalidatedTester extends Module { + val in = IO(Input(UInt(8.W))) + val out = IO(Output(UInt(8.W))) + val inst = Module(new ExtModule { + val in = IO(Input(UInt(8.W))) + val out = IO(Output(UInt(8.W))) + }) + inst.in := in + out := inst.out +} + class ExtModuleSpec extends ChiselFlatSpec { "A ExtModule inverter" should "work" in { assertTesterPasses({ new ExtModuleTester }, Seq("/chisel3/BlackBoxTest.v"), TesterDriver.verilatorOnly) @@ -117,4 +128,10 @@ class ExtModuleSpec extends ChiselFlatSpec { chirrtl should include("inst.in <= io.in") chirrtl shouldNot include("badIO") } + + it should "not have invalidated ports in a chisel3._ context" in { + val chirrtl = ChiselStage.emitChirrtl(new ExtModuleInvalidatedTester) + chirrtl shouldNot include("inst.in is invalid") + chirrtl shouldNot include("inst.out is invalid") + } } |
