• 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. Is there a way to get all parts connected to a flat-net...

Stats

  • State Verified Answer
  • Replies 5
  • Subscribers 12
  • Views 1873
  • Members are here 0
More Content

Is there a way to get all parts connected to a flat-net?

Jadystone
Jadystone 10 months ago

I am trying to use TCL to check all capcitors voltage whether is below permitting voltage. So I first get a flatnet which net name gives me the voltage information such as VCC3.3. Then I iterate all capcitors connected to the flatnet and check the description of the capcitor to get rating voltage. I compare the net allowing voltage with the rating voltage from capcitor. If they are not matching, I print a warnig out

  • Sign in to reply
  • Cancel
Parents
  • CadAP
    0 CadAP 10 months ago

     Jadystone 

    Please find the below code:

    It will check the property value Rated Voltage and pin connected wire name if both different value, then it will report pinname. 

    set object [GetSelectedObjects]
    set lPropCString [DboTclHelper_sMakeCString "Rated Voltage"]
    set lPartRefCString [DboTclHelper_sMakeCString "Part Reference"]
    set lPropValCString [DboTclHelper_sMakeCString ]
    set lPartRefValCString [DboTclHelper_sMakeCString ]
    set lPinCString [DboTclHelper_sMakeCString ]
    set lWireCString [DboTclHelper_sMakeCString ]
    set lNetCString [DboTclHelper_sMakeCString ]
    set lState [$object GetEffectivePropStringValue $lPropCString $lPropValCString]
    set lState [$object GetEffectivePropStringValue $lPartRefCString $lPartRefValCString]
    set lVoltage "[DboTclHelper_sGetConstCharPtr $lPropValCString]"
    set lPartRef "[DboTclHelper_sGetConstCharPtr $lPartRefValCString]"
    set lNullObj NULL
    set lStatus [DboState]
    set lIter [$object NewPinsIter $lStatus]
    #get the first pin of the part
    set lPin [$lIter NextPin $lStatus]
    while {$lPin !=$lNullObj } {

    $lPin GetPinName $lPinCString
    set lPinName [DboTclHelper_sGetConstCharPtr $lPinCString]
    set lWire [$lPin GetWire $lStatus]
    set lNet [$lPin GetNet $lStatus]

    if {$lWire != $lNullObj || $lNet != $lNullObj} {
    $lWire GetNetName $lWireCString
    # $lWire GetNetName $lNetCString
    set lWireName [DboTclHelper_sGetConstCharPtr $lWireCString]
    if {$lWireName != $lVoltage } {

    puts "Comp with Refdes=$lPartRef has pin $lPinName has connected to Net $lWireName but volatge rating of comp is $lVoltage"
    }

    }

    #get the next pin of the part
    set lPin [$lIter NextPin $lStatus]
    }
    delete_DboPartInstPinsIter $lIter

    Hope it helps!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jadystone
    0 Jadystone 10 months ago in reply to CadAP

    It work!

    Thank you very much.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Jadystone
    0 Jadystone 10 months ago in reply to CadAP

    It work!

    Thank you very much.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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