From 677e2f7146a0de85cbda88c0b9a1e9815daacb9b Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 18 Mar 2018 17:42:26 +0100 Subject: [PATCH] bsimcmg, add to ngspice, (level 17 and 72) --- configure.ac | 3 ++ .../devices/adms/admst/ngspiceVersion.xml | 47 +++++++++++++++++++ src/spicelib/devices/dev.c | 4 +- src/spicelib/parser/inp2m.c | 4 +- src/spicelib/parser/inpdomod.c | 8 ++++ 5 files changed, 64 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 265a92aef..9936d5c5d 100644 --- a/configure.ac +++ b/configure.ac @@ -956,6 +956,7 @@ if test "x$enable_adms" = xyes ; then AC_DEFINE([ADMS], [1], [Support for Verilog-A models]) VLADEVDIR=" adms/bsimbulk \ + adms/bsimcmg \ adms/ekv \ adms/hicum0 \ adms/hicum2 \ @@ -964,6 +965,7 @@ if test "x$enable_adms" = xyes ; then # The makefiles for adms (to be added to AC_CONFIG_FILES by ./autogen.sh --adms) #VLAMKF src/spicelib/devices/adms/bsimbulk/Makefile +#VLAMKF src/spicelib/devices/adms/bsimcmg/Makefile #VLAMKF src/spicelib/devices/adms/ekv/Makefile #VLAMKF src/spicelib/devices/adms/hicum0/Makefile #VLAMKF src/spicelib/devices/adms/hicum2/Makefile @@ -973,6 +975,7 @@ if test "x$enable_adms" = xyes ; then NOTVLADEVDIR="" VLADEV=" spicelib/devices/adms/bsimbulk/libbsimbulk.la \ + spicelib/devices/adms/bsimcmg/libbsimcmg.la \ spicelib/devices/adms/ekv/libekv.la \ spicelib/devices/adms/hicum0/libhicum0.la \ spicelib/devices/adms/hicum2/libhicum2.la \ diff --git a/src/spicelib/devices/adms/admst/ngspiceVersion.xml b/src/spicelib/devices/adms/admst/ngspiceVersion.xml index 640be851f..26001c2b2 100644 --- a/src/spicelib/devices/adms/admst/ngspiceVersion.xml +++ b/src/spicelib/devices/adms/admst/ngspiceVersion.xml @@ -2187,6 +2187,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/spicelib/devices/dev.c b/src/spicelib/devices/dev.c index c17aec6c3..168268c2a 100644 --- a/src/spicelib/devices/dev.c +++ b/src/spicelib/devices/dev.c @@ -126,6 +126,7 @@ int add_udn(int,Evt_Udn_Info_t **); #include "adms/ekv/ekvitf.h" #include "adms/psp102/psp102itf.h" #include "adms/bsimbulk/bsimbulkitf.h" +#include "adms/bsimcmg/bsimcmgitf.h" #endif #ifdef CIDER /* Numerical devices (Cider integration) */ @@ -207,6 +208,7 @@ static SPICEdev *(*static_devices[])(void) = { (SPICEdev *(*)(void)) get_ekv_info, (SPICEdev *(*)(void)) get_psp102_info, (SPICEdev *(*)(void)) get_bsimbulk_info, + (SPICEdev *(*)(void)) get_bsimcmg_info, #endif #ifdef NDEV @@ -291,7 +293,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", "bsimbulk"} + "mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc", "hicum0", "hicum2", "bjt504t", "ekv", "psp102", "bsimbulk", "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 e902237d3..a89d2652d 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -32,7 +32,8 @@ model_numnodes(int type) } #ifdef ADMS - if (type == INPtypelook("BSIMBULK")) /* bsimbulk.va */ + if (type == INPtypelook("BSIMBULK") || /* bsimbulk.va */ + type == INPtypelook("BSIMCMG")) /* bsimcmg.va */ { return 5; } @@ -133,6 +134,7 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current) thismodel->INPmodType != INPtypelook("ekv") && thismodel->INPmodType != INPtypelook("psp102") && thismodel->INPmodType != INPtypelook("bsimbulk") && + 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 41e94f124..cdfd9bf78 100644 --- a/src/spicelib/parser/inpdomod.c +++ b/src/spicelib/parser/inpdomod.c @@ -337,6 +337,14 @@ char *INPdomodel(CKTcircuit *ckt, card * image, INPtables * tab) INPmkTemp ("Device type BSIMBULK not available in this binary\n");} break; + case 17: + case 72: + 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) {