• 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. extracting pad stack information through skill scriptin...

Stats

  • State Verified Answer
  • Replies 5
  • Subscribers 18
  • Views 3221
  • Members are here 0
More Content

extracting pad stack information through skill scripting

archanav
archanav over 1 year ago

Hi Dave, i used the below functions to get the pad dimension and solder mask value provided in the pad stack editor. using both I am not getting the required output. Please let me know what i need to do to get the pad size given in the design layer section under regular pad column and solder mask value given in the mask layer (top/bottom) in mm.

skill > padStackId=axlLoadPadstack("Padstack name")

skill> pad=axlDBGetPad(padStackId "layer" "regular")

  • Cancel
  • Sign in to reply
  • DavidJHutchins
    0 DavidJHutchins over 1 year ago

    pad=axlDBGetPad(padStackId "ETCH/TOP" "regular")

    pad=axlDBGetPad(padStackId "PIN/SOLDERMASK_TOP" "regular")

    (llx = (caar((pad->bBox)) + (xCoord (pad->offset))))
    (lly = (cadar((pad->bBox)) + (yCoord (pad->offset))))
    (urx = (caadr((pad->bBox)) + (xCoord (pad->offset))))
    (ury = (cadadr((pad->bBox)) + (yCoord (pad->offset))))
    (Dx = (urx - llx))
    (Dy = (ury - lly))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • archanav
    0 archanav over 1 year ago in reply to DavidJHutchins

    Hi David,

    thanks for your reply. sorry for asking you again. i executed like this. but I want in x and y dimension values whatever we had given in pad stack editor and that to in mm. and i also i  tried like this by importing the il file but not getting the output what I required.

      file

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DavidJHutchins
    +1 DavidJHutchins over 1 year ago in reply to archanav

    Below is  some sample code that reports the pad info in MM units:

    procedure(get_pad_info()
        let((popup pad llx lly urx ury Dx Dy)
           popup = axlUIPopupDefine( nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun)))
            axlUIPopupSet( popup)
            axlSetFindFilter( ?enabled list("noall") ?onButtons "noall")
            axlSetFindFilter( ?enabled list("pins" "vias") ?onButtons list("pins" "vias"))
            axlMKSConvert(nil "MM")
            (while axlSelect()
                progn(
                    (pad = axlDBGetPad(car(axlGetSelSet()) "etch/top" "regular"))
                    (llx = (caar((pad->bBox)) + (xCoord (pad->offset))))
                    (lly = (cadar((pad->bBox)) + (yCoord (pad->offset))))
                    (urx = (caadr((pad->bBox)) + (xCoord (pad->offset))))
                    (ury = (cadadr((pad->bBox)) + (yCoord (pad->offset))))
                    (Dx = (urx - llx))
                    (Dy = (ury - lly))
                    if( ((pad->figureName) == "CIRCLE") || ((pad->figureName) == "OCTAGON")  || ((pad->figureName) == "SQUARE")  || ((pad->figureName) == "DONUT") then
                       axlMsgPut("Pad figure type : %s size %fmm\n" pad->figureName Dx)
                    else
                       if( ((pad->figureName) == "RECTANGLE") || ((pad->figureName) == "OBLONG_X") || ((pad->figureName) == "OBLONG_Y") || ((pad->figureName) == "ROUNDED_RECTANGLE")  || ((pad->figureName) == "CHAMFERED_RECTANGLE") then
                          axlMsgPut("Pad figure type : %s width %fmm height %fmm\n" pad->figureName Dx Dy)
                       else
                          axlMsgPut("Pad figure type : %s Unknown Size\n" pad->figureName )
                       )
                    )
                    (pad = axlDBGetPad(car(axlGetSelSet()) "PIN/SOLDERMASK_TOP" "regular"))
                    (llx = (caar((pad->bBox)) + (xCoord (pad->offset))))
                    (lly = (cadar((pad->bBox)) + (yCoord (pad->offset))))
                    (urx = (caadr((pad->bBox)) + (xCoord (pad->offset))))
                    (ury = (cadadr((pad->bBox)) + (yCoord (pad->offset))))
                    (Dx = (urx - llx))
                    (Dy = (ury - lly))
                    if( ((pad->figureName) == "CIRCLE") || ((pad->figureName) == "OCTAGON")  || ((pad->figureName) == "SQUARE")  || ((pad->figureName) == "DONUT") then
                       axlMsgPut("Paste figure type : %s size %fmm\n" pad->figureName Dx)
                    else
                       if( ((pad->figureName) == "RECTANGLE") || ((pad->figureName) == "OBLONG_X") || ((pad->figureName) == "OBLONG_Y") || ((pad->figureName) == "ROUNDED_RECTANGLE")  || ((pad->figureName) == "CHAMFERED_RECTANGLE") then
                          axlMsgPut("Paste figure type : %s width %fmm height %fmm\n" pad->figureName Dx Dy)
                       else
                          axlMsgPut("Paste figure type : %s Unknown Size\n" pad->figureName )
                       )
                    )
                )
            )
        )
    )

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • archanav
    0 archanav over 1 year ago in reply to DavidJHutchins

    Hi David, Thanks for your great support and thanks for sharing this. This is working well for all types of pins. and I added the code part to get the bottom layer pins information and paste mask value information. Currently I am working on fetching the line segments width present in package geometry assembly and silkscreen layer and changing as per my requirement through script only. for this one i am using cwidth.il file but there I changed the layer name and did some of the modifications. still not able to achieve my requirement. I attached my file here please see and let me know where I am missing. Assy_silk_width.zip

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • DavidJHutchins
    0 DavidJHutchins over 1 year ago in reply to archanav

    Below is some info on getting pin info I found by looking at old postings:

    - You can get the internal definition (DEFAULT INTERNAL) by doing using the 'internal symbol as the 2nd arg to GetPad

              pad = axlDBGetPad(pin 'internal "REGULAR")

    - For toleranace you need to access the padstack. For example if you have a pin dbid assigned to variable "pin". Then you would:

         def = pin->definition     ; get padstack

         ; tolerance is represented as a list of (+tol -tol) in design units (float)  

          printf("tol %L\n" def->holeTolerance)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify 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