|
Manuals >spicent
>Chapter 3: Advanced Methods for Importing a SPICE File Print version of this Book (PDF file) |
|
|
|
|
Importing a SPICE File from the Command LineThis section describes the details of setting up and operating the SPICE Netlist Translator from the command line.
Setting up the spctoiff CommandTo set up the spctoiff program for use from the command line: For Windows platforms:
For UNIX platforms:
For HPUX operating systems (i.e. hpux10 or hpux11), enter the following: OR For SUN operating systems (i.e. sun4 or sun55), enter the following: OR For AIX operating systems (i.e.aix4), enter the following: Executing the spctoiff CommandThe spctoiff command uses the following general syntax: spctoiff input_filename output_filename -{s2|s3|p|h} -{g|u|w} [-l] [-n] Simply entering spctoiff at the command line with no options displays a detailed spctoiff usage message. Entering the spctoiff -v command displays the translator version, while entering spctoiff -adv displays the syntax for the advanced options. Table 3-1 displays a listing of all parameters and definitions used by the spctoiff command.
Enter the appropriate spctoiff command from the command line to translate your SPICE file. Once the spctoiff command is complete you can view the output. Additional Options InformationUsing the -n OptionThe -n option should be used carefully if you have mixed cases in your SPICE file. While SPICE is case insensitive, ADS is case sensitive. If the -n option is used, names are not mapped to the lower case. If case mixing was used in the SPICE file, the variable, instance and model names will not be converted to lower case, resulting in multiple definitions in ADS. For more information on case sensitivity and name mapping, refer to Understanding Capitalization. Using the -models OptionAn HSpice library or model file can consist of hundreds of models, defined within a .LIB section. Each .LIB section defines one model, which may consist of a complete subcircuit. If this library file is referenced by a SPICE circuit file, only the libraries that are used will be translated. However, the user may want to translate the complete model library to a set of ADS netlist files. The -models option is available for this purpose. To translate the complete model library in a file called mix025.l, invoke the translator from a shell command line as shown in the following example. spctoiff mix025.l net -h -g -models The HSpice file is read, and for every .LIB section found in the library file, one ADS netlist file is output. The name of the library which is specified in the .LIB statement becomes the name of the ADS netlist file. An extension is given on the command line when the translator is invoked, and this is appended to the file name. In this case, the file extension is net. A library designated by .LIB resistor will be translated to an ADS netlist file called resistor.net. Using the -u2 OptionWhen the -u option is used, connections in a schematic are made by naming nodes. This is done by placing a node name on each pin. The translator makes these connections by reading a configuration file that contains pin locations for all the element symbols that the translator uses. Subcircuit symbols are plain boxes with the appropriate number of leads and pins on them. If you have defined a custom symbol for any element, and the pins are not in the location expected by the translator, some of the pins may not be named. Unconnected pins show up as red diamonds in the schematic. This will most likely happen when a custom library part exists in ADS and is referred to in a SPICE file. The translator does not create the subcircuit but is expected to connect to it. When the correct pin information isn't available to the translator in the spctoiff.cfg file, use the -u2 option from the command line as shown in the following example. spctoiff file.sp file.iff -h -u2 The translator will output the IFF file file.iff and another file named wireLabels.log. Import the IFF file from the user interface (refer to, Importing an IFF File). This will create a schematic with no connections. To complete the connections, make sure the component placement is satisfactory. There should be sufficient room between each component to display the parameters and the node names. Save all designs in which you made changes. Make sure the file wireLabels.log is in your project directory and enter the following commands on the AEL command line, load(strcat (HPEESOF_DIR, "links/spice/spcutil.ael")); spctoiff_connect_pins("wireLabels.log") When the macro is done running, the pins will all be labeled with node names and all connections will be made as specified in the SPICE file. Checking the SPICE Netlist Translator Version NumberTo determine the version of the SPICE Netlist Translator that you are running,
The SPICE Netlist Translator displays the version number. Where <version_number> is the actual version number of the translator. Viewing the Translation LogThe SPICE to IFF translation log (see Table 3-2) contains important information about the netlist translation, including any error or warning messages recorded during the import operation. The translation log can be viewed using any ASCII text editor. To view the translation log file, open your text editor and load spctoiff.log. If your log file displays any error or warning messages generated by the translator, refer to Troubleshooting. Using a combination of the information in the log file and the information provided in the troubleshooting section, edit your translated netlist and save the new netlist with your corrections. Since the translation log is an ASCII based text file, you can easily save the file with a new name using the File > Save As command for future reference.
|
|
|
|
|
|
|
|