


s2ibis(1.3)       Misc. Reference Manual Pages        s2ibis(1.3)



NAME
     s2ibis - convert SPICE models to IBIS models

SYNOPSIS
     s2ibis input_file [ output_file ]


DESCRIPTION
     _s_2_i_b_i_s reads in a _s_2_i_b_i_s input file and produces  a  Version
     1.1  IBIS  model  file.  The _s_2_i_b_i_s input file consists of a
     _s_2_i_b_i_s header, a modified IBIS pin list, and a  SPICE  input
     deck  describing  the topology of the circuit to be modeled.
     _s_2_i_b_i_s uses the _s_2_i_b_i_s 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.   _s_2_i_b_i_s invokes SPICE to run each of the
     simulations, and collates the results into a  syntactically-
     correct IBIS Version 1.1 model file.

     _s_2_i_b_i_s 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 _s_2_i_b_i_s 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  charac-
     ter is t for typical, n for min, and x for max.

     For all HSPICE and Berkeley SPICE 3 simulations,  the  stan-
     dard  error  output of the simulation run is redirected to a
     file named xxxyyyyy.msg.

     _s_2_i_b_i_s 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.


INPUT FILE
     The _s_2_i_b_i_s 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, *.

     _s_2_i_b_i_s _H_E_A_D_E_R




NC State Univ.     Last change:  15 March 1996                  1






s2ibis(1.3)       Misc. Reference Manual Pages        s2ibis(1.3)



     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 information:

          LINE 1:*company_name
          LINE 2:*device_name
          LINE 3:*package_type
          LINE 4:*technology

  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.  _s_2_i_b_i_s uses this information  to
  determine  the  correct  temperature  ranges to use for simula-
  tions.

  _O_P_T_I_O_N_A_L _H_E_A_D_E_R _I_N_F_O_R_M_A_T_I_O_N

  Optional information may also be included in the header. Under-
  standing  the  various  options  is crucial to efficient use of
  s2ibis.

  _s_2_i_b_i_s will automatically suppress the creation and  simulation
  of  SPICE decks if the corresponding output files already exist
  AND the *[Iterate] directive is found anywhere in  the  header.
  The syntax is:

  *[Iterate]

  This feature can be very important if any  of  the  simulations
  initiated by _s_2_i_b_i_s fails to complete; for example, due to con-
  vergence 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.  Any-
  thing 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, _s_2_i_b_i_s is  reinvoked  with
  the  *[Iterate] line in the header. _s_2_i_b_i_s 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  itera-
  tively  create  an IBIS model.  This technique can also be used
  to get _s_2_i_b_i_s 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 _s_2_i_b_i_s.

  _s_2_i_b_i_s defaults to Berkeley SPICE version 2, unless a  line  of



NC State Univ.     Last change:  15 March 1996                  2






