• 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. Allegro X Capture CIS
  3. DRC on duplicate nets

Stats

  • State Suggested Answer
  • Replies 7
  • Answers 1
  • Subscribers 42
  • Views 3684
  • Members are here 0
More Content

DRC on duplicate nets

WC202409216216
WC202409216216 over 1 year ago

Hi, 

Do we have any DRC checking rules that can flag same net name used in different places except it has off-page connector? see highlighted circles in picture below, would like the DRC tool to catch this.

  • Cancel
  • Sign in to reply
  • WC202409216216
    0 WC202409216216 over 1 year ago in reply to Jeet

    Yes, TCL scripts work for me, can I have one? 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jeet
    0 Jeet 11 months ago in reply to WC202409216216

    Please perform below steps to run TCL Script >

    1. Copy the attached script in notepad and save the file.
       
    2. Invoke OrCAD Capture and open the schematic design.
       
    3. Select the design file (.dsn) in the Project Manager.
       
    4. Select View > Command Window.
       
    5. Source the script in Capture using the following command: 

    source {path_to_script\tcl_dump_duplicate_net_name.tcl}
     

    Example: 

    source C:\TCL\tcl_dump_duplicate_net_name.tcl} and enter dumpToSessionlog in next line.

    Go to Session Log and see the off page name along with page number is present in the session log.

    Code >

    #Dump duplicate nets with page name info into sessionlog window
    proc dumpWireList {} {
    # global i
    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lNetNameCString [DboTclHelper_sMakeCString]
    set duplicateNetName {}
    set lStatus [DboState]
    set lDesign [$lSession GetActiveDesign]
    set lSchi_Name [DboTclHelper_sMakeCString]
    set lSchematicIter [$lDesign NewViewsIter $lStatus $::IterDefs_SCHEMATICS]
    #get the first schematic view
    set lView [$lSchematicIter NextView $lStatus]

    set lPage_Name [DboTclHelper_sMakeCString]


    while { $lView != $lNullObj} {
    #dynamic cast from DboView to DboSchematic
    set lSchematic [DboViewToDboSchematic $lView]
    $lSchematic GetName $lSchi_Name
    set lPagesIter [$lSchematic NewPagesIter $lStatus]
    #get the first page
    set lPage [$lPagesIter NextPage $lStatus]

    # puts [DboTclHelper_sGetConstCharPtr $lSchi_Name]

    while {$lPage!=$lNullObj} {
    #placeholder: do your processing on $lPage
    $lPage GetName $lPage_Name
    set lPageName [DboTclHelper_sGetConstCharPtr $lPage_Name]
    set lWiresIter [$lPage NewWiresIter $lStatus]
    #get the first wire
    set lWire [$lWiresIter NextWire $lStatus]
    set lNullObj NULL
    while {$lWire != $lNullObj} {
    set lObjectType [$lWire GetObjectType]
    if {$lObjectType == $::DboBaseObject_WIRE_SCALAR} {
    #placeholder: do your processing on Wire scalar $lWire
    $lWire GetNetName $lNetNameCString
    set lNetName [DboTclHelper_sGetConstCharPtr $lNetNameCString]

    # puts [lsearch $duplicateNetName $lNetName]
    if {[lsearch $duplicateNetName $lNetName] == -1} {
    lappend duplicateNetName $lNetName
    }
    }
    #get the next wire
    set lWire [$lWiresIter NextWire $lStatus]
    }
    delete_DboPageWiresIter $lWiresIter


    set lPage [$lPagesIter NextPage $lStatus]
    }
    #placeholder: do your processing on $lSchematic

    #puts $lSchematic

    #get the next schematic view
    set lView [$lSchematicIter NextView $lStatus]
    }
    delete_DboLibViewsIter $lSchematicIter
    delete_DboSchematicPagesIter $lPagesIter

    return $duplicateNetName
    }


    proc dumpToSessionlog {} {
    # global i
    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lWirelist [dumpWireList]
    set lNetNameCString [DboTclHelper_sMakeCString]
    set duplicateNetName {}
    set lStatus [DboState]
    set lDesign [$lSession GetActiveDesign]
    set lSchi_Name [DboTclHelper_sMakeCString]
    set lPageNamelist {}
    ClearSessionLog
    foreach wireName $lWirelist {
    set lSchematicIter [$lDesign NewViewsIter $lStatus $::IterDefs_SCHEMATICS]
    #get the first schematic view
    set lView [$lSchematicIter NextView $lStatus]

    set lPage_Name [DboTclHelper_sMakeCString]


    while { $lView != $lNullObj} {
    #dynamic cast from DboView to DboSchematic
    set lSchematic [DboViewToDboSchematic $lView]
    $lSchematic GetName $lSchi_Name
    set lPagesIter [$lSchematic NewPagesIter $lStatus]
    #get the first page
    set lPage [$lPagesIter NextPage $lStatus]

    # puts [DboTclHelper_sGetConstCharPtr $lSchi_Name]
    while {$lPage!=$lNullObj} {
    #placeholder: do your processing on $lPage
    $lPage GetName $lPage_Name
    set lPageName [DboTclHelper_sGetConstCharPtr $lPage_Name]
    set lWiresIter [$lPage NewWiresIter $lStatus]
    #get the first wire
    set lWire [$lWiresIter NextWire $lStatus]
    set lNullObj NULL
    while {$lWire != $lNullObj} {
    set lObjectType [$lWire GetObjectType]
    if {$lObjectType == $::DboBaseObject_WIRE_SCALAR} {
    #placeholder: do your processing on Wire scalar $lWire
    $lWire GetNetName $lNetNameCString
    set lNetName [DboTclHelper_sGetConstCharPtr $lNetNameCString]
    if {$wireName == $lNetName && [lsearch $lPageNamelist $wireName\_$lPageName] == -1 } {

    lappend lPageNamelist $wireName\_$lPageName
    DboState_WriteToSessionLog [DboTclHelper_sMakeCString $wireName\_$lPageName]

    }

    }
    #get the next wire
    set lWire [$lWiresIter NextWire $lStatus]
    }
    delete_DboPageWiresIter $lWiresIter


    set lPage [$lPagesIter NextPage $lStatus]
    }
    #placeholder: do your processing on $lSchematic

    #puts $lSchematic

    #get the next schematic view
    set lView [$lSchematicIter NextView $lStatus]
    }
    delete_DboLibViewsIter $lSchematicIter
    delete_DboSchematicPagesIter $lPagesIter
    }

    # return $lPageNamelist
    }

    Let me know how it goes for you after running the TCL Script.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
<
Cadence Guidelines

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