Adding a Simulation Model to a Component Definition
Old Content - see latest equivalent
Modified by Jason Howie on 31-May-2017
Parent article: Releasing a Component Definition to a Vault
On the design side, each design component released to an Altium Vault is specified using a source
Component Definition. A component definition is simply just that – a definition of a particular design
component. A definition that ties together the required models and parameters for that component in
a clean and ordered fashion.
In terms of its representation in the various design domains, a vault-based component doesn't contain
the domain models themselves, but rather links to these models. Along with the typical Schematic
Symbol and PCB 2D/3D component model – released to the vault as Schematic Symbol and PCB
Component Items respectively – you can also link to a required simulation model, released to the
vault as a Simulation Model Item.
This document takes a look at adding a simulation model to a component definition within a
Component Library (*.CmpLib), including component-level simulation parameter definition and
configuration of pin mapping.
This document assumes that all relevant domain models (schematic symbol, PCB 2D/3D
component model, and simulation model) have already been released as Items in an Altium
Vault. For information on releasing schematic symbols and PCB component models, see
Releasing a Schematic Symbol to a Vault and Releasing a PCB 2D/3D Model to a Vault
respectively. For information on releasing simulation models, see Releasing a Simulation
Model to a Vault.
Component Library with a definition for a Schottky Diode. The Schematic Symbol and PCB Component Item Revisions are already linked.
All it needs now is for the Simulation Model Item (which has already been released to the vault) to be added!
Specifying the Requirement of a Simulation Model
Firstly, the simulation model type needs to be added to the Required Models/Parameters list
within the Component Library. This simply adds a field for that model type to the component's
definition. To do this, click the Add control at the bottom of the Required Models/Parameters
region, and choose the SIM entry from the menu.
Specify the SIM model type to be made available for use in component definitions.
By default the SIM column is enabled for display. This can be controlled using the Show
option, to the right of the SIM entry in the Required Models/Parameters region.
Adding the Simulation Model Link
With the SIM model type added to the list of required models, you can now proceed to add the actual
link to the required (and previously released) Simulation Model Item. Simply click on the Add control
at the bottom of the Model Links region and choose the SIM entry from the menu. The Choose
Models dialog will appear, from where you can browse within the targeted vault and select the
required model. The link will be added to the region and a preview of the SimModel file displayed in
the preview window to the right.
Add a link to the specific revision of a Simulation Model Item that will represent the component in the simulation domain.
Any number of SIM model links may be added, including links to different revisions of the same model
Item. Each link is to a specific named-revision of a Simulation Model Item (e.g. SIM-001-0001-1, for
revision 1 of Simulation Model Item SIM-001-0001). Using the Show in Explorer command on the
right-click menu for a selected model link will quickly access the Vaults panel, with the chosen
Simulation Model Item Revision in focus.
To change a SIM model link, rather than add an additional one, simply click on its Item field,
then click on the ... button. The Choose Model dialog will appear, from where you can
browse for and choose, a different Simulation Model Item, or a different revision of that
same Item. If the revision of the Item being used is not the latest – as reflected in the
Revision Status no longer being Up to date – and you need it to be, simply right-click on
the current model link entry and choose the Update To Latest Revision command.
Once added as a model link, a Simulation Model can be accessed by any component
definition in the Component Library document. Assignment is simply a case of specifying to
use the link as part of the definition. To remove a SIM model link, simply select it and click
the Remove control.
Adding Component-Level Simulation Parameters
When using a simulation model for a component in a design, parameters specific to that model can be
specified at two different levels:
Model-Level Parameter –specified as part of the simulation model definition itself (in the
SimModel file), and released with that definition into a revision of the linked Simulation Model
Item.
Component-Level Parameter – specified as part of the component definition (here in the
CmpLib), and released with that definition into a revision of the linked Component Item.
Component-level parameters are used for parameters that are shared between multiple
models or where the designer wants to make such a parameter visible/editable on the
schematic (e.g. value, frequency etc).
Parameters are added at the component-level in the Required Models/Parameters region of the
Component Library document. It is important to note that the naming of parameters must be the
same as those parameters defined at the model-level. To see the model-level parameters, and
therefore which parameters can be added at the component-level (and their names!), select the SIM
model link and click the View Parameters control, at the bottom of the preview window.
View the model-level parameters for a Simulation Model Item, to see which parameters can be added at the component-level - and how
they are named!
Armed with the available model-level parameters, you can now proceed to add any of those same
parameters at the component-level – to be available to any component definition in the library. To do
so, simply click the Add control at the bottom of the Required Models/Parameters region. A new
parameter entry will be added to the list. Change the name as required – remembering to match
exactly the name of the corresponding model-level parameter.
Add sim-related parameters at the component-level.
To remove a parameter, simply select it and click the Remove control.
When an instance of the released component is placed in a design, a simulation parameter
can have a different value at the component-level, to that for the same parameter at the
model-level. When the netlist is generated, the component-level parameter will have
priority.
For some of the built-in SPICE3f5 models, entering a value for a parameter at the
component-level will override a related parameter defined in a linked model file (*.mdl). For
a semiconductor capacitor, for example, specifying a value for the component-level Width
parameter will override any value specified for the DEFW parameter in the associated model
file. If a parameter is specified at the component-level for a subcircuit model, that value will
override the value defined for it in the linked subcircuit file (*.ckt). If a parameter is
specified at the component-level for a digital device, that value will override the value
specified for that parameter in the source SimCode definition (*.scb).
Defining the Component from a Simulation Perspective
With the model link added and any component-level simulation parameters defined as required, you
can proceed to add/define the simulation 'portion' of the component's definition.
Model
Clicking on the SIM field for the definition will provide access to a dedicated model link pop-up
window. This presents a grid of all existing simulation model links, complete with all data columns.
Simply select the model link required to be used to represent that component in the simulation
domain, and either press Enter or double-click to assign that model.
Specify the SIM model to be used for the component.
Alternatively, drag and drop the required model link from the Model Links region, directly
onto the SIM field for the component definition.
Parameters
Locate the fields corresponding to the component-level simulation parameters that you have entered
in the Required Models/Parameters region of the document. There is one field per parameter.
Simply enter values for these parameters as required.
Specify values for component-level simulation parameters.
A parameter defined in the Required Models/Parameters 'bucket' doesn't have to be
used in a component definition. Only parameters with specified values will be released as
part of the component.
Depending on the component(s) being defined, there could be a considerable number of
parameters available. If you're finding it difficult to locate a parameter in a sea of
parameters down in the component definition region, simply use controls in the Required
Models/Parameters region (Show option for each parameter and related controls on the
right-click menu) to hide parameters from view.
Pin Mapping
Once the link to the required SIM model has been chosen, you need to ensure that the pins of the
component – when represented in the schematic domain – are correctly mapped to the pins of the
simulation model. This is performed in the Pin Mapping dialog, accessed by right-clicking on the SIM
model entry and choosing Edit Pin Mapping from the context menu. For each schematic pin, simply
use the available drop-down to change the associated Model Pin entry accordingly. If the device is
multi-part, be sure to check the mapping for each part.
Ensuring correct schematic pin-to-model pin mapping.
For a multi-part component, the ability to exclude a part from simulation is also determined
through the Pin Mapping dialog.
For the built-in SPICE3f5 and supported PSpice models, the function of each of the pins in a
model can be found in the general form section for that model, in the SPICE 3f5 user manual.
For subcircuit models, the manufacturer will typically insert comments for each pin of the
model, describing that pin's function. If no commenting is evident, then the pinout of the
model will typically be that of the physical device itself. Consult the datasheet for the device
in this case. For Digital SimCode models, the mapping of the component pins to the INPUTS
and OUTPUTS declared in the SimCode file will depend on the input and output node list
entries in the netlist template.
Verifying the Model in the Released Component
Once the component definition has been released to the target Altium Vault, the resulting Component
Item can be browsed in the Vaults panel. Direct access can be made after release by right-clicking on
the component definition and choosing Show in Explorer from the context menu.
View the released component directly in the target vault, courtesy of the Vaults panel. Note the linked Simulation Model Item (altiumsimulation-model) and the componentlevel simulation parameters.
The simulation model link and associated component-level simulation parameters can also be verified
when an instance of the Component Item-Revision is placed on a schematic sheet.
Verifying the simulation model link and component-level simulation parameters after placing an instance of a particular revision of the
Component Item.
Auto-Generation of a CmpLib
Related article: CmpLib Generation from Active Schematic Library
One particularly useful tool in the context of Component Libraries is the ability to generate these
automatically from source Schematic Libraries:
Either from the active Schematic Library, using the Tools » Generate Component Library
command.
From multiple Schematic Libraries stored in a nominated source folder, using the batch-style
Release Manager (File » Release Manager).
This tool takes the manual labor and potential for error out of the equation when creating the source
component definitions from which the vault-based Component Items are generated.
Generation of Component Libraries in this way first requires that the domain model Items it
needs to reference are themselves released first. The source symbol, simulation model
definition, and PCB 2D/3D Component model (where applicable) for an original source
schematic component must therefore be released to the target vault, before a new
component definition can be created from that schematic component.
The effort you have already spent in building a collection of simulation-ready components in you
source Schematic Libraries is not ignored or discarded and you are not required to duplicate that
effort! The tool uses the information for each original source schematic component in such a library to
essentially fill-in the required fields of the component definition:
The Items created from the release of schematic symbol, simulation model definition and linked
PCB 2D/3D Component model are used as the model links for the definition.
The Symbol Reference and Description parameter values are used as the values for the
Comment and Description parameters in the definition.
All user parameters defined for the schematic component – including those simulation-related
parameters added as component-level parameters – are added as required parameters for the
definition.
Component Libraries can also be generated directly from an active Database Library. For
more information, see CmpLib Generation from Active Database Library.
Full Support for Digital SimCode Models
When using a vault-based component that references a Simulation Model Item featuring a SimCode
definition (in a *.scb file), that scb file (released with the SimModel file to the vault) is used for
subsequently run simulations. In the generated simulation netlist (*.nsx file), the model reference
will contain the full path to the scb file, cached locally from the vault. For example:
.MODEL 74LS90 xsimcode(file="C:\ProgramData\Altium\AD
{A586F887-1E00-4F36-9EC8-61C78B91FA73}\VaultsFileCache\0072B38F-E431-40BBB462-FD262DB9CDAB\9A7AB3DA-D4A5-43B3-9C88-33A56E86A0BF\Released\LS.SCB"
func=ls90)
An .scb file typically contains multiple scb models. When the simulation model definition is
released, the .scb file – released and stored with the SimModel file in the vault – is stripped
back to include only the single scb model referenced by the simulation model definition, and
not the full listing of models.
Source URL: http://techdocs.altium.com/display/DMAN/Adding+a+Simulation+Model+to+a+Component+Definition
© Copyright 2026 Paperzz