• 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. List forming was changed in IC 6.1.5.65?

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 13913
  • 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

List forming was changed in IC 6.1.5.65?

Slayer
Slayer over 14 years ago

 Hi all!

Could u pls. help me with  one issue. The questionis, that succession of shapes in list is change in IC6.1.5.65. I try to clarify this moment.

In pcell I use some subCells, after that pull up need shepes and forming list formshapes

example:

[CODE]

        shapesToCopy = setof(i car(instances)->master->shapes i->up||i->conn);
        foreach(i if(oddp(ng) cdr(reverse(instances)) instances)
            foreach(s shapesToCopy
                dbCopyFig(s pcCV list(i->xy "R0"));
            );
        );

[/CODE]

after that according to property on shapes I sort it in lists

[CODE] 

         foreach(s setof(i pcCV->shapes i->conn)
            case(s->conn
                ("gTop"
                    gatesTop = cons(s gatesTop);
                )
                ("gBot"
                    gatesBot = cons(s gatesBot);
                )
                ("sub"
                    substrates = cons(s substrates);
                )
            );end case
        );end foreach

[/CODE]

And In cdb version (on this version all works fine)  I have succession of shapes which were builded from left to right, but in IC6.1.5.65 shape which was on first position now on second, wich was on 4 position now on 3 and etc.

What's wrong? What were changed, and how to use pcells which were created under cdb version?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    What's wrong is your assumption that the database is ordered. It never was in CDB and is not in OA either.

    Whilst empirically you may have observed that the data appeared to be ordered (possibily in the order it was created?) that was never a reasonable assumption - it is not documented as such, and having your code dependent upon some observed behaviour was asking for trouble. The underlying database could have been changed at any time for optimization reasons, and then things would have get messed up. Even doing simple operations on the database (in CDB) can cause the order to change.

    If you want the lists in an order sorted from left to right, use the sort() function to do that, with a comparison function which compares the coordinates. That's the only safe way of doing this.

    Regards,

    Andrew.

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

     Yes, function sort() is work around for this case, but I have a lot of devices in library, and now I must change a lot of pcell code and make db compare of layout to be insured that will no impacts for designers.

    Simple when we create shapes they have id number which increased step to step and when we takes shapes for process, for example: ccv()->shapes, I think this list should have shapes already sorted by id number isn't it? 

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

    No, that is also not a valid assumption. For a start, the database ids will not remain the same from one session to the next. There is no guarantee that they will come out in the same order.

    In CDB there was a command to "compact" the database (similar to a defragment). In OA something similar happens automatically, so you can find the database order changing even with just a save.

    As I said before, the database is unordered, and so you should never treat it as ordered.

    It's unfortunate that your code will need changing, but it's because your code was incorrect in the first place and based in an invalid assumption. Using sort() is not a workaround, it's how the code should have been written in the first place.

    Apologies if this is a little harsh, but you should never write code based on emperical assumptions and expect it to work through different versions, let alone when the underlying database has changed completely.

    Regards,

    Andrew.

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

     Ok, thx. for u explanation .

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Austin CAD Guy
    Austin CAD Guy over 14 years ago

    OA backfills released memory when new shapes are created, this means that the shapes you create are not always found in the creation order. This was documented in the adoption guide. 

    If you go back to the code creating the shapes, you can use create ROD objects and have them named according to their position. Then you can sort by the ROD names.

    Ted

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

    Thx. for the one more solution, but I have already fixed all through sort function.

     sortShapeList = sort(unsortShapeList lambda((a b) caar(a~>bBox) > caar(b~>bBox)));

     

    • 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