ERROR on importing a pkg
Using this comamnd_line: /pkg/qct/software/perl/5.16.2/bin/vhier -f ./files/sim_vhier.f --input-files ../rtl_build/top.v --synthesis --no-missing vhier_files.txt --language 1800-2012
.f file contains
.v+.sv+.vh +librescan -sv
I am seeing vhier (3.400) error
%Error: file1.sv:212: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING %Error: file2.sv:71: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING
the lines in question are both
import user_lib_pkg::* ;
this import is directly after the module port list (ANSI-style)
If I comment out those lines.. it completes with success.
seems like this is reasonably early SV stuff, so I thought it would be ok ? I don't see any other switches I should be enabling?
RE: ERROR on importing a pkg - Added by Wilson Snyder about 7 years ago
Perhaps you didn't declare user_lib_pkg first. The spec requires packages to be declared before use.
RE: ERROR on importing a pkg - Added by Mike Z about 7 years ago
you were correct.. I was still living in the pre-SV fantasy land where Verilog file order didn't matter and thought the pkg file would get picked up via either -y or +incdir.
When I specifically add the pkg file to my .f file.. no more errors.