Do not make glob imports of packages in the compilation unit scope unless necessary
Created by: bluewww
There are imports like this https://github.com/openhwgroup/cv32e40p/blob/8e22c994198ad08f4cacf239d56d98e1cc25627b/rtl/cv32e40p_core.sv#L30-L38
which makes all the variables visible in the whole compilation unit. This can cause issues when this codebase is compiled in the same compilation unit as another module that has a variable with the same name as in one of those packages. We saw this issue when using vcs and vsim. In vsim we had one compilation unit per file, but vcs had one compilation unit for the whole design.
The better approach is doing the import inside the module or in the module header (same effect).
i.e.
module cv32e40p_core import cv32e40p_defines::*;
#(
parameter PULP_HWLP = 0, // Hardware Loop (not supported yet; will be supported)
parameter PULP_CLUSTER = 0,
[...]