Information about SPICE for VLSI lab
 
 
 SPICE Tutorials online
You can find some information about input files and Spice commands here:
  •  Dr. David C Henry's Spice Manual 
  •  UC Berkeley Spice3 Tutorial 
  • the help command in Spice
  •  Examples of input files
    Circuit with DC Analysis

    The simulated circuit:

    The Spice input file that describes this circuit:  click here to download this file



    Circuit for DC analysis
    * Voltage sources
    Vds 1 0 DC +10V
    Vgs 2 0 DC +3V

    * Model description
    .model mosfet nmos (kp=20u Vto=+2 lambda=0)

    * Transistor
    M1 1 2 0 0 mosfet L=10u W=400u

    * Analysis request
    .DC Vds 0V 10V 100mV

    *End of the program
    .End


    Circuit with transient analysis

    The simulated circuit:

    The Spice input file that describes this circuit:  click here to download this file



    Circuit for transient analysis
    R1 1 2 1k
    R2 2 0 2k
    C1 2 0 20p
    Vin 1 0 DC PULSE (-3 6 +10n 10n 10n 100n 200n)
    .TRAN 1n 600n
    .PLOT TRAN V(1) V(2)
    .End


     
     
     Printing plots
    Set the output format to postscript. Type in Spice:

       set hcopydevtype = postscript

    For each plot type in Spice (remember about the .ps extention in your file name):

       hardcopy file_name function

    This command will create a postscript file file_name with a plot of the function function. The that need to be typed here are the same as for the plot and print spice commands (e.g. v(1), v(2), i(vdd)).

    Print the created postscript file. Type in UNIX shell window:

       lp -d printer_name file_name

    This command is explained in the  UNIX tutorial .