Need help on Skill script to generate pad coords, and text

Discussion in 'Cadence' started by vlsidesign, Mar 11, 2005.

  1. vlsidesign

    vlsidesign Guest

    Basically I want a program to generate some information about the pads
    and the text found on them.

    Let's say all my pad master cellnames are called "signal" "dvdd" "dvss"
    "avdd" and "avss" (maybe have the names in a file to be read in). Also
    I have a label on the pads top level metal (metal6). I want to a
    program to find each pad, and and find the pad's center point, and then
    find the pad metal label located on top of it. I then would like a
    printout to a file:
    pad_label pad_type pad_center_coordinates
    "DATA1" "SIGNAL" (30, 300)
    ......

    I have some skill code already. I have to first use the interactive
    search for the pads, and select them all, and then I can execute my
    code to determine the pad center point. I wanted to somehow use skill
    code search, and select, but wasn't quite sure how. Here is my code:

    pads=geGetObjectSelectedSet()
    file = outfile("~/pad_coords.txt")
    foreach(pad pads
    padBox = car(pad~>bBox)
    padName = car(pad~>cellName)
    iName = car(pad~>name)
    print(padName file)
    print(iName file)
    x1 = caar(padBox)
    y1 = cadar(padBox)
    x2 = caadr(padBox)foreach(text texts
    ltext=car(text~>theLabel)
    print(ltext file)

    y2 = cadadr(padBox)
    newX = x1 + (x2-x1)/2
    newY = y1 + (y2-y1)/2
    print(newX:newY file)
    println(" " file)
    ) ;end foreach
    close(file)

    I also use the search to locate the text, and then I can run my other
    script to extract the info from that. Here is that script:

    texts=geGetObjectSelectedSet()
    file = outfile("padlabels.txt")
    foreach(text texts
    ltext=car(text~>theLabel)
    print(ltext file)
    xytext=car(text~>xy)
    println(xytext file)
    ) ;end foreach
    close(file)

    If I had a script that could automate the search, and then match up the
    the label with the pad, and print it out. This info would be then used
    for the packaging guys for the bonding diagram.
    Thanks for any help.
     
    vlsidesign, Mar 11, 2005
    #1
  2. vlsidesign

    S. Badel Guest

    maybe have a look at leSearchHierarchy, which will return a list
    of the objects matching a set of criteria exactly like UI search.

    stéphane
     
    S. Badel, Mar 14, 2005
    #2
  3. vlsidesign

    vlsidesign Guest

    Thanks. I am having a little trouble using it. Here is what happens:

    cellId = geGetEditCellView()
    pads=list("pad_tmp_ml2")
    leSearchHierarchy(
    cellId list(-200:-200 4000:4000) 32 "inst" list("cellName"
    "pad_tmp_ml2")
    )

    After issuing the command, I don't see anything come up in the CIW, I
    don't see a list or an error. Maybe my syntax is wrong??

    I would also like to issue search for mutiple cellnames as well.
     
    vlsidesign, Mar 14, 2005
    #3
  4. vlsidesign

    S. Badel Guest

    this shoud work i hope:

    leSearchHierarchy(
    cellId
    list(-200:-200 4000:4000)
    32
    "inst"
    list(
    list("cellName" "==" "pad_tmp_ml2")
    list("cellName" "==" "other_cell_name")
    ...
    )
    )

    stéphane
     
    S. Badel, Mar 14, 2005
    #4
  5. vlsidesign

    vlsidesign Guest

    The following syntax doesn't seem to work either:

    leSearchHierarchy(cellId list(0:0 4300:4300) 32 "inst" list("cellName"
    "==" "pad_tmp_ml2"))

    and I get the error:

    *Error* icInstMoveTrigFunc: Invalid string - "cellName"
     
    vlsidesign, Mar 14, 2005
    #5
  6. vlsidesign

    S. Badel Guest

    because it's a list of lists, ie each criterium is a list, and
    all criteria are grouped into a list :

    list( list("cellName" "==" "pad_tmp_ml2") )
     
    S. Badel, Mar 14, 2005
    #6
  7. vlsidesign

    vlsidesign Guest

    Thanks for the response and help. You were right I had to do a list of
    lists, and this leSearchHierarchy is what I needed as well.

    Also I had to use "cell name" instead of "cellName".
     
    vlsidesign, Mar 14, 2005
    #7
  8. vlsidesign

    vlsidesign Guest

    Here is the my script with some of the improvements, but still need a
    little more help if possible:

    Port = poport ;;defines where to print -- screen or later to a file
    padName = "pad_tmp" ;; Pad cell that contains top level PAD metal
    chipXY = list(0:0 4300:4300) ;; chip xy dimensions
    cv = geGetEditCellView()
    pads = leSearchHierarchy(cv chipXY 32 "inst" list(list("cell name" "=="
    padName)))
    foreach(padi pads ;;foreach pad you find do some processing
    x1 = caar(padi~>bBox)
    y1 = cadar(padi~>bBox)
    x2 = caadr(padi~>bBox)
    y2 = cadadr(padi~>bBox)
    ;;;;tbox = list(x1:y1 x2:y2)
    padMetal = list("METAL6" "drawing")

    labels = leSearchHierarchy(cv list(36:3000 40:3100) 32 "label"
    list(list("layer" "==" padMetal)))
    ;;;;;;labels = leSearchHierarchy(cv tbox 32 "label" list(list("layer"
    "==" padMetal)))

    printf("LabelDbs are: %L \n" labels outPort)
    );end foreach

    I want to substitute a value in the 'leSearchHierarchy' function.
    Instead of using the 'list(36:3000 40:3100)' I wanted to use the pads
    bBox so that I can find the Metal6 label on the pad. I tried to create
    a variable called 'tbox' but I think it is creating a two item list
    instead of the formatting that it seems like it needs. Thanks in
    advance for any help.
     
    vlsidesign, Mar 16, 2005
    #8
  9. vlsidesign

    S. Badel Guest

    the notation x:y is equivalent to list(x y)
    is this what you're not understanding?

    why don't you simply use padi~>bBox??
     
    S. Badel, Mar 16, 2005
    #9
  10. vlsidesign

    vlsidesign Guest

    Thanks so much for the help! It works great!
     
    vlsidesign, Mar 17, 2005
    #10
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.