Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Verilog 'import <package file>::*' results in syntax error #1089

Closed
veripoolbot opened this issue Sep 14, 2016 · 1 comment
Closed
Assignees

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Ed Carstens
Original Redmine Issue: 1089 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


I have the following line in a System Verilog interconnect module:

import riscv_defines::*;

that is resulting in the following error:

%Error: :59: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING

I have found that inserting a line to include the package file before the import works:

`include "riscv_defines.sv"
import riscv_defines::*;

I don't think this include should be required if the package files can be read and parsed prior to the import, as you would do for a simulation.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-09-14T23:44:19Z


The SystemVerilog specification requires that you declare packages before using them. Therefore you must either `include or put the package file on the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants