Ocs package: Difference between revisions

426 bytes added ,  22 September 2015
Line 267: Line 267:




{{Code|Load the AND circuit structure parsing a .spc file |<syntaxhighlight lang="octave" style="font-size:13px">
{{Code| The .spc file for the CMOS AND gate|<syntaxhighlight lang="text" style="font-size:13px">
outstruct = prs_spice ("and");
* AND (simple Algebraic MOS-FET model)
 
.MODEL mynmos NMOS(LEVEL=simple k=2.94e-05  Vth=0.08 rd=.957e7)
.MODEL mypmos PMOS( k=-2.94e-05  Vth=-0.08 rd=.957e7)
 
M1 Va 3  4        0 mynmos
M2 Vb 0  3        0 mynmos
* nside of the inverter
M3 4  0  Va_and_b 0 mynmos     
 
M4 Va Vdd 4        Vdd  mypmos
M5 Vb Vdd 4        Vdd  mypmos
* pside of the inverter
M6 4  Vdd Va_and_b Vdd  mypmos 
 
V1  Va 0 SIN(0.5 0.5 1 0 0)
V2  Vb 0 SIN(0.5 0.5 2 0.25 0)
V3 Vdd 0 1
 
.END
 
</syntaxhighlight>
</syntaxhighlight>
}}
}}
349

edits