• 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. PAD on VIA.

Stats

  • Replies 12
  • Subscribers 18
  • Views 14401
  • Members are here 0
More Content

PAD on VIA.

karthikeyan123
karthikeyan123 over 6 years ago

I am new to skill can you help me. I want to highlight the pad where the via in the pad. Can you share me the skill code

  • Cancel
  • Sign in to reply
Parents
  • eDave
    eDave over 6 years ago

    Try the attached code. It's not very efficient but should give you an idea about where to start.

    defun( DE_viaInPinList ()
    let((vias, symSide, layer, pad, padPoly, viaInPinList, outPort)
    axlSetFindFilter(?enabled '("noall", "invisible", "vias"), ?onButtons '("noall", "vias"))
    axlAddSelectAll()
    vias = axlGetSelSet()
    foreach(sym, axlDBGetDesign() ->symbols
    foreach(pin, setof(pin, sym ->pins, !pin ->isThrough)
    symSide = if(sym ->isMirrored, "BOTTOM", "TOP")
    layer = strcat("ETCH/", symSide)
    pad = axlDBGetPad(pin, layer, "REGULAR")
    when(pad ->figure
    padPoly = car(axlPolyFromDB(pin, ?layer layer, ?padType 'REGULAR))
    when(padPoly && exists(via, vias, axlGeoPointInShape(via ->xy, padPoly) && memv(layer, via ->startEnd))
    viaInPinList = cons(list(symSide, pin ->xy), viaInPinList)
    )
    )
    )
    )
    if(viaInPinList then
    outPort = axlDMOpenFile("MISC", "ViaInPadReport.txt", "w")
    foreach(side, '("TOP", "BOTTOM")
    fprintf(outPort, "%s:\n", side)
    foreach(pin, setof(pin, viaInPinList, car(pin) == side)
    fprintf(outPort, "\t%L\n", cadr(pin))
    )
    )
    axlDMClose(outPort)
    axlUIViewFileCreate("ViaInPadReport.txt", "Via-in-Pad Report", nil, 20:30)
    else
    axlUIConfirm("No via-in-pad found")
    )
    ))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eDave
    eDave over 6 years ago

    Try the attached code. It's not very efficient but should give you an idea about where to start.

    defun( DE_viaInPinList ()
    let((vias, symSide, layer, pad, padPoly, viaInPinList, outPort)
    axlSetFindFilter(?enabled '("noall", "invisible", "vias"), ?onButtons '("noall", "vias"))
    axlAddSelectAll()
    vias = axlGetSelSet()
    foreach(sym, axlDBGetDesign() ->symbols
    foreach(pin, setof(pin, sym ->pins, !pin ->isThrough)
    symSide = if(sym ->isMirrored, "BOTTOM", "TOP")
    layer = strcat("ETCH/", symSide)
    pad = axlDBGetPad(pin, layer, "REGULAR")
    when(pad ->figure
    padPoly = car(axlPolyFromDB(pin, ?layer layer, ?padType 'REGULAR))
    when(padPoly && exists(via, vias, axlGeoPointInShape(via ->xy, padPoly) && memv(layer, via ->startEnd))
    viaInPinList = cons(list(symSide, pin ->xy), viaInPinList)
    )
    )
    )
    )
    if(viaInPinList then
    outPort = axlDMOpenFile("MISC", "ViaInPadReport.txt", "w")
    foreach(side, '("TOP", "BOTTOM")
    fprintf(outPort, "%s:\n", side)
    foreach(pin, setof(pin, viaInPinList, car(pin) == side)
    fprintf(outPort, "\t%L\n", cadr(pin))
    )
    )
    axlDMClose(outPort)
    axlUIViewFileCreate("ViaInPadReport.txt", "Via-in-Pad Report", nil, 20:30)
    else
    axlUIConfirm("No via-in-pad found")
    )
    ))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • karthikeyan123
    karthikeyan123 over 6 years ago in reply to eDave

    Thank you so much dave.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • karthikeyan123
    karthikeyan123 over 6 years ago in reply to eDave

    Hai dave

    It shows only fully filled vias in the pad but i need to show if it liitle bit touched in the pad  that also need to show.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • karthikeyan123
    karthikeyan123 over 6 years ago in reply to eDave

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • luanvn81
    luanvn81 over 6 years ago in reply to karthikeyan123

    Hi, try this  code

    axlCmdRegister( "VOP" `VOP)
    (defun VOP ()
    axlShell("redisplay")
    originalVisible = axlVisibleGet()
    designName = axlCurrentDesign()
    design_path = axlGetDrawingName()
    design_unit = car(axlDBGetDesignUnits())
    err_count = 0
    All_syms = list()

    ;#### Open temp files to work on ####
    writeOutFile = outfile("./Via_on_pad_report.log" "w")
    timeperform = fileTimeModified("Via_on_pad_report.log")
    fprintf(writeOutFile, "Design name: %s\n", design_path)
    fprintf(writeOutFile, "%s %s\n\n", "Check Date: ", timeToString(timeperform))
    fprintf(writeOutFile, "%s\n", "------------------------------------------------")
    fprintf(writeOutFile, "%-8s %-8s %-18s\n\n", "Symbol", "Layer", "Drc Location")

    foreach(sym, axlDBGetDesign()->symbols
    sym_refdes = sym->refdes
    Sym_side = if(sym->isMirrored, "BOTTOM", "TOP");end if
    Sym_pins = sym->pins

    axlVisibleDesign(nil)
    ;axlVisibleLayer(strcat("PIN/", Sym_side t))
    axlVisibleLayer(strcat("VIA CLASS/", Sym_side) t)
    ;axlShell("redisplay")
    axlSetFindFilter(?enabled '(NOALL VIAS) ?onButtons '(NOALL VIAS))
    axlClearSelSet()
    foreach(pin Sym_pins
    pin_pad = axlDBGetPad(pin, strcat("ETCH/", Sym_side), "REGULAR")
    pin_pad_bBox = pin_pad->bBox
    pin_bBox_chk = list(axlMXYAdd(pin->xy car(pin_pad_bBox)) axlMXYAdd(pin->xy lastelem(pin_pad_bBox)))
    data_in_box = axlGetSelSet(axlSingleSelectBox(pin_bBox_chk))
    axlClearSelSet()
    foreach(via data_in_box
    Via_poly = car(axlPolyFromDB(via ?padType 'REGULAR))
    Pin_poly = car(axlPolyFromDB(pin ?padType 'REGULAR))
    AndPoly = car(axlPolyOperation(Via_poly Pin_poly 'AND))
    if(AndPoly != nil then
    err_count = err_count + 1
    fprintf(writeOutFile, "%-8s %-8s %-L\n", sym_refdes, Sym_side, pin->xy)
    );end if
    );end foreach
    );end foreach
    );end foreach

    ; Close the file and wrap up
    fprintf(writeOutFile,"Total error found: %d errors\n", err_count)
    fprintf(writeOutFile, "%s\n", "END OF FILE")
    close(writeOutFile)

    axlVisibleSet(originalVisible)
    axlShell("redisplay")
    if(err_count > 0 then
    axlUIViewFileCreate("Via_on_pad_report.log", "Via_on_pad_report" nil )
    else
    axlUIConfirm("No error found.")
    if(isFile("Via_on_pad_report.log") == t then deleteFile("Universal_via_check.log"));end if
    ); end if
    );end defun VOP

    Luan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • karthikeyan123
    karthikeyan123 over 6 years ago in reply to luanvn81

    Thanks for your reply.

    Here i don't want the via outer layer overlap i want inter drill of via overlapped in the pad.

    • 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