Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15339 Discussions

Import Package error System Verilog

JNika
Beginner
1,440 Views

Hello,

I have a few packages that I have written like this:

 

package A;

-- 

--

endpackage

package B;

import A::*

---

-- 

endpackage

package C;

import A::*;

import B::*;

endpackage

In the file using package C, the error I am getting is as follows:

Error (10864): SystemVerilog error at C.sv(26): TMP was imported from multiple packages with ::* - none of the imported declarations are visible.

Is this problem because I am importing A::* in both package A and package C?

Any help to rsolve this is greatly appreciated.

Thanks in Advance~

--

Nikhil Pratap

 

0 Kudos
2 Replies
Vicky1
Employee
294 Views

Hi,

"Is this problem because I am importing A::* in both package A and package C?"

Yes, Please refer the below attached doc from Language reference manual(LRM) especially

"Table 26-1—Scoping rules for package importation" & Examples under the "26.6 Exporting imported names from packages"

 

 

Let me know if this has helped resolve the issue you are facing or if you need any further assistance.

 

Best Regards

Vikas Jathar 

(This message was posted on behalf of Intel Corporation)

 

dave_59
Novice
294 Views

It would help if you showed the places where TMP was declared and referenced. The import A::* by itself is not the problem. Most likely because you have declared TMP in both packages A and B and tried to reference it in C.

Reply