Closed tomverbeure closed 3 years ago
I think the issue is caused by an incorrect path?
Verilator is looking here:
../src/pulp-platform.org__common_cells_1.20.0/include/common_cells/common_cells/registers.svh
but I have this:
../src/pulp-platform.org__common_cells_1.20.0/include/common_cells/registers.svh
One way or the other, an additional common_cells
crept into the search path...
The issue is that ../src/pulp-platform.org__common_cells_1.20.0/src/isochronous_spill_register.sv
has the following:
`include "common_cells/registers.svh"
But swervolf_0.7.3.vc
contains:
+incdir+../src/pulp-platform.org__common_cells_1.20.0/include/common_cells
-CFLAGS -I../src/pulp-platform.org__common_cells_1.20.0/include/common_cells
Concatenate these 2, and you get common_cells/common_cells
twice.
After changing swervolf_0.7.3.vc
like this:
+incdir+../src/pulp-platform.org__common_cells_1.20.0/include/
-CFLAGS -I../src/pulp-platform.org__common_cells_1.20.0/include/
and a few other place too (e.g. include/axi
-> include
), Verilator compiles when I do make
in sim_verilator
.
But if I then run fusesoc
again, swervolf_0.7.3.vc
gets overwritten.
I don't know how to fix this the right way...
Tom
I was able to make it compile and simulate by making the following 2 changes:
diff --git a/pulp-platform.org/axi-0.25.0.core b/pulp-platform.org/axi-0.25.0.core
index c596820..a116f26 100644
--- a/pulp-platform.org/axi-0.25.0.core
+++ b/pulp-platform.org/axi-0.25.0.core
@@ -5,6 +5,7 @@ name : pulp-platform.org::axi:0.25.0
filesets:
rtl:
files:
+ - include/dummy : {is_include_file : true}
- include/axi/assign.svh : {is_include_file : true, include_path : include}
- include/axi/typedef.svh : {is_include_file : true, include_path : include}
# Source files grouped in levels. Files in level 0 have no dependencies on files in this
diff --git a/pulp-platform.org/common_cells-1.20.core b/pulp-platform.org/common_cells-1.20.core
index 2c32fd5..e6d19a9 100644
--- a/pulp-platform.org/common_cells-1.20.core
+++ b/pulp-platform.org/common_cells-1.20.core
@@ -6,6 +6,7 @@ filesets:
rtl:
files:
- include/common_cells/registers.svh : {is_include_file : true, include_path : include}
+ - include/dummy : {is_include_file : true}
# Source files grouped in levels. Files in level 0 have no dependencies on files in this package.
# Files in level 1 only depend on files in level 0, files in level 2 on files in levels 1 and 0,
# etc. Files within a level are ordered alphabetically.
Hmm. could it be that the include_path
attribute was introduced in Edalize 0.2.2 and you're using an older version? If so, sorry about that. I should have written down the minimum tool versions somewhere (it would also be doubly embarrassing in the light of https://github.com/olofk/corescore/issues/19)
This is the same machine, so edalize 0.2.3 is already installed.
Tom
Ok, I have another theory now. Is FuseSoC older than version 1.11? Because that was the version that introduced support for include_path
. Without that, I think there will be the errors you describe
Updating to version 1.12 fixed it.
Is there a way in the .core file to specify a minimum fusesoc version?
Not at this point. We need to take a look at versioning in more detail. Just adding a minimum FuseSoC version isn't perfect since the core description files are intended to be used by other tools as well. Might be better to add a minor version to the CAPI instead so that FuseSoC and other tools can detect if it encounter core description files written for a a newer API version than it can handle.
In this particular case I just added a note about the minimum FuseSoC version to the readme and filed https://github.com/chipsalliance/Cores-SweRVolf/issues/33 for the general case
Sounds good!
Closing...
I'm trying to compile run a swervolf simulation from a clean installation, using
Verilator 4.033 devel rev v4.032-73-gdef40fa
.Shortly after kicking things off, I get greeted with the following error: