• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to access Bottom level Bbox of an object according to...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 5246
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to access Bottom level Bbox of an object according to top level

skillEater
skillEater over 1 year ago

Hi,

I am trying to get the bBox details according to top level.

I am able to get details from database according to the bottom level but I want them according to top level.

Can somebody help me.

Thank you

Ganesh Doddipatla.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Ganesh,

    Not sure how you retrieved the lower level object - if you got it via (say) dbGetOveraps or dbShapeQuery, then you can use dbGetHierPathTransform to transform it to the top level coordinate system. The alternative is that you'd need to know the ~>transform of each instance down through the hierarchy to the instance you have the object within, and call dbConcatTransform to concatenate these together (in the right order) to give you the overall transformation. Once you've got that overall transformation, you then call dbTransformBBox.

    Note that in this forum (when replying to this post) I see a lot of relevant "Related Topics" on the right side of the page which are on a similar topic. For example, this one: How can I get an exact BBox from lower level to top?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillEater
    skillEater over 1 year ago in reply to Andrew Beckett

    Hi Andrew,

    I will tell you what I want to do now because the objective is changed.

    I want a pcell to be flattened in every cell in a given library.

    I want to write a SKILL script where I will get a form where the inputs will be library and the pcell that I want to flatten.

    After that It should flatten that pcell in every cellview where it is used.

    Any ideas are also welcome.

    Please help me.

    Thank you

    Ganesh Doddipatla.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillEater
    skillEater over 1 year ago in reply to skillEater

    Hi Andrew,

    Sorry for being rude in the last response.Then I was in a hurry to complete the task.

    Now I tried with the help of my colleagues and cadence forums previous requests.I am able to come only this far.

    I am able to do the tasks individually but when I combine the script its not working.

    My colleague gave me a suggestion to load this script in SKILL IDE writing.

    It is showing an error But I am not able to find out the error. Please let me know where I can be wrong.

    This is the error I am getting in virtuoso invalid libId (0x(nil)).

    Thank You

    Ganesh Doddipatla.

    lib_name=hiCreateStringField(
    ?name 'libname
    ?prompt "Library Name"
    ?defValue ""
    ?editable t
    )
    pcell_name=hiCreateStringField(
    ?name 'pcell_name
    ?prompt "Pcell Name"
    ?defValue ""
    ?editable t
    )
    vncapflatten=hiCreateAppForm(
    ?formTitle "LVTNFET FLATTEN"
    ?name 'vncap_form
    ?callback 'getinfo
    ?fields list(
    list(lib_name 5:5 375:30 85)
    list(pcell_name 450:5 200:30 75)
    ))

    hiDisplayForm(vncapflatten)

    procedure(getinfo(fromvncapform)
    info=hiGetCurrentForm()
    lib=info~>lib_name~>value
    libName=ddGetObj(lib)
    pcellName=info~>pcell_name~>value
    foreach( cell libName~>cells
    if( setof( the_view cell~>views the_view~>name == "layout") then

    cv = dbOpenCellViewByType(libName cell~>name "layout")))
    foreach(inst cv~>instances
    instName=inst~>cellName
    if((instName== pcellName) then
    dbFlattenInst( inst 10 t )
    else
    print("There is no lvtnfet_b")
    ))
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to skillEater

    There are numerous errors in the code. The field is called libname not lib_name and so that will result in lib ending up being nil; there are too many close parentheses on the cv=... line, and so that's wrong. Try this:

    procedure(getinfo(fromvncapform)
      let((info lib libName pcellName cv instName)
        info=fromvncapform
        lib=info~>libname~>value ; field was misspelt as lib_name
        libName=ddGetObj(lib)
        pcellName=info~>pcell_name~>value
        foreach( cell libName~>cells
          if( setof( the_view cell~>views the_view~>name == "layout") then
            cv = dbOpenCellViewByType(libName cell~>name "layout")
            foreach(inst cv~>instances
              instName=inst~>cellName ; confusing var name (it's not the instance name)
              if(instName==pcellName then 
                dbFlattenInst( inst 10 t )
              else
                printf("There is no %s\n" pcellName)
              )
            )
          )
        )
      )
    )
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillEater
    skillEater over 1 year ago in reply to Andrew Beckett

    Thank you Andrew It is working.

    The lib_name error is due to an confusion with my colleague and the other error is probably because I copied it from other program.

    during that time i may have not copied properly.

    Next time I will try to avoid these mistakes.

    Thanks once again

    Ganesh Doddipatla.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information