• 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 copy cells and still keep their relative position...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 16837
  • 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 copy cells and still keep their relative position?

Renee
Renee over 14 years ago

Hi,

 I had a problem with copy function:

I want to copy certain cells in a cellview to another cellview, but I still want to keep relative position of these cell. How can I do that?

I tried to use dbCopyFig function, but it only works for figures, not cells.

 Thanks in advance!

Lei

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

     Hi Lei,

    If you're copying an instance from one cellView to another, you would need to pass an instance id to dbCopyFig (instances are also figures). I suspect you must be passing the wrong type of object to dbCopyFig? If you cannot get it to work based on what I've just said, please post a snippet of your code (ensure that you include how you got hold of the object you're passing to dbCopyFig).

    Thanks,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Renee
    Renee over 14 years ago
    Here is my procedure:

    procedure(stu_dbcopy()

    cvId = deGetEditCellView()
     
    foreach(inst cvId~>instances

             ;println(inst~>??)

             dbCopyFig(inst cvId list(100:100 "R0"))
     

             );end foreach
     
    );end procedure

    But when I run the program, it reported dbCopyFig invalid figure: db: 57480645

    I don't know how to pass the right data to dbCopyFig.

    Thanks

     
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    You must be using IC5141, and have mosaics in the design (i.e. arrays). The ~>instances will include mosaicInst objects, and these cannot be copied using dbCopyFig, because they are members of the mosaic. Using:

    foreach(inst cvId~>instances
      unless(inst~>objType=="mosaicInst"
        dbCopyFig(inst cvId list(100:100 "R0"))
      )
    )
    foreach(mosaic cvId~>mosaics
      dbCopyFig(mosaic cvId list(100:100 "R0"))
    )

    Will do what you want.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Renee
    Renee over 14 years ago

    Yes, I use IC5141. I took your advice and it worked.

    But I still have some questions about dbCopyFig():

    I tried another procedure shown as below:

    procedure(stu_ge()

    cvId = geGetEditCellView()

    select = geGetSelectedSet()

    println(length(select))foreach(inst select       println(inst)       println(inst~>??)       dbCopyFig(inst cvId list(100:100 "R0")))); end procedure

    In this procedure, I select the same mosaic instance by clicking them in the cellview and do dbCopyFig(). This time, it works fine.

    I don't know why it could copy fig if them are selected using geGetSelectedSet() function, while it fails in the previous program.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    That's because geGetSelectedSet() is returning the mosaic object (i.e. the same as you get from doing cvId~>mosaics) and not the mosaicInst object. As I said before, the mosaicInst is the thing that is being arrayed, not the array itself. You can copy mosaics, but not mosaicInsts.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Renee
    Renee over 14 years ago

     

    These are my thoughts about the two ways realizing copy function; please correct me if I am wrong:

    In the layout, there are three types of cells:

    a single cell; a mosaic cell with one row and one column ; a mosaic cell with two row and two column.

     

    If I go through all these cells with  foreach (inst cvId~>instances , and then the object type of them are "inst", "mosaicInst" and "mosaicInst".

     

    If I go through all these cells with  foreach (inst geGetSelectedSet(), and then the object type of them are "inst", "mosaic" and "mosaic".

     

    I think that it might be the problem:

    When I use the first method to go through these cells, the returning data value is of "mosaicInst" type which dbCopyFig cannot handle, however, in the second method, the geGetSelectedSet() returns data of "mosaic" type, then dbCopyFig can work with it.

     

    In all, the layout is the same, but the difference lies in the data type that each method treats and returns.

     

    Am I right?

     

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago
    Yes, as I've said previously. To get to the mosaics themselves, you need to iterate over cvId~>mosaics - this will find the "mosaic" objects. Since the selected set can contain shapes, mosaics, instances (and in IC61 a few other object types) you need to look in several places in the database to find them.

    You cannot (to repeat again) copy mosaicInst objects because these are the things being arrayed rather than the array itself. Effectively they are instantiated _within_ the mosaic.

    Regards,

    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