• 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. How to find pin name using SKILL

Stats

  • State Suggested Answer
  • Replies 2
  • Answers 1
  • Subscribers 19
  • Views 3345
  • Members are here 0
More Content

How to find pin name using SKILL

fithawi
fithawi over 2 years ago

Hi there

How can I find the logical pin name of a symbol using SKILL?

The script below can find the Padstack Name, XY location of the pin, and Pin number. However, I am getting the wrong value for the pin name.

procedure(Diff_Pin_Net()
  prog(( Pin_Log_File padStackN pinName pinNumber pinx piny)
 
   ; Open the log file and print the header info
   ; 
   Pin_Log_File = outfile("./dummy_net_list.log" "w")
   fprintf(Pin_Log_File "\tDummy net logfile\n\n\n")
   fprintf(Pin_Log_File "\tTotal dummy pin: %L\n\n" length(axlDBDummyNet('pin)))
   fprintf(Pin_Log_File "\t%s\t\t%s\t\t%s\t%s\n\n\n" "Padstack Name" "---XY---" "Pin Name" "Pin number")
   
   ; 
   
    foreach( mapc x axlDBDummyNet('pin)
    padStackN = x->name
    pinName = car(car(x)->functionPins)->name
    pinx = car(x->xy)
    piny = cadr(x->xy)
    fprintf(Pin_Log_File "\t %s \t(%.3f %.3f)\t%L\t\t%s\n\n"  padStackN pinx piny pinName axlDbidName(x)))
     
   ; Highlight the dummy pins
   ;
   axlClearSelSet()
   axlCustomColorObject(axlDBDummyNet('pin))

   ; Close the log file, refresh the graphics, and open a viewlog
   ;
   close(Pin_Log_File)
   axlShell("redisplay")
   axlShell("viewlog ./dummy_net_list.log")
  );end prong
  ); end procedure
  • Sign in to reply
  • Cancel
Parents
  • JuanCR
    0 JuanCR over 2 years ago

    Hey fithawi 

    I checked your code and I have these comments for you: 

    fithawi said:
    padStackN = x->name

    This line doesn't look right ... I believe it should be car(x)->name

    fithawi said:
    pinName = car(car(x)->functionPins)->name

    This line I can confirm is right. And I believe this is the one that you're looking for. 

    Just as an example, I tested it on the Cadence Demo board and got this: 

    If you're not getting the right pin name, maybe the error is somewhere else in your design? Let me know if you still have trouble with this. Maybe I can contact you via a private message and discuss it. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • JuanCR
    0 JuanCR over 2 years ago

    Hey fithawi 

    I checked your code and I have these comments for you: 

    fithawi said:
    padStackN = x->name

    This line doesn't look right ... I believe it should be car(x)->name

    fithawi said:
    pinName = car(car(x)->functionPins)->name

    This line I can confirm is right. And I believe this is the one that you're looking for. 

    Just as an example, I tested it on the Cadence Demo board and got this: 

    If you're not getting the right pin name, maybe the error is somewhere else in your design? Let me know if you still have trouble with this. Maybe I can contact you via a private message and discuss it. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • AsbjornEdvalds
    0 AsbjornEdvalds over 2 years ago in reply to JuanCR

    Hi both, 

    I also reviewed this code snippet, and the issue seems arise at the mapc function in the foreach loop. 

    Using the mapc lets the foreach function iterate over each element of the argument list. There is therefore no need to do a car(x)->something since x is a single item from the axlDBDummyNet('pin) list. 

    By changing the pinName = car(car(x)->functionPins)->name to pinName = car(x->functionPins)->name the whole function works as intended. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
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