Re: HSPICE help
Hi:
¿How to run hspice?
on linux:
1. create a file simulation1.sp (input file)
2. Run in a terminal (in the folder where you created the *.sp file)
$ hspice simulation1.sp > simulation1.lis
3. the file *.lis is a output file that has all the information about the simulation that you made.
Depending on the type of analysis, you will have other output files:
*.tr# : transient analysis
*.sw# : DC analysis
*.ac# : AC analysis
....
¿How to make the file simulation1.sp?
in a text editor, for example vim, emacs.
you can follow this order:
* TITLE: an asterisk (*) at the begining of a line is used for a comment.
*OPTIONS:
*voltage & current SOURCES:
*NETLIST: a list of all the elements in the circuit.
you have to list the kind of element (resistor, transistor, ...) and the nodes (with numbers or names) where it's connected.
*Analysis STATEMENTS: what kind of analysis you want to do.
*LIBRARIES & SUBCIRCUITS:
.END
* always put the .END statement.
Added after 1 minutes:
this is a good page
http://www.seas.upenn.edu/~jan/spice/spice.overview.html:!:
Added after 9 minutes:
:!::!::!::?::!:
*example of SPICE analysis - CMOS inverter analysis
* we find the VTC of the CMOS inverter
****************************************
*---Models---*
.include modn.mod
.include modp.mod
*--Options---*
.option post=2 probe
*numdgt=2
*.protect
*****sources******
Vdd 1 0 3.3
Vin 4 0 0.66
****components********
****TRANSISTOR NMOS******
m1 2 4 0 0 modn l=0.35u w=0.7u
****TRANSISTOR PMOS******
m9 2 4 1 1 modp l=0.35u w=0.7u
****---Simulation setup---****
.temp 25
.op
.DC Vin 0 3.3 3.3m
****---Measurements---*
.print DC V(2) V(4)
.end