Re: [sv-bc] compilation of unselected module instantiations

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Thu Jan 15 2009 - 07:11:18 PST
Shalom, from a conceptual model side there is a difference
between a "possible dependency" and an "actual dependency".
All modules that are referenced in a design are possible
dependencies, but only those that actually participate in
the elaboration process are actual dependencies.  If an
implementation is aware of a possible dependency, it is
likely going to deal with the dependency if possible.  If
it can't determine what to do (i.e. if "m2" doesn't exist),
the implementation would just hope that the references to that
dependency are in fact dead in the elaboration flow otherwise
elaboration errors will result.  Obviously in your example
it is trivial to determine that "m2" is dead, but it is
not a solvable problem in general.  Given that, in practice
it is generally more consistent for users to not try to
do any of the "possible dependency" elimination early since
then small changes to parameters/generate/config/etc aspects
can perturb the dependencies.

BTW, none of this is specified LRM behavior.

Gord.



Bresticker, Shalom wrote:
> Hi,
>  
> Suppose I have a generate block with conditional module instantiations, 
> like this:
>  
> module m;
>  
> generate
>         if (1)
>                 m1 m1();
>         else
>                 m2 m2();
> endgenerate
>  
> endmodule
>  
> In this, m and m1 are compiled and elaborated, and m is the top-level 
> module.
>  
> However, when running simulators, that if the tool can find m2 (e.g., 
> suppose it is found in a library directory), then it compiles m2 as 
> well, but does not elaborate it.
>  
> However, if it does not find m2, then it also continues without a problem.
>  
> All the simulators I tested had the same behavior. One issued an 
> informational message that it did not find m2.
>  
> What is the explanation and consistency of this behavior? If the tool 
> does not need m2, why compile it? If the tool does need m2, how does it 
> manage without finding the module?
>  
> Thanks,
> Shalom
>  
> Shalom Bresticker
> Intel Jerusalem LAD DA
> +972 2 589-6582
> +972 54 721-1033
>  
>  
> 
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
> 
> 
> ------------------------------------------------------------------------
> 
> This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jan 15 07:11:59 2009

This archive was generated by hypermail 2.1.8 : Thu Jan 15 2009 - 07:12:13 PST