• 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 14141
  • 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
  • Vishnu Chada
    Vishnu Chada over 14 years ago
    can you post the script or the command sequence you are using to get the wire pointer ? It would be good to know the intent behind using the the command , there could be an easier way..
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sambasiva
    sambasiva over 14 years ago

     set fp1 [open "nets_list" "r"]
    set fp2 [open "nets_next_list" "w"]
    foreach net [gets $fp1] {
    set netPtr [dbGetNetByName $net]
    dbForEachNetWire $netPtr segmentPtr {
    set c [dbObjName [dbWireNet $segmentPtr]]
    puts $c
    dbWireNextInNet $segmentPtr

    }
    }

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sambasiva
    sambasiva over 14 years ago

     Hi Vishnu

    To explain the problem clearly ......

    I want to select a net (physically) next to a given net in the design after routing .With the above scipt iam not able to get it.

    help me 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 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
  • sambasiva
    sambasiva over 14 years ago
    Hi Bob

    Thank you so much for your response and script geven below.

    Means there is no use of dbWireNextInNet command.

    Thanks
    sambasiva
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sambasiva
    sambasiva over 14 years ago

    Hi Bob

     Iam not able to run the scipt given above.

    Isue is with the  command

    set direction [dbGet $layer.direction]

    'direction' is not a recognized object/attribute. For help use 'dbGet <object>.?' to get list of all supported objects and attributes

     Correct me 

     

    • 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