Forum: FPGA, VHDL & Verilog Import package error system Verilog

von Nikhil Ghanathe (Guest)

Rate this post
0 useful
not useful
I have a few packages that I have written like this:
package A; 

package B; 
import A::* 

package C; 
import A::*; 
import B::*; 
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 

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

von Duke Scarring (Guest)

Rate this post
1 useful
not useful
Nikhil Ghanathe wrote:
> TMP was imported from
> multiple packages with
I think not A is the problem but TMP is imported multiple times.
Maybe you can import more selective with:
import A::special_only; 


von Nikhil G. (Company: Microsoft) (nikhilghanathe)

Rate this post
0 useful
not useful
Thanks Duke,
Will try that out.
A follow up question, is there like a guard statement (like `ifndef...) 
which can be used here to avoid importing multiple times?\

Nikhil Pratap

von Tom T. (gogul)

Rate this post
0 useful
not useful
Yes, same syntax as in C


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.