• 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. Two pin net

Stats

  • Replies 5
  • Subscribers 17
  • Views 10418
  • Members are here 0
More Content

Two pin net

vimaldevlpr
vimaldevlpr over 6 years ago

Hai,

I need to find the location  pin to pin connected by single net  present in the board using skill  i want only single net report  connected between two pins can you please guide me how to do anybody having means share me the code i am new to skill.

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

    Hai all i used this code but it is not correctly working.

    procedure( ashNetsWithonePins()
        (let (nets port file msg done )
        file = "pinnets.log"
        msg = "Nets with pin to pin"
        nets = axlDBGetDesign()->nets
        port = axlDMOpenLog(file)
        fprintf(port "%s:\n" msg)
        done = 0
        foreach(item nets
            unless(item->branches->children->objType
            fprintf(port "\t%s\n" item->name)
            ++done)
        )
        if(done then
            fprintf(port "\nTotal nets with pin to pins: %d\n" done)
        else
            fprintf(port "\n No nets with pin to pins\n")
        )
        axlDMClose(port)
        axlUIViewFileCreate(file msg nil '(30 25) '(CENTER))
    ))

    unless(item->branches->children->objType   --> mistake here can anybody re correct the code please.

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

    item ->branches returns a list. In your case I believe you are only interested in single-branch nets so the following would work:

    twoPinNets = setof(net, axlDBGetDesign() ->nets, onep(length(net ->branches)) && length(setof(obj, car(net ->branches) ->children, obj ->objType == "pin")) == 2)

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

    item ->branches returns a list. In your case I believe you are only interested in single-branch nets so the following would work:

    twoPinNets = setof(net, axlDBGetDesign() ->nets, onep(length(net ->branches)) && length(setof(obj, car(net ->branches) ->children, obj ->objType == "pin")) == 2)

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

    I think this would also work:

    twoPinNets = setof(net, axlDBGetDesign() ->nets, length(axlPinsOfNet(net, 'pin)) == 2)

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

    Hai dave

    Thank you dave its working  and i have to add one more thing in this  while running this code that connection want to be automatically highlight in the board.

    procedure( Pins()
        (let (nets port file msg done )
        file = "pinnets.log"
        msg = "Nets with pin to pin"
        nets = setof(net, axlDBGetDesign() ->nets, length(axlPinsOfNet(net, 'pin)) == 2)
        port = axlDMOpenLog(file)
        fprintf(port "%s:\n" msg)
        done = 0


        foreach(item nets
            fprintf(port "\t%s\n" item->name)
            ++done
        )
        if(done then
            fprintf(port "\nTotal nets with pin to pin: %d\n" done)

           axlHighlightObject(nets)
        else
            fprintf(port "\n No nets with pin to pin\n")
        )
        axlDMClose(port)
        axlUIViewFileCreate(file msg nil '(30 25) '(CENTER))
    ))

    axlHighlightObject(nets) i used this for highlight its working but  i don't know how to de highlight while done.

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

    axlHighlightObject(nets)

    • 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