auxiliary my.mak files and %bsim6.el
This commit is contained in:
parent
3d2bd1c6e1
commit
6ad8a801ba
|
|
@ -0,0 +1,40 @@
|
|||
(compile "wget http://bsim.berkeley.edu/BSIMBULK/BSIM6.1.1_07302015.tar.gz")
|
||||
|
||||
stolen from ...
|
||||
bash ./testNgspice.sh $(pwd)/../admsXml/admsXml
|
||||
Running admsXml for Ngspice
|
||||
Using: /home/larice/s/ngspice.work/work/ngspice/adms/ADMS/testcases/../admsXml/admsXm
|
||||
|
||||
(compile "adms/ADMS/admsXml/admsXml")
|
||||
|
||||
(compile "cd src/spicelib/devices/adms/bsim6/admsva && make -if my.mak to")
|
||||
(compile "cd src/spicelib/devices/adms/bsim6 && ./build.sh")
|
||||
(ffap "src/spicelib/devices/adms/bsim6")
|
||||
|
||||
(compile "cd src/spicelib/devices/adms/hicum0/admsva && make -if my.mak to")
|
||||
(compile "cd src/spicelib/devices/adms/hicum2/admsva && make -if my.mak to")
|
||||
(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")
|
||||
|
||||
;; note only some blessed module names are accepted, see ngspiceVersion.xml
|
||||
;; here I reuse r2_cmc
|
||||
(compile "cd src/spicelib/devices/adms/ex-1/admsva && make -if my.mak to")
|
||||
|
||||
(compile "cd src/spicelib/devices/adms/bsim6/admsva && ../../../../../../adms/ADMS/admsXml/admsXml -e /home/larice/s/ngspice.work/work/ngspice/adms/ADMS/scripts/vlatovla.xml bsim6.va")
|
||||
(compile "cd src/spicelib/devices/adms/bsim6/admsva && ../../../../../../adms/ADMS/admsXml/admsXml -e /home/larice/s/ngspice.work/work/ngspice/adms/ADMS/scripts/vlatommlMODULE.htm.xml bsim6.va")
|
||||
|
||||
$vt
|
||||
$param.. in guesstopology
|
||||
and all the code in bsim..h
|
||||
|
||||
|
||||
|
||||
../../../../../../ngspice/src/spicelib/devices/adms/bsim6/bsim6guesstopology.c:694:22: error: 'T0' undeclared (first use in this function)
|
||||
NDEP_i=(NDEP_i*((1.0+T0)+T1));
|
||||
^
|
||||
|
||||
../../../../../../ngspice/src/spicelib/devices/adms/bsim6/bsim6guesstopology.c:997:3: error: 'GEOMOD' undeclared (first use in this function)
|
||||
((GEOMOD)==(0))
|
||||
|
||||
kommt in /* case */ als GEOMOD statt here->GEOMOD
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# -*- makefile -*-
|
||||
# (compile "make -i -f my.mak to")
|
||||
|
||||
CFLAGS=-I ../../../../../include -I ../../../../../../../w32/src/include
|
||||
|
||||
SRCS = \
|
||||
bsim6acld.c bsim6.analogfunction.c bsim6ask.c bsim6.c bsim6del.c bsim6dest.c bsim6guesstopology.c bsim6init.c bsim6load.c bsim6mask.c bsim6mdel.c bsim6mpar.c bsim6noise.c bsim6par.c bsim6pzld.c bsim6setup.c bsim6temp.c bsim6trunc.c
|
||||
|
||||
to : $(SRCS:%.c=%.o)
|
||||
|
||||
scripts = \
|
||||
-e ../../admst/ngspiceVersion.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 : bsim6.va
|
||||
../../../../../../adms/ADMS/admsXml/admsXml $(scripts) $<
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# -*- makefile -*-
|
||||
# (compile "make -i -f my.mak to")
|
||||
|
||||
CFLAGS=-I ../../../../../include -I ../../../../../../../w32/src/include
|
||||
|
||||
SRCS = \
|
||||
ekvacld.c ekvask.c ekv.c ekvdel.c ekvdest.c ekvguesstopology.c ekvinit.c ekvload.c ekvmask.c ekvmdel.c ekvmpar.c ekvnoise.c ekvpar.c ekvpzld.c ekvsetup.c ekvtemp.c ekvtrunc.c
|
||||
|
||||
scripts = \
|
||||
-e ../../admst/ngspiceVersion.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
|
||||
|
||||
to : $(SRCS:%.c=%.o)
|
||||
|
||||
$(SRCS) : do
|
||||
|
||||
do : ekv.va
|
||||
../../../../../../adms/ADMS/admsXml/admsXml $(scripts) $<
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
//
|
||||
// simple capacitor model
|
||||
// t R i C b
|
||||
// o——/\/\/——o——| |——o
|
||||
//
|
||||
|
||||
`include "constants.h"
|
||||
`include "discipline.h"
|
||||
|
||||
`define P_CELCIUS0 273.15
|
||||
`define TNOM (`P_CELCIUS0 + 27.0)
|
||||
|
||||
module r2_cmc(t, b);
|
||||
inout t, b;
|
||||
electrical t, b;
|
||||
electrical i;
|
||||
branch (t, i) R;
|
||||
branch (i, b) C;
|
||||
parameter real w = 1u from (0.1u : +inf);
|
||||
parameter real l = 1u from (0.1u : +inf);
|
||||
parameter real nc = 1 from [1:2];
|
||||
parameter real rsh = 1 from (0 : +inf);
|
||||
parameter real ca = 1f from (0 : +inf);
|
||||
parameter real tcr = 0;
|
||||
parameter real vc1 = 0;
|
||||
parameter real vc2 = 0;
|
||||
parameter real type = 0; // 0=n, 1=p
|
||||
analog begin : L
|
||||
real dT, rsh_t, c, r, Ir, Qc, Ceff, pwrR;
|
||||
begin : initializeModel
|
||||
dT = $temperature - `TNOM;
|
||||
rsh_t = rsh*(1.0+tcr*dT);
|
||||
end
|
||||
begin : initializeInstance
|
||||
c = w*l*ca*1e12; // unit conversion
|
||||
if (nc > 1.5)
|
||||
r = rsh_t*(w/l)/12;
|
||||
else
|
||||
r = rsh_t*(w/l)/3;
|
||||
end
|
||||
begin : evaluateStatic
|
||||
Ir = V(R)/r;
|
||||
end
|
||||
begin : evaluateDynamic
|
||||
if (type > 0.5) // inelegant
|
||||
Qc = c*V(C)*(1-V(C)*(vc1/2-V(C)*vc2/3));
|
||||
else
|
||||
Qc = c*V(C)*(1+V(C)*(vc1/2+V(C)*vc2/3));
|
||||
end
|
||||
begin : loadStatic
|
||||
I(R) <+ Ir;
|
||||
end
|
||||
begin : loadDynamic
|
||||
I(C) <+ ddt(Qc);
|
||||
end
|
||||
begin : postProcess
|
||||
if (type > 0.5)
|
||||
Ceff = c*(1.0-V(C)*(vc1/2-V(C)/3));//error!
|
||||
else
|
||||
Ceff = c*(1.0+V(C)*(vc1/2+V(C)/3));//error!
|
||||
pwrR = V(R)*Ir;
|
||||
end
|
||||
end // analog
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# -*- makefile -*-
|
||||
# (compile "make -i -f my.mak to")
|
||||
|
||||
CFLAGS=-I ../../../../../include -I ../../../../../../../w32/src/include
|
||||
|
||||
SRCS = \
|
||||
hicum0.c hicum0guesstopology.c hicum0del.c hicum0dest.c hicum0mdel.c hicum0noise.c hicum0setup.c hicum0pzld.c hicum0temp.c hicum0trunc.c hicum0acld.c hicum0load.c hicum0ask.c hicum0mask.c hicum0mpar.c hicum0par.c hic0_full.analogfunction.c hicum0init.c
|
||||
|
||||
to : $(SRCS:%.c=%.o)
|
||||
|
||||
scripts = \
|
||||
-e ../../admst/ngspiceVersion.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 : hicum0.va
|
||||
../../../../../../adms/ADMS/admsXml/admsXml $(scripts) $<
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# -*- makefile -*-
|
||||
# (compile "make -i -f my.mak to")
|
||||
|
||||
CFLAGS=-I ../../../../../include -I ../../../../../../../w32/src/include
|
||||
|
||||
SRCS = \
|
||||
hic2_full.analogfunction.c hicum2acld.c hicum2ask.c hicum2.c hicum2del.c hicum2dest.c hicum2guesstopology.c hicum2init.c hicum2load.c hicum2mask.c hicum2mdel.c hicum2mpar.c hicum2noise.c hicum2par.c hicum2pzld.c hicum2setup.c hicum2temp.c hicum2trunc.c
|
||||
|
||||
to : $(SRCS:%.c=%.o)
|
||||
|
||||
scripts = \
|
||||
-e ../../admst/ngspiceVersion.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 : hicum2.va
|
||||
../../../../../../adms/ADMS/admsXml/admsXml $(scripts) $<
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# -*- makefile -*-
|
||||
# (compile "make -i -f my.mak to")
|
||||
|
||||
CFLAGS=-I ../../../../../include -I ../../../../../../../w32/src/include
|
||||
|
||||
SRCS = \
|
||||
bjt504tacld.c bjt504task.c bjt504t.c bjt504tdel.c bjt504tdest.c bjt504tguesstopology.c bjt504tinit.c bjt504tload.c bjt504tmask.c bjt504tmdel.c bjt504tmpar.c bjt504tnoise.c bjt504tpar.c bjt504tpzld.c bjt504tsetup.c bjt504ttemp.c bjt504ttrunc.c bjt504tva.analogfunction.c
|
||||
|
||||
to : $(SRCS:%.c=%.o)
|
||||
|
||||
scripts = \
|
||||
-e ../../admst/ngspiceVersion.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 : bjt504t.va
|
||||
../../../../../../adms/ADMS/admsXml/admsXml $(scripts) $<
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# -*- makefile -*-
|
||||
# (compile "make -i -f my.mak to")
|
||||
|
||||
CFLAGS=-I ../../../../../include -I ../../../../../../../w32/src/include
|
||||
|
||||
SRCS = \
|
||||
psp102acld.c psp102ask.c psp102.c psp102del.c psp102dest.c psp102guesstopology.c psp102init.c psp102load.c psp102mask.c psp102mdel.c psp102mpar.c psp102noise.c psp102par.c psp102pzld.c psp102setup.c psp102temp.c psp102trunc.c
|
||||
|
||||
scripts = \
|
||||
-e ../../admst/ngspiceVersion.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
|
||||
|
||||
to : $(SRCS:%.c=%.o)
|
||||
|
||||
$(SRCS) : do
|
||||
|
||||
do : psp102.va
|
||||
../../../../../../adms/ADMS/admsXml/admsXml $(scripts) $<
|
||||
|
||||
Loading…
Reference in New Issue