349
edits
Line 18: | Line 18: | ||
SPICE .spc netlists are parsed via the function "prs_spice", which currently supports the set of "Element Cards" | SPICE .spc netlists are parsed via the function "prs_spice", which currently supports the set of "Element Cards" | ||
shown below with their instantiating syntax. | shown below with their instantiating syntax. | ||
{{|<> | {{Code|Model evaluator file for simple MOSFET models |<syntaxhighlight lang="text" style="font-size:13px"> | ||
}} | - Capacitors: | ||
Cname n+ n- cvalue | |||
- Diodes: | |||
Cname anode knode modelname <parameters> | |||
- MOS: | |||
Mname gnode dnode snode bnode modelname <parameters> | |||
N.B.: one instance of a MOS element MUST be preceeded | |||
(everywhere in the file) by the declaration of the related | |||
model. For instance: | |||
.MODEL mynmos NMOS( k=1e-4 Vth=0.1 rd=1e6) | |||
M2 Vgate 0 Vdrain 0 mynmos | |||
- Resistors: | |||
Rname n+ n- rvalue | |||
- Voltage sources: | |||
Vname n+ n- <dcvalue> <transvalue> | |||
Transvalue specifies a transient voltage source | |||
SIN(VO VA FREQ TD THETA) | |||
where: | |||
* VO (offset) | |||
* VA (amplitude) | |||
* FREQ (frequency) | |||
* TD (delay) | |||
* THETA (damping factor) | |||
* 0 to TD: V0 | |||
* TD to TSTOP: VO + | |||
VA*exp(-(time-TD)*THETA)*sine(twopi*FREQ*(time+TD)) | |||
Currently the damping factor has no effect. | |||
Pulse | |||
PULSE(V1 V2 TD TR TF PW PER) | |||
parameters meaning | |||
* V1 (initial value) | |||
* V2 (pulsed value) | |||
* TD (delay time) | |||
* TR (rise time) | |||
* TF (fall time) | |||
* PW (pulse width) | |||
* PER (period) | |||
Currently rise and fall time are not implemented yet. | |||
- .MODEL cards Defines a model for semiconductor devices | |||
.MODEL MNAME TYPE(PNAME1=PVAL1 PNAME2=PVAL2 ... ) | |||
TYPE can be: | |||
* NMOS N-channel MOSFET model | |||
* PMOS P-channel MOSFET model | |||
* D diode model | |||
The parameter "LEVEL" is currently assigned to the field | |||
"section" in the call of the element functions by the solver. | |||
Currently supported values for the parameter LEVEL for NMOS | |||
and PMOS are: | |||
* simple | |||
* lincap | |||
(see documentation of function Mdiode). | |||
Currently supported values for the parameter LEVEL for D are: | |||
* simple | |||
(see documentation of functions Mnmosfet and Mpmosfet). | |||
<syntaxhighlight/> }} | |||
== Tutorials == | == Tutorials == |
edits