• 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. power pins of stdcells

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 92
  • Views 13558
  • 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

power pins of stdcells

chitlesh
chitlesh over 9 years ago

Hi there,

Is there a way to get the power pin names of a particular placed stdcell within EDI?

  • Cancel
Parents
  • kazad
    kazad over 9 years ago

    Hi

    I updated the procedure to get the associated net connectivity, use '-net' option. If a PG term is not hooked up with global net connection, it'll report '0x0'.

    Here is some usage example:

    Pin only:

    encounter> findPGTerms -inst /A/B/C -termType power

    VCC VDD VPP

    Pin and net:

    encounter> findPGTerms -inst /A/B/C -termType power -net
    {VCC vaa2v8_otpm} {VDD vdd_otpm} {VPP VPP_0}

     

    ################################################################################
    # Procedure to find a list of Power/Ground pins of all cells in the design
    # Usage : findPGTerms -inst <instance_name> -termType <power | ground> -net
    ################################################################################
    proc findPGTerms {args} {

    # Get instance name
    if {[regexp {\-inst} $args]} {
    set instName [lindex $args [expr [lsearch $args -inst] + 1]]
    }

    # Get term type
    if {[regexp {\-termType} $args]} {
    set termType [lindex $args [expr [lsearch $args -termType] + 1]]
    }

    # Help
    set helpString "Usage : findPGTerms \
    \-inst <instance_name> \
    \-termType <power | ground> \
    \net \
    \-help"


    if {[regexp {\-help} $args] || $args == ""} {
    puts $helpString
    return 0
    }


    # Main code
    ############################################################

    # Get inst/cell pointer
    if {[dbGet top.insts.name $instName] == "0x0"} {

    puts "\nERROR: Instance $instName not found!\n"
    return 0

    } else {

    set instPtr [dbGetInstByName $instName]

    foreach pgTermPtr [dbGet ${instPtr}.pgCellTerms] {

    set pgTermName [dbGet ${pgTermPtr}.name]
    set pgNetPtr [dbPGTermNet [dbGetPGTermByName $instPtr $pgTermName]]

    # Check connected net
    if {$pgNetPtr == "0x0"} {
    set pgNetName "0x0"
    } else {
    set pgNetName [dbGet ${pgNetPtr}.name]
    }

    # Sort power/ground
    if {[dbGet ${pgTermPtr}.type] == "powerTerm"} {
    lappend pgTermArray(power) $pgTermName
    lappend pgNetArray(power) "$pgTermName $pgNetName"

    } elseif {[dbGet ${pgTermPtr}.type] == "groundTerm"} {

    lappend pgTermArray(ground) $pgTermName
    lappend pgNetArray(ground) "$pgTermName $pgNetName"
    }
    }
    }

    # Return results
    if {[regexp {\-net} $args]} {

    return $pgNetArray($termType)

    } else {

    return $pgTermArray($termType)
    }

    }

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • kazad
    kazad over 9 years ago

    Hi

    I updated the procedure to get the associated net connectivity, use '-net' option. If a PG term is not hooked up with global net connection, it'll report '0x0'.

    Here is some usage example:

    Pin only:

    encounter> findPGTerms -inst /A/B/C -termType power

    VCC VDD VPP

    Pin and net:

    encounter> findPGTerms -inst /A/B/C -termType power -net
    {VCC vaa2v8_otpm} {VDD vdd_otpm} {VPP VPP_0}

     

    ################################################################################
    # Procedure to find a list of Power/Ground pins of all cells in the design
    # Usage : findPGTerms -inst <instance_name> -termType <power | ground> -net
    ################################################################################
    proc findPGTerms {args} {

    # Get instance name
    if {[regexp {\-inst} $args]} {
    set instName [lindex $args [expr [lsearch $args -inst] + 1]]
    }

    # Get term type
    if {[regexp {\-termType} $args]} {
    set termType [lindex $args [expr [lsearch $args -termType] + 1]]
    }

    # Help
    set helpString "Usage : findPGTerms \
    \-inst <instance_name> \
    \-termType <power | ground> \
    \net \
    \-help"


    if {[regexp {\-help} $args] || $args == ""} {
    puts $helpString
    return 0
    }


    # Main code
    ############################################################

    # Get inst/cell pointer
    if {[dbGet top.insts.name $instName] == "0x0"} {

    puts "\nERROR: Instance $instName not found!\n"
    return 0

    } else {

    set instPtr [dbGetInstByName $instName]

    foreach pgTermPtr [dbGet ${instPtr}.pgCellTerms] {

    set pgTermName [dbGet ${pgTermPtr}.name]
    set pgNetPtr [dbPGTermNet [dbGetPGTermByName $instPtr $pgTermName]]

    # Check connected net
    if {$pgNetPtr == "0x0"} {
    set pgNetName "0x0"
    } else {
    set pgNetName [dbGet ${pgNetPtr}.name]
    }

    # Sort power/ground
    if {[dbGet ${pgTermPtr}.type] == "powerTerm"} {
    lappend pgTermArray(power) $pgTermName
    lappend pgNetArray(power) "$pgTermName $pgNetName"

    } elseif {[dbGet ${pgTermPtr}.type] == "groundTerm"} {

    lappend pgTermArray(ground) $pgTermName
    lappend pgNetArray(ground) "$pgTermName $pgNetName"
    }
    }
    }

    # Return results
    if {[regexp {\-net} $args]} {

    return $pgNetArray($termType)

    } else {

    return $pgTermArray($termType)
    }

    }

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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