• 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. Moving Layers Through Hierarchy

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 145
  • Views 22488
  • 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

Moving Layers Through Hierarchy

shayansh
shayansh over 13 years ago

 Hi,

I am looking for a way to move some components through hiearchy in layout. For example, i have drawn some metal 1 path in the first level of hiearchy, and would like to 'pop' it out to the second level of hiearchy. Is there any default feature in Cadence that does this? If someone could kindly guide me to setting this up i would appreciate it. Basically i want something close to the YANK command, but CUT instead of copy. 

I am using Cadence: Virtuoso: 6.1.4

 

Thanks,

Shayan

  • Cancel
Parents
  • dmay
    dmay over 13 years ago

    There are many factors that come into play when you want to do this type of operation.

    1. Are you moving shapes from a lower level to the top level, or to some intermediate level of hierarchy?
    2. Is the shape you are moving  placed in an instanced that has multiple placements? If so, this is a more complicated algorithm because you need to make multiple copies of the shape and know all of the locations where it should be placed.
    3. Do you use mosaics in your layout? This complicates the process since getting the transformation information is more complicated.

    Here is some basic code to allow you to move a shape up the hierarchy. It doesn't handle mosaics and only moves the objects for one placement of an instance. In the code below, I used dbCopyFig to copy the data instead of dbMoveFig. This will let you see what is going on without being destructive to the source cellview. If you change it to do a move, you'll need to save the source cellview. I already have the code making the source cellview editable.

    To use this, load the code in your CIW. Edit in place down the hierarchy to your lower level cell. Select the shapes you want to move. Press the ctrl-b bindkey. Choose the level you want to return to. You should have a copy of those shapes at the new level.

    procedure(myGetItemsToMove(@optional (win hiGetCurrentWindow()))
      let((transList items sourceCv)
        transList =  reverse(mapcar('lambda((x) car(x)~>transform) geGetHierMemInst(win)))
        items = geGetSelSet()
        sourceCv = geGetEditCellView()
        list(nil 'transList transList 'items items 'sourceCv sourceCv 'win win)
      ) ;let
    ) ;proc


    procedure(myMoveItemsHierarchically(data)
      let((newLevel destCv transList transform)
        newLevel = deGetEditLevel(data->win)
        destCv = geGetEditCellView()
        if(newLevel==0
            transList=data->transList
            transList=reverse(nthcdr(newLevel reverse(data->transList)))
        )
        transform = myConcatTransforms(transList)
        dbReopen(data->sourceCv "a")
        dbReopen(destCv "a")
        foreach(item data->items
            ;use dbMoveFig to move the items
            dbCopyFig(item destCv transform)
        )
        ;dbSave(data->sourceCv)
      ) ;let
    ) ;proc

    procedure(myConcatTransforms(transList)
        let((newTrans trans)
            newTrans=list('(0.0 0.0) "R0" 1.0)
            ;transList is in order from bottom of hierarchy to top
            foreach(trans transList
                newTrans=dbConcatTransform(newTrans trans)
            )
            newTrans
        )
    )

    hiSetBindKey("Layout" "Ctrl<Key>b" "let((data) data=myGetItemsToMove() geReturnToLevel() myMoveItemsHierarchically(data))")

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 13 years ago

    There are many factors that come into play when you want to do this type of operation.

    1. Are you moving shapes from a lower level to the top level, or to some intermediate level of hierarchy?
    2. Is the shape you are moving  placed in an instanced that has multiple placements? If so, this is a more complicated algorithm because you need to make multiple copies of the shape and know all of the locations where it should be placed.
    3. Do you use mosaics in your layout? This complicates the process since getting the transformation information is more complicated.

    Here is some basic code to allow you to move a shape up the hierarchy. It doesn't handle mosaics and only moves the objects for one placement of an instance. In the code below, I used dbCopyFig to copy the data instead of dbMoveFig. This will let you see what is going on without being destructive to the source cellview. If you change it to do a move, you'll need to save the source cellview. I already have the code making the source cellview editable.

    To use this, load the code in your CIW. Edit in place down the hierarchy to your lower level cell. Select the shapes you want to move. Press the ctrl-b bindkey. Choose the level you want to return to. You should have a copy of those shapes at the new level.

    procedure(myGetItemsToMove(@optional (win hiGetCurrentWindow()))
      let((transList items sourceCv)
        transList =  reverse(mapcar('lambda((x) car(x)~>transform) geGetHierMemInst(win)))
        items = geGetSelSet()
        sourceCv = geGetEditCellView()
        list(nil 'transList transList 'items items 'sourceCv sourceCv 'win win)
      ) ;let
    ) ;proc


    procedure(myMoveItemsHierarchically(data)
      let((newLevel destCv transList transform)
        newLevel = deGetEditLevel(data->win)
        destCv = geGetEditCellView()
        if(newLevel==0
            transList=data->transList
            transList=reverse(nthcdr(newLevel reverse(data->transList)))
        )
        transform = myConcatTransforms(transList)
        dbReopen(data->sourceCv "a")
        dbReopen(destCv "a")
        foreach(item data->items
            ;use dbMoveFig to move the items
            dbCopyFig(item destCv transform)
        )
        ;dbSave(data->sourceCv)
      ) ;let
    ) ;proc

    procedure(myConcatTransforms(transList)
        let((newTrans trans)
            newTrans=list('(0.0 0.0) "R0" 1.0)
            ;transList is in order from bottom of hierarchy to top
            foreach(trans transList
                newTrans=dbConcatTransform(newTrans trans)
            )
            newTrans
        )
    )

    hiSetBindKey("Layout" "Ctrl<Key>b" "let((data) data=myGetItemsToMove() geReturnToLevel() myMoveItemsHierarchically(data))")

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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