Home
  • Products
  • Solutions
  • Support
  • Company
  • Products
  • Solutions
  • Support
  • Company
Community PCB Design & IC Packaging (Allegro X) Allegro X Scripting - TCL SysCap - "Swap" Net Name"

Stats

  • State Verified Answer
  • Replies 9
  • Subscribers 5
  • Views 1229
  • Members are here 0
More Content

SysCap - "Swap" Net Name"

JohnFr38
JohnFr38 5 months 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.

  • Reply
  • Cancel
  • Cancel
  • srish09
    0 srish09 5 months 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
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • JohnFr38
    0 JohnFr38 5 months 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
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP 5 months ago in reply to JohnFr38

    # When pins are swapped in PCB Editor and back annotated in System Capture, the design swap information gets updated on the schematic where the pin text and pin numbers are interchanged.
    #This is the intended behavior of the swap pin command.


    # But if you want to swap the net name not the pin text and pin number. Please use the below tcl script.

    #Please copy the below code in notepad/notepad++ and save file with .tcl extension.
    #Please select the two wires(nets) which net names you want to interchange and source the below tcl code.

    #For example: Save the notepad as net_interchange.tcl and source {c:\tcl\net.interchange.tcl} where tcl is folder created in c directory.


    proc swapNetsName {} {

    set pageId [sch::dbGetActivePage]
    set pageSpath [sch::dbGetActivePageSpath]
    set selectedItems [sch::dbGetSelectedItems $pageId]
    if { [llength $selectedItems] > 0 } {

    foreach item $selectedItems {

    set itemType [sch::dbGetType $item]

    if {$itemType eq $sch::DBTRoute} {

    set name [sch::dbGetItemName $item]
    set netpos [sch::dbGetSegments $item]
    set netXY [ sch::dbConvertToUserUnits [lindex [lindex $netpos 0] 0] ]
    lappend netlist $name
    lappend netXYPos $netXY

    } else {puts "SelectedItem Is Not Net! or One Of The Selected Item Is Not A Net!"; set netlist {} }

    }

    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 "Sucessfully interchanged nets $net0 with $net1"

    } else { if {[llength $netlist] >= 1 } {puts "Net Interchange tcl Does Not Run For Single Net. Please Select Two Nets" } }


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

    }
    swapNetsName

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • JohnFr38
    0 JohnFr38 5 months ago in reply to CadAP

    Thank you very much for the script.

    I can't find the information to run the script from Cadence System Capture. I found where to execute TCL commands but not how to add a button or something to execute the script.

    Thanks for your answer.

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • JohnFr38
    0 JohnFr38 5 months ago in reply to JohnFr38

    I've finally managed to run the script! But I have a problem with this one:
    1) low priority transforming the script into a button
    2) high priority: the script switches the NETs but not where I select



    • Cancel
    • Up 0 Down
    • 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.

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

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