parser: fix BSIM-BULK (level 77) model type lookup for OSDI MOSFETs
inpdomod.c: Add case 77 to the MOS level switch so that .model lines with level=77 resolve to the bsimbulk OSDI device type instead of leaving INPmodType=-1. Without this, BSIM-BULK model cards are registered with an invalid type and instances later fail to load. inp2m.c: Add bsimbulk to the model-type allowlist in INP2M() so that MOSFET instances using an OSDI BSIM-BULK model (M-prefix) are accepted instead of rejected with 'incorrect model type'. This is the minimum subset needed for a single-model BSIM-BULK test case to parse. The multi-bin handling change to inpgmod.c that accompanied the original fix is omitted here — it is unrelated to the PMOS-polarity wiring demonstration this branch is for.
This commit is contained in:
parent
4b017d0f8a
commit
4db43d9612
|
|
@ -137,7 +137,8 @@ INP2M(CKTcircuit *ckt, INPtables *tab, struct card *current)
|
|||
thismodel->INPmodType != INPtypelook("HiSIM2") &&
|
||||
thismodel->INPmodType != INPtypelook("HiSIMHV1") &&
|
||||
thismodel->INPmodType != INPtypelook("HiSIMHV2") &&
|
||||
thismodel->INPmodType != INPtypelook("VDMOS"))
|
||||
thismodel->INPmodType != INPtypelook("VDMOS") &&
|
||||
thismodel->INPmodType != INPtypelook("bsimbulk"))
|
||||
{
|
||||
LITERR ("incorrect model type");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -380,9 +380,16 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab)
|
|||
err = tprintf("Device type HiSIMHV version %s not available in this binary\n", ver);
|
||||
}
|
||||
break;
|
||||
case 77: /* BSIM-BULK (OSDI) */
|
||||
type = INPtypelook("bsimbulk");
|
||||
if (type < 0) {
|
||||
err = INPmkTemp
|
||||
("Device type bsimbulk not available - load bsimbulk.osdi before .model\n");
|
||||
}
|
||||
break;
|
||||
default: /* placeholder; use level xxx for the next model */
|
||||
err = INPmkTemp
|
||||
("Only MOS device levels 1-6,8-10,14,49,54-58,60,68,73 are supported in this binary\n");
|
||||
("Only MOS device levels 1-6,8-10,14,49,54-58,60,68,73,77 are supported in this binary\n");
|
||||
break;
|
||||
}
|
||||
INPmakeMod(modname, type, image);
|
||||
|
|
|
|||
Loading…
Reference in New Issue