#include "spice.h"
#include <stdio.h>
#include "diodefs.h"
#include "const.h"
#include "util.h"
#include "sperror.h"
#include "niext.h"
Go to the source code of this file.
|
static int | dio_bypass () |
|
static int | dio_limiting () |
|
static void | dio_iv () |
|
static void | dio_cap () |
|
static void | dio_load () |
|
int | DIOload (GENmodel *inModel, CKTcircuit *ckt) |
|
static int | dio_bypass (CKTcircuit *ckt, DIOmodel *model, DIOinstance *here) |
|
static int | dio_limiting (CKTcircuit *ckt, DIOmodel *model, DIOinstance *here) |
|
static int | dio_pnjlim (double *vnew, double vold, double vt, double vcrit) |
|
static void | dio_iv (CKTcircuit *ckt, DIOmodel *model, DIOinstance *here) |
|
static void | dio_cap (CKTcircuit *ckt, DIOmodel *model, DIOinstance *here) |
|
static void | dio_load (CKTcircuit *ckt, DIOmodel *model, DIOinstance *here) |
|
static int dio_bypass |
( |
| ) |
|
|
static |
Definition at line 224 of file dioload.c.
230 double delvd, cdhat, tol, A1, A2;
232 delvd = here->
DIOvd - *(ckt->CKTstate0 + here->DIOvoltage);
235 A2 =
FABS(*(ckt->CKTstate0 + here->DIOvoltage));
238 if (
FABS(delvd) < tol) {
243 A1 = cdhat - here->
DIOcd;
244 if (
FABS(A1) < tol) {
245 here->
DIOvd = *(ckt->CKTstate0 + here->DIOvoltage);
Definition at line 355 of file dioload.c.
373 if (vd < here->DIOtDepCap) {
381 *(ckt->CKTstate0 + here->DIOcapCharge) =
389 czof2 = czero/model->
DIOf2;
390 *(ckt->CKTstate0 + here->DIOcapCharge) =
398 czof2*(model->
DIOf3 +
Definition at line 317 of file dioload.c.
342 arg = arg * arg * arg;
static int dio_limiting |
( |
| ) |
|
|
static |
Definition at line 255 of file dioload.c.
270 -(*(ckt->CKTstate0 + here->DIOvoltage) + here->
DIOtBrkdwnV),
unsigned DIObreakdownVoltageGiven
static int dio_pnjlim(double *vnew, double vold, double vt, double vcrit)
Definition at line 405 of file dioload.c.
420 *(ckt->CKTstate0 + here->DIOvoltage) = here->
DIOvd;
double * DIOposPosPrimePtr
double * DIOposPrimePosPrimePtr
double * DIOposPrimePosPtr
double * DIOnegPosPrimePtr
double * DIOposPrimeNegPtr
static int dio_pnjlim |
( |
double * |
vnew, |
|
|
double |
vold, |
|
|
double |
vt, |
|
|
double |
vcrit |
|
) |
| |
|
static |
Definition at line 283 of file dioload.c.
297 if ((vn > vcrit) && (
FABS(vn - vold) > (vt + vt))) {
299 arg = 1 + (vn - vold)/vt;
301 *vnew = vold + vt*log(arg);
308 *vnew = vt*log(vn/vt);
Definition at line 34 of file dioload.c.
77 here->
DIOcd += *(ckt->CKTstate0 + here->DIOcapCurrent);
99 here->
DIOvd = xf1* *(ckt->CKTstate1 + here->DIOvoltage)
100 + xf2* *(ckt->CKTstate2 + here->DIOvoltage);
102 *(ckt->CKTstate0 + here->DIOvoltage) =
103 *(ckt->CKTstate1 + here->DIOvoltage);
111 here->
DIOcd += *(ckt->CKTstate0 + here->DIOcapCurrent);
153 here->
DIOvd = *(ckt->CKTstate1 + here->DIOvoltage);
157 *(ckt->CKTstate1 + here->DIOcapCharge) =
158 *(ckt->CKTstate0 + here->DIOcapCharge);
161 here->
DIOcd += *(ckt->CKTstate0 + here->DIOcapCurrent);
177 here->
DIOvd = *(ckt->CKTstate0 + here->DIOvoltage);
195 *(ckt->CKTstate0 + here->DIOvoltage) = here->
DIOinitCond;
struct sDIOinstance * DIOnextInstance
static int dio_limiting()
DIOinstance * DIOinstances
#define NI_INTEG(ckt, geq, ceq, cap, qcap)
struct sDIOmodel * DIOnextModel