summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/Chisel/Printf.scala
diff options
context:
space:
mode:
authorRichard Lin2016-06-08 17:12:42 -0700
committerRichard Lin2016-06-08 17:12:42 -0700
commit07fa5622ccc995f925d6d967d2a386540c9064cc (patch)
treefab4d62dba2ffb78e673ee54939d9088739a79f1 /chiselFrontend/src/main/scala/Chisel/Printf.scala
parent53813f61b7dfe246d214ab966739d01c65c8ecb0 (diff)
parent68447044e8eba5c8f525639130f1a347677ff543 (diff)
Merge pull request #197 from ucb-bar/lowercaseChisel
Rename package Chisel to chisel, add Chisel package for compatibility
Diffstat (limited to 'chiselFrontend/src/main/scala/Chisel/Printf.scala')
-rw-r--r--chiselFrontend/src/main/scala/Chisel/Printf.scala36
1 files changed, 0 insertions, 36 deletions
diff --git a/chiselFrontend/src/main/scala/Chisel/Printf.scala b/chiselFrontend/src/main/scala/Chisel/Printf.scala
deleted file mode 100644
index f068f637..00000000
--- a/chiselFrontend/src/main/scala/Chisel/Printf.scala
+++ /dev/null
@@ -1,36 +0,0 @@
-// See LICENSE for license details.
-
-package Chisel
-
-import scala.language.experimental.macros
-
-import internal._
-import internal.Builder.pushCommand
-import internal.firrtl._
-import internal.sourceinfo.SourceInfo
-
-object printf { // scalastyle:ignore object.name
- /** Prints a message in simulation.
- *
- * Does not fire when in reset (defined as the encapsulating Module's
- * reset). If your definition of reset is not the encapsulating Module's
- * reset, you will need to gate this externally.
- *
- * May be called outside of a Module (like defined in a function), so
- * functions using printf make the standard Module assumptions (single clock
- * and single reset).
- *
- * @param fmt printf format string
- * @param data format string varargs containing data to print
- */
- def apply(fmt: String, data: Bits*)(implicit sourceInfo: SourceInfo) {
- when (!(Builder.dynamicContext.currentModule.get.reset)) {
- printfWithoutReset(fmt, data:_*)
- }
- }
-
- private[Chisel] def printfWithoutReset(fmt: String, data: Bits*)(implicit sourceInfo: SourceInfo) {
- val clock = Builder.dynamicContext.currentModule.get.clock
- pushCommand(Printf(sourceInfo, Node(clock), fmt, data.map((d: Bits) => d.ref)))
- }
-}