add bsimcmg, from Berkeley's BSIMCMG110.0.0_20160101.tar.gz

This commit is contained in:
rlar 2017-07-30 18:17:14 +02:00
parent a0a90cc762
commit 7c1db5c912
4 changed files with 206 additions and 0 deletions

View File

@ -16,6 +16,7 @@ Using: /home/larice/s/ngspice.work/work/ngspice/adms/ADMS/testcases/../admsXml/a
(compile "cd src/spicelib/devices/adms/mextram/admsva && make -if my.mak to")
(compile "cd src/spicelib/devices/adms/psp102/admsva && make -if my.mak to")
(compile "cd src/spicelib/devices/adms/ekv/admsva && make -if my.mak to")
(compile "cd src/spicelib/devices/adms/bsimcmg/admsva && make -if my.mak to")
;; note only some blessed module names are accepted, see ngspiceVersion.xml
;; here I reuse r2_cmc
@ -38,3 +39,7 @@ and all the code in bsim..h
((GEOMOD)==(0))
kommt in /* case */ als GEOMOD statt here->GEOMOD
(compile "wget http://bsim.berkeley.edu/BSIMCMG/BSIMCMG110.0.0_20160101.tar.gz")
(compile "mkdir -p src/spicelib/devices/adms/bsimcmg/admsva")
(compile "tar --dir src/spicelib/devices/adms/bsimcmg/admsva -zxvf BSIMCMG110.0.0_20160101.tar.gz code")

View File

@ -2182,6 +2182,53 @@
</admst:if>
</admst:when>
<admst:when test="[lower-case(name)='bsimcmg']">
<admst:if test="[nilled(variable[name='nmos'])]">
<admst:value-of select="analog"/>
<admst:value-of select="."/>
<admst:new datatype="variable" arguments="%p,nmos,%p">
<admst:push into="module/variable" select="." onduplicate="ignore"/>
<admst:value-to select="sizetype" value="scalar"/>
<admst:value-to select="type" value="integer"/>
<admst:value-to select="input" value="yes"/>
<admst:value-to select="output" value="yes"/>
<admst:value-to select="parametertype" value="model"/>
<admst:value-to select="scope" value="global_model"/>
<admst:new datatype="number" arguments="1">
<admst:value-to select="scalingunit" value="1"/>
<admst:value-of select="."/>
<admst:value-of select="../module"/>
<admst:new datatype="expression" arguments="%p,%p">
<admst:value-of select="."/>
<admst:value-to select="../../default" value="%p"/>
</admst:new>
</admst:new>
</admst:new>
</admst:if>
<admst:if test="[nilled(variable[name='pmos'])]">
<admst:value-of select="analog"/>
<admst:value-of select="."/>
<admst:new datatype="variable" arguments="%p,pmos,%p">
<admst:push into="module/variable" select="." onduplicate="ignore"/>
<admst:value-to select="sizetype" value="scalar"/>
<admst:value-to select="type" value="integer"/>
<admst:value-to select="input" value="yes"/>
<admst:value-to select="output" value="yes"/>
<admst:value-to select="parametertype" value="model"/>
<admst:value-to select="scope" value="global_model"/>
<admst:new datatype="number" arguments="1">
<admst:value-to select="scalingunit" value="1"/>
<admst:value-of select="."/>
<admst:value-of select="../module"/>
<admst:new datatype="expression" arguments="%p,%p">
<admst:value-of select="."/>
<admst:value-to select="../../default" value="%p"/>
</admst:new>
</admst:new>
</admst:new>
</admst:if>
</admst:when>
<admst:otherwise>
<admst:value-of select="name"/>
<admst:fatal format="%s: device not handled by the adms ngspice interface\n"/>

View File

