From 59327533f0c35d4c63fee38c5288bfbb95bbd1b3 Mon Sep 17 00:00:00 2001 From: Albert Magyar Date: Thu, 5 Sep 2019 11:06:21 -0700 Subject: Filter out more filename extensions for blackbox source headers (#1134) --- src/main/scala/firrtl/transforms/BlackBoxSourceHelper.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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, -- cgit v1.2.3