


NSPICE(1ICD)		     5/4/90		     NSPICE(1ICD)



NNNNAAAAMMMMEEEE
     nspice, nspice_pp, nspice_bs - encapsulated spice simulator

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     nnnnssssppppiiiicccceeee cell commandfile

     nnnnssssppppiiiicccceeee____pppppppp cell commandfile

     nnnnssssppppiiiicccceeee____bbbbssss cell

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     _N_s_p_i_c_e is the encapsulated spice simulator that performs a
     spice(1ICD) analysis for a circuit cell that is present in
     the database, using a commandfile with spice and/or
     sls(1ICD) commands.  _N_s_p_i_c_e consists of a unix shell-script
     that extracts a circuit cell from the database using
     _x_s_l_s(_1_I_C_D), converts a commandfile with spice and/or sls
     commands to a spice commandfile using _n_s_p_i_c_e__p_p, runs _s_p_i_c_e,
     and finally executes _n_s_p_i_c_e__b_s to backsubstitute node
     numbers in the output file by their corresponding names as
     specified in the database.  The output of _n_s_p_i_c_e is found in
     a file called _c_e_l_l.ana.

     _n_s_p_i_c_e__p_p
	  _N_s_p_i_c_e__p_p converts, for a particular cell (first pro-
	  gram argument), a commandfile with spice and/or sls
	  commands (second program argument) to a spice command-
	  file.  In the inputfile nodes may be referred to by
	  their names as specified in the database.  The output
	  of the program is sent to _s_t_d_o_u_t. The conversion is
	  executed by using information from a spice network
	  description that is present in the file _c_e_l_l.spc.  This
	  file is typically extracted from the database using
	  _x_s_l_s with the options -Shlmbf.  This will generate a
	  file _c_e_l_l.spc with a full (hierarchical) description of
	  the cell, including the appropriate transistor models,
	  terminals for n-bulk and/or p-bulk connections, and a
	  name translation table that translates node numbers
	  into node names as used in the database.  To reduce the
	  number of nodes in the spice network description the
	  use of the options -xy [ -z name ] is further recom-
	  mended (see manual page of _x_s_l_s ).

	  All sls commands that are allowed with the _s_l_s simula-
	  tor (see "sls: switch-level simulator user's manual")
	  may be used in the commandfile of _n_s_p_i_c_e__p_p. However
	  the ones that are translated into spice commands are
	  the following: The set commands in the commandfile are
	  translated into piecewise linear voltage sources that
	  are connected to the relevant input nodes of the net-
	  work.  Sls plot commands are translated into ".print
	  tran _n_o_d_e_1 _n_o_d_e_2 ..." cards.	If option level=3 is



		   The Nelsis IC Design System			1






NSPICE(1ICD)		     5/4/90		     NSPICE(1ICD)



	  specified, a transient analysis card will be placed in
	  the outputfile that specifies a simulation from t=0
	  till t=t_end, where t_end is given by simperiod x
	  sigunit or otherwise - if simperiod is not specified -
	  by the time of the last input signal transition.  The
	  value of tstep in the .tran card should explicitly be
	  defined in the commandfile (see below).

	  The other information that is allowed in the command-
	  file should be specified in the following way:

	  *%

	   ... translation information ...

	  *%

	   ... direct spice commands ...

	  *%

	  The separators '*%' should be placed at the beginning
	  of each line.  The first part consists of translation
	  information that is used to translate sls commands (if
	  any) into spice commands.  It may consist of zero or
	  more of the following lines

	  tstep 	  <real>
	  tstart	  <real>
	  uic
	  trise 	  <real>
	  tfall 	  <real>
	  vhigh 	  <real>
	  vlow		  <real>

	  The field <real> denotes a specification of a real
	  value.  It may optionally have a scale factor 'G'
	  (1e9), 'M' (1e6), 'k' (1e3), 'm' (1e-3), 'u' (1e-6),
	  'n' (1e-9), 'p' (1e-12) or 'f' (1e-15).  The variable
	  ttttsssstttteeeepppp specifies the value of tstep as used for tran-
	  sient analysis.  This value should be specified when
	  option level=3 is used with the sls commands (see
	  above).  The variable ttttssssttttaaaarrrrtttt optionally specifies the
	  start time for the transient analysis card.  If the
	  keyword uuuuiiiicccc is used, this keyword will be added to the
	  .tran card.  The variables ttttrrrriiiisssseeee and ttttffffaaaallllllll respectively
	  specify the rise and fall time of the input signals
	  (default trise = tfall = tstep).  The variables vvvvhhhhiiiigggghhhh
	  and vvvvlllloooowwww respectively specify the voltages that
	  correspond to the high state and the low state of the
	  input signals (default vhigh = 5 and vlow = 0).  For
	  the x state a voltage of (vhigh + vlow) / 2 is used.