s2ibis(1.3)       Misc. Reference Manual Pages        s2ibis(1.3)



  the form:

  *[Spice] spicetype

  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 processing.

  The SPICE call used by _s_2_i_b_i_s can be modified using a  line  of
  the form:

  *[Spice_Command] command_style

  The argument command_style is substituted into a C sprintf for-
  mat  string  used to make up the SPICE command, which is of the
  form

  sprintf(command_line,"spice                %s                %s
  %s",in_fname,out_fname,msg_fname);

  Thus you can tell _s_2_i_b_i_s to use the call

  MYSPICE -batch infile >outfile

  by including the header line

  *[Spice_Command] MYSPICE -batch %s >%s

  Please note that the order of the included strings, represented
  by the %s entries in the line, must be input_file, output_file,
  message_file, and that at least the input_file and  output_file
  need  to  be  specified.   Thus at least two %s entries must be
  used in the command_style argument.

  Please also note that it is still necessary to specify  a  ver-
  sion  of  SPICE using the *[Spice] directive, and that the com-
  mand line needs to call a version of SPICE that  is  compatible
  with the version of SPICE that is listed in the *[Spice] direc-
  tive.  The called program must have compatible input *and* out-
  put formats  in order to work properly.

  This feature can be used to invoke the  UNIX  nice,  /bin/time,
  etc.  features at runtime if desired.

  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.   _s_2_i_b_i_s
  will accept any string for rev_string.




NC State Univ.     Last change:  15 March 1996                  3






s2ibis(1.3)       Misc. Reference Manual Pages        s2ibis(1.3)



  _s_2_i_b_i_s 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 aster-
  isk.  Please note that the  comment  character  *must*  be  the
  default IBIS comment character: |

  The syntax for adding [Source] [Notes]  and  [Disclaimer]  sec-
  tions is the same as IBIS Version 1.1 except that asterisks are
  required at the beginning of each line.

  _s_2_i_b_i_s automatically omits any clamp tables in which the  typi-
  cal  clamp  current  is below 1 microampere.  This limit can be
  changed to any current, using the following syntax:

  *[Clamp_Tolerance] amps

  where amps  is  in  Amperes.   Thus  *[Clamp_Tolerance]  1.0e-3
  changes the limit to 1.0 milliamps.

  _s_2_i_b_i_s will automatically delete successfully  used  .spi  .out
  and  .msg files when it is finished with them if the *[Cleanup]
  directive is used.  The syntax is simply

  *[Cleanup]

  The .spi, .out, and .msg files of aborted simulations  are  not
  removed  to  facilitate  detective  work.  Please note that the
  *[Cleanup]  directive  will  preclude  subsequent  use  of  the
  *[Iterate] directive.

  _s_2_i_b_i_s _P_I_N _L_I_S_T

  Immediately following the header, _s_2_i_b_i_s 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 _s_2_i_b_i_s to set up the sub-
  sequent SPICE simulations.

  The format for the pindata line depends on  the  model_type  of
  the associated 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  fol-
  lowing format:

  *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



NC State Univ.     Last change:  15 March 1996                  4






s2ibis(1.3)       Misc. Reference Manual Pages        s2ibis(1.3)



  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  situa-
  tion.

  For pins with model_type Output, I/O, 3-state, and  Open_drain,
  the pindata line has the following format:

  *model_type SPICE_NODE ramp_time input_pin [enable_pin] [polar-
  ity] [vil] [vih]

  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 analysis to be used for gen-
  erating the [Ramp] tables. All output pins must have an associ-
  ated  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, _s_2_i_b_i_s will ignore all except the first.

  For GND pins, the pindata line has the following format:

  *model_type SPICE_NODE

  The SPICE_NODE field operates as  described  above.   Only  the
  first GND pin is acknowledged by _s_2_i_b_i_s.

  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  pindata  line,  and  beginning  with a
  double-asterisk will be searched for  keywords.   The  keywords
  affect  the creation of the [Model] for the associated 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)



NC State Univ.     Last change:  15 March 1996                  5






s2ibis(1.3)       Misc. Reference Manual Pages        s2ibis(1.3)



          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.)

  Thus, **Vinl = 0.45V can be used to add the following  line  to
  the associated [Model]:

  Vinl = 0.45V

  **Polarity Inverting can be used to force the Polarity  parame-
  ter in a [Model] to be listed as Inverting, even if the associ-
  ated pin is Non-Inverting.

  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:

  *[Endpin]

  _S_P_I_C_E _D_E_C_K

  The input SPICE  deck  should  contain  only  circuit  elements
  needed  to  describe the circuit.  The power supply and voltage
  sources are automatically generated by _s_2_i_b_i_s. Similarly,  con-
  trol  cards  probably  should not be present in the SPICE deck.
  _s_2_i_b_i_s uses default SPICE parameters, so users with convergence
  problems might want to use the .OPTIONS card to mitigate them.


RESTRICTIONS
     SPICE convergence problems may  result  in  missing  tables.



NC State Univ.     Last change:  15 March 1996                  6






s2ibis(1.3)       Misc. Reference Manual Pages        s2ibis(1.3)



     _s_2_i_b_i_s  tries  to  continue  in the event of problems in the
     SPICE runs, reporting problems on stderr.

     Temporary SPICE input and output file names are not variable
     and s2ibis will overwrite existing files automatically.

     _s_2_i_b_i_s 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 compatible)

     A temporary file named s2ibis.tmp is  created.  _s_2_i_b_i_s  will
     write to this file without asking for permission.

     _s_2_i_b_i_s 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.

     _s_2_i_b_i_s uses only Berkeley SPICE version 2 or 3,  PSPICE,  or
     HSPICE, using the following calls:

          spice inputfile outputfile

          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 different output  formats  or  dif-
  ferent calling sequences may not work properly with _s_2_i_b_i_s.

  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 exam-
  ple,  if  the  [Package] keyword is found in the _s_2_i_b_i_s 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.













NC State Univ.     Last change:  15 March 1996                  7



