Getting an unused rod name starting with some string

Discussion in 'Cadence' started by Suresh Jeevanandam, Sep 21, 2006.

  1. Hi all,
    I am trying to create rod object inside a cellview. I would like to
    have its name start with string ( just to be descriptive.)

    Right now I am doing this way,

    procedure(MYgetUnusedRodName(start cvId)
    prog((name)
    for(i 1 1000
    ;Max of 1000 attempts
    sprintf(name "%s%d" start i)
    when(rodIsFigNameUnused(name cvId)
    return(name)
    )
    )
    error("XXLgetRodName :: Tried 1000 times, could not get a unique
    rod name.")
    )
    )

    Is there any other elegant way of doing this?
    Is it possible to implement this without using return()

    regards,
    Suresh
     
    Suresh Jeevanandam, Sep 21, 2006
    #1
  2. gensym(
    [ S_arg ]
    )
    => s_result

    Returns a new symbol based on the input argument.


    e.g
    some trials
    gensym( "testName" ) => testName3273
    gensym( "testName" ) => testName3274


    Bernd
     
    Bernd Fischer, Sep 21, 2006
    #2
  3. Bernd,
    Thanks.
    I think I still will have to check if the resultant
    symbolToString(gensym("testName")) string is unused rod name.

    regards,
    Suresh
     
    Suresh Jeevanandam, Sep 21, 2006
    #3
  4. Not if every ROD object has it's unique string prefix name and if
    you use gensym form the beginning of the creation of your ROD objects
    in the cell view.

    I never had conflicts with this.

    Bernd
     
    Bernd Fischer, Sep 22, 2006
    #4
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.