From 4f9431311a94a31775e11b86b6fd2b02d3d00fee Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 7 Jul 2017 17:46:27 +0200 Subject: [PATCH] dev.c, inp2m.c, inpdomod.c, introduce bsimcmg (use level 17) --- src/spicelib/devices/dev.c | 4 +++- src/spicelib/parser/inp2m.c | 4 +++- src/spicelib/parser/inpdomod.c | 13 ++++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/spicelib/devices/dev.c b/src/spicelib/devices/dev.c index b109e2bfb..f289b61b9 100644 --- a/src/spicelib/devices/dev.c +++ b/src/spicelib/devices/dev.c @@ -127,6 +127,7 @@ int add_udn(int,Evt_Udn_Info_t **); #include "adms/ekv/ekvitf.h" #include "adms/psp102/psp102itf.h" #include "adms/bsim6/bsim6itf.h" +#include "adms/bsimcmg/bsimcmgitf.h" #endif #ifdef CIDER /* Numerical devices (Cider integration) */ @@ -209,6 +210,7 @@ static SPICEdev *(*static_devices[])(void) = { (SPICEdev *(*)(void)) get_ekv_info, (SPICEdev *(*)(void)) get_psp102_info, (SPICEdev *(*)(void)) get_bsim6_info, + (SPICEdev *(*)(void)) get_bsimcmg_info, #endif #ifdef NDEV @@ -293,7 +295,7 @@ SPICEdev ** devices(void) #define DEVICES_USED {"asrc", "bjt", "vbic", "bsim1", "bsim2", "bsim3", "bsim3v32", "bsim3v2", "bsim3v1", "bsim4", "bsim4v5", "bsim4v6", "bsim4v7", \ "bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", "hisimhv2", \ "cap", "cccs", "ccvs", "csw", "dio", "hfet", "hfet2", "ind", "isrc", "jfet", "ltra", "mes", "mesa" ,"mos1", "mos2", "mos3", \ - "mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc", "hicum0", "hicum2", "bjt504t", "ekv", "psp102", "bsim6"} + "mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc", "hicum0", "hicum2", "bjt504t", "ekv", "psp102", "bsim6", "bsimcmg"} #else #define DEVICES_USED {"asrc", "bjt", "vbic", "bsim1", "bsim2", "bsim3", "bsim3v32", "bsim3v2", "bsim3v1", "bsim4", "bsim4v5", "bsim4v6", "bsim4v7", \ "bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", "hisimhv2", \ diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index 6ee0f6b4a..b48f4da18 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -31,7 +31,8 @@ model_numnodes(int type) return 6; } - if (type == INPtypelook("BSIM6")) /* bsim6.va with __THERMAL_NODE__ */ + if (type == INPtypelook("BSIM6") || /* bsim6.va with __THERMAL_NODE__ */ + type == INPtypelook("BSIMCMG")) /* bsimcmg.va */ { return 5; } @@ -140,6 +141,7 @@ INP2M(CKTcircuit *ckt, INPtables *tab, struct card *current) thismodel->INPmodType != INPtypelook("ekv") && thismodel->INPmodType != INPtypelook("psp102") && thismodel->INPmodType != INPtypelook("bsim6") && + thismodel->INPmodType != INPtypelook("bsimcmg") && #endif thismodel->INPmodType != INPtypelook("HiSIM2") && thismodel->INPmodType != INPtypelook("HiSIMHV1") && diff --git a/src/spicelib/parser/inpdomod.c b/src/spicelib/parser/inpdomod.c index 563e3c393..adb4a6e1d 100644 --- a/src/spicelib/parser/inpdomod.c +++ b/src/spicelib/parser/inpdomod.c @@ -212,7 +212,7 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab) INPmakeMod(modname, type, image); } - /* ------ Check if model is a VDMOS FET ------- */ + /* -------- Check if model is a MOSFET --------- */ else if ((strcmp(type_name, "vdmos") == 0) || (strcmp(type_name, "vdmosn") == 0) || (strcmp(type_name, "vdmosp") == 0)) { @@ -298,7 +298,7 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab) if (prefix("3.1", ver)) { type = INPtypelook("BSIM3v1"); } - if (prefix("3.2", ver)) { /* version string ver has to start with 3.2 */ + if ( prefix("3.2", ver)) { /* version string ver has to start with 3.2 */ type = INPtypelook("BSIM3v32"); } if ( (strstr(ver, "default")) || (prefix("3.3", ver)) ) { @@ -349,6 +349,13 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab) INPmkTemp ("Device type BSIM6 not available in this binary\n");} break; + case 17: + type = INPtypelook("BSIMCMG"); + if (type < 0) { + err = + INPmkTemp + ("Device type BSIMCMG not available in this binary\n");} + break; case 44: type = INPtypelook("ekv"); if (type < 0) { @@ -461,7 +468,7 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab) INPmakeMod(modname, type, image); } - /* -------- Check if model is a PSPICE resistor --------- */ + /* -------- Check if model is a transmission line of some sort --------- */ else if (strcmp(type_name, "res") == 0) { type = INPtypelook("Resistor"); if (type < 0) {