• 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 check BGA minimum pitch using Allegro Skill lang...

Stats

  • State Not Answered
  • Replies 5
  • Subscribers 20
  • Views 544
  • Members are here 0
More Content

How to check BGA minimum pitch using Allegro Skill language

BZ202408076026
BZ202408076026 20 days ago

I want to check BGA minimum pitch. If BGA pitch is less than 0.5mm, need to highlight these BGA in PCB layout. Does anyone have experience to write script to do the check?

  • Sign in to reply
  • Cancel

Top Replies

  • SG20260713408
    SG20260713408 20 days ago +1
    안녕하세요.. 아래 코드가 도움이 되시길 바랍니다. 1. BGA 핀 PITCH가 정사각형 모양일 경우만 해당됩니다. 2. 정사각형이므로 핀 2개만 체크하여 결과를 출력합니다. 3. 코드입니다. Hoangkhoipcb 님의 코드를 일부 인용했습니다. 4. 명령어는 min_pitch_bga 이며 체크할 pitch값을 수정하고 싶으시면 min_pitch_bga…
Parents
  • SG20260713408
    0 SG20260713408 20 days ago

    안녕하세요.. 

    아래 코드가 도움이 되시길 바랍니다.

    1. BGA 핀 PITCH가 정사각형 모양일 경우만 해당됩니다.

    2. 정사각형이므로 핀 2개만 체크하여 결과를 출력합니다.

    3. 코드입니다. Hoangkhoipcb 님의 코드를 일부 인용했습니다.

    4. 명령어는 min_pitch_bga 이며

        체크할 pitch값을 수정하고 싶으시면 

       min_pitch_bga 0.9 를 사용하시면됩니다.

    axlCmdRegister("min_pitch_bga" 'min_pitch_bga ?cmdType "interactive")

    procedure(min_pitch_bga(@optional (argu_bga_pitch "0.5") "S")

    let((min_bga_pitch total_count symbols symbol_refdes sym_pins

    sym_pins all_pin_numbers a1_pin a2_pin a3_pin a4_pin a1_a2_dis a2_a3_dis a3_a4_dis)


    min_bga_pitch = atof(argu_bga_pitch)

    total_count = 0

    symbols = setof(e axlDBGetDesign() -> symbols e -> type == "PACKAGE" && length(e -> pins) > 10)

    foreach(symbol symbols

    symbol_refdes = symbol -> refdes

    sym_pins = symbol -> pins

    all_pin_numbers = sym_pins ~> number

    a1_pin = car(member("A1" all_pin_numbers))

    a2_pin = car(member("A2" all_pin_numbers))

    a3_pin = car(member("A3" all_pin_numbers))

    a4_pin = car(member("A4" all_pin_numbers))

    if(a1_pin && a2_pin then

    a1_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a1_pin)))

    a2_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a2_pin)))

    a1_a2_dis = axlDistance(a1_pin -> xy a2_pin -> xy)

    when(a1_a2_dis < min_bga_pitch

    axlHighlightObject(symbol)

    total_count = ++total_count

    printf("RefDes(%s) , Pitch(%f)\n" symbol_refdes a1_a2_dis)

    )

    else

    if(a2_pin && a3_pin then

    a2_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a2_pin)))

    a3_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a3_pin)))

    a2_a3_dis = axlDistance(a2_pin -> xy a3_pin -> xy)

    when(a2_a3_dis < min_bga_pitch

    axlHighlightObject(symbol)

    total_count = ++total_count

    printf("RefDes(%s) , Pitch(%f)\n" symbol_refdes a2_a3_dis)

    )

    else

    if(a3_pin && a4_pin then

    a3_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a3_pin)))

    a4_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a4_pin)))

    a3_a4_dis = axlDistance(a3_pin -> xy a4_pin -> xy)

    when(a3_a4_dis < min_bga_pitch

    axlHighlightObject(symbol)

    total_count = ++total_count

    printf("RefDes(%s) , Pitch(%f)\n" symbol_refdes a3_a4_dis)

    )

    )

    )

    )

    )

    printf("Min_BGA_Pitch(%f) - Checking Symbol Count = %d\n" min_bga_pitch total_count)

    )

    )

    이상입니다.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • SG20260713408
    0 SG20260713408 20 days ago

    안녕하세요.. 

    아래 코드가 도움이 되시길 바랍니다.

    1. BGA 핀 PITCH가 정사각형 모양일 경우만 해당됩니다.

    2. 정사각형이므로 핀 2개만 체크하여 결과를 출력합니다.

    3. 코드입니다. Hoangkhoipcb 님의 코드를 일부 인용했습니다.

    4. 명령어는 min_pitch_bga 이며

        체크할 pitch값을 수정하고 싶으시면 

       min_pitch_bga 0.9 를 사용하시면됩니다.

    axlCmdRegister("min_pitch_bga" 'min_pitch_bga ?cmdType "interactive")

    procedure(min_pitch_bga(@optional (argu_bga_pitch "0.5") "S")

    let((min_bga_pitch total_count symbols symbol_refdes sym_pins

    sym_pins all_pin_numbers a1_pin a2_pin a3_pin a4_pin a1_a2_dis a2_a3_dis a3_a4_dis)


    min_bga_pitch = atof(argu_bga_pitch)

    total_count = 0

    symbols = setof(e axlDBGetDesign() -> symbols e -> type == "PACKAGE" && length(e -> pins) > 10)

    foreach(symbol symbols

    symbol_refdes = symbol -> refdes

    sym_pins = symbol -> pins

    all_pin_numbers = sym_pins ~> number

    a1_pin = car(member("A1" all_pin_numbers))

    a2_pin = car(member("A2" all_pin_numbers))

    a3_pin = car(member("A3" all_pin_numbers))

    a4_pin = car(member("A4" all_pin_numbers))

    if(a1_pin && a2_pin then

    a1_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a1_pin)))

    a2_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a2_pin)))

    a1_a2_dis = axlDistance(a1_pin -> xy a2_pin -> xy)

    when(a1_a2_dis < min_bga_pitch

    axlHighlightObject(symbol)

    total_count = ++total_count

    printf("RefDes(%s) , Pitch(%f)\n" symbol_refdes a1_a2_dis)

    )

    else

    if(a2_pin && a3_pin then

    a2_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a2_pin)))

    a3_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a3_pin)))

    a2_a3_dis = axlDistance(a2_pin -> xy a3_pin -> xy)

    when(a2_a3_dis < min_bga_pitch

    axlHighlightObject(symbol)

    total_count = ++total_count

    printf("RefDes(%s) , Pitch(%f)\n" symbol_refdes a2_a3_dis)

    )

    else

    if(a3_pin && a4_pin then

    a3_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a3_pin)))

    a4_pin = car(axlSelectByName("PIN" strcat(symbol_refdes "." a4_pin)))

    a3_a4_dis = axlDistance(a3_pin -> xy a4_pin -> xy)

    when(a3_a4_dis < min_bga_pitch

    axlHighlightObject(symbol)

    total_count = ++total_count

    printf("RefDes(%s) , Pitch(%f)\n" symbol_refdes a3_a4_dis)

    )

    )

    )

    )

    )

    printf("Min_BGA_Pitch(%f) - Checking Symbol Count = %d\n" min_bga_pitch total_count)

    )

    )

    이상입니다.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • BZ202408076026
    0 BZ202408076026 18 days ago in reply to SG20260713408

    Hi SG20260713408 ,

    I have tried the script and it works well. Many thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Hoangkhoipcb
    0 Hoangkhoipcb 16 days ago in reply to SG20260713408

    Hi SG20260713408,

    Whenever you have some free time, I’d love to connect and discuss automation and skill development. I really appreciate your time.

    BR

    HoangKhoi

    • 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.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information