1 /********** 2 Copyright 1990 Regents of the University of California. All rights reserved. 3 Author: 1985 Thomas L. Quarles 4 Modified: Alan Gillespie 5 6 This function is obsolete (was used by an old sensitivity analysis) 7 **********/ 8 9 /* loop through all the devices and 10 * allocate parameter #s to design parameters 11 */ 12 13 #include "ngspice/ngspice.h" 14 #include "ngspice/smpdefs.h" 15 #include "ngspice/cktdefs.h" 16 #include "mos9defs.h" 17 #include "ngspice/sperror.h" 18 #include "ngspice/suffix.h" 19 20 int MOS9sSetup(SENstruct * info,GENmodel * inModel)21MOS9sSetup(SENstruct *info, GENmodel *inModel) 22 { 23 MOS9model *model = (MOS9model *)inModel; 24 MOS9instance *here; 25 26 /* loop through all the models */ 27 for( ; model != NULL; model = MOS9nextModel(model)) { 28 29 /* loop through all the instances of the model */ 30 for (here = MOS9instances(model); here != NULL ; 31 here=MOS9nextInstance(here)) { 32 33 if(here->MOS9senParmNo){ 34 if((here->MOS9sens_l)&&(here->MOS9sens_w)){ 35 here->MOS9senParmNo = ++(info->SENparms); 36 ++(info->SENparms);/* MOS has two design parameters */ 37 } 38 else{ 39 here->MOS9senParmNo = ++(info->SENparms); 40 } 41 } 42 here->MOS9senPertFlag = OFF; 43 if((here->MOS9sens = TMALLOC(double, 72)) == NULL) { 44 return(E_NOMEM); 45 } 46 47 } 48 } 49 return(OK); 50 } 51 52 53