39 using namespace qucs::device;
41 mosfet::mosfet () : circuit (4) {
110 nr_double_t
i = 8 *
kelvin (T) /
T0 * gm / 3 +
115 matrix cy = matrix (4);
199 pol = !strcmp (type,
"pfet") ? -1 : 1;
204 if ((
Leff = L - 2 * Ld) <= 0) {
206 "set to L = %g\n",
Leff, L);
232 if (
Cox > 0 && Uo > 0) {
236 "transconductance coefficient\n");
247 if ((
Phi = P) <= 0) {
249 if (Nsub * 1e6 >=
NiSi) {
253 "density, adjust Nsub >= %g\n",
NiSi / 1e6);
258 "surface potential\n");
266 if (
Cox > 0 && Nsub > 0) {
270 "valid bulk threshold\n");
277 if ((
Vto = Vt0) == 0.0) {
280 nr_double_t PhiMS, PhiG, Eg;
284 PhiG = 4.15 + Eg / 2 -
pol * Tpg * Eg / 2;
288 PhiMS = PhiG - (4.15 + Eg / 2 +
pol *
Phi / 2);
289 if (Nss >= 0 &&
Cox > 0) {
293 "valid threshold voltage\n");
307 if (Nrd > 0)
Rd += Rsh * Nrd;
308 if (Nrs > 0)
Rs += Rsh * Nrs;
316 nr_double_t PbT, F2, F3;
323 if (Pb > 0 && Nsub >= 0) {
328 "valid square junction capacitance\n");
362 nr_double_t F4, E1, E2;
368 nr_double_t Isd = (Ad > 0) ? Js * Ad : Is;
369 nr_double_t Iss = (As > 0) ? Js * As : Is;
388 nr_double_t Ut, IeqBS, IeqBD, IeqDS, UbsCrit, UbdCrit, gtiny;
441 nr_double_t Upn = (
MOSdir > 0) ? Ubs : Ubd;
449 Sarg = Sphi - Upn / Sphi / 2;
450 Sarg =
MAX (Sarg, 0);
457 nr_double_t
arg = (Sarg != 0.0) ? (
Ga / Sarg / 2) : 0;
468 nr_double_t b =
beta * (1 + l * Vds);
471 Ids = b * Utst * Utst / 2;
473 gds = l *
beta * Utst * Utst / 2;
477 Ids = b * Vds * (Utst - Vds / 2);
479 gds = b * (Utst - Vds) + l *
beta * Vds * (Utst - Vds / 2);
526 #define qgdState 0 // gate-drain charge state
527 #define igdState 1 // gate-drain current state
528 #define vgdState 2 // gate-drain voltage state
529 #define cgdState 3 // gate-drain capacitance state
530 #define qgsState 4 // gate-source charge state
531 #define igsState 5 // gate-source current state
532 #define vgsState 6 // gate-source voltage state
533 #define cgsState 7 // gate-source capacitance state
534 #define qbdState 8 // bulk-drain charge state
535 #define ibdState 9 // bulk-drain current state
536 #define qbsState 10 // bulk-source charge state
537 #define ibsState 11 // bulk-source current state
538 #define qgbState 12 // gate-bulk charge state
539 #define igbState 13 // gate-bulk current state
540 #define vgbState 14 // gate-bulk voltage state
541 #define cgbState 15 // gate-bulk capacitance state
544 nr_double_t Vgs, Vgd, Vbs, Vbd;
583 nr_double_t Cbs, Cbd, Cgd, Cgb, Cgs;
690 nr_double_t voltage, nr_double_t ccap) {
691 int vstate = qstate + 2, cstate = qstate + 3;
693 cap = (cap +
getState (cstate, 1)) / 2 + ccap;
701 nr_double_t voltage, nr_double_t ccap) {
702 int vstate = qstate + 2, cstate = qstate + 3;
void setProperty(const char *, char *)
std::complex< nr_double_t > nr_complex_t
nr_double_t transientChargeTR(int, nr_double_t &, nr_double_t, nr_double_t)
nr_double_t getOperatingPoint(const char *)
#define ESi
Relative permittivity of Silicon.
matrix ytos(matrix y, qucs::vector z0)
Admittance matrix to scattering parameters.
matrix real(matrix a)
Real part matrix.
#define T0
standard temperature
#define NiSi
Intrinsic carrier concentration in 1/m^3 of Silicon.
void calcNoiseSP(nr_double_t)
circuit * splitResistor(circuit *base, circuit *res, const char *c, const char *n, int internal)
nr_double_t getPropertyDouble(const char *)
nr_complex_t pow(const nr_complex_t z, const nr_double_t d)
Compute power function with real exponent.
#define E0
Electric constant of vacuum .
#define QoverkB
Elementary charge over Boltzmann constant ( )
#define K
Absolute 0 in centigrade.
int getPropertyInteger(const char *)
void pnJunctionMOS(nr_double_t Upn, nr_double_t Iss, nr_double_t Ute, nr_double_t &I, nr_double_t &g)
nr_double_t getScaledProperty(const char *)
static const nr_double_t z0
void fetCapacitanceMeyer(nr_double_t Ugs, nr_double_t Ugd, nr_double_t Uth, nr_double_t Udsat, nr_double_t Phi, nr_double_t Cox, nr_double_t &Cgs, nr_double_t &Cgd, nr_double_t &Cgb)
nr_double_t pnCapacitance(nr_double_t Uj, nr_double_t Cj, nr_double_t Vj, nr_double_t Mj, nr_double_t Fc)
void setScaledProperty(const char *, nr_double_t)
virtual void initDC(void)
#define ESiO2
Relative permittivity of Silicon dioxide (Silica)
nr_complex_t sqrt(const nr_complex_t z)
Compute principal value of square root.
nr_double_t SourceControl
void transientCapacitance(int, int, int, nr_double_t, nr_double_t, nr_double_t)
nr_double_t Egap(nr_double_t T, nr_double_t Eg0=Eg0Si)
#define Q_e
Elementary charge ( )
nr_double_t fetVoltage(nr_double_t Ufet, nr_double_t Uold, nr_double_t Uth)
qucs::matrix calcMatrixCy(nr_double_t)
#define kBoverQ
Boltzmann constant over Elementary charge ( )
#define kB
Boltzmann constant ( )
void disableResistor(circuit *base, circuit *res, int internal)
#define M_PI
Archimedes' constant ( )
state_type_t getState(int, int n=0)
void saveOperatingPoints(void)
nr_double_t pnCapacitance_F(nr_double_t T1, nr_double_t T2, nr_double_t M, nr_double_t VR)
void setI(int, nr_complex_t)
nr_double_t pnPotential_T(nr_double_t T1, nr_double_t T2, nr_double_t Vj, nr_double_t Eg0=Eg0Si)
nr_double_t pnCharge(nr_double_t Uj, nr_double_t Cj, nr_double_t Vj, nr_double_t Mj, nr_double_t Fc)
void setY(int, int, nr_complex_t)
matrix cytocs(matrix cy, matrix s)
Admittance noise correlation matrix to S-parameter noise correlation matrix.
nr_double_t transientChargeSR(int, nr_double_t &, nr_double_t, nr_double_t)
nr_double_t fetVoltageDS(nr_double_t Ufet, nr_double_t Uold)
void allocMatrixMNA(void)
void calcOperatingPoints(void)
nr_double_t getV(int, nr_double_t)
nr_complex_t exp(const nr_complex_t z)
Compute complex exponential.
void setOperatingPoint(const char *, nr_double_t)
nr_double_t pnCriticalVoltage(nr_double_t Iss, nr_double_t Ute)
char * getPropertyString(const char *)
void setState(int, state_type_t, int n=0)
void logprint(int level, const char *format,...)
nr_complex_t log(const nr_complex_t z)
Compute principal value of natural logarithm of z.
void calcNoiseAC(nr_double_t)
void loadOperatingPoints(void)
matrix arg(matrix a)
Computes the argument of each matrix element.
#define PROP_NO_SUBSTRATE
#define MAX(x, y)
Maximum of x and y.
qucs::matrix calcMatrixY(nr_double_t)
nr_double_t pnVoltage(nr_double_t Ud, nr_double_t Uold, nr_double_t Ut, nr_double_t Ucrit)