Project

General

Profile

[logo] 
 
Home
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  IPC::Locker
  Parallel::Forker
  Voneline
General Info
  Papers

Parse error with import name::*

Added by roger that over 5 years ago

I'm unsure if this is a bug or something I haven't configured properly

import company_common_pkg::*;

causes

%Error: filename.sv:177: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING


Replies (3)

RE: Parse error with import name::* - Added by Wilson Snyder over 5 years ago

The parser and IEEE requires data types and packages must be defined before being used, unfortunately that's the only way it can be parsed given how the language was defined.

RE: Parse error with import name::* - Added by roger that over 5 years ago

Is there a solution? Like processing the libraries first or something similar?

RE: Parse error with import name::* - Added by Wilson Snyder over 5 years ago

Yes, just add the files that contain packages to the command line (or read them if writing your own code) before your other modules, just as you would with any simulator or synthesis program.

    (1-3/3)