Find pcell "parent"

R

Roger Light

Guest
Hi there,

I'm writing a skill layout pcell using IC5.0.33_USR2. I'd like to be
able to find, in the pcell, the cell view that the pcell is being added to.

Is this possible? Any suggestions how I might do it?

Cheers,

Roger
 
On Thu, 07 Jul 2005 17:08:35 +0100, Roger Light
<roger.light@NOSPAM.nottingham.ac.uk> wrote:

Hi there,

I'm writing a skill layout pcell using IC5.0.33_USR2. I'd like to be
able to find, in the pcell, the cell view that the pcell is being added to.

Is this possible? Any suggestions how I might do it?

Cheers,

Roger
Hi Roger,

This is not (safely) possible. Here's the reason why.

A pcell is evaluated whenever its formal parameters change. That means if you
have a pcell instantiated in one cell with (say) w=1u, l=0.2u it will get
evaluated the first time it is used.

Then if you place another instance in another cell, with the same parameter
values, the pcell will not be re-evaluated - it will use the same submaster
that was created for the first time around - since all the formal parameters
are the same.

So even if you could find the parent cellView at time of instantiation,
there's no guarantees that you'd get a reevaluation when instantiated
elsewhere. In fact it's quite likely it won't.

In other words, only changes in the formal parameter values will cause a
re-evaluation.

Also, you might not even know the parent cellView at the time of the initial
evaluation - because the pcell is evaluated at create instance time to create
the ghost image - and then you don't know where you're going to place it.

Now, the question comes about - why do you want to know this? Often people
want this because they want some label displaying information about the
parent. If so, that's best achieved using a label of ILLabel type, with an
expression using the special variable ilInst which is set to the instanceId
being drawn at redraw time. So you can do things like:

ilInst~>cellView~>instancesLastChanged

to have a label which shows the date the parent last changed.

Don't be tempted to use ilInst directly inside your pcell code - because
whilst it might pick up one of the instances in your design at eval time,
there's no guarantee which instance (or indeed any instance) that would be
chosen.

Of course, the reason why the pcell code is not evaluated for every single
instance is that this would kill performance - and everyone would complain
like made if we did this!

Regards,

Andrew.
 
Andrew Beckett wrote:
On Thu, 07 Jul 2005 17:08:35 +0100, Roger Light
roger.light@NOSPAM.nottingham.ac.uk> wrote:


Hi there,

I'm writing a skill layout pcell using IC5.0.33_USR2. I'd like to be
able to find, in the pcell, the cell view that the pcell is being added to.

Is this possible? Any suggestions how I might do it?

This is not (safely) possible. Here's the reason why.
I thought it might not be :)

A pcell is evaluated whenever its formal parameters change. That means if you
have a pcell instantiated in one cell with (say) w=1u, l=0.2u it will get
evaluated the first time it is used.

Then if you place another instance in another cell, with the same parameter
values, the pcell will not be re-evaluated - it will use the same submaster
that was created for the first time around - since all the formal parameters
are the same.

So even if you could find the parent cellView at time of instantiation,
there's no guarantees that you'd get a reevaluation when instantiated
elsewhere. In fact it's quite likely it won't.
Ok, that makes sense.

In other words, only changes in the formal parameter values will cause a
re-evaluation.

Also, you might not even know the parent cellView at the time of the initial
evaluation - because the pcell is evaluated at create instance time to create
the ghost image - and then you don't know where you're going to place it.

Now, the question comes about - why do you want to know this? Often people
want this because they want some label displaying information about the
parent. If so, that's best achieved using a label of ILLabel type, with an
expression using the special variable ilInst which is set to the instanceId
being drawn at redraw time. So you can do things like:
I've created a couple of layout cells that have the chip package
outlines we use included in them. I've written some code which reads in
lines from a text file and adds the text around the package as pin names
so that it is easy to generate a diagram of the package with pin names
for documentation purposes.

My hope was that I could add a text cell view with a particular name to
a cell to contain the pin names and then add the pcell to the layout
view of that cell and have it automatically pick up the pin names view.
Just laziness really!

As it stands, I do that anyway but just have to specify the filename of
the text file manually per instance which is no problem as it should
only be used once per project.

As you note, the pcell will only be re-evaluated when a parameter
changes so a change in the text file will not cause an update - to get
around this I've added a second float parameter which the user can
modify to cause the pcell to be re-evaluated but does nothing within the
pcell itself.

Thanks,

Roger
 

Welcome to EDABoard.com

Sponsor

Back
Top