From b3e516d724e0955a7515f7175eaf5fad61fc1763 Mon Sep 17 00:00:00 2001 From: Troels Folke Date: Fri, 27 Feb 2026 14:03:22 +0100 Subject: [PATCH] Add C/C++ files to questasim (qrun) flow --- src/simplhdl/plugin/simulationflow.py | 4 ++++ .../resources/templates/questasim/project.qrun.j2 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/simplhdl/plugin/simulationflow.py b/src/simplhdl/plugin/simulationflow.py index c7310ad..8918b3e 100644 --- a/src/simplhdl/plugin/simulationflow.py +++ b/src/simplhdl/plugin/simulationflow.py @@ -22,6 +22,8 @@ VerilogFile, VerilogIncludeFile, VhdlFile, + CFile, + CppFile, UsedIn, ) from ..project.fileset import Fileset, FilesetOrder, FileOrder @@ -88,6 +90,8 @@ def get_globals(self) -> dict[str, Any]: globals["VerilogFile"] = VerilogFile globals["SystemVerilogFile"] = SystemVerilogFile globals["VhdlFile"] = VhdlFile + globals["CppFile"] = CppFile + globals["CFile"] = CFile globals["uvm"] = self.is_uvm() globals["isinstance"] = isinstance globals["UsedIn"] = UsedIn diff --git a/src/simplhdl_questasim/resources/templates/questasim/project.qrun.j2 b/src/simplhdl_questasim/resources/templates/questasim/project.qrun.j2 index 37a5ef3..6992d4d 100644 --- a/src/simplhdl_questasim/resources/templates/questasim/project.qrun.j2 +++ b/src/simplhdl_questasim/resources/templates/questasim/project.qrun.j2 @@ -19,7 +19,7 @@ {% endfor %} {% for fileset in filesets %} -makelib {{fileset.library.name}}:"{{fileset.library.name}}" -{% for file in fileset.files(type=(SystemVerilogFile, VerilogFile, VhdlFile), usedin=UsedIn.SIMULATION) %} +{% for file in fileset.files(type=(SystemVerilogFile, VerilogFile, VhdlFile, CFile, CppFile), usedin=UsedIn.SIMULATION) %} "{{file.path}}" {% endfor %} -endlib