summaryrefslogtreecommitdiff
path: root/src/main/scala/Chisel/testers
diff options
context:
space:
mode:
authorRichard Lin2016-05-20 16:34:03 -0700
committerRichard Lin2016-05-20 16:34:03 -0700
commitd742d70a05b5fa997517ea7b5eb2d15b23e7a431 (patch)
tree3c2453014c78e889fd1502085661ed604c5f0b34 /src/main/scala/Chisel/testers
parentd7697eb14a0195cc3726bf45fdf38c631b6f6507 (diff)
parente92f2f69477a6ce86fc148a1a95db5797f2e3051 (diff)
Merge pull request #186 from ucb-bar/sloc_impl
Source locators
Diffstat (limited to 'src/main/scala/Chisel/testers')
-rw-r--r--src/main/scala/Chisel/testers/BasicTester.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/scala/Chisel/testers/BasicTester.scala b/src/main/scala/Chisel/testers/BasicTester.scala
index d3e9e7c8..b8c1494a 100644
--- a/src/main/scala/Chisel/testers/BasicTester.scala
+++ b/src/main/scala/Chisel/testers/BasicTester.scala
@@ -3,9 +3,12 @@
package Chisel.testers
import Chisel._
+import scala.language.experimental.macros
+
import internal._
import internal.Builder.pushCommand
import internal.firrtl._
+import internal.sourceinfo.SourceInfo
class BasicTester extends Module {
// The testbench has no IOs, rather it should communicate using printf, assert, and stop.
@@ -19,9 +22,10 @@ class BasicTester extends Module {
* reset). If your definition of reset is not the encapsulating Module's
* reset, you will need to gate this externally.
*/
- def stop() {
+ def stop()(implicit sourceInfo: SourceInfo) {
+ // TODO: rewrite this using library-style SourceInfo passing.
when (!reset) {
- pushCommand(Stop(Node(clock), 0))
+ pushCommand(Stop(sourceInfo, Node(clock), 0))
}
}