Home > Community > Blogs > Digital Implementation > the case for robust database access
 
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more convenient.

Register | Membership benefits
Get email delivery of the Digital Implementation blog (individual posts).
 

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

The Case for Robust Database Access

Comments(5)Filed under: Digital Implementation, Hierarchical Module Ports, CTS, First Encounter, robust data access

The most frequently viewed forum post in the old cdnusers.org "Digital IC->Floorplanning, Place and Route" forum initially started off as a seemingly simple inquiry: "Can CTS Stop Tracing on Hierarchical Module Ports?"

From that one question came a number of suggestions and discussion about using First Encounter (FE) Clock Tree Synthesis (CTS) LeafPin and LeafPort constructs and whether they could succesfully be applied to hierarchical ports (they can't) and consequently how to identify the downstream pins that a hierarchical port connects to.

FE offers a way to find the downstream instances via its GUI-driven design browser, but this task was sought to be performed automatically as part of a scripted flow that would determine these pin names across netlist changes.  Further, it was desirable to automatically modify the clock tree specification file to drive these changes from the netlist. Thus enters the need for robust and easy-to-use db access commands.

Since it would be impractical for an EDA design tool to offer a natively defined command for any circumstance a user might envision (what would the command be called in this case? "findAllDownstreamPinsFromHierarchicalPinAndHackMyClockTreeSpecFile"?) tools have long provided scripting languages to provide users access to the database.  Users will tell you that db access is not a simple "have it or not" feature; all contemporary backend systems have db access mechanisms of some sort.

It is the ease of use, the consistensy and the robustness of the db access offered that determines whether the access adds value in to typical user and I would argue in large part determines whether the platform as a whole is likely to be successful.

No software is perfect -- there's always customization and querying required on the users part to get designs completed on schedule.  It is therefore in everyone's best interest to have a robust mechanism for users to query and modify the database effectively.  If the system is architected in this way it becomes a great canvas for designers to perform their artwork upon.  If not it risks becoming known as a career killer.

In FE, we've had a long-standing db access mechanism I refer to as "FE-TCL".  These are commands like "dbForEachCellInst" and "dbGetNetByName".  While these commands are powerful and often efficient, some users feel that they lack the ease of use and consistensy to be as useful as the could be otherwise.  Given these limitations, I'd like to mention two other database access mechanisms that users are often unaware of:

The first mechanism is "CTE-TCL".  CTE-TCL commands (like "all_fanout", "report_property" and "get_pins") provide robust access to the netlist and, more typically, timing information in the tool.  Consider using these commands for tasks such as finding all downstream sinks from a given pin through combinational logic, or finding all of the registers connected to a logical clock.  More information on CTE-TCL commands can be found in the FE Text Command Reference in the "Advanced Timing Tcl Scripting" chapter.

The second mechanism comes to us in the form of 2 simple commands: dbGet and dbSet. dbGet and dbSet were introduced in SOC7.1 as a way of providing users with mechanisms for probing the database consistently, traversing the design in a relational manner, and efficiently performing common tasks.  Here a few examples of how dbGet/Set can be used from recent user inquiries:

   1. How do I get a list of the nets with routing on M6?
      Example: "dbGet [dbGet -u -p3 top.nets.wires.layer.name M6].name"

   2. How do I convert all of the hard placement obstructions into soft placement obstructions?
      Example: "dbSet top.fplan.pBlkgs.type soft"

   3. How do I add all of the instances of cell type BUFX1 to an instance group?
      Example: "foreach inst [dbGet [dbGet -p2 top.insts.cell.name BUFX1].name] {addInstToInstGroup myGroup $inst}"

More information on dbGet can be found in the Encounter Database Access Command Reference.

By the way, as I'm writing this blog entry, the forum post I'm referring to had more than 12,000 views.  Not too shabby!  I'd like to personally thank all of you who made cdnusers.org a great place to exchange ideas and get solutions.  Without your posts, the community wouldn't be possible.  I look forward to continuing the discussion with you all in this new setting on cadence.com.

Okay, question of the day:  "What is your favorite db access mechanism of all time?  Why?"  Please post your answer as a comment below -- I'd love to hear from you.

Comments(5)

By eminemshow on July 22, 2008
Bob: Really happy to see your post on this new Cadence user community! As for my favorite db access mechanism of all time, I think it should be FE-TCL, althrough it has some limitation. It can make you write some great scripts beyond imagination......my dream is to have my own db TCL pool.......for CTE TCL, I think it is more useful when goes to 'timing aspect', for example, manipulating timing path, dealing with timing reports, etc. During this CDNLive Beijing, China, I am very honored to have a talk with Frank (your boss? hoho), and I say you are my forum buddy who I really loved to discuss with, hope we can still have wonderful posts together in this new forum. Best Regard!

By BobD on July 23, 2008
Hello eminemshow!  
Thank you for your comments.  It is great to see that you've migrated to this new forum.  Your posts over on cdnusers.org were excellent and much appreciated.  I hope that you'll lead the way in spurring similar discussions in the Digital Implementation Forum on the new cadence.com.
I'm pleased to hear that you've been successful with FE-TCL, and leveraging CTE-TCL for timing purposes is the exact use model we recommend.  I wish you continued success with SoC-Encounter in the future!

By Kari on August 25, 2008
Hi Bob,
My favorite db access mechanism of all time is the SKILL db access in DFII. I remember when you came to my office for the FE 6.2 TechTorial and gave me a sneak-peek of dbGet/dbSet, which has similarities to SKILL, and I was just thrilled to see that this was coming up in 7.x. I have yet to become a dbGet power-user, but I think it's a great way to traverse the db and I hope that more and more things will be changeable with dbSet as newer releases come out.

By BobD on August 27, 2008
Hi Kari!  First off, thanks a lot for your comment.
SKILL is great, isn't it?  I used DFII all day, every day at my first job out of college and it didn't take long for me to get hooked on writing SKILL code.  SKILL really sets the standard for robust database access in my view, and with dbGet we sought to incorporate the best attributes of SKILL as well as other EDA db access mechanisms.  The "." traversal mechanism was clearly patterned after the "~>" in SKILL.  The "-p" mechanism and simple in-line pattern matching in dbGet are things that are possible in other EDA db access mechanisms, but often require separate commands.  It is this kind of "best of" thinking that I hope makes dbGet powerful and useful for all of us.
That said, dbGet development continues with more capabilities becoming available in 8.1 and beyond.  If anyone has suggestions for enhancements to dbGet, feel free to post them here and I'll do my best to push for them in a future release.

By NAADHAN on April 14, 2009
Hi BobD.... "What is your favorite db access mechanism of all time?  Why?"  Please post your answer as a comment below----->??? :-)"
as am starting as a fresher i would love to know much about these... to me all your posts are awesome and i will go through them one by one ........... thanks BobD

Leave a Comment


Name
E-mail (will not be published)
Comment
 I have read and agree to the Terms of use and Community 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.