diff options
| author | Chick Markley | 2017-01-31 09:49:18 -0800 |
|---|---|---|
| committer | GitHub | 2017-01-31 09:49:18 -0800 |
| commit | 632a7166ac1935100cb1d61add3b28d1fd4dc8f4 (patch) | |
| tree | 221079012cebfff37390f6e330711e6a905ffa8f /src/main/scala/chisel3/Driver.scala | |
| parent | 770c5671744502ba7865a41472972388b2fade2c (diff) | |
Move blackbox verilog implementations within reach of verilator (#453)
* Move blackbox verilog implementations within reach of verilator
Blackbox implementers can annotate the modules with information on where to get the source verilog
This API is very lightweight, real work is done in firrtl in companion PR
Added some verilog to BlackBoxTest.v resource for testing
* if a file named black_box_verilog_files.f exists add a
-f black_box_verilog_files.f to the verilog to cpp command
Diffstat (limited to 'src/main/scala/chisel3/Driver.scala')
| -rw-r--r-- | src/main/scala/chisel3/Driver.scala | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main/scala/chisel3/Driver.scala b/src/main/scala/chisel3/Driver.scala index f4a7d0e5..f9f6dabe 100644 --- a/src/main/scala/chisel3/Driver.scala +++ b/src/main/scala/chisel3/Driver.scala @@ -113,10 +113,23 @@ trait BackendCompilationUtilities { vSources: Seq[File], cppHarness: File ): ProcessBuilder = { - val command = Seq("verilator", - "--cc", s"$dutFile.v") ++ + val blackBoxVerilogList = { + val list_file = new File(dir, firrtl.transforms.BlackBoxSourceHelper.FileListName) + if(list_file.exists()) { + Seq("-f", list_file.getAbsolutePath) + } + else { + Seq.empty[String] + } + } + val command = Seq( + "verilator", + "--cc", s"$dutFile.v" + ) ++ + blackBoxVerilogList ++ vSources.map(file => Seq("-v", file.toString)).flatten ++ - Seq("--assert", + Seq( + "--assert", "-Wno-fatal", "-Wno-WIDTH", "-Wno-STMTDLY", |
