⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nbjtacld.c

📁 spice中支持多层次元件模型仿真的可单独运行的插件源码
💻 C
字号:
/**********Copyright 1992 Regents of the University of California.  All rights reserved.Author:	1987 Kartikeya Mayaram, U. C. Berkeley CAD Group**********//* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */#include "spice.h"#include "util.h"#include <stdio.h>#include "cktdefs.h"#include "nbjtdefs.h"#include "sperror.h"#include "complex.h"#include "suffix.h"/* External Declarations */extern int ONEacDebug;intNBJTacLoad(inModel, ckt)  GENmodel *inModel;  CKTcircuit *ckt;{  register NBJTmodel *model = (NBJTmodel *) inModel;  register NBJTinstance *inst;  SPcomplex yIeVce, yIeVbe;  SPcomplex yIcVce, yIcVbe;  double startTime;  int NBJTadmittance();  for (; model != NULL; model = model->NBJTnextModel) {    FieldDepMobility = model->NBJTmodels->MODLfieldDepMobility;    Srh = model->NBJTmodels->MODLsrh;    Auger = model->NBJTmodels->MODLauger;    AvalancheGen = model->NBJTmodels->MODLavalancheGen;    AcAnalysisMethod = model->NBJTmethods->METHacAnalysisMethod;    MobDeriv = model->NBJTmethods->METHmobDeriv;    ONEacDebug = model->NBJToutputs->OUTPacDebug;    for (inst = model->NBJTinstances; inst != NULL;	inst = inst->NBJTnextInstance) {      if (inst->NBJTowner != ARCHme) continue;      startTime = SPfrontEnd->IFseconds();      /* Get Temp.-Dep. Global Parameters */      GLOBgetGlobals(&(inst->NBJTglobals));      model->NBJTmethods->METHacAnalysisMethod =	  NBJTadmittance(inst->NBJTpDevice, ckt->CKTomega,	  &yIeVce, &yIcVce, &yIeVbe, &yIcVbe);      *(inst->NBJTcolColPtr) += yIcVce.real;      *(inst->NBJTcolColPtr + 1) += yIcVce.imag;      *(inst->NBJTcolBasePtr) += yIcVbe.real;      *(inst->NBJTcolBasePtr + 1) += yIcVbe.imag;      *(inst->NBJTcolEmitPtr) -= yIcVbe.real + yIcVce.real;      *(inst->NBJTcolEmitPtr + 1) -= yIcVbe.imag + yIcVce.imag;      *(inst->NBJTbaseColPtr) -= yIcVce.real - yIeVce.real;      *(inst->NBJTbaseColPtr + 1) -= yIcVce.imag - yIeVce.imag;      *(inst->NBJTbaseBasePtr) -= yIcVbe.real - yIeVbe.real;      *(inst->NBJTbaseBasePtr + 1) -= yIcVbe.imag - yIeVbe.imag;      *(inst->NBJTbaseEmitPtr) += yIcVbe.real + yIcVce.real - yIeVbe.real - yIeVce.real;      *(inst->NBJTbaseEmitPtr + 1) += yIcVbe.imag + yIcVce.imag - yIeVbe.imag - yIeVce.imag;      *(inst->NBJTemitColPtr) -= yIeVce.real;      *(inst->NBJTemitColPtr + 1) -= yIeVce.imag;      *(inst->NBJTemitBasePtr) -= yIeVbe.real;      *(inst->NBJTemitBasePtr + 1) -= yIeVbe.imag;      *(inst->NBJTemitEmitPtr) += yIeVbe.real + yIeVce.real;      *(inst->NBJTemitEmitPtr + 1) += yIeVbe.imag + yIeVce.imag;      if (ckt->CKTomega != 0.0) {	inst->NBJTc11 = yIcVce.imag / ckt->CKTomega;	inst->NBJTc12 = yIcVbe.imag / ckt->CKTomega;	inst->NBJTc21 = (yIeVce.imag - yIcVce.imag) / ckt->CKTomega;	inst->NBJTc22 = (yIeVbe.imag - yIcVbe.imag) / ckt->CKTomega;      } else {	inst->NBJTc11 = 0.0;	/* XXX What else can be done?! */	inst->NBJTc12 = 0.0;	/* XXX What else can be done?! */	inst->NBJTc21 = 0.0;	/* XXX What else can be done?! */	inst->NBJTc22 = 0.0;	/* XXX What else can be done?! */      }      inst->NBJTy11r = yIcVce.real;      inst->NBJTy11i = yIcVce.imag;      inst->NBJTy12r = yIcVbe.real;      inst->NBJTy12i = yIcVbe.imag;      inst->NBJTy21r = yIeVce.real - yIcVce.real;      inst->NBJTy21i = yIeVce.imag - yIcVce.imag;      inst->NBJTy22r = yIeVbe.real - yIcVbe.real;      inst->NBJTy22i = yIeVbe.imag - yIcVbe.imag;      inst->NBJTsmSigAvail = TRUE;      inst->NBJTpDevice->pStats->totalTime[STAT_AC] +=	  SPfrontEnd->IFseconds() - startTime;    }  }  return (OK);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -