• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Digital Implementation
  3. How to find the number of pins of a given macro by using...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 92
  • Views 17623
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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

Ashok Nellore
Ashok Nellore over 13 years ago

 Hi

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

  • Cancel
  • jgentry
    jgentry over 13 years ago
    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.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ashok Nellore
    Ashok Nellore over 13 years ago

     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 ?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BobD
    BobD over 13 years ago

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ashok Nellore
    Ashok Nellore over 13 years ago
    Thanks Bob..its working ..it helped me a a lot
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information