• 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 traverse layout hierarchy?

Stats

  • Replies 1
  • Subscribers 144
  • Views 1275
  • Members are here 0

How to traverse layout hierarchy?

VT202502243045
VT202502243045 3 months ago

Problem statement: I have a hierarchical layout(called as  input_cell_view). I want to select all instances of Required_cell and place a copy the same instances along with parameters at the same x_coordinate:y_coordinate in another cell view(called as target_cellView).

Stratergy 1: Recursively opening up all instances and finding the coordinates.
Remarks: Very Slow and inefficient. Why is this not as fast as "leHiSearch" for getting the instances?

Strategy 2: Using "leSearchHierarchy"
Remarks: The returned list points to the master cell and I have no idea how to get the bBox or the parameters of the instance.

Strategy 3: Using "dbFlattenInst" or "dbFlattenInst2" (I understand that both are the same??)
Remarks: This actually throws up errors saying that i cannot flatten the cellview. The error seems very confusing.
The exact error is "*WARNING* (DB-220834): dbFlattenInstOrVia: Cannot flatten instance I6800 because it has no associated master. This could be because the master has been removed from disk, or is not correctly specified in the cds.lib file, or is unavailable on the network, for example. Check for such issues and retry."
I have checked all the aspects mentioned above and could not find any problems.


Strategy 4: Using "leHiSearch" and saving the output to .csv file.
Remarks: The .csv file does not contain the "ROTATION" of the instances. It does not contain the parameters passed to the instances.

Please suggest some methods for solving my problem statement. 
I hope my explanation of the problem is proper. Else, I can try to explain it better.

Regards,
V.S.

  • Sign in to reply
  • Cancel
  • psill00
    psill00 3 months ago

    This is what I use for layout/schematic hierarchy lists
    I got this a post

    Open a cellview ( layout or schematic )
    load the procedures
    Execute the command in the CIW findInstHier(geGetEditCellView())
    It will output the instDb path list so you can get the inst variable values


    procedure(hierarchy_traversal(cellview listofNand instHier)
    let((newHier nextcellview)
    foreach(inst cellview~>instances
    listofNand = cons(append1(instHier inst) listofNand)
    )

    foreach(inst cellview~>instances
    if(inst~>isAnyInst then
    if(rexMatchp("symbol" inst~>viewName) then
    if(ddGetObj(inst~>libName inst~>cellName "schematic") then
    nextcellview = dbOpenCellViewByType(inst~>libName inst~>cellName "schematic" "schematic" "r")
    else nextcellview = nil)
    else if(ddGetObj(inst~>libName inst~>cellName inst~>viewName) then
    nextcellview = dbOpenCellViewByType(inst~>libName inst~>cellName inst~>viewName "maskLayout" "r")
    else nextcellview = nil)
    )
    when(nextcellview
    newHier = append1(instHier inst)
    listofNand = hierarchy_traversal(nextcellview listofNand newHier))
    )
    )
    listofNand
    )); end of hierarchy_traversal

    procedure(findInstHier(cv); instance hier path
    let( (cv1 instofNand listofNand instHier
    )
    foreach(inst cv~>instances
    instofNand = cons(list(cv inst) instofNand))

    listofNand = foreach(mapcar x instofNand list(cv x) x)

    foreach(inst cv~>instances
    when(inst~>isAnyInst
    if(rexMatchp("symbol" inst~>viewName) then
    if(ddGetObj(inst~>libName inst~>cellName "schematic") then
    cv1 = dbOpenCellViewByType(inst~>libName inst~>cellName "schematic" "schematic" "r")
    else cv1 = nil)
    else if(ddGetObj(inst~>libName inst~>cellName inst~>viewName) then
    cv1 = dbOpenCellViewByType(inst~>libName inst~>cellName inst~>viewName "maskLayout" "r")
    else cv1 = nil)
    )
    when(cv1
    instHier = append1(list(cv) inst)
    listofNand = hierarchy_traversal(cv1 listofNand instHier))
    ))
    listofNand
    ));end of findInstHier

    Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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