Home > Community > Forums > Digital Implementation > How to find the number of pins of a given macro by using commands

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

 How to find the number of pins of a given macro by using commands  

Last post Sat, Dec 17 2011 12:56 AM by Ashok Nellore. 4 replies.
Started by Ashok Nellore 14 Dec 2011 09:01 PM. Topic has 4 replies and 2556 views
Page 1 of 1 (5 items)
Sort Posts:
  • Wed, Dec 14 2011 9:01 PM

    • Ashok Nellore
    • Not Ranked
    • Joined on Sun, Jul 17 2011
    • Bangalore, Karnataka
    • Posts 11
    • Points 220
    How to find the number of pins of a given macro by using commands Reply

     Hi

    In my design i need to find the number of pins of a macro by using commands 

    • Post Points: 20
  • Wed, Dec 14 2011 9:22 PM

    • jgentry
    • Top 150 Contributor
    • Joined on Thu, Sep 11 2008
    • Fort Collins, CO
    • Posts 51
    • Points 1,185
    Re: How to find the number of pins of a given macro by using commands Reply
    I think there might be a dbInstNrTerm command. If not, you could use something like the following (sorry, I'm not at a computer right now): llength [dbGet [dbGetInstByName $inst].terms] Let me know if that doesn't work and I can look it up tomorrow. Btw, that number won't include power pins.
    • Post Points: 20
  • Wed, Dec 14 2011 11:36 PM

    • Ashok Nellore
    • Not Ranked
    • Joined on Sun, Jul 17 2011
    • Bangalore, Karnataka
    • Posts 11
    • Points 220
    Re: How to find the number of pins of a given macro by using commands Reply

     Hey jg thanks u .i got the answer 

    But i need all the macros pin count at a time 

    any command to get the all the macros ?

    • Post Points: 20
  • Thu, Dec 15 2011 3:51 AM

    • BobD
    • Top 25 Contributor
    • Joined on Fri, Jul 11 2008
    • Chelmsford, MA
    • Posts 247
    • Points 9,125
    Re: How to find the number of pins of a given macro by using commands Reply

    Thanks for the help jg!

    Hi Ashok,

    To get a pointer for all the hard macros in the design:

    encounter 22> dbGet -p2 top.insts.cell.baseClass block                                                                                    
    0x2aaab42e95a0 0x2aaab42ea0e0 0x2aaab435b020 0x2aaab44b6bb0

    To get the number of pins on all of the hard macros in the design:

    encounter 23> llength [dbGet [dbGet -p2 top.insts.cell.baseClass block].instTerms]                                                        
    121

    To get the number of pins for each hard macro in the design:

    encounter 24> foreach inst [dbGet -p2 top.insts.cell.baseClass block] {Puts "[dbGet $inst.name] [llength [dbGet $inst.instTerms]]"}
    DTMF_INST/PLLCLK_INST 7
    DTMF_INST/RAM_128x16_TEST_INST/RAM_128x16_INST 43
    DTMF_INST/ARB_INST/ROM_512x16_0_INST 27
    DTMF_INST/RAM_256x16_TEST_INST/RAM_256x16_INST 44

    To learn more about dbGet, check out these slides on support.cadence.com:

    http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:DocumentViewer;src=wp;q
    =Training/Digital_IC_Design/dbGet.pdf

    Hope this helps,
    Bob

    • Post Points: 20
  • Sat, Dec 17 2011 12:56 AM

    • Ashok Nellore
    • Not Ranked
    • Joined on Sun, Jul 17 2011
    • Bangalore, Karnataka
    • Posts 11
    • Points 220
    Re: How to find the number of pins of a given macro by using commands Reply
    Thanks Bob..its working ..it helped me a a lot
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by Ashok Nellore at 14 Dec 2011 09:01 PM. Topic has 4 replies.