To simulate your design, PSpice needs to know about:
- parts in your circuit and how they are connected,
- what analysis to run,
- the simulation models that correspond to the parts in your circuit, and
- the stimulus definitions with which to test.
This information is provided in various data files.
Some of these are generated by the design entry program such as Capture , others come from libraries , and still others are user-defined.
The remaining topics cover:
Files that Design Entry Programs generate
When you begin the simulation process, the design entry programs first generate files describing the parts and connections in your circuit. These files are the netlist file and the circuit files that PSpice reads before doing anything else.
Netlist file
The netlist file contains a list of device names, values, and how they are connected with other devices. The name that design entry program generate for this file is DESIGN_NAME-DESIGN_NAME.NET. The netlist file is located in the directory:
<project_directory>\worklib\<design_name>\cfg_analog\
Other files that you can configure for simulation
Before starting simulation, PSpice needs to read other files that contain simulation information for your circuit. These are model files, and if required, stimulus files and include files.
The simulation profile contains references to the other user-configurable files that PSpice needs to read.
Model library
PSpice uses this information in a model library to determine how a part will respond to different electrical inputs. These definitions take the form of either a:
- model parameter set, which defines the behavior of a part by fine-tuning the underlying model built into PSpice
- or a subcrcuit netlist, which describes the structure and function of the part by interconnecting other parts and primitives.
The most commonly used models are available in the PSpice model libraries shipped with your programs. The model library names have a.LIB extension.
Stimulus file
You can create a stimulus file by:
- manually using the text editor in PSpice (or a standard text editor) to create the definition (a typical file extension is .STM)
Include file
An include file is a user-defined file that contains:
- PSpice commands,
- supplemental text comments that you want to appear in the PSpice output file.
You can create an include file using any standard text editor. Typically, include file names have a .INC extension.
An include file can contain definitions, using the PSpice .FUNC command, for functions that you want to use in numeric expressions elsewhere in your design.
Configuring model library, stimulus, and include files
PSpice searches model libraries, stimulus files, and include files for any information it needs to complete the definition of a part or to run a simulation.
The files that PSpice searches depend on how you configure your model libraries and other files. Much of the configuration is set up for you automatically, however, you can do the following yourself:
- Add and delete files from the configuration.
- Change the scope of a file: that is, whether the file applies only to a profile, a design (local) or to any design (global).
- Change the search order.
To configure these, edit the simulation profile by using the Configuration Files tab in the Simulation Settings dialog box.
Files that PSpice generates
After reading the circuit file, netlist file, model libraries, and any other required inputs, PSpice starts the simulation. As simulation progresses, PSpice saves results to two files--the data file and the PSpice output file.
Probe data file
The data file contains simulation results that can be displayed graphically. PSpice reads this file automatically and displays waveforms reflecting the circuit response at nets, pins, and parts that you marked in your design (cross-probing). You can set up your simulation so that PSpice displays the results as the simulation progresses or after the simulation completes.
After PSpice has read the data file and displayed the initial set of results, you can add more waveforms and perform post-simulation analysis of the data.
There are two ways to add waveforms to the display:
- From within PSpice, by specifying trace expressions.
- From within the design entry program, by cross-probing.
PSpice output file
The PSpice output file is an ASCII text file that contains:
- the netlist representation of the circuit
- the PSpice command syntax for simulation commands and options (like the enabled analyses)
- simulation results
- warning and error messages for problems encountered during read-in or simulation
Its content is determined by:
- the types of analyses you run
- the options you select for running PSpice
- the simulation control parts (like VPRINT1 and VPLOT1) that you place and connect to nets in your design