• 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. Skill access functions for schematic instances

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 15513
  • 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

Skill access functions for schematic instances

CADcasualty
CADcasualty over 6 years ago

I have a library of cells that are dangerously close to being able to have a universal cdf i.e. most of these cells currently just have a unix link to a master cdf. I have a couple questions about hopefully making that universal cdf a reality. I'll also preface this by saying skill coding isn't a great strength of mine and I often find myself lost in the quasi-infinite number of bewilderingly named skill functions available within the Cadence world.

1. Is there a skill function that, if given a library/cell/schematic view, can extract an instance within that schematic that has a specific name, e.g. mn1, and return the library and cell name for that instance.
2. Similar to above, is there a skill function that can access an instance within the schematic that has embedded useful information e.g. a piece of note text with a unique prefix followed by something useful that can be parsed (which I'll take care of). That note instance would only exist for the purposes of holding that information.

Even if the above is doable, I'm possibly going about doing what I'm trying to do in an obtuse way - I'm certainly open to other suggestions...

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    I don't think I understand what you mean by having a "unix link to a master cdf". The CDF is stored in the cell or library property bag (the "data.dm") and you really wouldn't want that to be shared across multiple cells - there are certainly other cell-specific non-CDF properties that could be stored there. Even with the CDF, do all your cells have the same properties and same terminals?

    Anyway, to (try to) answer your questions:

    1. inst=dbFindAnyInstByName(cvId "MN1") ; assuming it was MN1
      inst~>libName
      inst~>cellName
    2. I'm not sure what you mean by "embedded useful information" - i.e. where is this "note text"?

    It's unclear to me what you're actually trying to do here or why...

    Regards,

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • CADcasualty
    CADcasualty over 6 years ago in reply to Andrew Beckett

    Only because I don't have time to properly explain my full setup at this moment (but I will do so), would you mind please further clarifying a couple things:

    1. When I do:

    inst=dbFindAnyInstByName(cvId "MN1")

    I get an error because my cvld isn't right (in truth, I'm very fuzzy on all this). I thought I'd be good by starting with a pointer to the schematic and requesting info about MN1 from there, i.e.:

     ddGetObj("myLib" "my_cell" "schematic") gets me a handle to the schematic but I didn't know how to take that return value to get access to details about MN1

    By some horsing around I see I can do:

    ddGetObj( "myLib" "myCell" )

    inst=dbFindAnyInstByName(geGetEditCellView() "MN1")

    but something about that seems too unpleasingly "indirect" (can't think of the right word) to get what I'm after. If that's the correct way to go about this then so be it.

    2. By "embedded useful information" I mean the schematic could contain a note text (Create -> Note -> Text) e.g. "Cell Specific Info: 42" and I would look for the unique prefix "Cell Specific Info: " and be able to parse out the number I want after that. The idea is that it would be beneficial to be able to read the number "42" when viewing the cell (instead of being hidden away somewhere within the cell's database world). 

    I do appreciate that all of this seems very obtuse without the full description of what my setup is. Please bear with me until I can put together a good description for you. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • drdanmc
    drdanmc over 6 years ago in reply to CADcasualty

    You'll need the dbId for the cell view so something like this

    cvId = dbOpenCellViewByType("myLib" "myCell" "schematic" "" "r")

    inst = dbFindAnyInstByName(cvId "MN1")

    You can also iterate over instances.  For example:

    foreach(inst cvId~>instances

     printf("%L is an instance of %L\n" inst~>name inst~>cellName)

    )

    If you want to iterate over labels in a schematic, you can do something like this:

    foreach(i setof(X cvId~>shapes X~>objType=="label" && ! X~>parent )

      printf("at %L:  text = %L\n" i~>xy  i~>theLabel)

    )

    "setof()" is a very useful thing to be comfortable with.  The "&& ! X~>parent" is finding unattached labels because I didn't want to pick up net labels although this would also skip labels attached to a note shape.

    The simple version of the dd* functions are they do things that you'd do in the library manager.  I.e. tell me the libraries, tell me the cells in a library, tell me the views and files in a cell, etc.  But to actually look in the database for a cellview, you need the db* functions.

    -Dan

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • CADcasualty
    CADcasualty over 6 years ago in reply to drdanmc

    That's fantastic, Dan :-). I really appreciate you providing the additional background into how these functions work. Very helpful!!

    • 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