• 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. Getting Cline Seg list and Cline Seg data, and saving user...

Stats

  • Replies 6
  • Subscribers 159
  • Views 5506
  • Members are here 0
More Content

Getting Cline Seg list and Cline Seg data, and saving user data/settings

EvanShultz
EvanShultz over 15 years ago

Hi all, I have a 3 part question.

 

Getting Cline Segs:

I am interested in selecting Cline Segs, and I don't know of any better way than using the Allegro select functions as axlDBGetDesign()->?doesn't show Cline Segs. Is there a better way to create a list of all Cline Seg dbids than to turn on all etch layers and use axlAddSelectAll() after setting the Find Filter to only Cline Segs?

 

Saving environment settings:

Assuming not, I want to save the Find Filter settings since I will need to (possibly) change it to enable Cline Segs. However, I am getting "nil" instead of a meaningful list when I use axlGetFindFilter(nil) or axlGetFindFilter(t). I run the function when sitting in EE mode with several boxes checked. Why wouldn't I get a list returned to me?

I found a (possibly internal Cadence) function Dave put at www.cadence.com/.../18504.aspx. This also retuns nil. Why? (BTW, it's used in Larry Bowman's Allegro SKILL programs).

I then tried the function that Craig wrote about in the same post. That seems to work, but what is retuned is "axluidata:<number>". How do I use this?

 

When I'm done, even if I don't restore the Find Filter, it never changes. If I set enabled and onButtons to list("noall" "clinesegs"), the Find Filter is no different than before I run my program. But if I comment out the line where I change the Find Filter no Cline Segs are found. So I know the program is setting the Find Filter, at least while it if running, but the Find tab isn't changing.

 

Finding Cline Seg angle:

Checking the properties of a Cline Seg (dbid->??) doesn't show the info in the "Delta-xy" or "Normalize angle" fields from the Show Element form of an "odd" Cline Seg. I am assuming this means this information is calculated when the Show Element form is created. Is there a way to directly extract this info from a Cline Seg? Getting the angle from Allegro is almost certainly better than the (seemingly) overly complicated program I've written which doesn't even quite work perfectly yet...

 

By the way, it appears to me that Allegro's "Normalize angle" is finding the angle within 2pi (0 to 360 degrees) , and then subtracting 0.5pi if the seg is in quadrant II, subtracting pi if the angle is in quadrant III, etc. So the "Normalize angle" is always between 0 and 90 degrees. Does anyone know for sure if this is Allegro's method? If so, I'm sure I can modify my code to report that Allegro's giving me if I can't get the angle directly. I haven't gotten it all figured out yet so any tips, for instance this same code in another language, would be helpful.

 

Thanks in advance!

  • Sign in to reply
  • Cancel
  • fxffxf
    fxffxf over 15 years ago

    There are multiple ways of gettting clines segments via Skill. Since segments  will tend to dominate a routed design performance of the method should be the primary consideration. So what are the methods:

    1) axl Select - good for finding by layer and/or by a restricted region.

    2) axlDBGetDesign()->nets and traverse the branches - good for ordering segments by the net that owns the

    3) axlExtractMap() - allows for extract based filtering 

    So you need to consider what you are going to do with the segments and select the method that will get you closest to that goal. So it you want lists of segments based upon nets in the design method 2 is the best but if your primary consideration is by layer then multiple calls to the Select interface based upon the layer  would be the method of choice.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • aCraig
    aCraig over 15 years ago

    getting net segments

    defun(getNetSegs (net)
    let((segs)
      foreach(branch net->branches
        foreach(child branch->children
          when(child->objType == "path"
            foreach(seg child->segments
              segs = cons(seg segs)
            )
          )
        )
      )
      segs
    ))

     saving the enviornment

    Not sure why you are having problems.

    cline angle:

    defun(getAngle (seg)
    let((x1 y1 x2 x2 deltax deltay rad deg quadrant)
      x1 = car(car(seg->startEnd))
      y1 = cadr(car(seg->startEnd))
      x2 = car(cadr(seg->startEnd))
      y2 = cadr(cadr(seg->startEnd))
      deltax = x2 - x1
      deltay = y2 - y1
      rad = atan(deltay/deltax)
      deg = rad * 180 / 3.14159265
      case(plusp(deltax) plusp(deltay)
        (t
          case(plusp(deltay)
            (t   quadrant = 1)
            (nil quadrant = 4)
          )
        )
        (nil
           case(plusp(deltay)
            (t   quadrant = 2)
            (nil quadrant = 3)
          )
        )
      )
      (90 * quadrant) + deg
    ))

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • EvanShultz
    EvanShultz over 15 years ago

     Hi fxffxf and Craig,

     Thanks for the suggestions and help!

     Here are my thoughts on the various methods for gathering Cline Segs:

    1. axlSelect - it precludes the ability to create an Allegro report since it requires interaction with the database

     2. axlDBGetDesign()->nets and traverse the branches - can create reports, but this method also captures Cline Segs that are spokes for a shape. Is there a way to filter out spokes from "real" Cline Segs? If so, this looks like the way to go for me.

    3. one of the other methods will work better for me in this situation, but thanks for pointing it out.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fxffxf
    fxffxf over 15 years ago

    All of these methods require interaction with the database and you can create a report using any of these methods. The only downside is with the axlSelect method you must register and run your skill code via axlCmdRegister so it plays nice with Allegro's "app mode".  For development purposes I would turn off "app mode".

    If you want to eliminate thermal reliefs then you would test clines for the thermal relief property

        cline->prop->THERMAL_RELIEF == t

    The same would apply if you did not want any legay FILLET clines

        cline->prop->FILLET == t

    Note the properties only on the cline (objType=="path" in Skill) If you have a segment (objType=="line" in Skill) then you must look at its parent.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • EvanShultz
    EvanShultz over 15 years ago

     Hi fxffxf,

     As always, thanks for your insight. I was able to rearrange my filtering (as the props were on the Cline Seg parents) and filter out the properties you mentioned. I also discovered another useful property I wanted to filter out which occurs if a Cline Seg is part of a symbol:

         cline->prop->SYMBOL_ETCH == t

     

    Is there a list of possible properties? algroskill.pdf does a pretty good job fo explaning the hierarchy of elements in the database, but I just browse through the various elements at all levels of the hierarchy to find the SYMBOL_ETCH property. It would be nice to know what possible pre-defined properties can exist on the various elements.

     

     As far as creating a report, when I used axlReportRegister and then queued the nets using the Find Filter and axlSel* functions, I never collected any nets. But when using the axlDBGetDesign()->nets method and descending through the branches, I am finding all the nets in the design. Page 975 of algroskill.pdf v16.2 seems to indicate that axlReportRegister is blocking and I can't use axlSelect function, so I though that was what was happening, leading to my response above. As I'm a bit confused now, can you help to straighten things out?

     

    Once my report is generated, it normally appears on the right center side of the screen (similar to the list("e" "outer") argument that can be passed to, for example, axlFormCreate). However, occasionally the report will open in the center of the screen. I cannot determine anything I am doing to cause various placements of the report window. Is there a way to control the location of the report window?

    • 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