• 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. pin location

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 93
  • Views 15168
  • 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

pin location

Yemelya
Yemelya over 14 years ago
Hello,

How can I find location of the pin/pins for particular instance? For example I can find the instance itself by dbInstLoc, but I am not sure how to locate pins of this cell.

Thanks!
-Boris

 

  • Cancel
Parents
  • turtlej9
    turtlej9 over 14 years ago

    Hi Boris,

    We've got a procedure we use that incorporates the dbTermLoc that you've already identified. After sourcing this proc, you'd just have to type "queryInstPin_loc myInstance/pin"


    proc queryInstPin_loc { { instPin "" } } {
      loguse procedures queryInstPin_loc
    # queryInstPin_loc: returns the location of the <inst>/<pin>
      if { $instPin == "" } {
        puts ""
        puts "   Usage:  queryInstPin_loc  <inst>/<pin>"
        puts ""
        puts "      returns the location of pin <inst>/<pin>"
        puts ""
      } else {
        set scale [pdsDBU2Micron 1]
        set numbFields [regsub -all "/" $instPin " " inst_pin]
        set pin [lindex $inst_pin $numbFields]
        regsub -all {[[$^?+*()|\\]} $pin {\\&} escPin
        regsub -all "/${escPin}$" $instPin "" inst
        set instPtr [dbGetInstByName $inst]
        if { $instPtr == "0x0" } {
          puts "Didn't find inst $inst"
        } else {
          set termPGPtr "0x0"
          set termPtr [dbGetTermByName $instPtr $pin]
          if { $termPtr == "0x0" } {
            set termPGPtr [dbGetPGTermByName $instPtr $pin]
          }
          if { $termPtr == "0x0"  &&  $termPGPtr == "0x0" } {
            puts "Didn't find signal or power pin named $pin on inst $inst"
          } else {
            if { $termPGPtr == "0x0" } {
              set pinLoc [dbTermLoc $termPtr]
              set dbXY  [dbTermLoc $termPtr]
             } else {
              set pinLoc [dbTermLoc $termPGPtr]
              set dbXY  [dbTermLoc $termPGPtr]
            }
            set dbX [lindex $dbXY 0]
            set dbY [lindex $dbXY 1]
            set x [expr $dbX * $scale]
            set y [expr $dbY * $scale]
            return "$x $y"
            return $pinLoc
          }
        }
      }
    }

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • turtlej9
    turtlej9 over 14 years ago

    Hi Boris,

    We've got a procedure we use that incorporates the dbTermLoc that you've already identified. After sourcing this proc, you'd just have to type "queryInstPin_loc myInstance/pin"


    proc queryInstPin_loc { { instPin "" } } {
      loguse procedures queryInstPin_loc
    # queryInstPin_loc: returns the location of the <inst>/<pin>
      if { $instPin == "" } {
        puts ""
        puts "   Usage:  queryInstPin_loc  <inst>/<pin>"
        puts ""
        puts "      returns the location of pin <inst>/<pin>"
        puts ""
      } else {
        set scale [pdsDBU2Micron 1]
        set numbFields [regsub -all "/" $instPin " " inst_pin]
        set pin [lindex $inst_pin $numbFields]
        regsub -all {[[$^?+*()|\\]} $pin {\\&} escPin
        regsub -all "/${escPin}$" $instPin "" inst
        set instPtr [dbGetInstByName $inst]
        if { $instPtr == "0x0" } {
          puts "Didn't find inst $inst"
        } else {
          set termPGPtr "0x0"
          set termPtr [dbGetTermByName $instPtr $pin]
          if { $termPtr == "0x0" } {
            set termPGPtr [dbGetPGTermByName $instPtr $pin]
          }
          if { $termPtr == "0x0"  &&  $termPGPtr == "0x0" } {
            puts "Didn't find signal or power pin named $pin on inst $inst"
          } else {
            if { $termPGPtr == "0x0" } {
              set pinLoc [dbTermLoc $termPtr]
              set dbXY  [dbTermLoc $termPtr]
             } else {
              set pinLoc [dbTermLoc $termPGPtr]
              set dbXY  [dbTermLoc $termPGPtr]
            }
            set dbX [lindex $dbXY 0]
            set dbY [lindex $dbXY 1]
            set x [expr $dbX * $scale]
            set y [expr $dbY * $scale]
            return "$x $y"
            return $pinLoc
          }
        }
      }
    }

    • 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