📄 vbicsetup.c
字号:
/**********Copyright 1990 Regents of the University of California. All rights reserved.Author: 1985 Thomas L. QuarlesModel Author: 1995 Colin McAndrew MotorolaSpice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH**********//* * This routine should only be called when circuit topology * changes, since its computations do not depend on most * device or model parameters, only on topology (as * affected by emitter, collector, and base resistances) */#include "ngspice.h"#include "cktdefs.h"#include "smpdefs.h"#include "vbicdefs.h"#include "const.h"#include "sperror.h"#include "ifsim.h"#include "suffix.h"intVBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the VBIC structure with those pointers needed later * for fast matrix loading */{ VBICmodel *model = (VBICmodel*)inModel; VBICinstance *here; int error; CKTnode *tmp; /* loop through all the transistor models */ for( ; model != NULL; model = model->VBICnextModel ) { if(model->VBICtype != NPN && model->VBICtype != PNP) { model->VBICtype = NPN; } if(!model->VBICtnomGiven) { model->VBICtnom = 27.0; } if(!model->VBICextCollResistGiven) { model->VBICextCollResist = 0.1; } if(!model->VBICintCollResistGiven) { model->VBICintCollResist = 0.1; } if(!model->VBICepiSatVoltageGiven) { model->VBICepiSatVoltage = 0.0; } if(!model->VBICepiDopingGiven) { model->VBICepiDoping = 0.0; } if(!model->VBIChighCurFacGiven) { model->VBIChighCurFac = 1.0; } if(!model->VBICextBaseResistGiven) { model->VBICextBaseResist = 0.1; } if(!model->VBICintBaseResistGiven) { model->VBICintBaseResist = 0.1; } if(!model->VBICemitterResistGiven) { model->VBICemitterResist = 0.1; } if(!model->VBICsubstrateResistGiven) { model->VBICsubstrateResist = 0.1; } if(!model->VBICparBaseResistGiven) { model->VBICparBaseResist = 0.1; } if(!model->VBICsatCurGiven) { model->VBICsatCur = 1e-16; } if(!model->VBICemissionCoeffFGiven) { model->VBICemissionCoeffF = 1.0; } if(!model->VBICemissionCoeffRGiven) { model->VBICemissionCoeffR = 1.0; } if(!model->VBICdeplCapLimitFGiven) { model->VBICdeplCapLimitF = 0.9; } if(!model->VBICextOverlapCapBEGiven) { model->VBICextOverlapCapBE = 0.0; } if(!model->VBICdepletionCapBEGiven) { model->VBICdepletionCapBE = 0.0; } if(!model->VBICpotentialBEGiven) { model->VBICpotentialBE = 0.75; } if(!model->VBICjunctionExpBEGiven) { model->VBICjunctionExpBE = 0.33; } if(!model->VBICsmoothCapBEGiven) { model->VBICsmoothCapBE = -0.5; } if(!model->VBICextOverlapCapBCGiven) { model->VBICextOverlapCapBC = 0.0; } if(!model->VBICdepletionCapBCGiven) { model->VBICdepletionCapBC = 0.0; } if(!model->VBICepiChargeGiven) { model->VBICepiCharge = 0.0; } if(!model->VBICextCapBCGiven) { model->VBICextCapBC = 0.0; } if(!model->VBICpotentialBCGiven) { model->VBICpotentialBC = 0.75; } if(!model->VBICjunctionExpBCGiven) { model->VBICjunctionExpBC = 0.33; } if(!model->VBICsmoothCapBCGiven) { model->VBICsmoothCapBC = -0.5; } if(!model->VBICextCapSCGiven) { model->VBICextCapSC = 0.0; } if(!model->VBICpotentialSCGiven) { model->VBICpotentialSC = 0.75; } if(!model->VBICjunctionExpSCGiven) { model->VBICjunctionExpSC = 0.33; } if(!model->VBICsmoothCapSCGiven) { model->VBICsmoothCapSC = -0.5; } if(!model->VBICidealSatCurBEGiven) { model->VBICidealSatCurBE = 1e-18; } if(!model->VBICportionIBEIGiven) { model->VBICportionIBEI = 1.0; } if(!model->VBICidealEmissCoeffBEGiven) { model->VBICidealEmissCoeffBE = 1.0; } if(!model->VBICnidealSatCurBEGiven) { model->VBICnidealSatCurBE = 0.0; } if(!model->VBICnidealEmissCoeffBEGiven) { model->VBICnidealEmissCoeffBE = 2.0; } if(!model->VBICidealSatCurBCGiven) { model->VBICidealSatCurBC = 1e-16; } if(!model->VBICidealEmissCoeffBCGiven) { model->VBICidealEmissCoeffBC = 1.0; } if(!model->VBICnidealSatCurBCGiven) { model->VBICnidealSatCurBC = 0.0; } if(!model->VBICnidealEmissCoeffBCGiven) { model->VBICnidealEmissCoeffBC = 2.0; } if(!model->VBICavalanchePar1BCGiven) { model->VBICavalanchePar1BC = 0.0; } if(!model->VBICavalanchePar2BCGiven) { model->VBICavalanchePar2BC = 0.0; } if(!model->VBICparasitSatCurGiven) { model->VBICparasitSatCur = 0.0; } if(!model->VBICportionICCPGiven) { model->VBICportionICCP = 1.0; } if(!model->VBICparasitFwdEmissCoeffGiven) { model->VBICparasitFwdEmissCoeff = 1.0; } if(!model->VBICidealParasitSatCurBEGiven) { model->VBICidealParasitSatCurBE = 0.0; } if(!model->VBICnidealParasitSatCurBEGiven) { model->VBICnidealParasitSatCurBE = 0.0; } if(!model->VBICidealParasitSatCurBCGiven) { model->VBICidealParasitSatCurBC = 0.0; } if(!model->VBICidealParasitEmissCoeffBCGiven) { model->VBICidealParasitEmissCoeffBC = 1.0; } if(!model->VBICnidealParasitSatCurBCGiven) { model->VBICnidealParasitSatCurBC = 0.0; } if(!model->VBICnidealParasitEmissCoeffBCGiven) { model->VBICnidealParasitEmissCoeffBC = 2.0; } if(!model->VBICearlyVoltFGiven) { model->VBICearlyVoltF = 0.0; } if(!model->VBICearlyVoltRGiven) { model->VBICearlyVoltR = 0.0; } if(!model->VBICrollOffFGiven) { model->VBICrollOffF = 0.0; } if(!model->VBICrollOffRGiven) { model->VBICrollOffR = 0.0; } if(!model->VBICparRollOffGiven) { model->VBICparRollOff = 0.0; } if(!model->VBICtransitTimeFGiven) { model->VBICtransitTimeF = 0.0; } if(!model->VBICvarTransitTimeFGiven) { model->VBICvarTransitTimeF = 0.0; } if(!model->VBICtransitTimeBiasCoeffFGiven) { model->VBICtransitTimeBiasCoeffF = 0.0; } if(!model->VBICtransitTimeFVBCGiven) { model->VBICtransitTimeFVBC = 0.0; } if(!model->VBICtransitTimeHighCurrentFGiven) { model->VBICtransitTimeHighCurrentF = 0.0; } if(!model->VBICtransitTimeRGiven) { model->VBICtransitTimeR = 0.0; } if(!model->VBICdelayTimeFGiven) { model->VBICdelayTimeF = 0.0; } if(!model->VBICfNcoefGiven) { model->VBICfNcoef = 0.0; } if(!model->VBICfNexpAGiven) { model->VBICfNexpA = 1.0; } if(!model->VBICfNexpBGiven) { model->VBICfNexpB = 1.0; } if(!model->VBICtempExpREGiven) { model->VBICtempExpRE = 0.0; } if(!model->VBICtempExpRBIGiven) { model->VBICtempExpRBI = 0.0; } if(!model->VBICtempExpRCIGiven) { model->VBICtempExpRCI = 0.0; } if(!model->VBICtempExpRSGiven) { model->VBICtempExpRS = 0.0; } if(!model->VBICtempExpVOGiven) { model->VBICtempExpVO = 0.0; } if(!model->VBICactivEnergyEAGiven) { model->VBICactivEnergyEA = 1.12; } if(!model->VBICactivEnergyEAIEGiven) { model->VBICactivEnergyEAIE = 1.12; } if(!model->VBICactivEnergyEAICGiven) { model->VBICactivEnergyEAIC = 1.12; } if(!model->VBICactivEnergyEAISGiven) { model->VBICactivEnergyEAIS = 1.12; } if(!model->VBICactivEnergyEANEGiven) { model->VBICactivEnergyEANE = 1.12; } if(!model->VBICactivEnergyEANCGiven) { model->VBICactivEnergyEANC = 1.12; } if(!model->VBICactivEnergyEANSGiven) { model->VBICactivEnergyEANS = 1.12; } if(!model->VBICtempExpISGiven) { model->VBICtempExpIS = 3.0; } if(!model->VBICtempExpIIGiven) { model->VBICtempExpII = 3.0; } if(!model->VBICtempExpINGiven) { model->VBICtempExpIN = 3.0; } if(!model->VBICtempExpNFGiven) { model->VBICtempExpNF = 0.0; } if(!model->VBICtempExpAVCGiven) { model->VBICtempExpAVC = 0.0; } if(!model->VBICthermalResistGiven) { model->VBICthermalResist = 0.0; } if(!model->VBICthermalCapacitanceGiven) { model->VBICthermalCapacitance = 0.0; } if(!model->VBICpunchThroughVoltageBCGiven) { model->VBICpunchThroughVoltageBC = 0.0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -