• 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 get the cellviews hierachy

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 144
  • Views 21456
  • 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 get the cellviews hierachy

wenckey
wenckey over 6 years ago

In Virtuoso, if I have the target cell name "target", top cell name "top", lib name "mylib", view name "layout". How can I get the hierachy path for the "target" from "top"?

Like hierachy path: top->cellA->cellB->target

  • Cancel
  • skillUser
    skillUser over 6 years ago

    Hi,

    I think either geGetInstHierPath() or geGetInstHier() might give you what you want?

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • wenckey
    wenckey over 6 years ago in reply to skillUser

    geGetInstHierPath() and geGetInstHier() need to open a cell view and descend into or EIP in a cellview. It will not report the hier path if another cell contain the target cell.

    Also thanks for your response Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Marben
    Marben over 6 years ago

    Hi wenckey,

    Code below will get all the instance hierarchy path from top level.

    Hope it helps.

    ;procedure(CCFgetInstanceNamesAndCoords(master @optional (transform list(0:0 "R0" 1)) (hierInstPath "/"))
    procedure(ci()
    cvId=geGetWindowCellView()
    csh("touch ./instance_coord.txt")
    outPort = outfile("./instance_coord.txt")
    fprintf(outPort "\n Coordinates of instances of %s with a library %s :\n\n" cvId~>cellName cvId~>libName)
    ctr = 0

    procedure(CCFgetInstanceNamesAndCoords(master @optional (transform list(0:0 "R0" 1)) (hierInstPath "/"))


    foreach(inst master~>instances
    when(inst~>objType=="inst"
    ctr = ctr +1

    printf("%s%s %L\n" hierInstPath inst~>cellName dbTransformPoint(inst~>xy transform))
    fprintf(outPort " %d. %s%s %L\n" ctr hierInstPath inst~>cellName dbTransformPoint(inst~>xy transform))


    CCFgetInstanceNamesAndCoords(

    inst~>master

    dbConcatTransform(inst~>transform transform)

    strcat(hierInstPath inst~>cellName "/")

    )

    ) ;when


    )

    t


    )


    CCFgetInstanceNamesAndCoords(cvId)


    fprintf(outPort " \n\n\n <<<------------------------------------------>>>" )

    fprintf(outPort " \n\n End of instances coordinates list . " )

    fprintf(outPort " \n\n <<<------------------------------------------>>>" )

    close( outPort)
    ;view("./netConnection_layout.txt" list(0:0 500:500) "SCHEMATIC NET CONNECTION")
    ; edit("./netConnection_layout.txt")
    ;hiRegTimer("system("open_net_selected")" 100)
    sleep(3)
    system("gedit ./instance_coord.txt &")

    ; End of outport


    );proc

    Best regards,

    Marben

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • wenckey
    wenckey over 6 years ago in reply to Marben

    THanks a lot~ Very useful

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • wenckey
    wenckey over 6 years ago in reply to Marben

    Hi, Marben:

    I try to find a specific cellname's hierachy, and I edit the code like this: (add the if to match the cellname)

    if(inst~>cellName=="specificCell" then<-----added
    ctr = ctr +1

    printf("%s%s %L\n" hierInstPath inst~>cellName dbTransformPoint(inst~>xy transform))
    fprintf(outPort " %d. %s%s %L\n" ctr hierInstPath inst~>cellName dbTransformPoint(inst~>xy transform))
    );endif<-------added

    Seems not work.

    Do you have any suggestion?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to wenckey

    It works for me. Did you get the cell name correct in the comparison?

    I did have to put my peril-sensitive sunglasses on to read the code though!

    • no local variables
    • not sure why the CCFgetInstanceNamesAndCoords was declared within the outer function - unless you were writing this in SKILL++ mode - i.e. with a .ils suffix. Only then would the function be local and see the ctr variable as being lexically scoped.
    • don't know why there's a sleep for 3 seconds at the end - this shouldn't be necessary since you've closed the file.
    • I assume the formatting was lost when the code was pasted here...

    Maybe I'm being a bit harsh ;-)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DilipChalla
    DilipChalla over 6 years ago in reply to Andrew Beckett

    Hi Andrew, 

    I am first time SKILL user , and i am trying to automate a process and I need to get the hierarchy from source to destination . (Source is always from Cell A and destination might change) 

    for example : for "a" on Cell A  my expecting output should be like  (InstanceOfCellA.InstanceOfCellB.InstanceOfCellC.InstanceOfCellD) and (InstanceOfCellA.InstanceOfCellB.InstanceOfCellE) ; basically all fan out hierarchies of "a" and dump the outputs  to some text file . 

    It should do for all ports going out on Cell A . (like a,b,c till x )

    Please guide me on this or let me know the right reference material to develop code . 

    Regards, 

    Dilip . 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to DilipChalla

    Hi Dilip,

    This is quite a complex task, and to be honest more than I can really answer here. To handle net tracing through the hierarchy (especially if you have busses/bundles and iterated instances anywhere) is quite complicated - I’ve done it before but the code I have isn’t really fit for sharing as it was written for a specific application many years ago.

    However, I’m wondering whether the probe assistant (Window->Assistants->Probes) will do what you want. Probe the net (e.g. using the 9 bindkey) and then the assistant at the bottom will show everything to which the net is connected. You can then save that to a file from the assistant. So with this, you may not need to write any SKILL code - or can adapt the output to suit your needs?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • DilipChalla
    DilipChalla over 6 years ago in reply to Andrew Beckett

    Hi Andrew , 

    Thanks for  quick reply . Yeah that would work , but in reality there are at least a hundred or more nets to probe.I just want to find a way to automate it and reuse for different projects .

    I also find another problem here , for example a[0:5] , if CellD uses a[3:5] and cellE uses a[0:2] , we need to trace the hierarchies even if the bus splits . 

    Best Regards, 

    Dilip.  

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to DilipChalla

    Hi Dilip,

    One thought - there's a new function added in IC618/ICADVM181 called schTraceNet which allows you to have a callback to collect information as it traces a net. This might make it easier to implement?

    Andrew.

    • 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