• 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 PCB Editor
  3. PIN select issue

Stats

  • Replies 7
  • Subscribers 159
  • Views 14507
  • Members are here 0
More Content

PIN select issue

catalineacsu
catalineacsu over 9 years ago

Hello,


I am working on a skill that generates a report with vias in pad but I am having problems using the single select function. It selects pins that are not overlapping the via but instead are 20 mils away. When I am running running the code line by line it works fine. If anyone spots a mistake please let me know. Or a workaround better than axlSingleSelectBox, which works better but not perfect...

The logic behind it is:

1. turn on vias and pads on one side of the pcb

2. select all visible vias

3. parse the list and select the pins overlapping the center of the via

4. report the result

The code is below (please forgive minor mistakes in the code if any. I have a 99% working code implemented with axlSingleSelectBox function and the one below is recreated from memory):

    axlWindowFit()
    axlVisibleDesign(nil)
    axlVisibleLayer("PIN/TOP" t)
    axlVisibleLayer("VIA CLASS/TOP" t)
    axlUIWRedraw(nil)
    
    axlClearSelSet()
    axlSetFindFilter(?enabled '(noall VIAS) ?onButtons '(noall VIAS))
    topvias = axlGetSelSet(axlAddSelectAll())
   

    axlClearSelSet()
    axlSetFindFilter(?enabled '(noall PINS) ?onButtons '(noall PINS))
    foreach(via topvias
        axlAddSelectPoint() ; this is the line that is not working!!!
    )

    vippinlist = axlGetSelSet()
    axlClearSelSet()

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 9 years ago

    Try using axlAddSelectPoint(via ->xy)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • catalineacsu
    catalineacsu over 9 years ago

    Dave,

    sorry for the typo.

    that is exactly the syntax I used.

    It has the same faulty behavior with window select function, although the number of failures is significantly lower.

    regards,

    catalin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • catalineacsu
    catalineacsu over 9 years ago
    and the fragment from the routine I use now: axlSetFindFilter(?enabled '(noall VIAS) ?onButtons '(noall VIAS))
    bottomvias = axlGetSelSet(axlAddSelectAll())
    axlClearSelSet()
    fprintf(Log_File "\n\nBottom VIPs:\n")
    fprintf(Log_File "Location\n\n")
    axlSetFindFilter(?enabled '(noall PINS) ?onButtons '(noall PINS))
    foreach(via bottomvias
    Xvia = xCoord(via->xy)
    Yvia = yCoord(via->xy)
    LL = list((Xvia - halfwindow) (Yvia - halfwindow))
    UR = list((Xvia + halfwindow) (Yvia + halfwindow))
    BB = list(LL UR)
    ;axlClearSelSet()
    if(axlSingleSelectBox(BB) == t then
    fprintf(Log_File "%s @ \t (%.2n %.2n )\n" via->name xCoord(via->xy) yCoord(via->xy))
    )
    )
    axlClearSelSet()
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • B Bruekers
    B Bruekers over 9 years ago

    Try this piece of code:

    ;first get only pins which are not through-hole
    l_pins= tconc(nil nil)
    foreach(symb axlDBGetDesign()->symbols foreach(pin symb->pins unless(pin->isThrough l_pins= tconc(l_pins pin))))
    ;make a flat list, remove nil
    l_pins= remq(nil car(l_pins))

    axlVisibleDesign(nil)
    axlSetFindFilter(?enabled '("NOALL" "VIAS") ?onButtons '("NOALL" "VIAS"))
    l_padvia = tconc(nil nil)
    foreach(pin l_pins
    if(car(pin->startEnd)=="ETCH/BOTTOM"
    then lay= "ETCH/BOTTOM", axlVisibleLayer( "VIA CLASS/TOP" nil), axlVisibleLayer( "VIA CLASS/BOTTOM" t)
    else lay= "ETCH/TOP", axlVisibleLayer( "VIA CLASS/TOP" t), axlVisibleLayer( "VIA CLASS/BOTTOM" nil)
    )
    poly = car( axlPolyFromDB(pin ?layer lay))
    pinxy= pin->xy
    when(poly
    axlClearSelSet()
    ;make small selection around pin, only continue when a via found
    when(axlSingleSelectBox(poly->bBox)
    l_vias = axlGetSelSet()
    foreach(via l_vias
    ;check if via is within the pin poly, if so add to list
    when(axlGeoPointInShape(via->xy poly) l_padvia = tconc(l_padvia via))
    )
    )
    )
    )
    l_padvia= remq(nil car(l_padvia))
    axlClearSelSet()
    ;l_padvia contains a list of via DBID which are in pad.
    pprint(length(l_padvia))
    pprint(l_padvia)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • catalineacsu
    catalineacsu over 9 years ago

    Hello B Bruekers,

    I thought of doing it the other way round, as you suggested and I am sure that is a good option to solve at least a part of my problem. However, going that way has some disadvantages:

    1. for the large rectangular pins which are placed at 45 degree there is some room for error as well, as some vias can "hide" in the corner of the bounding box

    2. it moves my attention from the interesting problem I found. As I said, with window select, the failure rate dropped (from 50% to about 1%), which is somehow acceptable.

    3. the code moves away from the elegant and optimized solution I initially had in mind, select the vias and then select the pads that contain the center of the via, transforming 2 lines of code in 15 or more.

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