ISSUE 255

Add Proposal  Add Analysis  Edit Class, Environment, or Release
Number 255
Category errata
Synopsis clarify explicitly whether a module may instantiate itself
State open
Class errata-discuss
Arrival-DateJan 12 2003
Originator Shalom.Bresticker@motorola.com
Release 2001b
Environment
http://www.eda.org/vlog-synth/hm/0403.html
Description

Can a module instantiate itself, directly or indirectly?

Using generates or configurations, it is easy to invent
useful examples.

The LRM should answer this question explicitly.

See the discussion in the thread beginning at
http://www.eda.org/vlog-synth/hm/0403.html

It seems to me that even in Verilog-1995, it could have been
done in Verilog-XL using the `uselib compiler directive to
make an instance different from its father.

Fix

Audit-Trail

From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/255: clarify explicitly whether a module may instantiate
itself
Date: Sun, 12 Jan 2003 10:47:13 +0200

One related question that arises is, what happens to the definition of a
"top-level module"?

And must there always be a top-level module?
And what happens if there is not?




From: "Brad Pierce" <Brad.Pierce@synopsys.com>
To: <etf-bugs@boyd.com>
Cc:
Subject: Re: errata/255: clarify explicitly whether a module may instantiate itself
Date: Sat, 3 May 2003 09:48:39 -0700

This issue asks --

"Can a module instantiate itself"

No, but using generate and a parameterized module, a structurally recursive
chain of module instantiations can be declared. Paul Graham gives a good
explanation and example in

http://www.eda.org/vlog-synth/hm/0404.html






From: Shalom.Bresticker@motorola.com
To: Brad Pierce <Brad.Pierce@synopsys.com>
Cc: etf-bugs@boyd.com
Subject: Re: errata/255: clarify explicitly whether a module may instantiate
itself
Date: Sat, 3 May 2003 21:39:00 +0300 (IDT)

Using configurations, it is also possible that different instances of a module
may be different from each other.

In fact, even before, it could be done using `uselib.

The issue requests that the LRM explicitly state whether and when it is legal.

Shalom

> This issue asks --
>
> "Can a module instantiate itself"
>
> No, but using generate and a parameterized module, a structurally recursive
> chain of module instantiations can be declared. Paul Graham gives a good
> explanation and example in
>
> http://www.eda.org/vlog-synth/hm/0404.html

--
Shalom Bresticker Shalom.Bresticker@motorola.com
Design & Reuse Methodology Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478


From: Steven Sharp <sharp@cadence.com>
To: etf-bugs@boyd.com, Brad.Pierce@synopsys.com
Cc:
Subject: Re: errata/255: clarify explicitly whether a module may instantiate itself
Date: Sat, 3 May 2003 14:42:46 -0400 (EDT)

> This issue asks --
>
> "Can a module instantiate itself"
>
> No, but using generate and a parameterized module, a structurally recursive
> chain of module instantiations can be declared. Paul Graham gives a good
> explanation and example in

I don't understand why you are saying "No", and following it by a more complex
way of saying "Yes".

Unless you are interpreting "itself" to mean "the same instance as itself",
which is of course impossible. Different instantiations of the same module
always correspond to different instances. I think most people understand
that this question means "Can a module definition contain an instantiation of
an instance of this same module definition?" This should be OK as long as
the user avoids infinite recursion by the use of one of the mechanisms that
Shalom describes.

Steven Sharp
sharp@cadence.com

From: Shalom.Bresticker@freescale.com
To: Steven Sharp <sharp@cadence.com>
Cc: etf-bugs@boyd.com
Subject: Re: Errata/255: recursive instantiation
Date: Sun, 27 Jun 2004 14:37:24 +0300 (IDT)

In the proposal, 12.4 para. 1 says,

"Generate constructs provide the ability for parameter values to affect the structure of the model. They also allow for modules with repetitive structure to be described more concisely, and they make recursive module instantiation possible."

A paragraph in 12.4.2 also says,

"Conditional generate constructs make it possible for a module to contain an instantiation of itself. The same can be said of loop generate constructs, but it is more easily done with conditional generates. With proper use of parameters, the resulting recursion can be made to terminate, resulting in a legitimate model hierarchy. Note that because of the rules for determining top-level modules, a module containing an instantiation of itself will not be a top-level module."

I did not find other references to it, though I might have missed one.

One might conclude from this that a recursive instantiation using configurations might not be legal, though.

Shalom


On Thu, 24 Jun 2004, Steven Sharp wrote:

> Has this issue been resolved by the generate proposal?

--
Shalom Bresticker Shalom.Bresticker @freescale.com
Design & Reuse Methodology Tel: +972 9 9522268
Freescale Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 5441478

[ ]Freescale Internal Use Only
[ ]Freescale Confidential Proprietary

Unformatted

Hosted by Boyd Technology