Sim Model Editor
Parent Page: SIM Dialogs
Summary
The Sim Model dialog provides numerous controls to create or edit a simulation model, including Model Kind/subkind, model Parameters, Port Map, Model Location, and so on.
Access
In the Models region of the Properties dialog of a component, click the Add button down the bottom right, then choose Simulation to open this dialog.
Options/Controls
Model Kind Tab
- Model Kind - Select the required category of simulation model. Subsequent access to a specific simulation model then depends on if Spice supports external models for that component-kind.
- Model Sub-Kind - Once the Model Kind has been selected, choose the required Model Sub-Kind. When this is done Altium Designer will automatically define the Spice Prefix and the Netlist Template fields. Subsequent access to a specific simulation model then depends on whether Spice supports external models for that component-kind. Choose the Generic Editor option to: link to a model file; have access to editing the pre-defined Netlist Template; and be able to change the Spice Prefix.
- Spice Prefix - Spice defines a standard set of Prefix values, each corresponding to a component kind. For example a Capacitor model has a prefix of C, an Integrated Circuit has a Spice prefix of X and so on.
- Model Name - The Model Name is the name for the device model. Device models have device model names so they can be referenced in simulations and device element lines in SPICE refer to the model names as well.
- Browse - Click this button to invoke the Browse Libraries dialog and choose a different model from a list of available libraries. Make sure the model you choose to link is valid for the component.
- Create - Click this button to invoke the Model wizard depending on the model type. For a new simulation model, the model wizard will help you extract parameters to create a specific spice model.
- Description - This description field for a device model also appears in the editable Model Description column of the Component Properties dialog. Edit this field to change the description.
- Model Location - these options determine how flexible Altium Designer can be in locating the model.
- Any - Enable this option if you want to use a simulation model from any currently available library (model file), as listed in the Available Libraries dialog.
- In File - Enable this option to enter a specific model file name. The model file must either be available (listed in the Available Libraries dialog), or be in the same folder as the project.
- Full Path - Enable this option if you wish to browse and choose a specific model file.
- Choose - this button is enabled when the Full Path option is chosen. Click to navigate and select the required model in the required folder.
- Use SIM model from component library - this option is enabled if the model has been located in the same integrated library as the schematic symbol.
- Found In - shows where the model has been located, confirm that this is what is required.
Parameters Tab
Click on the Parameters tab to set up the parameters for the target SIM model, the parameters are different for each model.
Port Map
Click on the Port Map tab to inspect the mapping from the schematic pins to the model pins, use the details in the Model File tab at the bottom of the dialog to assist in the mapping process.
- Pin Mapping List - This table defines the association from the schematic symbol pins, to the relevant entries in the simulation model file. Choose from the pull down list for each pin in the Model Pin column and check its associated Model File for pin assignments.
- Next Part >> - Click to move to the next part of a multi-part device, and check or map its pins.
- Previous Part << - Click to move to the previous part of a multi-part device.
Netlist Template
The Netlist Template tab, at the bottom of the dialog, gives access to the information that is entered into the XSpice netlist for a given component.
For all of the predefined model kinds and sub-kinds, the Netlist Template is read-only. If, however, one of these predefined entries does not allow enough control over the information placed in the netlist, you can define your own template. To edit the Netlist Template, you need to select Generic Editor in the Model Sub-Kind region of the Sim Model dialog - ensuring that the Model Kind field is first set to General. This will be the default model kind/sub-kind setting when adding a new simulation model to a schematic component. For all other General model sub-kinds, you can effectively change to Generic Editor and edit the predefined template - modifying it to your own requirements.
When defining the Netlist Template, the information entered should be in accordance with the requirements of SPICE3f5/XSpice, and the required model.
Netlist Preview
The Netlist Preview tab shows the netlist entry as it will be written into the XSPICE netlist. If there are illegal pin assignments, go to the Netlist Template and the Pin Mapping pages to check the pin mapping. Refer to the Model File tab for subcircuit pin assignments. When connection information is not available, is inserted in place of the net name to which the pin is connected.
Model File
The Model File tab shows the contents of the simulation model file of either a sub-circuit model with a CKT extension or a device model with a MDL extension. This is a handy reference when defining the Pin Mapping.