2		   The Nelsis IC Design System






NSPICE(1ICD)		     5/4/90		     NSPICE(1ICD)



	  In the second part of the spice information, direct
	  spice commands may be specified.  These commands are
	  directly copied to the output, however with node names
	  that are specified between quotes translated to their
	  corresponding node numbers.  E.g. .ic v("out")=5v might
	  be translated into .ic v(12)=5v.  If no sls commands
	  are used, this part of the commandfile - beside the
	  information that is extracted with _x_s_l_s - will contain
	  all the information that is necessary for the spice
	  simulation.

	  An example of a commandfile with only spice commands is
	  given below:

	  *%
	  *%
	  vphi1 "phi1" 0 pulse (5v 0v 29.4ns 0.6ns 0.6ns 29.4ns 60ns)
	  vphi2 "phi2" 0 pulse (0v 5v 29.4ns 0.6ns 0.6ns 29.4ns 60ns)
	  vvdd "vdd" 0 5v
	  vin "in" 0 pulse (5v 0v 29.4ns 0.6ns)
	  .tran 0.2n 120n
	  .print tran v("phi1") v("phi2") v("1") v("2") v("3")
	  .print tran v("4") v("in") v("out") v("out_inv")
	  .options nomod
	  .options limpts=601
	  .options cptime=100
	  .ic v("3")=0 v("out")=5
	  *%


	  An example of a commandfile with mixed sls and spice
	  commands is as follows:

	  set phi1 = (h*30 l*30)*~
	  set phi2 = (l*30 h*30)*~
	  set vdd  = h
	  set vss  = l
	  set in   = h*30 l
	  option level = 3
	  option simperiod = 120
	  option sigunit = 1n
	  option outacc  = 10p
	  plot phi1 phi2 1 2 3 4 in out out_inv

	  /*

	  *%
	  tstep 0.2n
	  trise 0.6n
	  tfall 0.6n
	  *%
	  .options nomod



		   The Nelsis IC Design System			3






NSPICE(1ICD)		     5/4/90		     NSPICE(1ICD)



	  .options limpts=601
	  .options cptime=100
	  .ic v("3")=0 v("out")=5
	  *%

	  */

	  (Note that the spice information is placed between sls
	  comment signs ("/*" and "*/") so as to allow to use the
	  same inputfile for an sls simulation.)

     _n_s_p_i_c_e__b_s
	  The program _n_s_p_i_c_e__b_s backsubstitutes node numbers by
	  node names in a spice output file for a cell (specified
	  as an argument).  This is  done according to a name
	  translation table that should be present in a file
	  called _c_e_l_l.spc.  The name of the spice output must be
	  _c_e_l_l.ana.  _N_s_p_i_c_e__b_s will only backsubstitute node
	  numbers that are in the header of a transient analysis
	  table.

     The nspice unix-shell script has the following form:

      # xsls: always use options -Shlmbf;
      #       the use of options -xy [ -z name ] is recommended
      xsls -Shlmbf -xy $1
      nspice_pp $1 $2 >> $1.spc
      spice $1.spc > $1.ana
      if nspice_bs $1
      then
	  exit 0
      else
	  exit 1
      fi
      # eof

EEEEXXXXAAAAMMMMPPPPLLLLEEEE
     $ nspice latch latch.cmd

AAAAUUUUTTTTHHHHOOOORRRR
     A.J. van Genderen

FFFFIIIILLLLEEEESSSS
     commandfile     input file
     _c_e_l_l.spc	     generated input file for spice
     _c_e_l_l.axa	     temporary file
     _c_e_l_l.ana	     output file

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     sls(1ICD),
     xsls(1ICD),
     spice(1ICD),



4		   The Nelsis IC Design System






NSPICE(1ICD)		     5/4/90		     NSPICE(1ICD)



     simeye(1ICD),
     user's guide for spice,
     sls: switch-level simulator user's manual.

DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
     _N_s_p_i_c_e__p_p and _n_s_p_i_c_e__b_s send their diagnostics to _s_t_d_e_r_r.
     Spice diagnostics are found in the output file _c_e_l_l.ana.
















































		   The Nelsis IC Design System			5



