• 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 eradicate a net completely

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 92
  • Views 15351
  • 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 eradicate a net completely

AThomasL
AThomasL over 12 years ago

I am writing some commands to delete nets and connect their instTerms to other nets.  deleteNet does not always delete the net and its wires.  If the net is connected to a top level port I know to use deleteModulePort - first, but if the net was connected to a lower level port in the original netlist hierarchy, how do I trace through hInst/hNet/hTerm to really delete the net and its possible hierarchical port connections?  Some of my nets are busses and I'll be deleting all members of that bus.  I did figure out that editDelete -net will at least get rid of my wires, but the verification guys don't like when I write a flat Verilog netlist that has wire statements for nets that no longer exist and connect to nothing.

 

  • Cancel
Parents
  • AThomasL
    AThomasL over 12 years ago

    set net [dbGet top.nets {.name == "my_net_to_delete"}]
    array unset busTerms
    foreach hNet [dbGet -e $net.hNets] {
          foreach hTerm [dbGet -e $hNet.hTerms] {
             set hInstName [dbGet $hTerm.hInst.name]
             if {"$hInstName" == "{}" } {
                set hInstName "-"
             }
             set bus [dbGet $hTerm.term.bus]
             if {$bus} {
                set busTerms($hInstName\ [dbGet $bus.basename]) 1
             } else {
                deleteModulePort $hInstName [dbGet $hTerm.term.name]
             }
          }
       }
    foreach bus [array names busTerms] {
       lassign $bus inst port
       deleteModulePort $inst $port
    }
    array unset busTerms

       set bus [dbGet $net.bus]
       if {$bus} {
          deleteNet $bus.baseName
       } else {
          deleteNet $bus
       }

    This has the caveat of deleting whole buses, but you shouldn't be deleting just one net of a bus anyway.  I still have cases of some nets which are hanging around, but they don't have hInst connections.  They have names like a/b/c[0] but are not part of busses (dbGet $net.bus = 0x0).  It's a different issue.  More debugging...

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • AThomasL
    AThomasL over 12 years ago

    set net [dbGet top.nets {.name == "my_net_to_delete"}]
    array unset busTerms
    foreach hNet [dbGet -e $net.hNets] {
          foreach hTerm [dbGet -e $hNet.hTerms] {
             set hInstName [dbGet $hTerm.hInst.name]
             if {"$hInstName" == "{}" } {
                set hInstName "-"
             }
             set bus [dbGet $hTerm.term.bus]
             if {$bus} {
                set busTerms($hInstName\ [dbGet $bus.basename]) 1
             } else {
                deleteModulePort $hInstName [dbGet $hTerm.term.name]
             }
          }
       }
    foreach bus [array names busTerms] {
       lassign $bus inst port
       deleteModulePort $inst $port
    }
    array unset busTerms

       set bus [dbGet $net.bus]
       if {$bus} {
          deleteNet $bus.baseName
       } else {
          deleteNet $bus
       }

    This has the caveat of deleting whole buses, but you shouldn't be deleting just one net of a bus anyway.  I still have cases of some nets which are hanging around, but they don't have hInst connections.  They have names like a/b/c[0] but are not part of busses (dbGet $net.bus = 0x0).  It's a different issue.  More debugging...

    • 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