Using the PSPICE Simulator with IC-CAP
PSPICE is a SPICE-based circuit simulator developed by MicroSim Corporation. PSPICE uses the same basic numeric algorithms as the UCB SPICE2 simulator but claims superior convergence and performance. Using IC-CAP's Open Simulator Interface, a C-language Translation Module is provided that makes PSPICE simulation capability available in IC-CAP. This module and instructions for performing PSPICE simulations in IC-CAP are described here. For general information on the Open Simulator Interface, refer to the section "Adding a Simulator" in the User's Guide.
The IC-CAP/PSPICE link uses UCB SPICE2 as the template simulator. When performing a PSPICE simulation in IC-CAP, IC-CAP behaves as if it is performing a SPICE2 simulation. Therefore it generates an input deck in SPICE2 format, calls the simulator and reads back a binary raw data file in SPICE2 format. Through the Open Simulator Interface, the call to the simulator is actually calling the executable version of the C-language Translation Module, pspice.c. This executable, called pspice, translates the SPICE2 input deck to a PSPICE input format, calls PSPICE to perform the simulation, then translates the PSPICE format binary raw data file to SPICE2 format which is read by IC-CAP. The source code file pspice.c is located in the $ICCAP_ROOT/src directory.
Note
|
|
|
|
The IC-CAP/PSPICE translation module pspice.c has been updated in IC-CAP 5.0 to support the output binary data format of PSPICE 6.3. Only PSPICE versions with the identical output binary data format will work with this translation module. For older PSPICE versions, use the translation module pspice5_4.c, also supplied with this release.
|
|
To set up PSPICE simulation capability in IC-CAP:
1 |
Add the pspice simulator to the usersimulators file in the directory $ICCAP_ROOT/iccap/lib, as shown next. |
-
pspice spice2 /<your path>/pspice "<host_machine_name>" CANNOT_PIPE
2 |
The host_machine_name is the host computer for the PSPICE simulations. This name can be left blank ("") if PSPICE and IC-CAP are running on the same computer. Since PSPICE does not have the ability to perform piped simulations in IC-CAP, the CANNOT_PIPE flag must always be set, as shown in the above example. |
3 |
Make the following change to the pspice.c program to customize it for your environment: |
|
• |
In the main routine, specify the full pathname of the actual PSPICE simulator on your system. |
4 |
Compile the translation module using the following command: |
-
cc -o pspice pspice.c -lm
5 |
Move the executable file, pspice to a permanent location such as ICCAP_ROOT/bin. The location must match the path specified in the usersimulators file. |
6 |
In IC-CAP, set the SIMULATOR variable to pspice or specify pspice with the Select Simulator command in the IC-CAP Tools Menu. |
The following files are generated in your home directory when running PSPICE simulations in IC-CAP:
• |
psp.cir - PSPICE format circuit description deck file translated from the SPICE2 circuit description deck. |
• |
psp.raw - PSPICE formatted binary raw data output file generated by a PSPICE simulation. |
• |
psp.out - Output print file generated by a PSPICE simulation. |
psp.raw and psp.out are automatically removed from your home directory after the simulation is completed in IC-CAP.
Note
|
|
|
|
When using PSPICE, the LM_LICENSE_FILE environment variable must be set. This variable contains the directory path for the license file required by the PSPICE simulator. Refer to the PSPICE Reference Manual for detailed procedures on installing the PSPICE simulator.
|
|
|