diff options
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/scala/Chisel/testers/BasicTester.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/scala/Chisel/testers/BasicTester.scala b/src/main/scala/Chisel/testers/BasicTester.scala index 398e49e7..fecbe2a9 100644 --- a/src/main/scala/Chisel/testers/BasicTester.scala +++ b/src/main/scala/Chisel/testers/BasicTester.scala @@ -3,6 +3,10 @@ package Chisel.testers import Chisel._ +import internal._ +import internal.Builder.pushCommand +import firrtl._ + class BasicTester extends Module { val io = new Bundle { val done = Bool() @@ -12,4 +16,10 @@ class BasicTester extends Module { io.error := UInt(0) def popCount(n: Long): Int = n.toBinaryString.count(_=='1') + + /** Ends the test, reporting success. + */ + def stop() { + pushCommand(Stop(Node(clock), 0)) + } } |
