Re: [sv-bc] Query related with package import in extern module declaration.

From: Kakoli Bhattacharya <kakoli@cal.interrasystems.com>
Date: Mon Dec 13 2010 - 04:51:25 PST

Hello,

Consider the following egs:

1) package pack1;
    const int c1 = 3;
   endpackage

   extern module static prog1 import pack1::*;(output shortint out1); *// Wild card import
*
   module static prog1 (.*);

    assign out1 = 8'b10011001 >>> c1; *// c1 is not visible*
   endmodule

2) package pack1;
    const int c1 = 3;
   endpackage

   extern module static prog1 import pack1::c1;(output shortint out1); *// Explicit import*

   module static prog1 (.*);

    assign out1 = 8'b10011001 >>> c1; *// c1 is visible*
   endmodule

 Many tools are passing the 2nd case while giving error for the 1st one.
 Which one is correct? Or are they both wrong ??

 Earlier there were some mails related to a similar issue but I am not able to clearly relate them to
 this issue of mine.
 Maybe I am missing some points from those mails ...

Regards,
Kakoli

Dhiraj Kumar Prasad wrote:

> Hello,
>
> I have a query regarding package import in extern module declaration.
>
> Consider the following testcase
> ----------------------------------------
>
> package pack1;
> parameter p1 = 10;
> parameter p2 = 20;
> endpackage
>
> extern module mod1 import pack1::p1;(out1, out2);
>
> module mod1 import pack1::p2;(out1, out2);
> output int out1;
> output int out2;
>
> initial
> begin
> out1 = p1;
> out2 = p2;
> end
> endmodule
>
> Both package items p1 and p2 should be visible ?? AS LRM say only
> about parameter and port list and said nothing
> about the package import.
>
> Regards,
> dhiRAj
>
>
>
>
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Dec 13 06:46:29 2010

This archive was generated by hypermail 2.1.8 : Mon Dec 13 2010 - 06:48:17 PST