From e96628b7bdf03af87b8084b61f06d8dc9dd26b40 Mon Sep 17 00:00:00 2001 From: pnenzi Date: Wed, 2 May 2001 20:33:10 +0000 Subject: [PATCH] Linked stag model to the simulator --- configure.in | 1 + src/Makefile.am | 1 + src/include/cktdefs.h | 2 +- src/spicelib/devices/Makefile.am | 1 + src/spicelib/devices/dev.c | 18 +++++++------- src/spicelib/parser/inp2m.c | 25 ++++++++++--------- src/spicelib/parser/inpdomod.c | 41 ++++++++++++++++++++++++++++---- 7 files changed, 65 insertions(+), 24 deletions(-) diff --git a/configure.in b/configure.in index 90a16ee86..b2ab650e9 100644 --- a/configure.in +++ b/configure.in @@ -255,6 +255,7 @@ src/spicelib/devices/mos3/Makefile \ src/spicelib/devices/mos6/Makefile \ src/spicelib/devices/mos9/Makefile \ src/spicelib/devices/res/Makefile \ +src/spicelib/devices/soi3/Makefile \ src/spicelib/devices/sw/Makefile \ src/spicelib/devices/tra/Makefile \ src/spicelib/devices/urc/Makefile \ diff --git a/src/Makefile.am b/src/Makefile.am index 51302c536..30e9864c8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,6 +49,7 @@ DYNAMIC_DEVICELIBS = \ spicelib/devices/mos6/libmos6.la \ spicelib/devices/mos9/libmos9.la \ spicelib/devices/res/libres.la \ + spicelib/devices/soi3/libsoi3.la \ spicelib/devices/sw/libsw.la \ spicelib/devices/tra/libtra.la \ spicelib/devices/urc/liburc.la \ diff --git a/src/include/cktdefs.h b/src/include/cktdefs.h index 3684adb71..bdec508b4 100644 --- a/src/include/cktdefs.h +++ b/src/include/cktdefs.h @@ -6,7 +6,7 @@ #ifndef CKT #define CKT "CKTdefs.h $Revision$ on $Date$ " -#define MAXNUMDEVS 39 /* Max number of possible devices PN:XXX may cause toubles*/ +#define MAXNUMDEVS 40 /* Max number of possible devices PN:XXX may cause toubles*/ extern int DEVmaxnum; /* Not sure if still used */ #define MAXNUMDEVNODES 4 /* Max No. of nodes per device */ /* Need to change for SOI devs ? */ diff --git a/src/spicelib/devices/Makefile.am b/src/spicelib/devices/Makefile.am index ff23996c1..ca5e1f7c1 100644 --- a/src/spicelib/devices/Makefile.am +++ b/src/spicelib/devices/Makefile.am @@ -33,6 +33,7 @@ SUBDIRS = \ mos6 \ mos9 \ res \ + soi3 \ sw \ tra \ urc \ diff --git a/src/spicelib/devices/dev.c b/src/spicelib/devices/dev.c index 138929d52..6e8e3420c 100644 --- a/src/spicelib/devices/dev.c +++ b/src/spicelib/devices/dev.c @@ -35,7 +35,7 @@ #include "dev.h" -#define DEVICES_USED "asrc bjt bjt2 bsim1 bsim2 bsim3 bsim3v2 bsim3v1 bsim4 bsim3soipd bsim3soifd bsim3soidd cap cccs ccvs csw dio hfet hfet2 ind isrc jfet ltra mes mesa mos1 mos2 mos3 mos6 mos9 res sw tra urc vccs vcvs vsrc" +#define DEVICES_USED "asrc bjt bjt2 bsim1 bsim2 bsim3 bsim3v2 bsim3v1 bsim4 bsim3soipd bsim3soifd bsim3soidd 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" /* * Analyses @@ -85,6 +85,7 @@ #include "mos6/mos6itf.h" #include "mos9/mos9itf.h" #include "res/resitf.h" +#include "soi3/soi3itf.h" #include "sw/switf.h" #include "tra/traitf.h" #include "urc/urcitf.h" @@ -93,7 +94,7 @@ #include "vsrc/vsrcitf.h" -#define DEVNUM 39 +#define DEVNUM 40 SPICEdev *DEVices[DEVNUM]; @@ -137,12 +138,13 @@ spice_init_devices(void) DEVices[31] = get_mos6_info(); DEVices[32] = get_mos9_info(); DEVices[33] = get_res_info(); - DEVices[34] = get_sw_info(); - DEVices[35] = get_tra_info(); - DEVices[36] = get_vccs_info(); - DEVices[37] = get_vcvs_info(); - DEVices[38] = get_vsrc_info(); - assert(39 == DEVNUM); + DEVices[34] = get_soi3_info(); + DEVices[35] = get_sw_info(); + DEVices[36] = get_tra_info(); + DEVices[37] = get_vccs_info(); + DEVices[38] = get_vcvs_info(); + DEVices[39] = get_vsrc_info(); + assert(40 == DEVNUM); } diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index 0c721f3c7..12a48b042 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -105,14 +105,15 @@ INP2M (void *ckt, INPtables * tab, card * current) { /* 7th token is a model - only have 6 terminal device */ if ((thismodel->INPmodType != INPtypelook ("B3SOIPD")) && (thismodel->INPmodType != INPtypelook ("B3SOIFD")) && - (thismodel->INPmodType != INPtypelook ("B3SOIDD")) + (thismodel->INPmodType != INPtypelook ("B3SOIDD")) && + (thismodel->INPmodType != INPtypelook ("SOI3")) ) { - /* if model is not variable node B3SOIPD/FD/DD model, error! */ - LITERR ("only level 9-10 B3SOI(PD | FD | DD) can have 6 nodes") return; + /* if model is not variable node B3SOIPD/FD/DD or STAG model, error! */ + LITERR ("only level 9-10 B3SOI(PD | FD | DD) and STAG (SOI3) can have 6 nodes") return; } else - { /* if looking at B3SOIPD/FD/DD model, allocate the 6th node */ + { /* if looking at B3SOIPD/FD/DD or STAG (SOI3) model, allocate the 6th node */ INPtermInsert (ckt, &nname5, tab, &node5); INPtermInsert (ckt, &nname6, tab, &node6); model = nname7; @@ -123,14 +124,15 @@ INP2M (void *ckt, INPtables * tab, card * current) { /* 6th token is a model - only have 5 terminal device */ if ((thismodel->INPmodType != INPtypelook ("B3SOIPD")) && (thismodel->INPmodType != INPtypelook ("B3SOIFD")) && - (thismodel->INPmodType != INPtypelook ("B3SOIDD")) + (thismodel->INPmodType != INPtypelook ("B3SOIDD")) && + (thismodel->INPmodType != INPtypelook ("SOI3")) ) { - /* if model is not variable node B3SOIPD/FD/DD model, error! */ - LITERR ("only level 9-10 B3SOI(PD | FD | DD) can have 5 nodes") return; + /* if model is not variable node B3SOIPD/FD/DD model, error! */ + LITERR ("only level 9-10 B3SOI(PD | FD | DD) and STAG (SOI3) can have 5 nodes") return; } else - { /* if looking at B3SOIPD/FD/DD model, allocate the 5th node */ + { /* if looking at B3SOIPD/FD/DD or STAG (SOI3) model, allocate the 5th node */ INPtermInsert (ckt, &nname5, tab, &node5); model = nname6; /* make model point to the correct token */ } @@ -164,7 +166,8 @@ INP2M (void *ckt, INPtables * tab, card * current) && thismodel->INPmodType != INPtypelook ("B3SOIDD") && thismodel->INPmodType != INPtypelook ("BSIM4") && thismodel->INPmodType != INPtypelook ("BSIM3V1") - && thismodel->INPmodType != INPtypelook ("BSIM3V2")) + && thismodel->INPmodType != INPtypelook ("BSIM3V2") + && thismodel->INPmodType != INPtypelook ("SOI3")) { LITERR ("incorrect model type"); return; @@ -195,8 +198,8 @@ INP2M (void *ckt, INPtables * tab, card * current) IFC (bindNode, (ckt, fast, 4, node4)); if ((thismodel->INPmodType == INPtypelook ("B3SOIPD")) || (thismodel->INPmodType == INPtypelook ("B3SOIFD")) || - (thismodel->INPmodType == INPtypelook ("B3SOIDD")) - ) + (thismodel->INPmodType == INPtypelook ("B3SOIDD")) || + (thismodel->INPmodType == INPtypelook ("SOI3"))) { switch (nodeflag) { diff --git a/src/spicelib/parser/inpdomod.c b/src/spicelib/parser/inpdomod.c index 200ec1f56..533edd8b9 100644 --- a/src/spicelib/parser/inpdomod.c +++ b/src/spicelib/parser/inpdomod.c @@ -151,7 +151,9 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab) } INPmakeMod(modname, type, image); } else if ((strcmp(typename, "nmos") == 0) - || (strcmp(typename, "pmos") == 0)) { + || (strcmp(typename, "pmos") == 0) + || (strcmp(typename, "nsoi") == 0) + || (strcmp(typename, "psoi") == 0)) { err = INPfindLev(line, &lev); switch (lev) { case 0: @@ -274,6 +276,14 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab) ("Placeholder: Device type BSIM6 not available in this binary\n"); } break; + case 44: + type = INPtypelook("EKV"); + if (type < 0) { + err = + INPmkTemp + ("Placeholder for EKV model: look at http://.... for info on EKV\n"); + } + break; case 49: type = INPtypelook("BSIM3V1"); if (type < 0) { @@ -282,8 +292,6 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab) ("Device type BSIM3V1 not available in this binary\n"); } break; - - case 50: type = INPtypelook("BSIM3V2"); if (type < 0) { @@ -291,11 +299,36 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab) INPmkTemp ("Device type BSIM3V2 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; default: /* placeholder; use level xxx for the next model */ err = INPmkTemp - ("Only MOS device levels 1-6,8,14 are supported in this binary\n"); + ("Only MOS device levels 1-6,8,14,44,49-50,62 are supported in this binary\n"); break; } INPmakeMod(modname, type, image);