📄 inpdomod.c
字号:
err = INPmkTemp ("Device type BSIM3v1A not available in this binary\n"); } break; case 52: type = INPtypelook("BSIM3v0"); if (type < 0) { err = INPmkTemp ("Device type BSIM3v0 not available in this binary\n"); } break; case 55: type = INPtypelook("B3SOIFD"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type B3SOIFD not available in this binary\n"); } break; case 56: type = INPtypelook("B3SOIDD"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type B3SOIDD not available in this binary\n"); } break; case 57: type = INPtypelook("B3SOIPD"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type B3SOIPD not available in this binary\n"); } break; case 58: type = INPtypelook("B3SOI"); if (type < 0) { err = INPmkTemp ("Device type B3SOI V3.0 not available in this binary\n"); } break; case 60: type = INPtypelook("SOI"); if (type < 0) { err = INPmkTemp ("Device type SOI not available in this binary (internal STAG release)\n"); } break; case 61: type = INPtypelook("SOI2"); if (type < 0) { err = INPmkTemp ("Device type SOI2 not available in this binary (internal STAG release)\n"); } break; case 62: type = INPtypelook("SOI3"); if (type < 0) { err = INPmkTemp ("Device type SOI3 not available in this binary (internal STAG release)\n"); } break; case 64: type = INPtypelook("HiSIM1"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type HiSIM1 not available in this binary\n"); } break; default: /* placeholder; use level xxx for the next model */ err = INPmkTemp ("Only MOS device levels 1-6,8,9,14,44,49-52,55-58,62,64 are supported in this binary\n"); break; } INPmakeMod(modname, type, image); } /* -------- Check if model is a resistor --------- */ else if (strcmp(typename, "r") == 0) { type = INPtypelook("Resistor"); if (type < 0) { err = INPmkTemp ("Device type Resistor not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a transmission line of some sort --------- */ else if(strcmp(typename,"txl") == 0) { char *val; double rval=0, lval=0; INPgetTok(&line,&val,1); while (*line != '\0') { if (*val == 'R' || *val == 'r') { INPgetTok(&line,&val,1); rval = atof(val); } if ((strcmp(val,"L") == 0) || (strcmp(val,"l") == 0)) { INPgetTok(&line,&val,1); lval = atof(val); } INPgetTok(&line,&val,1); } if(lval) rval = rval/lval; if (rval > 1.6e10) { type = INPtypelook("TransLine"); INPmakeMod(modname,type,image); } if (rval > 1.6e9) { type = INPtypelook("CplLines"); INPmakeMod(modname,type,image); } else { type = INPtypelook("TransLine"); INPmakeMod(modname,type,image); } if(type < 0) { err = INPmkTemp( "Device type TransLine not available in this binary\n"); } } /* -------- Check if model is a ???? --------- */ else if(strcmp(typename,"cpl") == 0) { type = INPtypelook("CplLines"); if(type < 0) { err = INPmkTemp( "Device type CplLines not available in this binary\n"); } INPmakeMod(modname,type,image); } /* -------- Check if model is a cap --------- */ else if (strcmp(typename, "c") == 0) { type = INPtypelook("Capacitor"); if (type < 0) { err = INPmkTemp ("Device type Capacitor not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is an ind --------- */ else if (strcmp(typename, "l") == 0) { type = INPtypelook("Inductor"); if (type < 0) { err = INPmkTemp ("Device type Inductor not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a switch --------- */ else if (strcmp(typename, "sw") == 0) { type = INPtypelook("Switch"); if (type < 0) { err = INPmkTemp ("Device type Switch not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a Current Controlled Switch --------- */ else if (strcmp(typename, "csw") == 0) { type = INPtypelook("CSwitch"); if (type < 0) { err = INPmkTemp ("Device type CSwitch not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a Lossy TransLine --------- */ else if (strcmp(typename, "ltra") == 0) { type = INPtypelook("LTRA"); if (type < 0) { err = INPmkTemp ("Device type LTRA not available in this binary\n"); } INPmakeMod(modname, type, image); } #ifdef CIDER else if(strcmp(typename,"numd") == 0) { err = INPfindLev(line,&lev); switch( lev ) { case 1: default: type = INPtypelook("NUMD"); if(type < 0) { err = INPmkTemp ("Device type NUMD not available in this binary\n"); } break; case 2: type = INPtypelook("NUMD2"); if(type < 0) { err = INPmkTemp ("Device type NUMD2 not available in this binary\n"); } break; } INPmakeMod(modname,type,image); } else if(strcmp(typename,"nbjt") == 0) { err = INPfindLev(line,&lev); switch( lev ) { case 1: default: type = INPtypelook("NBJT"); if(type < 0) { err = INPmkTemp ("Device type NBJT not available in this binary\n"); } break; case 2: type = INPtypelook("NBJT2"); if(type < 0) { err = INPmkTemp ("Device type NBJT2 not available in this binary\n"); } break; } INPmakeMod(modname,type,image); } else if(strcmp(typename,"numos") == 0) { type = INPtypelook("NUMOS"); if(type < 0) { err = INPmkTemp ("Device type NUMOS not available in this binary\n"); } INPmakeMod(modname,type,image); } #endif /* CIDER */ /* type poly added by SDB . . . */#ifdef XSPICE /* -------- Check if model is a poly (specific to xspice) --------- */ else if ( (strcmp(typename, "poly") == 0) || (strcmp(typename, "POLY") == 0) ) { type = INPtypelook("POLY"); if (type < 0) { err = INPmkTemp ("Device type POLY not available in this binary\n"); } INPmakeMod(modname, type, image); } #endif /* -------- Default action --------- */ else {#ifndef XSPICE type = -1; err = (char *) MALLOC(35 + strlen(typename)); (void) sprintf(err, "unknown model type %s - ignored\n", typename);#else /* gtri - modify - wbk - 10/23/90 - modify to look for code models */#ifdef TRACE /* SDB debug statement */ printf("In INPdomodel, found unknown model type, typename = %s . . .\n", typename); #endif /* look for this model type and put it in the table of models */ type = INPtypelook(typename); if(type < 0) { err = (char *) MALLOC(35 + strlen(typename)); sprintf(err,"Unknown model type %s - ignored\n",typename);#ifdef TRACE /* SDB debug statement */ printf("In INPdomodel, ignoring unknown model typ typename = %s . . .\n", typename); #endif } else {#ifdef TRACE /* SDB debug statement */ printf("In INPdomodel, adding unknown model typename = %s to model list. . .\n", typename); #endif INPmakeMod(modname,type,image); } /* gtri - end - wbk - 10/23/90 */#endif } tfree(typename); return (err);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -