From 2b2d2efce0155d1e7336d5a7b909d9136042e027 Mon Sep 17 00:00:00 2001 From: pnenzi Date: Wed, 25 Apr 2007 17:44:58 +0000 Subject: [PATCH] Added support for new verilog-a models. --- configure.in | 7 +++++-- src/spicelib/devices/dev.c | 17 ++++++++++------- src/spicelib/parser/inp2m.c | 1 + src/spicelib/parser/inpdomod.c | 10 ++++++++++ 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/configure.in b/configure.in index fb217bfab..66902b033 100644 --- a/configure.in +++ b/configure.in @@ -683,11 +683,13 @@ if test "$enable_adms" = "yes"; then VLADEVDIR=" adms/hicum0 \ adms/hicum2 \ - adms/mextram " + adms/mextram \ + adms/psp102 " VLADEV=" spicelib/devices/adms/hicum0/libhicum0.a \ spicelib/devices/adms/hicum2/libhicum2.a \ - spicelib/devices/adms/mextram/libmextram.a " + spicelib/devices/adms/mextram/libmextram.a \ + spicelib/devices/adms/psp102/libpsp102.a " fi AC_SUBST(ADMSXML) @@ -776,6 +778,7 @@ src/spicelib/devices/Makefile \ src/spicelib/devices/adms/hicum0/Makefile \ src/spicelib/devices/adms/hicum2/Makefile \ src/spicelib/devices/adms/mextram/Makefile \ +src/spicelib/devices/adms/psp102/Makefile \ src/spicelib/devices/asrc/Makefile \ src/spicelib/devices/bjt/Makefile \ src/spicelib/devices/bjt2/Makefile \ diff --git a/src/spicelib/devices/dev.c b/src/spicelib/devices/dev.c index a9d795624..795c7ac53 100644 --- a/src/spicelib/devices/dev.c +++ b/src/spicelib/devices/dev.c @@ -120,6 +120,7 @@ int add_udn(int,Evt_Udn_Info_t **); #include "adms/hicum0/hicum0itf.h" #include "adms/hicum2/hicum2itf.h" #include "adms/mextram/mextramitf.h" +#include "adms/psp102/psp102itf.h" #endif #ifdef CIDER /* Numerical devices (Cider integration) */ @@ -136,9 +137,9 @@ int add_udn(int,Evt_Udn_Info_t **); #ifdef ADMS #ifdef XSPICE - static int DEVNUM = 55; + static int DEVNUM = 56; #else - #define DEVNUM 55 + #define DEVNUM 56 #endif #else /* NOT ADMS */ @@ -156,9 +157,9 @@ int add_udn(int,Evt_Udn_Info_t **); #ifdef ADMS #ifdef XSPICE - static int DEVNUM = 50; + static int DEVNUM = 51; #else - #define DEVNUM 50 + #define DEVNUM 51 #endif #else /* NOT ADMS */ @@ -263,7 +264,8 @@ spice_init_devices(void) DEVices[52] = get_hicum0_info(); DEVices[53] = get_hicum2_info(); DEVices[54] = get_mextram_info(); - assert(55 == DEVNUM); + DEVices[55] = get_psp102_info(); + assert(56 == DEVNUM); #else /* NOT ADMS */ assert(52 == DEVNUM); #endif /* ADMS */ @@ -272,7 +274,8 @@ spice_init_devices(void) DEVices[47] = get_hicum0_info(); DEVices[48] = get_hicum2_info(); DEVices[49] = get_mextram_info(); - assert(50 == DEVNUM); + DEVices[50] = get_psp102_info(); + assert(51 == DEVNUM); #else /* NOT ADMS */ assert(47 == DEVNUM); #endif /* ADMS */ @@ -305,7 +308,7 @@ devices(void) #ifdef ADMS #define DEVICES_USED {"asrc", "bjt", "bjt2", "vbic", "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", "hicum0", "hicum2", "mextram"} + "mos2", "mos3", "mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc", "hicum0", "hicum2", "mextram", "psp102"} #else #define DEVICES_USED {"asrc", "bjt", "bjt2", "vbic", "bsim1", "bsim2", "bsim3", "bsim3v2", "bsim3v1", "bsim4", "bsim3soipd", "bsim3soifd", \ "bsim3soidd", "cap", "cccs", "ccvs", "csw", "dio", "hfet", "hfet2", "ind", "isrc", "jfet", "ltra", "mes", "mesa" ,"mos1", \ diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index 4cc0f739f..29a078b16 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -212,6 +212,7 @@ INP2M (void *ckt, INPtables * tab, card * current) #endif #ifdef ADMS && thismodel->INPmodType != INPtypelook ("EKV") + && thismodel->INPmodType != INPtypelook ("psp102") #endif && thismodel->INPmodType != INPtypelook ("HiSIM1") ) diff --git a/src/spicelib/parser/inpdomod.c b/src/spicelib/parser/inpdomod.c index f3b0ecbff..534a11834 100644 --- a/src/spicelib/parser/inpdomod.c +++ b/src/spicelib/parser/inpdomod.c @@ -311,6 +311,7 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab) INPmkTemp ("Device type BSIM6 not available in this binary\n");} break; +#ifdef ADMS case 44: type = INPtypelook("EKV"); if (type < 0) { @@ -319,6 +320,15 @@ char *INPdomodel(void *ckt, card * image, INPtables * tab) ("Device type EKV not available in this binary\n"); } break; + case 46: + type = INPtypelook("psp102"); +printf("found psp102 lev=%i\n",lev); + if(type < 0) { + err = INPmkTemp( + "Device type PSP102 not available in this binary\n"); + } + break; +#endif case 49: type = INPtypelook("BSIM3v1S"); if (type < 0) {