-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
verilator: Fix dependencies on testbench files in makefile
The build is a two-stage process. First, the RTL files are "verilated" into C++ files and a <project>.mk file is created. Then, the verilated C++ files together with the testbench are compiled into an executable. The Makefile generated by Edalize had a dependency on the testbench files for the first step, but the testbench files are really only used in the second step, so there was nothing to pick up the changes.
- Loading branch information
Showing
4 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from .edalize_tool_common import tool_fixture | ||
|
||
|
||
def test_tool_verilator(tool_fixture): | ||
tf = tool_fixture("verilator") | ||
|
||
name = "design" | ||
|
||
tf.tool.configure() | ||
tf.compare_config_files( | ||
[ | ||
name + ".vc", | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Auto generated by Edalize | ||
|
||
all: Vtop_module | ||
|
||
Vtop_module.mk: design.vc sv_file.sv vlog_file.v vlog05_file.v vlog_incfile another_sv_file.sv | ||
$(EDALIZE_LAUNCHER) verilator -f design.vc | ||
|
||
Vtop_module: Vtop_module.mk c_file.c cpp_file.cpp | ||
$(EDALIZE_LAUNCHER) make -f Vtop_module.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--Mdir . | ||
--cc | ||
+incdir+. | ||
-CFLAGS -I. | ||
sv_file.sv | ||
vlog_file.v | ||
vlog05_file.v | ||
another_sv_file.sv | ||
--top-module top_module | ||
|
||
--exe | ||
c_file.c | ||
cpp_file.cpp | ||
-Gvlogparam_bool=1 | ||
-Gvlogparam_int=42 | ||
-Gvlogparam_str=\"hello\" | ||
-Dvlogdefine_bool=1 | ||
-Dvlogdefine_int=42 | ||
-Dvlogdefine_str=hello |