diff --git a/library/AnalogueCM.lib b/library/AnalogueCM.lib deleted file mode 100644 index 0d4fcddaf..000000000 --- a/library/AnalogueCM.lib +++ /dev/null @@ -1,222 +0,0 @@ - - - - -Esaki tunnel diode model: - -4 April 2016 Mike Brinson mbrin72043@yahoo.co.uk - -Parameters; Description; Default value -is; Saturation current (A); 1e-12 -ip; Peak current (A); 5e-3 -iv; Valley current (A); 370e-6 -vp; Peak voltage (V); 50e-3 -vv; Valley current (V); 0.37 -a2; Excess current exponential factor (1/V); 5 -ctd; Diode capacitance at zero volts bias (F); 0.5e-12 -temp; Diode temperature (Celsius); 26.58 - -Test examples: (1) Test_EsakiTD_DC.sch, (2) TD_oscillator.sch - -References -[1] S.M. Sze and Kwok K. Ng,"Physics of semiconductor devices, -Third Edition, 2007, John Wiley & Sons, New York, ISBN-13: 978-0-471, -ISBN-10: 0-471-1423-5. -[2] Messaadi Lotfi and Dibi Zohir, "A SPICE behavioural model of -tunnel diode: simulation and application" International Conference -on Automation, Control Engineering and Computer Science (ACECS'14), -Proceedings - IPCO-2014, pp 186-191, ISSN 2356-5608. -[3] M. Nikhil, S. Bowyer, J. Huckaby and M.B Steer, "Modelling of an -Esaki tunnel diode in a circuit simulator", Active and Passive -Electronic Components, Vol. 2011, Article ID 830182, 8 pages, -doi:10.1155/2011/830182. - - - -.SUBCKT AnalogueCM_Esakitd gnd A C is=1e-12 ip=5e-3 -+ iv=370e-6 vp=0.05 vv=0.37 a2=5 ctd=0.5e-12 temp=26.85 -C1 A C {ctd} -A1 %gd(A C) modtd -Rp C A 1e9 -.MODEL modtd etd ( is ={is} ip = {ip} -+ iv = {iv} vp = {vp} vv = {vv} a2 = {a2} temp= {temp} ) -.ENDS - - - -.Def: AnalogueCM_Esakitd _net0 _net1 -.DefEnd - - - - - - - - - - - <.ID -40 54 Esakitd "1=is=1e-12==" "1=ip=5e-3==" "1=iv=370e-6==" "1=vp=0.05==" "1=vv=0.37==" "1=a2=5==" "1=ctd=0.5e-12==" "1=temp=26.85=="> - - <.PortSym 40 0 2 180> - <.PortSym -60 0 1 0> - - -/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ - - -Fowler-Nordheim diode model: - -14 September 2017 Mike Brinson mbrin72043@yahoo.co.uk - -Parameters; Description; Default value -M; Number of diodes multiplying factor; 1 -L; Length pf diode for calculating Fowler-Nordheim current (m); 50e-6 -W; Width of diode for calculating Fowler-Nordheim current (m); 50e-6 -Ef; Forward critical electric field (V/m); 1e10 -Er; Reverse critical electric field (V/m); 1e10 -Jf; Forward Fowler Nordheim current coefficient; 1e-10 -Jr; Reverse Fowler Nordheim current coefficient; 1e-10 -Scale; Scale factor for circuit parameters; 1 -Scalem; Scale factor for model parameters; 1 -Shrink; Shrink factor; 1 -Xl; Masking and etching effect for length; 1 -Xw; Masking and etching effect for width; 1 -Rd; Series parasitic resistance (Ohm); 0.1 -Ld; Series parasitic inductance (H); 1e-10 -Tox; Thickness of oxide layor (m); 1.0e-8 - -Test example: (1) TestFNXSPICEDC.sch - -References -[1] R. H. Fowler and L. W. Nordheim, Electron emission in Intense Electric Fields,Proc. R. Soc. London, -Vol. 119, No. 781, 1 May 1928, 173-181.. -[2] Gong-Ru Lin, Chun-Jung Lin, and Chi-Kuan Lin, Enhanced Fowler-Nordheim tunneling -effect in nanocrystallite Si based LED with interfacial Si nano-pyramids, Optics Express -Vol. 15, Issue 5, pp. 2555-2563, 2007, https://doi.org/10.1364/OE.15.002555. -[3] R G. Forbes, Simple good approximations for the special elliptic functions in standard -Fowler-Nordheim tunneling theory for a Schottky-Nordheim barrier, Applied Physics Letters, -89, 113122, 2006. - - - -.SUBCKT AnalogueCM_FowlerNDiodeXSPICE gnd nPAnode nPCathode M=1 L=50e-6 W=50e-6 Ef=1e10 Er=1e10 Jf=1e-10 Jr=1e-10 Tox=1.0e-8 Scale=1.0 Scalem=1.0 Shrink=1.0 Xl=1.0 Xw=1.0 Rd=0.1 Ld=1e-10 -L1 ni1 nPAnode {Ld} -R1 ni2 ni1 {Rd} -A1 %gd(ni2 nPCathode) FNMOD -.MODEL FNMOD FNXSPICECM(M = {M} L = {L} W = {W} Ef = {Ef} Er = {Er} -+ Jf = {Jf} Jr = {Jr} Tox = {Tox} Scale = {Scale} Scalem = {Scalem} Shrink = {Shrink} -+ Xl = {Xl} Xw = {Xw} ) -.ENDS - - - -.Def: AnalogueCM_FowlerNDiodeXSPICE _net0 _net1 -.DefEnd - - - - - <.PortSym -40 0 1 0> - <.ID -20 44 FN_Diode "1=M=1==" "1=L=50e-6==" "1=W=50e-6==" "1=Ef=1e10==" "1=Er=1e10==" "1=Jf=1e-10==" "1=Jr=1e-10==" "1=Scale=1.0==" "1=Scalem=1.0==" "1=Shrink=1.0==" "1=Xl=1.0==" "1=Xw=1.0==" "1=Rd=0.1==" "1=Ld=1e-10==" "1=Tox=1.0e-8=="> - - - - - - <.PortSym 60 0 2 180> - - -/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ - - -Simple RF inductor model. - -1 January 2017 Mike Brinson mbrin72043@yahoo.co.uk - -1. XSPICE I-V CodeModel: DC, transient and AC functionality, -2. L, il1 and il2 determine inductance value as a function of DC current, -3. L, tc1 and tc2 determine inductance value as a function of device temperature "temp". -4. Inductance RF performance is set by parasitic components rs, cp and rp. - -NOTE: The Qucs-S XSPICE RF inductance CodeModel only uses two circuit nodes, yielding -a highly efficient compact model. - -Parameters: - -NAME; DESCRIPTION; DEFAULT VALUE; UNIT -L; Inductance at tmperature tnom; 370u; H -il1; Linear current coefficient; 0; 1/A -il2; Quadratic current coefficient; -6.19e-5; 1/(A*A) -tc1; Linear temperature coefficient; 0.0; 1/C -tc2; Quadratic temperature coefficient; 0.0; 1/(C*C) -lic; Initial condition: dc current; 0.0; A -tnom; Inductance measurement temperature; 26.58; C -rs; Inductance winding resistance; 0.315; Ohms -cp; Self-resonant capacitance; 6.02e-12; F -rp; Limits self-resonant impedance; 363k; Ohms - -References: -1. L. Green, RF-inductor modeling for the 21st century, EDN, 27, pp. 67-70,72,74, 2001. -2. O'Hara, Modeling non-ideal inductors in SPICE, UK:Newo]port Components Limited, -Milton Keynes, http://www.intusoft.com/articles/inductor.pdf, 1993. -3. M.E. Brinson and S. Jahn, Modelling of high-frequency inductance with Qucs non-linear radio -frequency equation defined devices, International Journal of Electronics, V.93, pp. 307-321, 2009, -http://dx.doi.org/10.1080/00207210802640603. - - - -.Def:AnalogueCM_RFind _net0 _net1 -.Def:End - -* Qucs 0.0.19 XSPICEind_RFind.sch - -.SUBCKT AnalogueCM_RFind gnd _net0 _net1 l=370u il1=0.0 il2=-6.19e-5 tc1=0.0 tc2=0.0 lic=0.0 tnom=26.85 rs=0.315 cp=10e-12 rp=363k -A1 %gd(_net0 _net1) lmod -.MODEL lmod RFind(L={l} lic={lic} -+ il1={il1} il2={il2} tc1={tc1} tc2={tc2} -+ tnom = {tnom} rs={rs} cp={cp} rp={rp}) -.ENDS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <.PortSym -60 -30 1 0> - - <.PortSym 90 -30 2 180> - - - - - - <.ID -25 19 RF_Ind "1=l=370u==" "1=il1=0.0==" "1=il2=-6.19e-5==" "1=tc1=0.0==" "1=tc2=0.0==" "1=lic=0.0==" "1=tnom=26.85==" "1=rs=0.315==" "1=cp=6.02e-12==" "1=rp=363k=="> - - - - diff --git a/library/AnalogueCM/CMakeLists.txt b/library/AnalogueCM/CMakeLists.txt deleted file mode 100644 index dacc8d1ce..000000000 --- a/library/AnalogueCM/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -SET(AN_CM_resources -etd.mod -etd.ifs -FNXSPICECM.mod -FNXSPICECM.ifs -RFind.mod -RFind.ifs -) - -INSTALL( FILES ${AN_CM_resources} DESTINATION share/${QUCS_NAME}/library/AnalogueCM ) - diff --git a/library/AnalogueCM/FNXSPICECM.ifs b/library/AnalogueCM/FNXSPICECM.ifs deleted file mode 100644 index 1b61b1b9e..000000000 --- a/library/AnalogueCM/FNXSPICECM.ifs +++ /dev/null @@ -1,146 +0,0 @@ -NAME_TABLE: -C_Function_Name: cm_FNXSPICECM -Spice_Model_Name: fnxspicecm -Description: " " - - -PORT_TABLE: -Port_Name: nPAnode_nPCathode -Description: " " -Direction: inout -Default_Type: gd -Allowed_Types: [gd] -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: jf -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: tox -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: ef -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: jr -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: er -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: m -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: l -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: scale -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: shrink -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: w -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: xl -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: scalem -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: xw -Description: " " -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - diff --git a/library/AnalogueCM/FNXSPICECM.mod b/library/AnalogueCM/FNXSPICECM.mod deleted file mode 100644 index 1d5a0e2ab..000000000 --- a/library/AnalogueCM/FNXSPICECM.mod +++ /dev/null @@ -1,68 +0,0 @@ -/* - FNXSPICECM cm model. - - 14 September 2017 Mike Brinson - - - This is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. -*/ - - -#include -#include "xspice_mathfunc.h" - -void cm_FNXSPICECM(ARGS) -{ - Complex_t ac_gain00; - static double Jf,Tox,Ef,Jr,Er,M,L,Scale,Shrink,W,Xl,Scalem,Xw; - static double Xweff,Xleff,Weff,Leff,Areaeff,Eox; - static double V1,V1_old; - double Q0, cQ0; - double delta_t; - - if(INIT) { - Jf = PARAM(jf); - Tox = PARAM(tox); - Ef = PARAM(ef); - Jr = PARAM(jr); - Er = PARAM(er); - M = PARAM(m); - L = PARAM(l); - Scale = PARAM(scale); - Shrink = PARAM(shrink); - W = PARAM(w); - Xl = PARAM(xl); - Scalem = PARAM(scalem); - Xw = PARAM(xw); - Xweff=Xw*Scalem; - Xleff=Xl*Scalem; - Weff= Scale*Shrink*W+Xweff; - Leff= Shrink*L*Scale+Xleff; - Areaeff=M*Weff*Leff; - Eox=3.45306e-11; - } - if (ANALYSIS != AC) { - if (TIME == 0) { - V1_old = V1 = INPUT(nPAnode_nPCathode); - Q0=0.0; - cQ0=0.0; - } else { - V1 = INPUT(nPAnode_nPCathode); - delta_t=TIME-T(1); - Q0 = (Eox/Tox*Areaeff)*(V1-V1_old)/(delta_t+1e-20); - cQ0 = (Eox/Tox*Areaeff)/(delta_t+1e-20); - V1_old = V1; - } - OUTPUT(nPAnode_nPCathode) = (V1>=0.0)?exp(-Tox*Ef/V1)/(Tox*Tox)*Areaeff*Jf*(V1*V1):-exp(Er/V1*Tox)*Areaeff*Jr*(V1*V1)/(Tox*Tox) + Q0; - PARTIAL(nPAnode_nPCathode,nPAnode_nPCathode) = (V1>=0.0)?2.0*V1/(Tox*Tox)*Areaeff*Jf*exp(-1.0/V1*Tox*Ef)+1.0/Tox*Areaeff*Jf*exp(-1.0/V1*Tox*Ef)*Ef: - Er*exp(Er/V1*Tox)/Tox*Areaeff*Jr+-2.0*exp(Er/V1*Tox)*V1/(Tox*Tox)*Areaeff*Jr + cQ0; - } else { - ac_gain00.real = (V1>=0.0)?2.0*V1/(Tox*Tox)*Areaeff*Jf*exp(-1.0/V1*Tox*Ef)+1.0/Tox*Areaeff*Jf*exp(-1.0/V1*Tox*Ef)*Ef: - Er*exp(Er/V1*Tox)/Tox*Areaeff*Jr+-2.0*exp(Er/V1*Tox)*V1/(Tox*Tox)*Areaeff*Jr; - ac_gain00.imag = (Eox/Tox*Areaeff)*RAD_FREQ; - AC_GAIN(nPAnode_nPCathode,nPAnode_nPCathode) = ac_gain00; - } -} diff --git a/library/AnalogueCM/RFind.ifs b/library/AnalogueCM/RFind.ifs deleted file mode 100644 index e57660618..000000000 --- a/library/AnalogueCM/RFind.ifs +++ /dev/null @@ -1,132 +0,0 @@ -/* - RFind inductance cm model. - - 12 Oct 2016 Mike Brinson - - This is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. -*/ -NAME_TABLE: -C_Function_Name: cm_RFind -Spice_Model_Name: RFind -Description: "A SPICE RF inductance." - -PORT_TABLE: -Port_Name: nind -Description: "inductance terminals" -Direction: inout -Default_Type: gd -Allowed_Types: [gd] -Vector: no -Vector_Bounds: - -Null_Allowed: no - - - - -PARAMETER_TABLE: -Parameter_Name: l -Description: "Nominal inductance value at tnom." -Data_Type: real -Default_Value: 1e-3 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - - -PARAMETER_TABLE: -Parameter_Name: il1 -Description: "Linear current coefficient." -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - - -PARAMETER_TABLE: -Parameter_Name: il2 -Description: "Quadratic current coefficient." -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: tc1 -Description: "Linear temperature coefficient." -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - - -PARAMETER_TABLE: -Parameter_Name: tc2 -Description: "Quadratic current coefficient." -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: lic -Description: "Inductance current initial condition value." -Data_Type: real -Default_Value: 0.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: rs -Description: "Equivalent series resistance." -Data_Type: real -Default_Value: 1e-3 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: cp -Description: "Equivalent parallel capacitance." -Data_Type: real -Default_Value: 10e-12 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: rp -Description: "Equivalent parallel resistance." -Data_Type: real -Default_Value: 10e-12 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - - -PARAMETER_TABLE: -Parameter_Name: tnom -Description: "Inductance parameter measurement temperature n Celsius." -Data_Type: real -Default_Value: 26.58 -Vector: no -Vector_Bounds: - -Null_Allowed: no - - diff --git a/library/AnalogueCM/RFind.mod b/library/AnalogueCM/RFind.mod deleted file mode 100644 index ee22e71e8..000000000 --- a/library/AnalogueCM/RFind.mod +++ /dev/null @@ -1,82 +0,0 @@ -/* - RFind inductance cm model. - - 12 Oct 2016 Mike Brinson - - This is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. -*/ - -#include - -void cm_RFind (ARGS) -{ - Complex_t ac_gain; - static double PLIND, PIL1, PIL2, PTC1, PTC2, PTNOMC, PLIC, PRS, PCP, PRP; - static double iind, iind_dc, iind_old, vind, vind_old, icp, icp_old, irp; - static double tnomk, tempk, lvalue, iind_dc_old; - double delta, p1; - - - if(INIT) { - PLIND = PARAM(L); - PIL1 = PARAM(il1); - PIL2 = PARAM(il2); - PTC1 = PARAM(tc1); - PTC2 = PARAM(tc2); - PTNOMC = PARAM(tnom); - PLIC = PARAM(lic); - PRS = PARAM(Rs); - PCP = PARAM(Cp); - PRP = PARAM(Rp); - - tnomk = PTNOMC + 273.15; - tempk = TEMPERATURE + 273.15; - iind_dc_old = PLIC; - icp = 0.0; - icp_old = 0.0; - } - - - - - if(ANALYSIS == DC) { - lvalue = PLIND*(1+PIL1*iind_dc_old+PIL2*iind_dc_old*iind_dc_old)* - (1+PTC1*(tempk-tnomk)+PTC2*(tempk-tnomk)*(tempk-tnomk)); - vind = INPUT(nind); - iind_dc = vind/(PRS+1e-7) + vind/(PRP+1e-7); - OUTPUT(nind) = iind_dc; - PARTIAL(nind, nind) = 1/(PRS+1e-7) + 1/(PRP+1e-7); - - iind_dc_old = iind_dc; - - - - } - - if(ANALYSIS == AC) { - p1 =(PRS*PRS+RAD_FREQ*RAD_FREQ*lvalue*lvalue); - ac_gain.real = PRS/p1+1/PRP; - ac_gain.imag= RAD_FREQ*PCP - (lvalue * RAD_FREQ)/p1; - AC_GAIN(nind,nind) = ac_gain; - } - - if(ANALYSIS == TRANSIENT) { - vind = INPUT(nind); - delta = TIME - T(1); - p1 = lvalue/delta; - iind = (iind_old*p1 + vind)/(PRS+p1); - icp = icp_old+PCP*(vind - vind_old)/delta; - irp = vind/PRP; - OUTPUT(nind) = iind + icp + irp; - PARTIAL(nind, nind) = 1/(PRS+p1) + PCP/delta + 1/PRP; - vind_old = vind; - iind_old = iind; - icp_old = icp; - - } - -} - diff --git a/library/AnalogueCM/etd.ifs b/library/AnalogueCM/etd.ifs deleted file mode 100644 index e5dce3ea3..000000000 --- a/library/AnalogueCM/etd.ifs +++ /dev/null @@ -1,97 +0,0 @@ -/* - etd cm model. - - 2 April 2016 Mike Brinson - - This is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. -*/ - -NAME_TABLE: -C_Function_Name: cm_etd -Spice_Model_Name: etd -Description: "A non-linear tunnel diode model." - - -PORT_TABLE: -Port_Name: ntd -Description: "Tunnel diode terminals" -Direction: inout -Default_Type: gd -Allowed_Types: [gd] -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: vp -Description: "Peak voltage in volts." -Data_Type: real -Default_Value: 0.1 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - - -PARAMETER_TABLE: -Parameter_Name: ip -Description: "Peak current in amps." -Data_Type: real -Default_Value: 1e-5 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: vv -Description: "Valley voltage in volts." -Data_Type: real -Default_Value: 0.4 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: iv -Description: "Valley current in amps." -Data_Type: real -Default_Value: 1e-6 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: a2 -Description: "Excess current exponential factor in 1/volts." -Data_Type: real -Default_Value: 5 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no -PARAMETER_TABLE: -Parameter_Name: temp -Description: "Device temperature in Celsius." -Data_Type: real -Default_Value: 26.85 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - - -PARAMETER_TABLE: -Parameter_Name: is -Description: "Diode saturation current in amps." -Data_Type: real -Default_Value: 1e-12 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no diff --git a/library/AnalogueCM/etd.mod b/library/AnalogueCM/etd.mod deleted file mode 100644 index d0708b864..000000000 --- a/library/AnalogueCM/etd.mod +++ /dev/null @@ -1,70 +0,0 @@ -/* - etd cm model. - - 2 April 2016 Mike Brinson - - - This is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. -*/ - - -#include - -void cm_etd(ARGS) -{ - Complex_t ac_gain1; - static double PVP, PIP, PVV, PIV, PA2; - static double PIS, T2, con1, con2, con3, VT; - double ith, ix, it, dith, dix, ditu; - static double vtd, itd, diff; - double P_K, P_Q; - - if (INIT) { - PVP = PARAM(vp); - PIP = PARAM(ip); - PVV = PARAM(vv); - PIV = PARAM(iv); - PA2 = PARAM(a2); - PIS = PARAM(is); - -/* Constants */ - - P_K = 1.3806503e-23 ; /* Boltzmann's constant in J/K */ - P_Q = 1.602176462e-19; /* Charge of an electron in C */ - T2 = PARAM(temp)+237.15; - VT = P_K*T2/P_Q; /* Thermal voltage at Temp in volts */ - con1 = PIV*PA2; - con2 = PIS/VT; - con3 = PIP/PVP; - - - - } - - if (ANALYSIS != AC) { - vtd = INPUT(ntd); - ith = PIS*(exp( vtd/VT) -1.0); - ix = PIV*exp(PA2*(vtd-PVV)); - it = PIP*(vtd/PVP)*exp(1-vtd/PVP); - itd = ith+ix+it; - dith = con2*exp(vtd/VT); - dix = con1*exp(PA2*(vtd-PVV)); - ditu = con3*(1-vtd/PVP)*exp(1-vtd/PVP); - diff = dith+dix+ditu; - - OUTPUT(ntd) = itd; - PARTIAL(ntd, ntd) = diff; - - } - - else { - ac_gain1.real = diff; - ac_gain1.imag = 0.0; - AC_GAIN(ntd, ntd) = ac_gain1; - - } - -} diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 2265f7e79..78581fafd 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -47,3 +47,5 @@ xyce.blacklist INSTALL( FILES ${COMPLIBS} ${BLACKLIST} DESTINATION share/${QUCS_NAME}/library ) ADD_SUBDIRECTORY( XyceDigital) +ADD_SUBDIRECTORY( symbols ) + diff --git a/library/MESFETs.lib b/library/MESFETs.lib deleted file mode 100644 index c73a1e550..000000000 --- a/library/MESFETs.lib +++ /dev/null @@ -1,97 +0,0 @@ - - - - -Simple level 1 Curtice MESFET model. -1. XSPICE I-V CodeModel core: DC, transient and AC functionality, -2. Fixed capacitors: cgs, cgd and cds, -3. Parasitic R and L components: rd, ld, rg, lg, rs and ls. - -Parameters: - -NAME DESCRIPTION DEFAULT VALUE -rg External gate resistance 1m Ohm -rd External drain resistance 1m Ohm -rs External source resistance 1m Ohm -cgs Zero-bias gate-source - capacitance 1f F -cgd Zero-bias gate-drain - capacitance 1f F -cds Zero-bias drain-source - capacitance 1f F -lg External gate lead inductance 0.1n H -ld External drain lead inductance 0.1n H -ls External source lead inductance 0.1n H -beta Transconductance parameter 3m A/V^2 -lambda Channel length modulation - parameter for quadratic model 40m 1/V -alpha Coefficient of Vds in tanh - function for quadratic model 0.8 1/V -vto Quadratic model gate threshold - voltage -1.8 V -area Area factor 1 -is Diode saturation coefficient 1f A -n Diode emission coefficient 1 -rf Diode forward bias slope - resistance 10 Ohm -Vbi Built-in gate potential 1 V -rin Series resistance to cgs 1m Ohm - - - -References: -1. W.R. Curtice, A MESFET model for use in the design of GaAs integrated circuits, IEEE -Transactions on Microwave Theory and Techneques, MTT-28, pp. 448-456, 1980. -2. Mike Brinson and Stefan John, Qucs: Compact device - circuit macromodel specification; A -Curtice level 1 MESFET model, pp 1-8, 2007, -[Available from http://qucs.sourceforge.net/docs/report/curtice.pdf]. -3. Mike Brinson, Qucs: A report - Verilog-A compact device models for GaAs MESFETS, pp 1-38, 2008, -[Available from http://qucs.sourceforge.net/docs/report/MESFET.pdf]. - - - - -.Def:MESFETs_MESFETCL1 nd ns ng beta="3e-3" lambda="0.05" alpha="2.25" vto="-1.8" area="1" rg="5.1" rd="1.3" rs="1.3" is="1e-15" rf="10.0" vbi="1.0" ld="0.1e-9" lg="0.1e-9" ls="0.1e-9" cgs="1e-12" cgd="1e-12" cds="1e-12" rin="1e-3" -XSP_CMod:XSP_CMod1 File="curtice1.mod" File="curtice1.ifs" -R:R1 ns1 ns2 R="{rs}" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85" -.Def:End - - * Qucs 0.0.19 MESFETs_MESFETCL1.sch - -.SUBCKT MESFETs_MESFETCL1 gnd nd ns ng beta=3e-3 lambda=0.05 alpha=2.25 vto=-1.8 area=1 rg=5.1 rd=1.3 rs=1.3 is=1e-15 rf=10.0 vbi=1.0 ld=0.1e-9 lg=0.1e-9 ls=0.1e-9 cgs=1e-12 cgd=1e-12 cds=1e-12 rin=1e-3 -A1 %gd(nd1 ns1) %gd(ng1 ns1) mod - -R2 ng1 ng2 {rg} -R4 ns1 _net0 {rin} -C2 ng1 _net0 {cgs} -C1 nd1 ng1 {cgd} - -R1 ns1 ns2 {RS} -L3 ns2 ns {ls} -R3 nd1 nd2 {rd} -C3 nd1 ns1 {cds} -L2 nd nd2 {ld} -L1 ng ng2 {lg} -.MODEL mod curtice1 (beta={beta} lambda={lambda} alpha={alpha} -+ vto={vto} rf={rf} is={is} vbi={vbi} ) -.ENDS - - - - - - <.PortSym -40 0 3 0> - - - - - <.PortSym 0 40 2 0> - <.PortSym 0 -40 1 0> - - - - - <.ID 50 -116 MESFETCL1 "1=beta=3e-3==" "1=lambda=0.05==" "1=alpha=2.25==" "1=vto=-1.8==" "1=area=1==" "1=rg=5.1==" "1=rd=1.3==" "1=rs=1.3==" "1=is=1e-15==" "1=rf=10.0==" "1=vbi=1.0==" "1=ld=0.1e-9==" "1=lg=0.1e-9==" "1=ls=0.1e-9==" "1=cgs=1e-12==" "1=cgd=1e-12==" "1=cds=1e-12==" "1=rin=1e-3=="> - - - diff --git a/library/MESFETs/CMakeLists.txt b/library/MESFETs/CMakeLists.txt deleted file mode 100644 index 23a4a35f3..000000000 --- a/library/MESFETs/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ - -SET(MESFETs_resources -curtice1.mod -curtice1.ifs -) - -INSTALL( FILES ${MESFETs_resources} DESTINATION share/${QUCS_NAME}/library/MESFETs ) - diff --git a/library/MESFETs/curtice1.ifs b/library/MESFETs/curtice1.ifs deleted file mode 100644 index 7833c6391..000000000 --- a/library/MESFETs/curtice1.ifs +++ /dev/null @@ -1,122 +0,0 @@ -/* - cutice1 cm model. - - 21 September 2016 Mike Brinson - - This file contains the XSPICE ifs specification for an experimental Curtice - basic level MESFET model. This model is used as a test bench for constructing - compact device models with the Qucs-0.0.19-S automatic XSPICE CodeModel compiler - system. - - This is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. -*/ -NAME_TABLE: -C_Function_Name: cm_curtice1 -Spice_Model_Name: curtice1 -Description: "An MESFET Curtice Level 1 test model." - - -PORT_TABLE: -Port_Name: ndisi -Description: "Intrinsic internal drain to source terminals" -Direction: inout -Default_Type: gd -Allowed_Types: [gd] -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PORT_TABLE: -Port_Name: ngisi -Description: "Intrinsic internal gate to source terminals" -Direction: inout -Default_Type: gd -Allowed_Types: [gd] -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: area -Description: "Device area factor" -Data_Type: int -Default_Value: 1 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: beta -Description: "Transconductance." -Data_Type: real -Default_Value: 3e-3 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: lambda -Description: "Channel length modulation factor." -Data_Type: real -Default_Value: 40e-3 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: alpha -Description: "Hyperbolic tangent function." -Data_Type: real -Default_Value: 0.8 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: vto -Description: "Threshold voltage." -Data_Type: real -Default_Value: -6.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: rf -Description: "Forward bias slope resistance." -Data_Type: real -Default_Value: 10.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: vbi -Description: "Built-in gate potential." -Data_Type: real -Default_Value: 1.0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - -PARAMETER_TABLE: -Parameter_Name: is -Description: "Diode saturation current." -Data_Type: real -Default_Value: 1e-15 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: no - - diff --git a/library/MESFETs/curtice1.mod b/library/MESFETs/curtice1.mod deleted file mode 100644 index 5d4c6b555..000000000 --- a/library/MESFETs/curtice1.mod +++ /dev/null @@ -1,109 +0,0 @@ -/* - curtice cm model. - - 10 March 2016 Mike Brinson - - This file contains the XSPICE ifs specification for an experimental Curtice - Level 1 MESFET model. This model is used as a test bench for constructing - compact device models with the Qucs-S automatic XSPICE CodeModel compiler - system. - - This is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. -*/ - -#define Xpow(x,y) (exp(y*log(x+1e-20))) -#define Xsech(y) (1.0/(cosh(y)+1e-20)) -#include - -void cm_curtice1(ARGS) -{ - Complex_t ac_gain2, ac_gain3; - static double PBETA, PALPHA, PLAMBDA, PVTO, PRF, PVBI, PAREA; - static double gdisi, gm, PIS, GMIN; - static double Vndisi, Vngisi, Idisi, Igisi, ggisi; - double x,x1,x2, factor; - - - - - if(INIT) { - - PBETA = PARAM(beta); - PLAMBDA = PARAM(lambda); - PALPHA = PARAM(alpha); - PVTO = PARAM(vto); - PRF = PARAM(rf); - PVBI = PARAM(vbi); - PIS = PARAM(is); - PAREA = PARAM(area); - - Idisi = 0.0; - gdisi = 1e-20; - - GMIN = 1e-9; - - - } - - - if (ANALYSIS != AC) { - - Vndisi = INPUT(ndisi); - Vngisi = INPUT(ngisi); - - if ( (Vngisi-PVTO) > 0.0) { - x = Vndisi*PALPHA; - x1 = 1.0+Vndisi*PLAMBDA; - x2 = Vngisi-PVTO; - factor = PBETA*Xpow(x2, 2)*x1; - Idisi = factor*tanh(x); - gdisi = factor*PLAMBDA*tanh(x) +PBETA*PALPHA*x1*Xsech(x)*Xsech(x); - gm = 2*PBETA*x2*x1*tanh(x); - - } - else { - Idisi = 0.0; - gdisi = 1e-20; - gm = 1e-20; - - } - - if ( Vngisi > PVBI) { - Igisi = Vngisi/(PRF+1e-10); - ggisi = PRF; - } - else { - Igisi = -PAREA*PIS+GMIN*Vngisi; - ggisi = GMIN; - } - - OUTPUT(ndisi) = Idisi; - PARTIAL(ndisi, ndisi) = gdisi; - PARTIAL(ndisi, ngisi) = gm; - OUTPUT(ngisi) = Igisi; - PARTIAL(ngisi, ngisi) = ggisi; - - } - - else { - - ac_gain2.real = gdisi; - ac_gain2.imag = 0.0; - AC_GAIN(ndisi, ndisi) = ac_gain2; - - - ac_gain3.real = gm; - ac_gain3.imag = 0.0; - AC_GAIN(ndisi, ngisi) = ac_gain3; - - - } - - - - -} - diff --git a/qucs/spicecomponents/symbols/CMakeLists.txt b/library/symbols/CMakeLists.txt similarity index 100% rename from qucs/spicecomponents/symbols/CMakeLists.txt rename to library/symbols/CMakeLists.txt diff --git a/library/symbols/nmos4.sym b/library/symbols/nmos4.sym new file mode 100644 index 000000000..76572989e --- /dev/null +++ b/library/symbols/nmos4.sym @@ -0,0 +1,21 @@ + + + <.ID 10 44 X> + <.PortSym 0 -30 1 90 > + <.PortSym 0 30 3 270 > + <.PortSym 20 0 4 180 > + + + + + + + + + + + + + + <.PortSym -30 0 2 0 > + diff --git a/library/symbols/opamp3t.sym b/library/symbols/opamp3t.sym new file mode 100644 index 000000000..726038756 --- /dev/null +++ b/library/symbols/opamp3t.sym @@ -0,0 +1,16 @@ + + + + + + + + + + + + <.PortSym -40 20 2 0 > + <.PortSym -40 -20 1 0 > + <.PortSym 60 0 3 180 > + <.ID 30 24 OP> + diff --git a/qucs/spicecomponents/symbols/opamp5t.sym b/library/symbols/opamp5t.sym similarity index 95% rename from qucs/spicecomponents/symbols/opamp5t.sym rename to library/symbols/opamp5t.sym index 4c713b952..7236db43b 100644 --- a/qucs/spicecomponents/symbols/opamp5t.sym +++ b/library/symbols/opamp5t.sym @@ -1,3 +1,4 @@ + diff --git a/library/symbols/pmos4.sym b/library/symbols/pmos4.sym new file mode 100644 index 000000000..c59b1c596 --- /dev/null +++ b/library/symbols/pmos4.sym @@ -0,0 +1,21 @@ + + + <.PortSym 0 -30 1 90 > + <.PortSym -30 0 2 0 > + <.PortSym 20 0 4 180 > + + + + + + + + + + + + + + <.PortSym 0 30 3 270 > + <.ID 20 14 X> + diff --git a/qucs/spicecomponents/CMakeLists.txt b/qucs/spicecomponents/CMakeLists.txt index 73db234ae..35ccd327e 100644 --- a/qucs/spicecomponents/CMakeLists.txt +++ b/qucs/spicecomponents/CMakeLists.txt @@ -194,7 +194,6 @@ spicelibcomp.h ADD_LIBRARY(spicecomponents STATIC ${COMPONENTS_HDRS} ${COMPONENTS_SRCS} ${COMPONENTS_MOC_SRCS} ) -ADD_SUBDIRECTORY( symbols ) diff --git a/qucs/spicecomponents/symbols/nmos4.sym b/qucs/spicecomponents/symbols/nmos4.sym deleted file mode 100644 index 3452eee08..000000000 --- a/qucs/spicecomponents/symbols/nmos4.sym +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - -<.PortSym 0 -30 1 90> -<.PortSym -30 0 2 0> -<.PortSym 0 30 3 270> -<.PortSym 20 0 4 180> -<.ID 30 12 M> - \ No newline at end of file diff --git a/qucs/spicecomponents/symbols/opamp3t.sym b/qucs/spicecomponents/symbols/opamp3t.sym deleted file mode 100644 index 99077cdc2..000000000 --- a/qucs/spicecomponents/symbols/opamp3t.sym +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - -<.PortSym -40 20 2 0> -<.PortSym -40 -20 1 0> -<.PortSym 60 0 5 180> -<.ID 30 24 OP> - diff --git a/qucs/spicecomponents/symbols/pmos4.sym b/qucs/spicecomponents/symbols/pmos4.sym deleted file mode 100644 index 8fbca9754..000000000 --- a/qucs/spicecomponents/symbols/pmos4.sym +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - -<.PortSym 0 -30 1 90> -<.PortSym -30 0 2 0> -<.PortSym 0 30 3 270> -<.PortSym 20 0 4 180> -<.ID 30 12 M> - \ No newline at end of file