aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Magyar2019-09-05 11:06:21 -0700
committermergify[bot]2019-09-05 18:06:21 +0000
commit59327533f0c35d4c63fee38c5288bfbb95bbd1b3 (patch)
treebb39799b5ab433349db780ed7ed015758a5017d1
parenta991d9744e2c95a93c641655045cc65153495421 (diff)
Filter out more filename extensions for blackbox source headers (#1134)
-rw-r--r--src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala b/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala
index 8192b416..b62cf7a1 100644
--- a/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala
+++ b/src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala
@@ -112,7 +112,8 @@ class BlackBoxSourceHelper extends firrtl.Transform {
}
// Issue #917 - We don't want to list Verilog header files ("*.vh") in our file list - they will automatically be included by reference.
- val verilogSourcesOnly = (resourceFiles ++ inlineFiles).filterNot( _.getName().endsWith(".vh"))
+ def isHeader(name: String) = name.endsWith(".h") || name.endsWith(".vh") || name.endsWith(".svh")
+ val verilogSourcesOnly = (resourceFiles ++ inlineFiles).filterNot{ f => isHeader(f.getName()) }
val filelistFile = if (flistName.isAbsolute()) flistName else new File(targetDir, flistName.getName())
// We need the canonical path here, so verilator will create a path to the file that works from the targetDir,