summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchick2016-03-08 09:51:22 -0800
committerchick2016-03-08 09:51:22 -0800
commit8db2ef969f273adaa97e06f9f2d1794c401ad491 (patch)
treec99d65e61ed7086e03254ea64ffbf9f6169ee3c5
parentdb0236c0363e8c1dee8c49759a79a8448711ed2b (diff)
Added -Wno-WIDTH and -Wno-STMTDLY warning suppressors to verilator command
show verilator command on starndard out Changed --Wno-fatal to -Wno-fatal (double dash became single dash) in accordance with verilator docs println the verilator command to the standard out, so it can be seen along with the various compiler calls
-rw-r--r--src/main/scala/Chisel/Driver.scala33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/main/scala/Chisel/Driver.scala b/src/main/scala/Chisel/Driver.scala
index 61b74dcd..ca77eb33 100644
--- a/src/main/scala/Chisel/Driver.scala
+++ b/src/main/scala/Chisel/Driver.scala
@@ -59,19 +59,25 @@ trait BackendCompilationUtilities {
dutFile: String,
dir: File,
vSources: Seq[File],
- cppHarness: File): ProcessBuilder =
-
- Seq("verilator",
- "--cc", s"$dutFile.v") ++
- vSources.map(file => Seq("-v", file.toString)).flatten ++
- Seq("--assert",
- "--Wno-fatal",
- "--trace",
- "-O2",
- "+define+TOP_TYPE=V" + dutFile,
- "-CFLAGS", s"""-Wno-undefined-bool-conversion -O2 -DTOP_TYPE=V$dutFile -include V$dutFile.h""",
- "-Mdir", dir.toString,
- "--exe", cppHarness.toString)
+ cppHarness: File
+ ): ProcessBuilder = {
+ val command = Seq("verilator",
+ "--cc", s"$dutFile.v") ++
+ vSources.map(file => Seq("-v", file.toString)).flatten ++
+ Seq("--assert",
+ "-Wno-fatal",
+ "-Wno-WIDTH",
+ "-Wno-STMTDLY",
+ "--trace",
+ "-O2",
+ "+define+TOP_TYPE=V" + dutFile,
+ "-CFLAGS",
+ s"""-Wno-undefined-bool-conversion -O2 -DTOP_TYPE=V$dutFile -include V$dutFile.h""",
+ "-Mdir", dir.toString,
+ "--exe", cppHarness.toString)
+ System.out.println(s"${command.mkString(" ")}")
+ command
+ }
def cppToExe(prefix: String, dir: File): ProcessBuilder =
Seq("make", "-C", dir.toString, "-j", "-f", s"V${prefix}.mk", s"V${prefix}")
@@ -99,7 +105,6 @@ object Driver extends BackendCompilationUtilities {
/** Elaborates the Module specified in the gen function into a Circuit
*
* @param gen a function that creates a Module hierarchy
- *
* @return the resulting Chisel IR in the form of a Circuit (TODO: Should be FIRRTL IR)
*/
def elaborate[T <: Module](gen: () => T): Circuit = Builder.build(Module(gen()))