• 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. Allegro X Scripting - Skill
  3. Skill - access to pins List

Stats

  • State Verified Answer
  • Replies 5
  • Answers 1
  • Subscribers 18
  • Views 5723
  • Members are here 0
More Content

Skill - access to pins List

soll
soll over 3 years ago

Hello,

I am learning to use Skill language to develop scripts to automate some tasks on Cadence Allegro. As a training, I am trying to write a simple script that asks the user to select a symbol, and then the script lists all the pins on that symbol alongside the net name associated with the pin. I am using this very good serie of videos on the Cadence Youtube channel : https://youtu.be/bzXmQYvpCFc

I have some issues understanding how the different interactions between the design, the database and the language itself work. I have these two pieces of code :

axlSetFindFilter(?enabled list("noall" "symbols") ?onButtons list("noall" "symbols"))
axlSingleSelectPoint()
symb = axlGetSelSet()
length(symb~>pins)  -> RETURNS 1
pinsList = nth(0 symb~>pins)
length(pinsList) -> RETURNS THE CORRECT AMOUNT OF PINS

allDBids = axlDBGetDesign()
symb2 = nth(100 allDBids~>components)
length(symb2~>pins) -> RETURNS THE CORRECT AMOUNT OF PINS

As you can see, in the first code, I trigger a selection (forcing it to symbols), then get the result of that selection in a variable (symb), then asks what is the length of the "pins" list. It returns 1, whatever symbol I pick. To get a list with 1 pin per list element, I have to use the nth() function as shown above.
In the second code, I get the design DBids, then pick one (random) symbol in the list, and asks for the length of the "pins" list. It give the correct amount of pins right away.

Does anyone has an idea about what causes the symb~>pins list to have only one element (that is, in fact, the pins list itself) whereas symb2~>pins works as expected ? Maybe I am wrongfully using the axlSingleSelectPoint() function ?

Something I may add : When I try to use -> instead of ~> to access the lists, it returns nil everytime in the first code, but it does work with the second code, and I have absolutely no idea why.

Is there some place where I could find resources about Skill ? Do you know about some forum (else than this one that I don't want to pollute) or facebook group or anything where people discuss about this language ?

Thank you for taking the time to read this, and please excuse English, it isn't my primary language.

  • Cancel
  • Sign in to reply
Parents
  • mahimag
    0 mahimag over 3 years ago

    length(symb~>pins) this is returing 1 because the outout of symb~>pins is a list of list.  For ex: a= symb~>pins will store ((dbid:000001778BC01148 dbid:000001778BC02038 dbid:000001778BC019C8 )) something like this for a 3 pin part. You need to extract the list by using car(a) or nth(0 a) and then use length function on the output.

    b=car(a) should look something like (dbid:000001778BC01148 dbid:000001778BC02038 dbid:000001778BC019C8 ) and then when you use length(b) you should get 3 as output.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • soll
    0 soll over 3 years ago in reply to mahimag

    OK I understand why I only have one result... Thank you for the reply ! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • soll
    0 soll over 3 years ago in reply to mahimag

    OK I understand why I only have one result... Thank you for the reply ! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
Cadence Guidelines

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