Program: UC Berkeley Spice 3f2
Author: UC Berkeley / Ported to OS/2 by Andrew Brush
Supplied by: Andrew S. Brush  <auburn@apk.net>


This is the port of Berkeley Spice 3f2 to the OS/2 operating 
system.  It is a text-mode app, with no *on-screen* graphical 
interface.  The "hardcopy" function *is* enabled, and will produce
PostScript files, if the hardcopy device is set properly.  Note 
that the spinit file furnished by me will set the hardcopy device 
to postscript.

There are probably some bugs in this port.  One of them that I 
know about relates to the flushing of I/O.  It shows up in spice's
"more" function.  Whenever a screen-full of information is shown, 
and you should obviously enter a selection or hit "enter" for 
more, the prompt will not display until *after* you make the 
selection.  This is because the default I/O flushing in OS/2 is 
different from UNIX.  I will try to get this right in 3f3-1.

Installation:

Choose the directory for the SPice 3f2 executable, and unzip this 
entire archive to that directory.  Allow unzip to create the 
subdirectories

This executable is set up to be installed in D:\spice, with the 
executable in that directory, and subdirectories helpdir and 
scripts in d:\spice\lib.  Spice looks for init macro and help 
files following these paths.  If you install elsewhere, make sure 
that you have a path to spice.exe, and that "spice_lib_dir" 
environment variable points to the directories containing the 
directories scripts and helpdir.  These directories must have 
these names, contain the script and help files, and must be 
together in the spice_lib_dir.  

Assorted Information:

This version of spice contains nutmeg, the spice postprocessor. 
This is a powerful tool for, for example, making vector 
calculations on ac sweep results to determine various impedances
and gaind in one ac run.  Nutmeg is built-in to spice.exe.  All 
the interactive nutmeg commands will work from the spice prompt. 
See the on-line help for info on the commands.

The on-line help files furnished by Berkeley are available by 
typing "help" at the spice prompt.  This file contains nearly all 
the information you can get from the Berkeley user manual. 
Unfortunately, not *all* of the features that are new for Spice 3f
are listed in the on-line help.  The one that means the most to me
is the "B" source card, which lets you implement an arbitrary 
voltage or current source which is a nearly-arbitrary function of 
available voltages, currents, and model parameters.

An excerpt from the source for the on-line help for Spice 3f3-1 
follows to describe this new source:

      BXXXXXXX N+ N- <I=EXPR> <V=EXPR>                                            
                                                                                  
                                                                                  
  _E_x_a_m_p_l_e_s:                                                       
                                                                                  
      B1 0 1 I=cos(v(1))+sin(v(2))                                                
      B1 0 1 V=ln(cos(log(v(1,2)^2)))-v(3)^4+v(2)^v(1)                            
      B1 3 4 I=17                                                                 
      B1 3 4 V=exp(pi^i(vdd))                                                     
                                                                                  
                                                                                  
                                                                                  
       _N+ is the positive node, and _N- is the  negative  node.                
  The  values of the V and I parameters determine the voltages                    
  and currents across and through  the  device,  respectively.                    
  If  I is given then the device is a current source, and if V                    
  is given the device is a voltage source.  One and  only  one                    
  of these parameters must be given.                                              
                                                                                  
       The small-signal AC behavior of the nonlinear source is                    
  a  linear dependent source (or sources) with a proportional-                    
  ity constant equal to the derivative (or derivatives) of the                    
  source at the DC operating point.                                               
                                                                                  
                                                                                  
       The expressions given for V and I may be  any  function                    
  of voltages and currents through voltage sources in the sys-                    
  tem.  The following functions of real variables are defined:                    
                                                                                  
                  abs     asinh   cosh   sin                                      
                  acos    atan    exp    sinh                                     
                  acosh   atanh   ln     sqrt                                     
                  asin    cos     log    tan                                      
                                                                                  
                                                                                  
                                                                                  
       The function "u" is the  unit  step  function,  with  a                    
  value  of  one for arguments greater than one and a value of                    
  zero for arguments less than zero.  The function "uramp"  is                    
  the  integral of the unit step: for an input _x, the value is                  
  zero if _x is less than zero, or if _x is  greater  than  zero                
  the value is _x.  These two functions are useful in sythesiz-                  
  ing piece-wise non-linear functions, though convergence  may                    
  be adversely affected.                                                          
                                                                                  
                                                                                  
       The following standard operators are defined:                              
                                                                                  
       +       -       *       /       ^       unary -                            
                                                                                  
                                                                                  
       If the argument of log, ln, or sqrt becomes  less  than                    
  zero,  the  absolute  value  of  the argument is used.  If a                    
  divisor becomes zero or the argument of log  or  ln  becomes                    
  zero,  an  error will result.  Other problems may occur when                    
  the argument for a function in a partial derivative enters a                    
  region where that function is undefined.                                        
                                                                                  
                                                                                  
       To get time into the expression you can  integrate  the                    
  current  from a constant current source with a capacitor and                    
  use the resulting voltage (don't forget to set  the  initial                    
  voltage  across the capacitor).  Non-linear resistors, capa-                    
  citors, and inductors may be synthesized with the  nonlinear                    
  dependent  source.   Non-linear resistors are obvious.  Non-                    
  linear capacitors and inductors are implemented  with  their                    
  linear  counterparts  by  a  change of variables implemented                    
  with the nonlinear dependent source.  The following  subcir-                    
  cuit will implement a nonlinear capacitor:                                      
                                                                                  
      .Subckt nlcap   pos neg                                                     
      * Bx: calculate f(input voltage)                                            
      Bx   1    0    v = f(v(pos,neg))                                            
      * Cx: linear capacitance                                                    
      Cx   2    0    1                                                            
      * Vx: Ammeter to measure current into the capacitor                         
      Vx   2    1    DC 0Volts                                                    
      * Drive the current through Cx back into the circuit                        
      Fx   pos  neg  Vx 1                                                         
      .ends                                                                       
                                                                                  
                                                                                  
  Non-linear inductors are similar.                                               
                                                                                  
I have included the source to Spice 3f3-1 on-line help as 
man/spice.txt.  Also, the UNIX man-pages for spice and nutmeg are 
included in the man directory.  I think the command-line options 
for nutmeg also apply to this version of nutmeg-enabled Spice.

If you wish to ask me a question, or report another bug, please 
E-mail to "auburn@apk.net"

Disclaimer and legal stuff:

SPICE was written by the University of California at Berkeley.  
They own and hold the copyright to the source, other than the few 
small modifications I made to compile for OS/2.  *I* (Andrew S. 
Brush) own the modifications and this executable, and allow you 
the right to use it for your own purposes.  You may re-distribute 
the executable and helpfiles, as long as you do not charge for 
them.  UC Berkeley and I are completely unrelated.  Neither UC 
Berkeley or I make ANY guarantees about the function of this 
program or accuracy of the helpfiles.  Neither UC Berkeley or I 
assume any liability for anything arising from you use of or 
inability to use this program and/or documentation.  

Andrew S. Brush, P.E.
