• 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. Select schematic instance from instance iterations

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 14485
  • 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

Select schematic instance from instance iterations

Brouns Robin
Brouns Robin over 14 years ago

 Hello,

I have a question, how do i select in SKILL a single instance from a
instance?

This is my situation:
I have a schematic with a instance I5<153:0> and this instance has 7
pins.
Connected to these pins are nets with "complex" net names.
Like
this :"<*4>(<*16>coladdr<4>,<*16>coladdr_<4>),<*16>coladdr<4>,<*10>coladdr_<4>".

I wanted to make a generic skill script that selects each iteration
(e.g. I5<15>) and generate a via matrix to forsee the correct connects
at his pins in layout.

However I have difficulties finding the right attribute to get the
list of the iterations.

This is how far i got:
libName = "my_lib"
cellName = "my_cell"

targetInstanceName= "my_instname<153:0>"

cvId=dbOpenCellViewByType(libName cellName "schematic" "schematic"
"r");

instList=cvId~>instances;

n=length(instList);
targetPosition=0;
for( index 0 n
        if(nth(index instList)~>name == targetInstanceName
        then
                targetPosition=index;
        )
)

targetInstance=nth(targetPosition instList);

From here i wanted to make an array from the iterations as objects and
then see what the connections should be for each pin.

Thanks for your help,

Robin
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    I answered this over on comp.cad.cadence - but for completeness, including reply here too:

    > Hi Robin,
    >
    > Could you explain what data structure do you want to have at the end ?
    > And I think that the code that you wrote above can be replaced with
    > targetInstance = dbGetInstByName(cvId targetInstanceName)
    >
    > At least it is (much) faster.
    >
    > BR,
    > Marcel

    I agree with Marcel - the way you're doing it is terribly inefficient. First of all you're treating the list you have as an array - it is NOT random access, and so you are having to do a sequential search from the beginning of the list each time you call nth(), and so that loop will be doing (roughly) N2/2 (where N is the number of instances). A foreach loop would be better, but best is the dbGetInstByName() function.

    Then you probably want:

    dbGetMemName(targetInstanceName 23) => "my_instname<130>"

    or

    dbProduceMemName(targetInstanceName)
    ("my_instname<153>" "my_instname<152>" "my_instname<151>" "my_instname<150>" "my_instname<149>"
        "my_instname<148>" "my_instname<147>" "my_instname<146>" "my_instname<145>" "my_instname<144>"
        "my_instname<143>" "my_instname<142>" "my_instname<141>" "my_instname<140>" "my_instname<139>" ... )

    dbGetNameNumBit(targetInstanceName) => 154

    could be useful too.

    You can use these same functions on the expression "<*4>(<*16>coladdr<4>,<*16>coladdr_<4>),<*16>coladdr<4>,<*10>coladdr_<4>" too. For example:

    dbGetMemName("<*4>(<*16>coladdr<4>,<*16>coladdr_<4>),<*16>coladdr<4>,<*10>coladdr_<4>" 23) => "coladdr_<4>"

    Regards,

    Andrew.
     

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

    I answered this over on comp.cad.cadence - but for completeness, including reply here too:

    > Hi Robin,
    >
    > Could you explain what data structure do you want to have at the end ?
    > And I think that the code that you wrote above can be replaced with
    > targetInstance = dbGetInstByName(cvId targetInstanceName)
    >
    > At least it is (much) faster.
    >
    > BR,
    > Marcel

    I agree with Marcel - the way you're doing it is terribly inefficient. First of all you're treating the list you have as an array - it is NOT random access, and so you are having to do a sequential search from the beginning of the list each time you call nth(), and so that loop will be doing (roughly) N2/2 (where N is the number of instances). A foreach loop would be better, but best is the dbGetInstByName() function.

    Then you probably want:

    dbGetMemName(targetInstanceName 23) => "my_instname<130>"

    or

    dbProduceMemName(targetInstanceName)
    ("my_instname<153>" "my_instname<152>" "my_instname<151>" "my_instname<150>" "my_instname<149>"
        "my_instname<148>" "my_instname<147>" "my_instname<146>" "my_instname<145>" "my_instname<144>"
        "my_instname<143>" "my_instname<142>" "my_instname<141>" "my_instname<140>" "my_instname<139>" ... )

    dbGetNameNumBit(targetInstanceName) => 154

    could be useful too.

    You can use these same functions on the expression "<*4>(<*16>coladdr<4>,<*16>coladdr_<4>),<*16>coladdr<4>,<*10>coladdr_<4>" too. For example:

    dbGetMemName("<*4>(<*16>coladdr<4>,<*16>coladdr_<4>),<*16>coladdr<4>,<*10>coladdr_<4>" 23) => "coladdr_<4>"

    Regards,

    Andrew.
     

    • 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