create a Parametric cell after taking data from the window

S

supra

Guest
Hello ,
I am developing Parametric cells for superconducting layouts. I need
to draw power lines manually so i need to obtain data (ie points or
coordinate value by clicking in the window) and then drawing the path.
How do i do this.

supradeep
 
Hello Andrew,

I am trying to draws paths interactively by selecting points from the
window. I wrote the following code, but when i try to run it the
window shuts down.

pcDefinepCell ( list (ddGetObj ("SNtmp") "tmp" "layout")
( (layerm2 "string" "m2") ; layer name
(width "float" 10.0 ) ; width of the path
)
cv = geGetWindowCellView()

SNenterpath()
SNreturnpoints(cv SNenterpath points)
)


procedure( snretunpoints( windowID done listofpoints )
printf( "list of points %l " listofpoints)
)


procedure( snenterpath()
enterpath (
?prompts list ("enter fist point"
"enter nexr pint "
)
?doneProc "snreturnpoints"
)
)
 
supra wrote:

I am trying to draws paths interactively by selecting points from the
window. I wrote the following code, but when i try to run it the
window shuts down.
It sounds to me like you're trying to make an Multipart Path. Try having a
look in <inst dir>/docs/roduser/roduser.pdf

Cheers,

Roger
 
I am trying to draws paths interactively by selecting points from the
window. I wrote the following code, but when i try to run it the
window shuts down.

pcDefinepCell ( list (ddGetObj ("SNtmp") "tmp" "layout")
( (layerm2 "string" "m2") ; layer name
(width "float" 10.0 ) ; width of the path
)
cv = geGetWindowCellView()

SNenterpath()
SNreturnpoints(cv SNenterpath points)
)
As suggested by your crashes, do not use enterPath in the code of a pcell.


You can create a "path" pcell by defining a parameter, say coords, with a fourth entry "path", as in :

(coords ILList '((0.0 0.0) (10.0 0.0) (10.0 10.0) (0.0 10.0)) "path")

when a user instantiates such a pcell, virtuoso will prompt him to enter a path, and the coords
parameters will hold the points of the path.

It is just a mechanism to graphically enter the parameter of a pcell. The user won't be able to do
regular path operations such as stretch, reshape or chop. (Indeed, stretch can be obtained by making
the pcell stretchable, but it's not exactly as convenient).



Another option, as Roger stated, is to create a multipart path. A multipart path is more convenient,
as it behaves just like a regular path, but it has it's own drawbacks. You cannot do very complex
stuff with a multipart path, as it is basically composed of multiple paths which can be on different
layers and offset with respect to each other, and of arrays of rectangles of given size and spacing.
It's suitable to do things like guard rings.

Multipart paths are created with Create->Multipart Path. Templates can be defined and saved into
text files or in the technology file.

Another way is to create a procedure, which you can the bind to a menu item and/or bindkey. That
procedure would call enterPath() to prompt the user for the points of the path, then call
rodCreatePath() to actually create the MPP. The advantage is that the user do not have to bother
with templates, and you can prompt the user for more parameters by instantiating an option form :
for example, when creating a slotted power line, you may ask for the width and layer of the path and
calculate the number and size of slots to be inserted accordingly.

The drawback of MPPs compared to pcells is that they do not react to change of parameters. By this,
I mean the following : in the above example, if the user increases the width of a slotted line,
there is no way to modify the path to add more slots. The user has to create a new one. It would be
great if callbacks could be defined for MPPs to handle this.


Now it all depends which option suits most your application.



Cheers,

Stéphane
 
On 2 May 2007 15:35:47 -0700, supra <supradeep@gmail.com> wrote:

Hello Andrew,

I am trying to draws paths interactively by selecting points from the
window. I wrote the following code, but when i try to run it the
window shuts down.

pcDefinepCell ( list (ddGetObj ("SNtmp") "tmp" "layout")
( (layerm2 "string" "m2") ; layer name
(width "float" 10.0 ) ; width of the path
)
cv = geGetWindowCellView()

SNenterpath()
SNreturnpoints(cv SNenterpath points)
)


procedure( snretunpoints( windowID done listofpoints )
printf( "list of points %l " listofpoints)
)


procedure( snenterpath()
enterpath (
?prompts list ("enter fist point"
"enter nexr pint "
)
?doneProc "snreturnpoints"
)
)
Calling enter functions from within a pcell doesn't make sense. Otherwise every
time the database got loaded, it would have to prompt you to enter some
points...

I think Roger's response is apposite.

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 
On 7 Mar 2007 14:44:56 -0800, "supra" <supradeep@gmail.com> wrote:

Hello ,
I am developing Parametric cells for superconducting layouts. I need
to draw power lines manually so i need to obtain data (ie points or
coordinate value by clicking in the window) and then drawing the path.
How do i do this.

supradeep
You can write SKILL code which uses enterPoints() or enterPath(). Not that clear
what you're actually trying to do here.

Regards,

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top