• 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. See amount of rats crossing

Stats

  • State Verified Answer
  • Replies 2
  • Subscribers 159
  • Views 7894
  • Members are here 0
More Content

See amount of rats crossing

FilipSwe
FilipSwe over 2 years ago

Hello,

Was wondering if there is a way to see how many of the rats that cross each other? i.e. how many intersections are along its path.

This could help with choosing the best rotation for a large IC/BGA.

Thanks in advance!

  • Sign in to reply
  • Cancel
  • DavidJHutchins
    +1 DavidJHutchins over 2 years ago

    I wrote a skill function this morning to count the rat crossings & return the count, below is an example of running it from the journal file:

    \i (00:00:06) generaledit
    \i (00:00:13) skill Count_Rat_Crossings()
    (00:00:13) 1164

    Below is the skill code:

    procedure(Count_Rat_Crossing()
    let((OnButtonList EnabledList RatsList StartPt p1 p2 p3 p4 DataList cnt)
    (OnButtonList = axlGetFindFilter())
    (EnabledList = axlGetFindFilter(t))
    (axlClearSelSet)
    (axlSetFindFilter ?enabled (list "noall" "ratsnests" "invisible") ?onButtons (list "noall" "ratsnests"))
    axlAddSelectAll()
    (RatsList = axlGetSelSet());
    (axlClearSelSet)
    (cnt = 0)
    while(RatsList
    (StartPt = car(RatsList))
    (p1 = car(StartPt->pins)->xy)
    (p2 = cadr(StartPt->pins)->xy)
    (RatsList = cdr(RatsList))
    foreach(EndPt RatsList
    (p3 = car(EndPt->pins)->xy)
    (p4 = cadr(EndPt->pins)->xy)
    (DataList = (axl_ol_ol2 list(p1 p2) list(p3 p4)))
    when(zerop(caddr(DataList))
    (cnt++)
    )
    )
    )
    (axlSetFindFilter ?enabled EnabledList ?onButtons OnButtonList)
    cnt
    )
    )

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • FilipSwe
    0 FilipSwe over 2 years ago in reply to DavidJHutchins

    Wow, this is great! I have to read up on skill code and how to use it but this is very helpfull!

    Thanks

    Edit: I have tried a bit my self and read some Skill documentation but I have not figured out how to run the code yet. Can you give some info how you ran it from the journal file? (Also I'm not sure what you mean by running in the journal file).

    I tried adding this line to be able to run it from command window but did not work:

    axlCmdRegister("RatsCross" 'Count_Rat_Crossing)

    I figured it out!
    For future novices:

    Add the code to a text file and save it for example as CountRatCrossing.il (Save in a folder that is added in your scriptpath)
    Add this line at end of file in allegro.ilinnit: load("CountRatCrossing.il")

    In Allegro write in command line: set telskill
    In the new window write: Count_Rat_Crossing()

    • 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