Jump to content

macro expansion error with minimalistic import

Recommended Posts

The error:

Following verilog source has syntax error :
  "myBfm.sv", 12 
  (expanding macro): token is '#'

The code:

`include "uvm_pkg.sv"
import uvm_pkg::uvm_component;
class myBfm extends uvm_component;

First I did not understand, because this looked exactly like the in examples.

Then I decided that instead of importing only the symbols each file needed (e.g. import uvm_pkg::uvm_component), I would try to import everything at the top level (i.e. import uvm_pkg::*). Doing so, the error went away, but the compiler simply hangs forever during parsing with not hints as to what is wrong.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...