Open albert-sun opened 1 year ago
Cleaning work directory is required to avoid issues. This solution ensures that all files are up-to-date during compilation and also result of compilation is always the same.
Bypassing directory cleanup can cause the following issues:
Could not find the package
.Linter currently supports importing packages when you provide information where the package is. The simplest workaround is `include "package_name.svh"
above import package_name::*;
I understand that this solution may be inconvenient, so probably HDL_Linter needs something better. Maybe new setting incfiles
, similar to incdirs
?
// Specify files to be included in compilation
// Possible values: list of "<path>"
// Example value: ["C:/project1/packages_1/package_name1.svh", "C:/project1/packages_2/package_name2.svh"]
// Default value: []
"incfiles": [
]
What do you think about this?
When importing packages using the syntax
import package_name::*
, HDL_Linter outputs errorvlog-13006
, for instance:Error: ./projects/axi/axi4_lite_subordinate.sv(4): (vlog-13006) Could not find the package (axi4_pkg). Design read will continue [...]
. This is caused by the work directory being cleaned after every compile - perhaps a setting to disable the cleaning could help mitigate this issue. The solution is still somewhat hacky since you have to lint the package file first and then your original file, but it somewhat solves the issue.