28 July 1994 s2ibis(1)
s2ibis - convert SPICE models to IBIS models
s2ibis input_file [ output_file ]
s2ibis reads in a s2ibis input file and produces a Version 1.1 IBIS
model file. The s2ibis input file consists of a s2ibis header, a modi-
fied IBIS pin list, and a SPICE input deck describing the topology of
the circuit to be modeled. s2ibis uses the s2ibis header and pin list to
generate the IBIS model file header and pin list, and the input deck to
generate SPICE input decks for each of the tables in the IBIS model
file. s2ibis invokes SPICE to run each of the simulations, and collates
the results into a syntactically-correct IBIS Version 1.1 model file.
s2ibis generates SPICE simulations for [Pullup], [Pulldown],
[POWER_clamp], [GND_clamp], and [Ramp] tables, as is appropriate for
each pin in the pin list. The resulting SPICE input and output files
are created in the directory in which s2ibis is invoked. The files
remain in this directory after execution has completed. The general
naming scheme for the files is xxxyyyyy.spi or xxxyyyyy.out for the
input and output files respectively, where xxx is a three-letter code
name for the simulation type and yyyyy is the pin name. The first two
characters of the xxx codes are: [Pullup]=pu, [Pulldown]=pd,
[POWER_clamp]=pc, [GND_clamp]=gc, and [RAMP]=ru or rd, ru for the rising
edge ramp (ramp up) and rd for the falling edge ramp (ramp down). The
third character is t for typical, n for min, and x for max.
For all HSPICE and Berkeley SPICE 3 simulations, the standard error out-
put of the simulation run is redirected to a file named xxxyyyyy.msg.
s2ibis reads input from input_file and puts its output on stdout, unless
output_file is specified. In all cases s2ibis logs its activities to
stderr, which is normally the console.
The s2ibis input file consists of three parts: 1) the header 2) the
modified pin list 3) the SPICE input deck. All of the lines preceding
the SPICE input deck must begin with the SPICE comment character, *.
The header is used to create the IBIS model file header. It consists of
all lines before the modified pin list. The first four lines of the
header are required. These lines must contain the following informa-
North Carolina State University 1
s2ibis(1) 28 July 1994
Any string or combination of strings is acceptable for LINEs 1-3. LINE 4
must have the string BIPOLAR or the string CMOS somewhere after the
asterisk. s2ibis uses this information to determine the correct tem-
perature ranges to use for simulations.
OPTIONAL HEADER INFORMATION
Optional information may also be included in the header. Understanding
the various options is crucial to efficient use of s2ibis.
s2ibis will automatically suppress the creation and simulation of SPICE
decks if the corresponding output files already exist AND the iterate
switch is found anywhere in the header. The syntax is:
This feature can be very important if any of the simulations initiated
by s2ibis fails to complete; for example, due to convergence problems.
In many cases a SPICE run can be coaxed to completion by tweaking the
SPICE input deck. For example, the .OPTIONS mechanism can be used to
change a tolerance parameter or choose a different numerical integration
algorithm. Anything that can be done to coax SPICE to finish the table
is acceptable, as long as the .PRINT card causes the table to be printed
out in the same format that the original s2ibis-added .PRINT card would
have, and the correct output file name is used. When the problem is
resolved, s2ibis is reinvoked with the *[Iterate] line in the header.
s2ibis checks to see if the associated output file exists before making
up any SPICE decks, so the output file for the problem simulation, and
the output files from any other completed simulations are read in
instead. Any simulations for which output files are not found are
invoked as usual. Using this technique it is easy to iteratively create
an IBIS model. This technique can also be used to get s2ibis to create
an IBIS model using SPICE outputs that were created by hand or by other
programs, as long as the .PRINT format is the same as that used by
s2ibis defaults to Berkeley SPICE version 2, unless a line of the form:
is found in the header, where spicetype can be 2,3,P, or H, which
correspond to Berkeley SPICE 2, Berkeley SPICE 3, PSPICE, and HSPICE
respectively. The selected version is reported on stderr during pro-
The [File Rev] defaults to 0.0 unless a line of the form:
*[File Rev] rev_string
is found in the header. This happens without warning. s2ibis will
2 North Carolina State University
28 July 1994 s2ibis(1)
accept any string for rev_string.
s2ibis inserts a default [Package] section into the output file unless
the header contains such a section. This happens without warning. The
syntax is identical to the IBIS version 1.1 syntax except that each line
must be preceded by an asterisk. Please note that the comment character
*must* be the default IBIS comment character: |
The syntax for adding [Source] [Notes] and [Disclaimer] sections is the
same as IBIS Version 1.1 except that asterisks are required at the
beginning of each line.
s2ibis automatically omits any clamp tables in which the typical clamp
current is below 1 microampere. This limit can be changed to any
current, using the following syntax:
where amps is in Amperes. Thus *[Clamp_Tolerance] 1.0e-3 changes the
limit to 1.0 milliamps.
s2ibis PIN LIST
Immediately following the header, s2ibis expects to find a pin list.
The pin list is the same as a standard IBIS pin list except that after
each non-NC pin entry a second line, called the pindata line, is
inserted to help s2ibis to set up the subsequent SPICE simulations.
The format for the pindata line depends on the model_type of the associ-
ated pin. Eight model_types are currently supported: 1) Input 2) Ouput
3) I/O 4) 3-state 5) Open_drain 6) POWER 7) GND 8) NC.
For pins with model_type Input, the pindata line has the following for-
*model_type SPICE_NODE polarity vil vih
The model_type field must be Input. The SPICE_NODE field is used to
specify which node in the attached SPICE deck corresponds to the pin.
The polarity field should be 1 for inverting inputs and 0 for non-
inverting inputs. The vil field should be a floating point number
specifying the voltage that this input should be driven to when a logic
low is to be applied. The vih field is similar for the logic high
For pins with model_type Output, I/O, 3-state, and Open_drain, the pin-
data line has the following format:
*model_type SPICE_NODE ramp_time input_pin [enable_pin] [polarity] [vil]
The model_type field must be Output, I/O, 3-state, or Open_drain. The
SPICE_NODE field is as above. The ramp_time field should be a floating
point number specifying suggested minimum length for the SPICE .TRAN
North Carolina State University 3
s2ibis(1) 28 July 1994
analysis to be used for generating the [Ramp] tables. All output pins
must have an associated input pin. The input_pin field refers to the
pin name, *not* the SPICE node name. If the model_type is I/O or 3-
state, an enable_pin field is expected, specifying the pin name for the
pin that enables the associated output. For I/O pins, the polarity,
vil, and vih entries are required, and work just like the analogous
entries for an Input pin, described above.
For POWER pins, the pindata line has the following format:
*model_type SPICE_NODE vpwr_typ [vpwr_min] [vpwr_max]
The model_type field must be POWER. The SPICE_NODE field operates as
described above. The vpwr_typ field is required. A floating point
number is expected, describing the nominal supply voltage to be applied.
If multiple POWER pins are specified, s2ibis will ignore all except the
For GND pins, the pindata line has the following format:
The SPICE_NODE field operates as described above. Only the first GND
pin is acknowledged by s2ibis.
Extra lines may optionally be added after a pindata line to specify
optional parameters for the [Model] associated with that pin. These
lines must begin with a double-asterisk: **. Any line following a pin-
data line, and beginning with a double-asterisk will be searched for
keywords. The keywords affect the creation of the [Model] for the asso-
ciated pin. If a keyword is not found, the line will be ignored, thus
this technique can be used for inserting comments in the input file.
The following keywords are currently recognized:
NoModel (suppresses creation of [Model] entirely)
NoPolarity (suppresses the Polarity parameter)
NoEnable (suppresses the Enable parameter)
Polarity (used to override the Polarity parameter)
Enable (used to override the Enable parameter)
Vinl (the line is copied to the [Model])
Vinh (the line is copied to the [Model])
C_comp (the line is copied to the [Model])
Input_ramp_xxx vil vih tr tf (allows customization of the input
ramp for Ramp tables. xxx can be typ, min, or max, and each
must be entered separately or the default will be used. The
units are Volts, Volts, seconds, and seconds, respectively.)
4 North Carolina State University
28 July 1994 s2ibis(1)
Thus, **Vinl = 0.45V can be used to add the following line to the asso-
Vinl = 0.45V
**Polarity Inverting can be used to force the Polarity parameter in a
[Model] to be listed as Inverting, even if the associated pin is Non-
The C_comp entry in all models defaults to:
C_comp 5.0pF 5.0pF 5.0pF
if no C_comp is specified in the pin list. This happens without warning.
Finally, the [Pin] section must end with an [Endpin] card:
The input SPICE deck should contain only circuit elements needed to
describe the circuit. The power supply and voltage sources are automat-
ically generated by s2ibis. Similarly, control cards probably should not
be present in the SPICE deck. s2ibis uses default SPICE parameters, so
users with convergence problems might want to use the .OPTIONS card to
SPICE convergence problems may result in missing tables. s2ibis tries to
continue in the event of problems in the SPICE runs, reporting problems
Temporary SPICE input and output file names are not variable and s2ibis
will overwrite existing files automatically.
s2ibis does not check to make sure that the output file name meets the
requirements of IBIS Version 1.1. (all lower case, .ibs extension, DOS
A temporary file named s2ibis.tmp is created. s2ibis will write to this
file without asking for permission.
s2ibis expects all voltages to be expressed in Volts, all times to be
expressed in seconds, all currents to be expressed in Amperes. Unit
suffixes are not recognized.
s2ibis uses only Berkeley SPICE version 2 or 3, PSPICE, or HSPICE, using
the following calls:
spice inputfile outputfile
North Carolina State University 5
s2ibis(1) 28 July 1994
spice3 -b inputfile >outputfile 2>messagefile
PSPICE inputfile outputfile /D0
hspice inputfile >outputfile 2>messagefile
The calls for SPICE3 and HSPICE are tailored for UNIX systems which use
the Bourne shell (sh) for invoking system calls. The calling sequence
may have to be modified for users of SPICE3 and HSPICE that do not use
UNIX operating systems. Proprietary versions of SPICE which use dif-
ferent output formats or different calling sequences may not work prop-
erly with s2ibis.
The pipe character (|), which is the default comment character for IBIS,
must be used in any situation where user-specified comments are inserted
directly into the output file. For example, if the [Package] keyword is
found in the s2ibis header, the user-specified [Package] section is
copied directly to the output file. If a comment line is included, it
must use the pipe character.