• 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. PCB Design
  3. How to automatically launch simulations replacing parts...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 165
  • Views 12633
  • Members are here 0
More Content
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 automatically launch simulations replacing parts from different manufacturers.

simpro
simpro over 9 years ago

Example : i made a design with four diodes but each one can come from NXP or ON SEMI or other.

I want to verify that whatever the mounted diode will be, the design will work => launching a PSPICE simulation for each combination of diodes.

That is i don't want to replace by hand one part by another one : i want all combinations to be done automatically in PSPICE.

The replacement is always of the same type : a BAS16 diode stays a BAS16 diode but comes from different manufacturer.

Is it possible with a TCL script in Capture or something else ?

Thanks !

  • Cancel
  • Alok Tripathi
    Alok Tripathi over 9 years ago

    Can you please elaborate bit more? It is not clear - what's different between two parts? or what is the difference PSpice or Capture would see between two BAS16 parts, one from NXP or OnSEMI?

    I guess these would be two different parts (with different associated models) from two different olbs?

    As par as writing a tcl script to delete/place a part is concerned; yes this is possible. you can delete and place a new part using tcl.

    if your primary goal is to simulate a standard test fixture with different models then this can be easily achieved by directly simulating a .cir file in PSpice; and having a script to update model in this cir file to do simulation with different models.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • simpro
    simpro over 9 years ago

    Hi, i wanted to simulate with different models but one schematic. That is each component model is different even if the name is the same (the shape in schematic is the same too). For example BAS16 reverse leakage current is not the same with every manufacturer.

    In fact the idea is more to have only one schematic, with a "multi manufacturer capable" part, named for example BAS16, and then simulating with manufacturer-specific model.

    We could do it like that : add a "manufacturer" property to the part, let the designer choose the manufacturer and when the simulator starts the .cir is generated using a postfix in the model name that is the value of "manufacturer" property. For example, BAS16 with NXP manufacturer gives BAS16_NXP component model. "PSpice template" property of the multimanufacturer part in Orcad is modified to @REFDES_@MANUFACTURER ... to invoke a specific manufacturer model (e.g. BAS16_NXP).

    Actually i follow the documentation on scanning properties of a part in the datasheet inside a script but this documentation is really not enough detailed !

    I wrote the code, source the script but the result is a print of the string pointer... I don't know how to retirive or print in a dialog the properties name and values ...

    The script is a right mouse button called with one part selected only in the "more..." submenu.

    As below, it prints "Property: _f0f2ff08_p_CString" and not the property name !!! i am fed up because nowhere is explained how to deal with these pointers ... I lost sooooooo many time because of bad documentation. Each property in the database is not explained or where is it ? not in the "OrCAD Capture Tcl/Tk Extensions – Application Notes" this is only a big list absolutly unusable.

    Is there somewhere a script example that displays the properties names and values in a box or in the session log for a part with a right mouse button click or parts in a design ?

    The paragraph 3.2.22 only retrieve string pointers but they are never displayed. In paragraph 3.2.23 you MUST know the property name in advance.

    package require Tcl 8.4
    package require DboTclWriteBasic 16.3.0
    package provide capUtils 1.0

    namespace eval ::capUtils {
     namespace export capSelectDeviceManufacturerEnabler
     namespace export capSelectDeviceManufacturer
    }

    #------------------------------------------------------------------------------
    # capSelectDeviceManufacturerEnabler
    #
    # Enables the context menu if :
    # - one item only is selected
    # - it contains the "Supplier" and "SupplierList" properties
    #------------------------------------------------------------------------------
    proc ::capValeoUtils::capSelectDeviceManufacturerEnabler {} {

     # Variables
     set lNullObj NULL
     set lReturn 0
     set lStatus [DboState]
       
     # Verifiy only one object is selected
     set lSelObjs [GetSelectedObjects] 
     if { [llength $lSelObjs] == 1 } {
     
      # Verifiy object is a part
      set lObj [lindex $lSelObjs 0]
      set lObjType [DboBaseObject_GetObjectType $lObj] 
      if { $lObjType == 13 } {
       set lReturn 1
      }
     }
     return $lReturn
    }
     
    #------------------------------------------------------------------------------
    # capSelectDeviceManufacturer
    #
    # 1- Parse the "SupplierList" property
    # 2- Provide a dialog to the user for one supplier selection
    # 3- Fills the "Supplier" property with the supplier name
    #------------------------------------------------------------------------------
    proc ::capUtils::capSelectDeviceManufacturer {} {

     # Variables
     set lNullObj NULL
     set lStatus [DboState]
     
     # Select object
     set lSelObjs [GetSelectedObjects]
     set lObj [lindex $lSelObjs 0]

     # Create iteration
     set lPropsIter [$lObj NewDisplayPropsIter $lStatus]
      
     #get the first display property of the object
     set lDProp [$lPropsIter NextProp $lStatus]
     
        while {$lDProp !=$lNullObj } {
         #placeholder: do your processing on $lDProp
         
         #get the name
         set lName [DboTclHelper_sMakeCString]
         $lDProp GetName $lName

         puts "Property: $lName"
         
         #get the location
         set lLocation [$lDProp GetLocation $lStatus]
         
         #get the rotation
         set lRot [$lDProp GetRotation $lStatus]
         
         #get the font
         set lFont [DboTclHelper_sMakeLOGFONT]
         set lStatus [$lDProp GetFont $::DboLib_DEFAULT_FONT_PROPERTY $lFont]
         
      #get the color
      set lColor [$lDProp GetColor $lStatus]
      
      #get the next display property on the object
      set lDProp [$lPropsIter NextProp $lStatus]  
     }
     delete_DboDisplayPropsIter $lPropsIter
    }

    #==============================================================================
    # Register all context menus
    #
    # RegisterAction <Label> <Enabler> <Accel> <Callback> <ViewType>
    #
    # Label  Label on the pop-up menu
    # Enabler TCL procedure based on which this menu-item will appear enabled or disabled
    # Accel  Keyboard Accelerator
    # Callback TCL Procedure that will be invoked when the user clicks on this menu-item
    # ViewType The Application View type for which this command is available.
    #   Valid view types are: Schematic, PM, Empty Value for NULL
    #==============================================================================

    RegisterAction "Select Device Manufacturer" ::capUtils::capSelectDeviceManufacturerEnabler "" ::capUtils::capSelectDeviceManufacturer Schematic

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