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: commands return memory pointers
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
mboudreaux
Posts: 11
Online: User is Offline
2/06/2008 10:30 AM  
When I run simple commands in the command prompt like: "set X [get_nets -of_objects $port]" I get the net I am looking for, as well as some random variable - ie: "U_global_control_rtl/sbr_efadd_oΎ] 0x5500" What is the 0x5500?? That ends up being the value stored in the variable "X". Any help would be awesome!
mboudreaux
Posts: 11
Online: User is Offline
2/06/2008 11:45 AM  
Forgot to mention... I am running 64bit on Linux.
BobD
Posts: 80
Online: User is Offline
2/06/2008 12:12 PM  
"get_nets" is a CTE-TCL command. CTE-TCL commands return special pointers that other CTE-TCL commands can operate on, or collections of special pointers.

For example, you could do something like this:

set port [get_ports BG_scan_in_2]
set X [get_nets -of_objects $port]
report_property $X

(pardon the formatting, the following table is aligned in the console but appears unaligned here in the forum):

property | value
-------------------------------------------------
capacitance_max | 0.002
capacitance_min | 0.002
driver_pins |
hierarchical_name | BG_scan_in_2
has_detailed_parasitics | false
is_dont_touch | false
is_hierarchical | false
load_pins |
name | BG_scan_in_2
object_type | net
pin_capacitance_max | 0.002
pin_capacitance_min | 0.002
wire_capacitance_max | 0.000
wire_capacitance_min | 0.000

If you had a collection, you could iterate through each pointer in the collection with "foreach_in_collection". You can find more information on these types of commands in the FE Text Command Reference (fetxtcmdref.pdf) shipped with the software under the "Advanced Timing Tcl Scripting Commands".

Feel free to post back if this wasn't the kind of information you were looking for, or if you have further questions in this area.

Hope this helps,
Bob
mboudreaux
Posts: 11
Online: User is Offline
2/06/2008 2:33 PM  
In your example, the value of "X" would be something like "0x5cff" instead of the name of the net attached to BG_scan_in_2. If I were to enter your code in my FE, it would error as it would not find the properties of "0x5cff".

Any ideas?
BobD
Posts: 80
Online: User is Offline
2/06/2008 4:05 PM  
Here is my log file cut and pasted as is:

[DEV]encounter 4> set port [get_ports BG_scan_in_2]
0x2
[DEV]encounter 5> set X [get_nets -of_objects $port]
0x3
[DEV]encounter 6> puts $X
0x3
[DEV]encounter 7> report_property $X

property | value
-------------------------------------------------
capacitance_max | 0.002
capacitance_min | 0.002
driver_pins |
hierarchical_name | BG_scan_in_2
has_detailed_parasitics | false
is_dont_touch | false
is_hierarchical | false
load_pins |
name | BG_scan_in_2
object_type | net
pin_capacitance_max | 0.002
pin_capacitance_min | 0.002
wire_capacitance_max | 0.000
wire_capacitance_min | 0.000
[DEV]encounter 8> report_property 0x3

property | value
-------------------------------------------------
capacitance_max | 0.002
capacitance_min | 0.002
driver_pins |
hierarchical_name | BG_scan_in_2
has_detailed_parasitics | false
is_dont_touch | false
is_hierarchical | false
load_pins |
name | BG_scan_in_2
object_type | net
pin_capacitance_max | 0.002
pin_capacitance_min | 0.002
wire_capacitance_max | 0.000
wire_capacitance_min | 0.000

As you can see, whether I pass "$X" or "0x3"- report_property still works as I'd hope it would.

Please give it a try. If it still doesn't work for you there may be some other problem conspiring against you. If that's the case, please do post back or open a service request at http://sourcelink.cadence.com.

Thanks,
Bob
mboudreaux
Posts: 11
Online: User is Offline
2/07/2008 4:53 AM  
Your example works for me and gets the same output you get... How do I get a variable to "equal" only the associated net name to which BG_scan_in_2 is attached?
BobD
Posts: 80
Online: User is Offline
2/07/2008 5:24 AM  
I'm glad to hear that worked for you. Now that you see the list of property/value pairs output by report_property, you can set any one of the properties values to a variable using "get_property":

[DEV]encounter 11> set net_name [get_property $X name]
BG_scan_in_2

[DEV]encounter 12> puts $net_name
BG_scan_in_2

It might be worth mentioning that there are several db access mechanisms that are available in Encounter. The mechanism you're using right now I call CTE-TCL. They're the way to go when you're interested in probing the design from a timing perspective.

A new mechanism that debuted in our 7.1 release is called "dbGet". It provides a more SKILL-like way to probe the db. I say SKILL-like not from a syntax perspective, but in terms of the way it presents information to the user in a relational/linked manner. Here's an example of how you would do the same thing you did with CTE-TCL with dbGet:

[DEV]encounter 20> dbGet top.terms.name
clk reset rcc_clk {addressΑ]} {addressΐ]} {addressΏ]} {addressΎ]} {din⎛]} {din⎚]} {din⎙]} {din⎘]} {din⎗]} {din⎖]} {dinΗ]} {dinΖ]} {dinΕ]} {dinΔ]} {dinΓ]} {dinΒ]} {dinΑ]} {dinΐ]} {dinΏ]} {dinΎ]} digit_clk {doutΕ]} {doutΔ]} {doutΓ]} {doutΒ]} {doutΑ]} {doutΐ]} {doutΏ]} {doutΎ]} dout_flag test_mode scan_en BG_scan_in BG_scan_out BG_scan_in_2 BG_scan_out_2

[DEV]encounter 21> dbGet top.terms.name BG_scan_in_2
BG_scan_in_2

[DEV]encounter 22> dbGet -p top.terms.name BG_scan_in_2
0x15100248

[DEV]encounter 23> set term [dbGet -p top.terms.name BG_scan_in_2]
0x15100248

[DEV]encounter 24> dbGet $term.?
term: cell inOutDir isInput isOutput isScanClk isSpecial isTieHi isTieLo name net objType orient pStatus type

[DEV]encounter 25> dbGet $term.net.name
BG_scan_in_2

I don't mean to confuse you with another db access mechanism- but depending on what information you're trying to get (and the eda tools you've used in the past) you might find one mechanism easier than the other. One note: hex pointers from dbGet are not interchangable with CTE-TCL hex pointers. To pass information back and forth between dbGet and CTE-TCL you need to re-get the pointer by name. Here's an example:

From CTE-TCL to dbGet:
[DEV]encounter 7> set port [get_ports BG_scan_in_2]
0x6
[DEV]encounter 8> set port_name [get_property $port hierarchical_name]
BG_scan_in_2
[DEV]encounter 9> dbGet top.terms.name $port_name
BG_scan_in_2
[DEV]encounter 10> set term [dbGet -p top.terms.name $port_name]
0x14a91a98
[DEV]encounter 11> dbGet $term.net.name
BG_scan_in_2

dbGet's usage is:
Usage: dbGet [-d] [-p#] [-u] [-regexp] .[obj_type][{.attr_name|.?|.??|.?h} [pattern]]

More information on dbGet is available in the soceDBAref.pdf document shipped with the software.

Thanks,
Bob
Posting to forums is available to community members only.
Login or Register

Forums > Digital IC > Floorplanning, Place and route > commands return memory pointers


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.