Home > Community > Blogs > Digital Implementation > tab completion with encounter s dbget command smarter than you might think
 
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more conveniennt.

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: *

Tab Completion with Encounter's dbGet Command: Smarter Than You Might Think

Comments(4)Filed under: Digital Implementation, dbGet, encounter, screencast, Encounter Digital Implementation, tab completion

If there's one thing that makes navigating a UNIX command line or tool console more efficient, it's tab completion. We've been improving Encounter's support for tab completion over the past few releases, and in 10.1 Encounter's dbGet command received tab completion support for the first time. Have a look at the screencast embedded below -- I think the way it's been implemented is really nice. And smarter than you might realize at first glance.

In its simplest sense tab completion works like this:
encounter 1> dbGet top.<tab>

...returns a list of all the attributes associated with the "top" cell in the design. If I provide a portion of an attribute it auto-completes and inserts a trailing ".":

encounter 2> dbGet top.i<tab>
encounter 2> dbGet top.insts.

If you continue on and ask it to complete when there are no remaining attributes associated with the last field, notice how <tab> inserts a trailing space:

encounter 3> dbGet top.insts.n<tab>
encounter 3> dbGet top.insts.name
<-and inserts a trailing space

dbGet's tab completion is smart enough to recognize whether there are remaining fields available for traversal and either inserts a trailing "." -or- a trailing space which makes for very efficient command line navigation of the database.

It's also smart enough to return a varying list of attributes depnding on what you have selected. For example you'll see a different list of attributes revealed when you tab complete the selected keyword depending on what you currently have selected in the tool:

encounter 4> dbGet selected.<tab>

Similarly, if you task it with tab completing a variable. It's smart enough to examine the contents of the variable and tab complete accordingly:

encounter 5> set nets [dbGet top.nets.name *clk* -p]
encounter 6> dbGet $nets.<tab>

These examples are demonstrated in the screencast embedded below:
(if you have trouble viewing the video try this link instead)

Check it out next time you're using dbGet in 10.1 or newer releases. I hope you find it useful.

Bob Dwyer

Comments(4)

By Kari on May 26, 2011
Bob, thanks for taking the time to include the video. I thought I understood how cool this functionality was just by reading the text of the article, but the video really adds a lot to show this in action!

By Kevin on June 13, 2011
The tab completion feature is a very good feature

By DSubbu on January 15, 2012
hi ,
can any one let me know the purpose of  " -p " in above statement  . i also observed the same in few other posts like "-p2" . so can u please give me clarity on this option .

By BobD on March 20, 2012
This would make for a good focused blog post because it's one of the more unique capabilities of dbGet.
-p gives you the "previous pointer" for what you've filtered on. -p2 traverses back 2 levels from where you filtered. More information in this app note:
support.cadence.com/.../cos

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.