Re: [sv-bc] $unit::m or $root.m in module instance?

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Thu Oct 12 2006 - 14:39:11 PDT
So the default left operand of :: would be the definitions namespace?

There used to be a default for this operand, namely, a "built-in"
namespace, but that namespace was removed, in favor of today's 'std'
package which is implicitly wildcard imported into every $unit.

  http://www.eda.org/sv-ec/Errata/ERR_56_57_v2.pdf

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Greg
Jaxon
Sent: Thursday, October 12, 2006 2:20 PM
To: Michael (Mac) McNamara
Cc: sv-bc@eda.org
Subject: Re: [sv-bc] $unit::m or $root.m in module instance?

Michael (Mac) McNamara wrote:

> Moreover, one should really adopt a naming convention for local 
> modules in order to make understanding the code easier, and also to 
> greatly reduce the risk of overlap:
> 
> module top;
>       module local_to_top_nest;
>       endmodule
> 
> 	// local nest
>       Local_to_top_nest n1(a,b);
> 
> 	// global nest;
> 	nest n2(b,c);
> 
> endmodule

One philosophy of 4th generation compilers is that the compiler - not
the end user - implements these conventions.  In fact, within the
language, they are not "conventions" at all, but absolute barriers to
name collision etc.

I think Gord's suggestion of ::nest works just fine, and addresses the
module known elsewhere as "nest".
The full module name of its homograph is "top[nest]"
or possibly "top::nest"; it is NOT accessible globally (only its
instances are via "$root.top.n1").

Greg
Received on Thu Oct 12 14:39:23 2006

This archive was generated by hypermail 2.1.8 : Thu Oct 12 2006 - 14:39:30 PDT