diff options
| author | Aditya Naik | 2023-11-23 03:11:56 -0800 |
|---|---|---|
| committer | Aditya Naik | 2023-11-23 03:11:56 -0800 |
| commit | af415532cf160e63e971ceb301833b8433c18a50 (patch) | |
| tree | 1fef70139846f57298c8e24a590490a74249f7dd /src/test/scala/chiselTests/TesterDriverSpec.scala | |
| parent | 8200c0cdf1d471453946d5ae24bc99757b2ef02d (diff) | |
cleanup
Diffstat (limited to 'src/test/scala/chiselTests/TesterDriverSpec.scala')
| -rw-r--r-- | src/test/scala/chiselTests/TesterDriverSpec.scala | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/test/scala/chiselTests/TesterDriverSpec.scala b/src/test/scala/chiselTests/TesterDriverSpec.scala deleted file mode 100644 index c3cc232f..00000000 --- a/src/test/scala/chiselTests/TesterDriverSpec.scala +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -package chiselTests - -import chisel3._ -import chisel3.testers.BasicTester -import chisel3.util._ - -/** Extend BasicTester with a simple circuit and finish method. TesterDriver will call the - * finish method after the FinishTester's constructor has completed, which will alter the - * circuit after the constructor has finished. - */ -class FinishTester extends BasicTester { - val test_wire_width = 2 - val test_wire_override_value = 3 - - val counter = Counter(1) - - when(counter.inc()) { - stop() - } - - val test_wire = WireDefault(1.U(test_wire_width.W)) - - // though we just set test_wire to 1, the assert below will pass because - // the finish will change its value - assert(test_wire === test_wire_override_value.asUInt) - - /** In finish we use last connect semantics to alter the test_wire in the circuit - * with a new value - */ - override def finish(): Unit = { - test_wire := test_wire_override_value.asUInt - } -} - -class TesterDriverSpec extends ChiselFlatSpec { - "TesterDriver calls BasicTester's finish method which" should - "allow modifications of test circuit after the tester's constructor is done" in { - assertTesterPasses { - new FinishTester - } - } -} |
