Compiling a package and an interface into a library

Hello,

I have a package which includes bfm sources. And there is a interface that is used along with the bfm classes as virtual. It is placed in the same file but definitely outside the package. For example,

my_pkg.sv →


  package my_pkg;
  // some classes
  `include "some_class.h"
  endpackage

  interface my_if;
  // some signals
  endinterface;


I compile my_pkg.sv into a library, let’s say, my_lib. Because I don’t want to recompile every time since it took some time to compile. And I use different library because working library is deleted sometimes, for some reason.
The source code that I actually compile daily, imports the package successfully when I instruct the tool to look for that specific library. But it gives me an error saying it can’t find that interface. For example,


module my_module
  import my_pkg::*; // no errors
  my_if my_if_; // throws an error
endmodule;

Is it something that SystemVerilog related or should I contact the vendor? Please let me know the correct way of doing this kind of stuff, if possible.

P.S I am using Questa.

In reply to emin:

The problem could be there might have been an error in compiling the interface, so it did not actually get put into the library, but the package did. Or it could be you are not specific the compiled library in all the correct places. That would be a tool specific usage issue.

This Mentor/Siemens EDA sponsored public forum is not for discussing tool specific usage or issues. Please read your tool’s user manual or contact your tool vendor directly for support.