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: Extracting Max Height and Area of Symbols
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
jmwilkinson
Posts: 9
Online: User is Offline
1/25/2008 8:57 AM  

I am trying to extract the Area and PACKAGE_HEIGHT_MAX from symbols using the following code... I am recieving an error on s_prop... Can someone lend a hand...?

max = "PACKAGE_HEIGHT_MAX"
;
; Open each symbol by name
;
axlOpenDesign(?design shapename ?mode "wf" )
axlClearSelSet()
axlVisibleDesign(nil)
axlVisibleLayer("PACKAGE GEOMETRY/PLACE_BOUND_TOP" t)
axlSetFindFilter(?enabled "shapes" ?onButtons "shapes")
axlAddSelectAll()
lshape = axlGetSelSet()
foreach(shape lshape
   proplist = shape->prop->??
   if( proplist!=nil ;check to make sure there are attached properties.
   then
      foreach( prop proplist ;step through each property
         sprintf(s_prop "%s", prop) ; This format is incorrect...
         if( s_prop == max
         then
            max_height=car(prop->?)
            shp_area = shape->area
         );end if prop max
       );end foreach
      );end if
 );end foreach

JMW

Randy R.
Posts: 52
Online: User is Offline
1/25/2008 9:57 AM  
1) What is the error message on s_prop?
2) Have you isolated which line the error is occuring on?
3) Is "prop" evaluating to something other than a string?
4) The skill doc doesn't show the comma for the sprintf command syntax (but I don't think this is a problem).

G'Day,
kerchunk
Posts: 19
Online: User is Offline
1/25/2008 10:15 AM  
foreach( prop_pair proplist
prop_key = symbolToString( car( prop_pair))
prop_val = cadr( prop_pair)
if( prop_key == "PACKAGE_HEIGHT_MAX" then



the important thing to know here is properties are stored as key-value pairs within proplist AND
the key isn't a STRING but rather a symbol so you need to convert it b4 doing the comparison.

HTH,


Chris Walters
local Cadence guru
()
fxf
Posts: 43
Online: User is Offline
1/25/2008 11:36 AM  
several tips;
1) axlDBGetProperties(shape "allegro") will return a list of name value pairs instead of using shape->prop->??
- also allows for high-level property filtering
2) It is more efficient to compare symbols so either define PACKAGE_HEIGHT_MAX as a symbol or convert it to a symbol
sym = makeSymbol("PACKAGE_HEIGHT_MAX")
Alternatively a comparision using a symbol: if( prop_key == 'PACKAGE_HEIGHT_MAX
3) If you are just trying to get a single property value off a dbid then you can do
value = shape->prop->PACKAGE_HEIGHT_MAX
if property is not defined then the value is nil
jmwilkinson
Posts: 9
Online: User is Offline
1/25/2008 11:54 AM  
Hi All,

Thanks for the help... Here is a working update... Please provide any further feedback on ways to make this more efficient...

JMW

;
; Open each symbol by name
;
axlOpenDesign(?design shapename ?mode "wf" )
fprintf(outlog "%s read in for area/max_height extraction...\n" shapename)
axlClearSelSet()
axlVisibleDesign(nil)
axlVisibleLayer("PACKAGE GEOMETRY/PLACE_BOUND_TOP" t)
axlSetFindFilter(?enabled "shapes" ?onButtons "shapes")
axlAddSelectAll()
lshape = axlGetSelSet()
foreach(shape lshape
proplist=axlDBGetProperties(shape)
if( proplist!=nil ;check to make sure there are attached properties.
then
foreach(prop_pair proplist ;step through each property
prop_key=symbolToString(car(prop_pair))
prop_val=cadr(prop_pair)
if(prop_key=="PACKAGE_HEIGHT_MAX"
then
max_height=atof(car(parseString(prop_val)))/1000
;printf("%s\n" max_height)
poly = car(axlPolyFromDB(shape))
shp_area = poly->area
shp_area = shp_area/1000000
;printf("%2.3f\n" shp_area)
);end if prop max
);end foreach
);end if
);end foreach
curshapename = axlCurrentDesign()
axlClearSelSet()
axlVisibleDesign(nil)
axlVisibleLayer("PIN/TOP" t)
axlVisibleUpdate(t)
axlSetFindFilter(?enabled "PINS" ?onButtons "PINS")
axlAddSelectAll()
pincnt = axlGetSelSetCount()
fprintf(sepupdate "%s,%2.3f,%2.3f,%n\n" curshapename shp_area max_height pincnt)
axlClearSelSet()
jmwilkinson
Posts: 9
Online: User is Offline
1/25/2008 12:12 PM  

Hi All,

My apology for the formatting... Here is an attached formatted version...

JMW


Attachment: test1.il

leonlee
Posts: 81
Online: User is Offline
2/26/2008 1:07 AM  
I am treating with the height property too, and I want to got the maximum height.
See my question at next post~~

Leon Lee
Schneider-Electric
Posting to forums is available to community members only.
Login or Register

Forums > Silicon-package-board > Shared code - SKILL > Extracting Max Height and Area of Symbols


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.