create a Parametric cell after taking data from the window

Discussion in 'Cadence' started by supra, Mar 7, 2007.

  1. supra

    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
     
    supra, Mar 7, 2007
    #1
  2. 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, May 1, 2007
    #2
  3. supra

    supra Guest

    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, May 2, 2007
    #3
  4. supra

    S. Badel Guest

    I am trying to draws paths interactively by selecting points from the
    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
     
    S. Badel, May 4, 2007
    #4
  5. 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, May 8, 2007
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.