• 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. selecting a net next to a given net

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 91
  • Views 14143
  • 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

selecting a net next to a given net

KVBABU
KVBABU over 14 years ago

how to select a net next to a net with the db command.

Iam using the below command to get but  iam not getting some body help me 

 dbWireNextInNet

  • Cancel
Parents
  • BobD
    BobD over 14 years ago

    I think the best way to do this is to expand the box of a selected wire segment and use "editSelect" to find wires within that box on the same layer:

    set selected [dbGet selected]
    if {$selected == "0x0"} {
      Puts "Nothing selected"
      return
    } elseif {[llength $selected] != 1} {
      Puts "More than 1 wire selected - select a single wire segment and try again"
      return
    }
    set selectedWire [dbGet selected]
    set pts [dbGet $selectedWire.pts]
    set net [dbWireNet $selectedWire]
    Puts "INFO: Original wire segment is $selectedWire of net [dbGet $net.name]"
    set layer [dbGet $selectedWire.layer]
    set layerName [dbGet $layer.name]
    set direction [dbGet $layer.direction]
    if {$direction == "Horizontal"} {
      set pitch [dbGet $layer.pitchY]
      set llx [lindex [lindex [lindex $pts 0] 0] 0]
      set lly [expr [lindex [lindex [lindex $pts 0] 0] 1] - $pitch]
      set urx [lindex [lindex [lindex $pts 0] 1] 0]
      set ury [expr [lindex [lindex [lindex $pts 0] 1] 1] + $pitch]
    } else {
      set pitch [dbGet $layer.pitchX]
      set llx [expr [lindex [lindex [lindex $pts 0] 0] 0] - $pitch]
      set lly [lindex [lindex [lindex $pts 0] 0] 1]
      set urx [expr [lindex [lindex [lindex $pts 0] 1] 0] + $pitch]
      set ury [lindex [lindex [lindex $pts 0] 1] 1]
    }
    set rdagSelectIntersectingBox 1
    editSelect -area $llx $lly $urx $ury -layer $layerName
    Puts "Nearby wire segments:"
    foreach wire [dbGet selected] {
      Puts "  Wire segment $wire of net [dbGet [dbWireNet $wire].name]"
    }

    Example result:

    INFO: Original wire segment is 0x2aa95bb668 of net {high_mag[3]}
    Nearby wire segments:
      Wire segment 0x2aa9643ae0 of net n_6011
      Wire segment 0x2aac53fc30 of net n_2506
      Wire segment 0x2aa96270e8 of net {high_mag[3]}
      Wire segment 0x2aa95bb668 of net {high_mag[3]}

    Hope this helps,
    Bob

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

    I think the best way to do this is to expand the box of a selected wire segment and use "editSelect" to find wires within that box on the same layer:

    set selected [dbGet selected]
    if {$selected == "0x0"} {
      Puts "Nothing selected"
      return
    } elseif {[llength $selected] != 1} {
      Puts "More than 1 wire selected - select a single wire segment and try again"
      return
    }
    set selectedWire [dbGet selected]
    set pts [dbGet $selectedWire.pts]
    set net [dbWireNet $selectedWire]
    Puts "INFO: Original wire segment is $selectedWire of net [dbGet $net.name]"
    set layer [dbGet $selectedWire.layer]
    set layerName [dbGet $layer.name]
    set direction [dbGet $layer.direction]
    if {$direction == "Horizontal"} {
      set pitch [dbGet $layer.pitchY]
      set llx [lindex [lindex [lindex $pts 0] 0] 0]
      set lly [expr [lindex [lindex [lindex $pts 0] 0] 1] - $pitch]
      set urx [lindex [lindex [lindex $pts 0] 1] 0]
      set ury [expr [lindex [lindex [lindex $pts 0] 1] 1] + $pitch]
    } else {
      set pitch [dbGet $layer.pitchX]
      set llx [expr [lindex [lindex [lindex $pts 0] 0] 0] - $pitch]
      set lly [lindex [lindex [lindex $pts 0] 0] 1]
      set urx [expr [lindex [lindex [lindex $pts 0] 1] 0] + $pitch]
      set ury [lindex [lindex [lindex $pts 0] 1] 1]
    }
    set rdagSelectIntersectingBox 1
    editSelect -area $llx $lly $urx $ury -layer $layerName
    Puts "Nearby wire segments:"
    foreach wire [dbGet selected] {
      Puts "  Wire segment $wire of net [dbGet [dbWireNet $wire].name]"
    }

    Example result:

    INFO: Original wire segment is 0x2aa95bb668 of net {high_mag[3]}
    Nearby wire segments:
      Wire segment 0x2aa9643ae0 of net n_6011
      Wire segment 0x2aac53fc30 of net n_2506
      Wire segment 0x2aa96270e8 of net {high_mag[3]}
      Wire segment 0x2aa95bb668 of net {high_mag[3]}

    Hope this helps,
    Bob

    • 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