Thursday, January 08, 2009     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: Calculation/precision issue with arc radius
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
ejlersen
Posts: 40
Online: User is Offline
6/16/2006 4:36 AM  
Hi,

I've got the following problem with some skill code I've written that should export more than one place bound per component to IDF.
The code so far seems stable, but I have issues with calculating the arc radius if it is not between 10 and 170 degrees or 0/180 degrees.

I've created a test case that exhibits the issue. It is attached as boards.zip it contains 2 board files. Case2.brd which is the original board in millimeters and micron_2decimals.brd which is a conversion of case2.brd with 2 decimal points. Looking at this there should be precisely a factor 1000 in difference, this is however not the case, I can get better precision after the translation. Here's the arc data that I can get out using the attached skill program

Arc data        millimeters        microns
Center x        -1.06                -1059.77
Center y        -0.122                -122.36
Radius            0.151                150.52
x1                 -0.98                 -980.0
y1                  -0.25                -250.0
x2                -1.14                -1140.0             
y2                0.005                5.0
Load the skill program and run ns_idf to get files named boardname.emp/emn and temp_ptc.emp/emn (the last is the Cadence IDF output)
Look in the boardname.emp file to see the data above, they're listed just below the line with the arc radius in the boardnameemp file.
The boards.zip also contains an Excel spreadsheet that shows the calculation method. This is also written in the skill code, but in a rather complex system due to the fact that the angles has to be correct with respect to sign and degree. I've had customers looking at the output and this should be the only issue left to get the correct results.

Now using mathematics I can calculate the arc radius to the following
In millimeters (case2.brd) I get the angle to be -170.86
And in microns I get the angle to be -179.89

The weird thing here is that using the Cadence built in IDF export functionality gives the same figure in both cases, namely -179.798

So I'm looking for a  way to get more precision out of the board using millimeters.
Does anyone have any idea whats going on here? I'm just very curious as to how the built in Cadence IDF export can get the precision from the case2.brd to calculate the angle whereas I cannot do the same

Best regards,
Ole

Attachment: boards.zip
Attachment: ns_idf.il


Best regards,
Ole Ejlersen
Technical Service Manager
Nordcad Systems A/S
Dave Elder
Moderator
Posts: 150
Online: User is Offline
6/19/2006 8:56 PM  
Hi Ole,

Your code is quite complex - and involves lots of floating point maths - so you will probably get lots of floating point rounding errors. See the discussion about that problem in this forum.

I have written a similar routine for exporting IDF and get the same results as Cadence.
See attached.

Cheers, Dave

Attachment: IDF_putVertices.il


Dave Elder
Tait Electronics
ejlersen
Posts: 40
Online: User is Offline
6/20/2006 5:35 AM  
Hi Dave,

Thanks very much for the code, although I've got problems figuring out how you actually calculate the angle. I've looked all over the documentation for the atan2 function but I cannot find anything about it, except that it takes 2 arguments but how will that help me?

Another thing is the sign of the angle, it is consequently the wrong sign compared to running this on a larger board with several arcs. It may be easy to change, but as written above I've got some problems figuring out exactly what you do and why?
I know my code is also pretty complex and this is due to the fact that getting the correct angle when using normal atan is dependent on the start and end points position relatively (depending on the quadrant of the coordinate system). I can see that you get the correct angle each time, only issue is the sign, so maybe you've got another approach than I have?

I've attached an example that exhibits this issue so you can see it for your self. The angle figure is the same but the sign in your case is negative whereas it is positive in the Cadence case.

Best regards,
Ole


Attachment: case3.zip


Best regards,
Ole Ejlersen
Technical Service Manager
Nordcad Systems A/S
Dave Elder
Moderator
Posts: 150
Online: User is Offline
6/27/2006 4:59 PM  
Hi Ole,

I'll take a look at the angle sign issue. I have had problems with that in the past and possibly need to improve my code for it to work in every case.

atan2 gets around the problem with atan where the adjacent line length is 0.
i.e. atan(o / a) returns an "Attempted to divide by zero" error if a is 0. atan2(o a) correctly returns pi / 2 if a is 0.

I don't know why atan2 isn't documented. I never use atan.

Cheers, Dave

Dave Elder
Tait Electronics
ejlersen
Posts: 40
Online: User is Offline
6/28/2006 12:54 AM  
Hi Dave,

Thanks for the explanation. This problem was actually one of the reasons I had to make the code more complex.


Best regards,
Ole

Best regards,
Ole Ejlersen
Technical Service Manager
Nordcad Systems A/S
Posting to forums is available to community members only.
Login or Register

Forums > Silicon-package-board > Shared code - SKILL > Calculation/precision issue with arc radius


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.