• 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 Scripting - TCL
  3. SysCap - "Swap" Net Name"

Stats

  • State Verified Answer
  • Replies 19
  • Subscribers 15
  • Views 6572
  • Members are here 0
More Content

SysCap - "Swap" Net Name"

JohnFr38
JohnFr38 over 2 years ago

Hi Everyone,

I'm having a problem using SysCapture. I would like to swap "net name" of a FPGA 

On VHD designer -> Texte/swap

On SysCap -> Swap PIN

But the function modifies the PIN name and not the associated NET.

  • Cancel
  • Sign in to reply
Parents
  • srish09
    0 srish09 over 2 years ago

    Hello John, 

    Are you swapping the pins in pcb editor and then importing the layout into System Capture? As per the flow, pins within the same pin group can be swapped in pcb editor. These changes can be back-annotated to SysCap schematic using the File > Import > Layout option.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • JohnFr38
    0 JohnFr38 over 2 years ago in reply to srish09

    Thank you for answer. 

    With this method on the schematic -> the numbering changes. On chip : 10-9-8-7-6 i want swap net label of 8 & 7. If I use the command swap pin, on the  graphic representation chip : 10-9-7-8-6

    I would like just swap the net no swap pin

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • JohnFr38
    0 JohnFr38 over 2 years ago in reply to CadAP

    Thanks a lot, the script works great! And exactly as I want it to!

    Can I turn the script into a button? Or do I have to run it every time from the command line?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    +1 CadAP over 2 years ago in reply to JohnFr38

    #After sourcing the below tcl code "CustomMenu" will be added and active till the System Capture is open. If you closed the system capture then you need to source the tcl file again. See the below attached screenshot.

    # For AutoLoading tcl in System Capture you can follow the below link:

    support.cadence.com/.../ArticleAttachmentPortal


    proc callMenu {} {

    set menu {CustomMenu}

    addMenuToMenuBar $menu {} 1 {} sch
    addActionToMenu $menu "Swap_Net" swapNetsName {} {} {} sch


    }


    proc swapNetsName {} {


    set pageId [sch::dbGetActivePage]
    set pageSpath [sch::dbGetActivePageSpath]
    set selectedItems [sch::dbGetSelectedItems $pageId]

    if { [llength $selectedItems] > 0 } {

    foreach item $selectedItems {

    set itemId [sch::dbGetConnectedItems $item]
    # puts $itemId
    set itemType [sch::dbGetType $itemId]
    # puts $itemType
    if {$itemType eq $sch::DBTRoute} {

    set name [sch::dbGetItemName $itemId]
    set netpos [sch::dbGetPos $item]
    set netXY [ sch::dbConvertToUserUnits $netpos]
    lappend netlist $name
    lappend netXYPos $netXY

    }
    }

    # return $netlist
    # return $netXYPos

    if {[llength $netlist] == 2} {

    # puts "$netlist"
    # puts "$netXYPos"
    set net0 [lindex $netlist 0]
    # puts $net0
    set net1 [lindex $netlist 1]
    # puts $net1
    set net0Xpos [lindex [lindex $netXYPos 0] 0]
    # puts $net0Xpos
    set net0Ypos [lindex [ lindex $netXYPos 0] 1]
    # puts $net0Ypos
    set net1Xpos [lindex [lindex $netXYPos 1 ] 0]
    # puts $net1Xpos
    set net1Ypos [lindex [lindex $netXYPos 1] 1]
    # puts $net1Ypos

    renameSignal -pg $pageSpath -net [list $net0Xpos $net0Ypos $net0 $net1]
    renameSignal -pg $pageSpath -net [list $net1Xpos $net1Ypos $net1 $net0]

    puts "Successfully interchange selected instances of $net0 with $net1"
    selectObject none

    }

    if { [llength $selectedItems] <= 1 } {

    puts "Net Interchange tcl Does Not Run For Single Net. Please Select Two Pins whose nets need to be interchanged "

    }

    if {[llength $selectedItems] > 2} {

    puts "More than two Pins are selected, Please select two Pins"}


    } else {puts "No Object Is Selected On The Schematic!"}

    }

    callMenu

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • JohnFr38
    0 JohnFr38 over 2 years ago in reply to CadAP

    It's the best solution! Thank you so much!


    This solution is 100% functional and even allows you to add a keyboard shortcut! 

    I had read another guide that asked you to put scripts in "canvas/resources/sda" Now I understand where the mistake was

    Thanks again

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 5 days ago in reply to CadAP

    Dear CadAP,

    may i ask you if i run On SysCap -> Swap PIN. How could i swap the pin number and pin name together? Currently only Pin Number swapped without Pin Name swapped together.

    Many thanks.

    Moyan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP 5 days ago in reply to MZ20250602835

    MZ20250602835 

    Currently only Pin Number is editable on schematic canvas. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • CadAP
    0 CadAP 5 days ago in reply to MZ20250602835

    MZ20250602835 

    Currently only Pin Number is editable on schematic canvas. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • MZ20250602835
    0 MZ20250602835 4 days ago in reply to CadAP

    Dear CadAP,

    many thanks for your reply. I created another case for this issue: (1) Pin Swap issue from DE HDL to System Capture - Allegro X System Capture (EE Cockpit) - PCB Design & IC Packaging (Allegro X) - Cadence Community

    If a solution such as tcl available may i ask you to advise me in the case above?

    Many thanks again and wish you a nice day.

    Best Regards

    Moyan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 4 days ago in reply to CadAP

    Dear CadAP,

    an update: i swapped the pins in PCB Editor and back annotated in System Capture, the design swap information gets updated on the schematic only the pin numbers were interchanged and the pin text wasn't changed.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 4 days ago in reply to CadAP

    Dear CadAP,

    kindly to give a update and the solution is below:

    ALLOW_PINTEXT_SWAP

    By default, pin swaps received from back-end or performed on the schematic swap only pin numbers assigned to the pins. When this directive set to ON, both pin names and pin numbers assigned to the pins are swapped. 

    Syntax

    ALLOW_PINTEXT_SWAP 'ON|OFF'

    Example

    ALLOW_PINTEXT_SWAP 'ON'

    Corresponding UI Option

    None

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP 4 days ago in reply to MZ20250602835

    MZ20250602835 

    When you swap a pin name and number in the PCB editor and then backannotate the changes to Allegro System Capture, it is necessary to include the above directive in Allegro System Capture either site.cpm or project.cpm.

    This directive allows the pin swap to be applied to the corresponding component within Allegro System Capture.

    The pin text can also be swapped along with the pin number after defining the ALLOW_PINTEXT_SWAP directive in the START_CANVAS section of the project or site cpm.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MZ20250602835
    0 MZ20250602835 4 days ago in reply to CadAP

    Dear CadAP,

    many thanks again.

    Best Regards

    Moyan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify 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.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information