@ -0,0 +1,112 @@
##
## Interface: ngspice 1.0.0.0
## created by: admsXml-2.3.6
## Process this file with automake to produce Makefile.in
ADMSXMLINTERFACE=$(srcdir)/../admst
noinst_LTLIBRARIES = libbsimcmg.la
BUILT_SOURCES = \
bsimcmg.c \
bsimcmg.hxx \
bsimcmgacld.c \
bsimcmgask.c \
bsimcmgdefs.h \
bsimcmgdel.c \
bsimcmgdest.c \
bsimcmgext.h \
bsimcmgguesstopology.c \
bsimcmginit.c \
bsimcmginit.h \
bsimcmgitf.h \
bsimcmgload.c \
bsimcmgmask.c \
bsimcmgmdel.c \
bsimcmgmpar.c \
bsimcmgpar.c \
bsimcmgpzld.c \
bsimcmgsetup.c \
bsimcmgtemp.c \
bsimcmgtrunc.c
libbsimcmg_la_SOURCES = \
$(BUILT_SOURCES)
CLEANFILES = \
$(BUILT_SOURCES) \
bsimcmgnoise.c \
.bsimcmg.va.adms \
.adms.implicit.xml \
.interface.xml \
*.h \
*.xml
#TODO (not implemented) \
bsimcmgconv.c \
bsimcmggetic.c
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include
AM_CFLAGS = $(STATIC)
MAINTAINERCLEANFILES = Makefile.in \
Makefile.am
DISTCLEANFILES = Makefile.am \
Makefile.in
%.c %.hxx \
%acld.c %ask.c %defs.h %del.c %dest.c %ext.h %guesstopology.c \
%init.c %init.h %itf.h %load.c %mask.c %mdel.c %mpar.c %par.c \
%pzld.c %setup.c %temp.c %trunc.c \
: $(srcdir)/admsva/%.va \
$(ADMSXMLINTERFACE)/ngspiceVersion.xml \
$(ADMSXMLINTERFACE)/analogfunction.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \
$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml
$(ADMSXML) -I$(srcdir) -I$(srcdir)/admsva $< \
-e $(ADMSXMLINTERFACE)/ngspiceVersion.xml \
-e $(ADMSXMLINTERFACE)/analogfunction.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \
-e $(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml

View File

@ -0,0 +1,42 @@
# -*- makefile -*-
# (compile "make -i -f my.mak to")
# (compile "make -i -f my.mak do 2>&1 > log")
# (compile "make -i -f my.mak to 2>&1 > log")
CFLAGS=-I ../../../../../include -I ../../../../../../../w32/src/include
SRCS = \
bsimcmgacld.c bsimcmg.analogfunction.c bsimcmgask.c bsimcmg.c bsimcmgdel.c bsimcmgdest.c bsimcmgguesstopology.c bsimcmginit.c bsimcmgload.c bsimcmgmask.c bsimcmgmdel.c bsimcmgmpar.c bsimcmgnoise.c bsimcmgpar.c bsimcmgpzld.c bsimcmgsetup.c bsimcmgtemp.c bsimcmgtrunc.c
to : $(SRCS:%.c=%.o)
scripts = \
-e ../../admst/ngspiceVersion.xml \
-e ../../admst/analogfunction.xml \
-e ../../admst/ngspiceMODULEitf.h.xml \
-e ../../admst/ngspiceMODULEinit.c.xml \
-e ../../admst/ngspiceMODULEinit.h.xml \
-e ../../admst/ngspiceMODULEext.h.xml \
-e ../../admst/ngspiceMODULEdefs.h.xml \
-e ../../admst/ngspiceMODULEask.c.xml \
-e ../../admst/ngspiceMODULEmask.c.xml \
-e ../../admst/ngspiceMODULEpar.c.xml \
-e ../../admst/ngspiceMODULEmpar.c.xml \
-e ../../admst/ngspiceMODULEload.c.xml \
-e ../../admst/ngspiceMODULEacld.c.xml \
-e ../../admst/ngspiceMODULEpzld.c.xml \
-e ../../admst/ngspiceMODULEtemp.c.xml \
-e ../../admst/ngspiceMODULEtrunc.c.xml \
-e ../../admst/ngspiceMODULEsetup.c.xml \
-e ../../admst/ngspiceMODULEdel.c.xml \
-e ../../admst/ngspiceMODULEmdel.c.xml \
-e ../../admst/ngspiceMODULEdest.c.xml \
-e ../../admst/ngspiceMODULEnoise.c.xml \
-e ../../admst/ngspiceMODULEguesstopology.c.xml \
-e ../../admst/ngspiceMODULE.hxx.xml \
-e ../../admst/ngspiceMODULE.c.xml
$(SRCS) : do
do : bsimcmg.va
../../../../../../adms/ADMS/admsXml/admsXml $(scripts) $<