remove last remainder of unused sensitivity analysis
This commit is contained in:
parent
2b60d56606
commit
f90295f46a
|
|
@ -8,7 +8,6 @@ libvbic_la_SOURCES = \
|
||||||
vbicask.c \
|
vbicask.c \
|
||||||
vbicconv.c \
|
vbicconv.c \
|
||||||
vbicdefs.h \
|
vbicdefs.h \
|
||||||
vbicdel.c \
|
|
||||||
vbicext.h \
|
vbicext.h \
|
||||||
vbicgetic.c \
|
vbicgetic.c \
|
||||||
vbicinit.c \
|
vbicinit.c \
|
||||||
|
|
|
||||||
|
|
@ -61,13 +61,7 @@ IFparm VBICpTable[] = { /* parameters */
|
||||||
OPU("qbc", VBIC_QUEST_QBC, IF_REAL, "Charge storage B-C junction"),
|
OPU("qbc", VBIC_QUEST_QBC, IF_REAL, "Charge storage B-C junction"),
|
||||||
OPU("cqbc", VBIC_QUEST_CQBC, IF_REAL, "Cap. due to charge storage in B-C jct."),
|
OPU("cqbc", VBIC_QUEST_CQBC, IF_REAL, "Cap. due to charge storage in B-C jct."),
|
||||||
OPU("qbx", VBIC_QUEST_QBX, IF_REAL, "Charge storage B-X junction"),
|
OPU("qbx", VBIC_QUEST_QBX, IF_REAL, "Charge storage B-X junction"),
|
||||||
OPU("cqbx", VBIC_QUEST_CQBX, IF_REAL, "Cap. due to charge storage in B-X jct."),
|
OPU("cqbx", VBIC_QUEST_CQBX, IF_REAL, "Cap. due to charge storage in B-X jct.")
|
||||||
OPU("sens_dc", VBIC_QUEST_SENS_DC, IF_REAL, "DC sensitivity "),
|
|
||||||
OPU("sens_real",VBIC_QUEST_SENS_REAL, IF_REAL, "Real part of AC sensitivity"),
|
|
||||||
OPU("sens_imag",VBIC_QUEST_SENS_IMAG,IF_REAL, "DC sens. & imag part of AC sens."),
|
|
||||||
OPU("sens_mag", VBIC_QUEST_SENS_MAG, IF_REAL, "Sensitivity of AC magnitude"),
|
|
||||||
OPU("sens_ph", VBIC_QUEST_SENS_PH, IF_REAL, "Sensitivity of AC phase"),
|
|
||||||
OPU("sens_cplx",VBIC_QUEST_SENS_CPLX, IF_COMPLEX, "AC sensitivity")
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IFparm VBICmPTable[] = { /* model parameters */
|
IFparm VBICmPTable[] = { /* model parameters */
|
||||||
|
|
|
||||||
|
|
@ -150,66 +150,6 @@ VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalu
|
||||||
case VBIC_QUEST_QBC:
|
case VBIC_QUEST_QBC:
|
||||||
value->rValue = *(ckt->CKTstate0 + here->VBICqbc);
|
value->rValue = *(ckt->CKTstate0 + here->VBICqbc);
|
||||||
return(OK);
|
return(OK);
|
||||||
case VBIC_QUEST_SENS_DC:
|
|
||||||
if(ckt->CKTsenInfo){
|
|
||||||
value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
case VBIC_QUEST_SENS_REAL:
|
|
||||||
if(ckt->CKTsenInfo){
|
|
||||||
value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
case VBIC_QUEST_SENS_IMAG:
|
|
||||||
if(ckt->CKTsenInfo){
|
|
||||||
value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
case VBIC_QUEST_SENS_MAG:
|
|
||||||
if(ckt->CKTsenInfo){
|
|
||||||
vr = *(ckt->CKTrhsOld + select->iValue + 1);
|
|
||||||
vi = *(ckt->CKTirhsOld + select->iValue + 1);
|
|
||||||
vm = sqrt(vr*vr + vi*vi);
|
|
||||||
if(vm == 0){
|
|
||||||
value->rValue = 0;
|
|
||||||
return(OK);
|
|
||||||
}
|
|
||||||
sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
value->rValue = (vr * sr + vi * si)/vm;
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
case VBIC_QUEST_SENS_PH:
|
|
||||||
if(ckt->CKTsenInfo){
|
|
||||||
vr = *(ckt->CKTrhsOld + select->iValue + 1);
|
|
||||||
vi = *(ckt->CKTirhsOld + select->iValue + 1);
|
|
||||||
vm = vr*vr + vi*vi;
|
|
||||||
if(vm == 0){
|
|
||||||
value->rValue = 0;
|
|
||||||
return(OK);
|
|
||||||
}
|
|
||||||
sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
|
|
||||||
value->rValue = (vr * si - vi * sr)/vm;
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
case VBIC_QUEST_SENS_CPLX:
|
|
||||||
if(ckt->CKTsenInfo){
|
|
||||||
itmp = select->iValue + 1;
|
|
||||||
value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[itmp]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[itmp]+
|
|
||||||
here->VBICsenParmNo);
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
default:
|
default:
|
||||||
return(E_BADPARM);
|
return(E_BADPARM);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -215,30 +215,13 @@ typedef struct sVBICinstance {
|
||||||
unsigned VBICtempGiven :1; /* temperature given for vbic instance*/
|
unsigned VBICtempGiven :1; /* temperature given for vbic instance*/
|
||||||
unsigned VBICdtempGiven :1; /* delta temperature given for vbic instance*/
|
unsigned VBICdtempGiven :1; /* delta temperature given for vbic instance*/
|
||||||
unsigned VBICmGiven :1; /* flag to indicate multiplier was specified */
|
unsigned VBICmGiven :1; /* flag to indicate multiplier was specified */
|
||||||
unsigned VBICsenPertFlag :1; /* indictes whether the the parameter of
|
|
||||||
the particular instance is to be perturbed */
|
|
||||||
|
|
||||||
int VBICsenParmNo; /* parameter # for sensitivity use;
|
|
||||||
set equal to 0 if not a design parameter */
|
|
||||||
double VBICcapbe;
|
double VBICcapbe;
|
||||||
double VBICcapbex;
|
double VBICcapbex;
|
||||||
double VBICcapbc;
|
double VBICcapbc;
|
||||||
double VBICcapbcx;
|
double VBICcapbcx;
|
||||||
double VBICcapbep;
|
double VBICcapbep;
|
||||||
double VBICcapbcp;
|
double VBICcapbcp;
|
||||||
double *VBICsens;
|
|
||||||
|
|
||||||
#define VBICsenGpi VBICsens /* stores the perturbed values of gpi */
|
|
||||||
#define VBICsenGmu VBICsens+5 /* stores the perturbed values of gmu */
|
|
||||||
#define VBICsenGm VBICsens+10 /* stores the perturbed values of gm */
|
|
||||||
#define VBICsenGo VBICsens+15 /* stores the perturbed values of go */
|
|
||||||
#define VBICsenGx VBICsens+20 /* stores the perturbed values of gx */
|
|
||||||
#define VBICsenCpi VBICsens+25 /* stores the perturbed values of cpi */
|
|
||||||
#define VBICsenCmu VBICsens+30 /* stores the perturbed values of cmu */
|
|
||||||
#define VBICsenCbx VBICsens+35 /* stores the perturbed values of cbx */
|
|
||||||
#define VBICsenCmcb VBICsens+40 /* stores the perturbed values of cmcb */
|
|
||||||
#define VBICsenCsub VBICsens+45 /* stores the perturbed values of csub */
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef NONOISE
|
#ifndef NONOISE
|
||||||
double VBICnVar[NSTATVARS][VBICNSRCS];
|
double VBICnVar[NSTATVARS][VBICNSRCS];
|
||||||
|
|
@ -341,17 +324,6 @@ typedef struct sVBICinstance {
|
||||||
|
|
||||||
#define VBICnumStates 66
|
#define VBICnumStates 66
|
||||||
|
|
||||||
#define VBICsensxpbe VBICstate+66 /* charge sensitivities and their derivatives.
|
|
||||||
* +67 for the derivatives
|
|
||||||
* pointer to the beginning of the array */
|
|
||||||
#define VBICsensxpbex VBICstate+68
|
|
||||||
#define VBICsensxpbc VBICstate+70
|
|
||||||
#define VBICsensxpbcx VBICstate+72
|
|
||||||
#define VBICsensxpbep VBICstate+74
|
|
||||||
|
|
||||||
#define VBICnumSenStates 10
|
|
||||||
|
|
||||||
|
|
||||||
/* per model data */
|
/* per model data */
|
||||||
typedef struct sVBICmodel { /* model structure for a vbic */
|
typedef struct sVBICmodel { /* model structure for a vbic */
|
||||||
|
|
||||||
|
|
@ -779,12 +751,6 @@ enum {
|
||||||
VBIC_QUEST_CBCX,
|
VBIC_QUEST_CBCX,
|
||||||
VBIC_QUEST_CBEP,
|
VBIC_QUEST_CBEP,
|
||||||
VBIC_QUEST_CBCP,
|
VBIC_QUEST_CBCP,
|
||||||
VBIC_QUEST_SENS_REAL,
|
|
||||||
VBIC_QUEST_SENS_IMAG,
|
|
||||||
VBIC_QUEST_SENS_MAG,
|
|
||||||
VBIC_QUEST_SENS_PH,
|
|
||||||
VBIC_QUEST_SENS_CPLX,
|
|
||||||
VBIC_QUEST_SENS_DC,
|
|
||||||
VBIC_QUEST_POWER,
|
VBIC_QUEST_POWER,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
/**********
|
|
||||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
|
||||||
Author: 1985 Thomas L. Quarles
|
|
||||||
Model Author: 1995 Colin McAndrew Motorola
|
|
||||||
Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH
|
|
||||||
**********/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This routine deletes a VBIC instance from the circuit and frees
|
|
||||||
* the storage it was using.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ngspice/ngspice.h"
|
|
||||||
#include "vbicdefs.h"
|
|
||||||
#include "ngspice/sperror.h"
|
|
||||||
#include "ngspice/suffix.h"
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
VBICdelete(GENinstance *gen_inst)
|
|
||||||
{
|
|
||||||
VBICinstance *inst = (VBICinstance *) gen_inst;
|
|
||||||
FREE(inst->VBICsens);
|
|
||||||
return OK;
|
|
||||||
}
|
|
||||||
|
|
@ -49,7 +49,7 @@ SPICEdev VBICinfo = {
|
||||||
.DEVaccept = NULL,
|
.DEVaccept = NULL,
|
||||||
.DEVdestroy = NULL,
|
.DEVdestroy = NULL,
|
||||||
.DEVmodDelete = NULL,
|
.DEVmodDelete = NULL,
|
||||||
.DEVdelete = VBICdelete,
|
.DEVdelete = NULL,
|
||||||
.DEVsetic = VBICgetic,
|
.DEVsetic = VBICgetic,
|
||||||
.DEVask = VBICask,
|
.DEVask = VBICask,
|
||||||
.DEVmodAsk = VBICmAsk,
|
.DEVmodAsk = VBICmAsk,
|
||||||
|
|
|
||||||
|
|
@ -397,9 +397,6 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
||||||
|
|
||||||
here->VBICstate = *states;
|
here->VBICstate = *states;
|
||||||
*states += VBICnumStates;
|
*states += VBICnumStates;
|
||||||
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){
|
|
||||||
*states += VBICnumSenStates * (ckt->CKTsenInfo->SENparms);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(model->VBICextCollResist == 0) {
|
if(model->VBICextCollResist == 0) {
|
||||||
here->VBICcollCXNode = here->VBICcollNode;
|
here->VBICcollCXNode = here->VBICcollNode;
|
||||||
|
|
|
||||||
|
|
@ -2053,7 +2053,6 @@
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicacld.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicacld.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicask.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicask.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicconv.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicconv.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicdel.c" />
|
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicgetic.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicgetic.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicinit.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicinit.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicload.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicload.c" />
|
||||||
|
|
|
||||||
|
|
@ -2491,7 +2491,6 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicacld.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicacld.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicask.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicask.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicconv.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicconv.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicdel.c" />
|
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicgetic.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicgetic.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicinit.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicinit.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicload.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicload.c" />
|
||||||
|
|
|
||||||
|
|
@ -2458,7 +2458,6 @@
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicacld.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicacld.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicask.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicask.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicconv.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicconv.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicdel.c" />
|
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicgetic.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicgetic.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicinit.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicinit.c" />
|
||||||
<ClCompile Include="..\src\spicelib\devices\vbic\vbicload.c" />
|
<ClCompile Include="..\src\spicelib\devices\vbic\vbicload.c" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue