Subject: Re: [sv-cc] FW: [sv-bc] External Functions and Tasks proposal
From: Stickley, John (john_stickley@mentorg.com)
Date: Fri Mar 14 2003 - 14:13:42 PST
I preferred 'import' to 'extern' all along so that sounds
fine to me.
-- johnS
Warmke, Doug wrote:
> Joao, others,
>
> Please see the forwarded proposal from Peter Flake that appeared on SV-BC.
> He is saying that the "external" keyword truly should have prototype
> semantics.
> This is not in matching with our requirements for external functions,
> which we
> stated should be semantically equivalent to a true function declaration.
> (i.e. they stand in for a C function which would normally be declared in SV
> at that particular declarative scope)
>
> I think our usage of the term "extern" is too much in conflict with the
> prototype-oriented usage required by the other committees.
> As a result, I reluctantly think we should go back to using
> the keyword "import" instead of "extern" for describing external functions.
> And probably we should use the term "imported function" whenever we
> currently use the term "exported function".
>
> Given the deadline situation, please send comments soon(!)
>
> Thanks and regards,
> Doug
>
> -----Original Message-----
> From: Peter Flake [mailto:Peter.Flake@synopsys.com]
> Sent: Friday, March 14, 2003 7:27 AM
> To: sv-bc@server.eda.org
> Cc: Arturo Salz
> Subject: [sv-bc] External Functions and Tasks proposal
>
> ADD to draft 3 new section 10.6
>
> 5.8 External tasks and functions
>
> Some tools require each module to be analyzed separately. If the module
> uses tasks or functions declared in $root, the names and argument types
> need to be visible to the analysis to allow checking. However it is
> important that each analysis does not create its own copy of the task or
> function.
>
> SystemVerilog allows the existence elsewhere of a task or function name
> and prototype to be declared using the extern keyword. For example
> extern function int func1(int I);
>
> If this external declaration is in $root, the same name can be declared
> with the same prototype more than once.
>
> A declarations of a task or function prototype requires a matching
> declaration (with the same arguments) somewhere else , otherwise there
> is an elaboration error. For example:
> function int func1(int I);
> return I;
> endfunction
>
> If the prototype is in the $root scope, the task or function must be
> declared in the $root scope.
>
> If the prototype is in an interface, the task or function must be
> declared in one of the modules connected to an instance of that interface.
>
> If the prototype is a class, the task or function must be declared as an
> out-of-body method (see section 11.20).
>
>
--This email may contain material that is confidential, privileged and/or attorney work product for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. __ ______ | \ ______________________/ \__ / \ \ H Dome ___/ | John Stickley E | a __ ___/ / \____ Principal Engineer l | l | \ / Verification Solutions Group | f | \/ ____ Mentor Graphics Corp. - MED C \ -- / / 17 E. Cedar Place a \ __/ / / Ramsey, NJ 07446 p | / ___/ | / / mailto:John_Stickley@mentor.com \ / Phone: (201)818-2585 \ / ---------
This archive was generated by hypermail 2b28 : Fri Mar 14 2003 - 14:15:57 PST