working myvares example
This commit is contained in:
parent
d8755d681c
commit
347e4453e0
|
|
@ -2,5 +2,6 @@
|
|||
|
||||
// load the adms shared library model
|
||||
admsmodel hicum0 UQ
|
||||
admsmodel myvares UQ
|
||||
|
||||
source hic0.cir
|
||||
|
|
|
|||
10
hic0.cir
10
hic0.cir
|
|
@ -5,10 +5,18 @@ VB B 0 0.5
|
|||
VC C 0 2.0
|
||||
VS S 0 0.0
|
||||
X1 C B 0 S hicumL0V1p1_c_sbt
|
||||
|
||||
Vfoo 98 0 120.0
|
||||
r111 98 99 1
|
||||
qfoo 99 0 myvares_model
|
||||
.model myvares_model myvares myr=39
|
||||
|
||||
.control
|
||||
dc vb 0.2 1.0 0.5
|
||||
run
|
||||
print i(vc)
|
||||
print i(vc) i(vfoo)
|
||||
*show all
|
||||
*showmod all
|
||||
.endc
|
||||
.subckt hicumL0V1p1_c_sbt c b e s
|
||||
qhcm0 c b e s 0 hic0_full
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
device=myvares
|
||||
|
||||
top_srcdir=/where/is/ngspice
|
||||
srcdir=$(top_srcdir)/src/spicelib/devices/adms/$(device)/adms3va
|
||||
|
||||
top_builddir=/where/to/build
|
||||
|
||||
ADMSXMLINTERFACE=$(top_srcdir)/src/spicelib/devices/adms/admst
|
||||
include $(ADMSXMLINTERFACE)/makefile.adms3
|
||||
|
||||
|
||||
all: lib$(device).so
|
||||
|
||||
clean:
|
||||
rm -f $(CLEANFILES)
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
// Resistor
|
||||
|
||||
`include "constants.h"
|
||||
`include "discipline.h"
|
||||
|
||||
module myvares(p,n);
|
||||
inout p,n;
|
||||
electrical p,n;
|
||||
(*spice_name="myr", info="my resistance"*) parameter real myr= 13.0 from [0:inf);
|
||||
|
||||
// analog
|
||||
// V(p,n) <+ myr*I(p,n);
|
||||
|
||||
analog
|
||||
I(p,n) <+ V(p,n)/myr;
|
||||
|
||||
endmodule
|
||||
|
|
@ -19,10 +19,12 @@
|
|||
|
||||
(compile "LC_ALL=C make -C src/spicelib/devices/adms/ekv/adms3va top_srcdir=$(pwd) top_builddir=$(readlink -f ../build-adms3) ADMS=$(readlink -f ../../adms/adms-2.3.0-1500/admsXml)")
|
||||
(compile "LC_ALL=C make -C src/spicelib/devices/adms/hicum0/adms3va top_srcdir=$(pwd) top_builddir=$(readlink -f ../build-adms3) ADMS=$(readlink -f ../../adms/adms-2.3.0-1500/admsXml)")
|
||||
(compile "LC_ALL=C make -C src/spicelib/devices/adms/myvares/adms3va top_srcdir=$(pwd) top_builddir=$(readlink -f ../build-adms3) ADMS=$(readlink -f ../../adms/adms-2.3.0-1500/admsXml)")
|
||||
|
||||
|
||||
(compile "LC_ALL=C make -C src/spicelib/devices/adms/ekv/adms3va top_srcdir=$(pwd) clean")
|
||||
(compile "LC_ALL=C make -C src/spicelib/devices/adms/hicum0/adms3va top_srcdir=$(pwd) clean")
|
||||
(compile "LC_ALL=C make -C src/spicelib/devices/adms/myvares/adms3va top_srcdir=$(pwd) clean")
|
||||
|
||||
|
||||
;;; jetzt passts, ergebnis wie bei laurent ? check ...
|
||||
|
|
@ -33,7 +35,8 @@
|
|||
../build-wip-adms3/src/ngspice -b hic0.cir")
|
||||
|
||||
|
||||
(compile "LD_LIBRARY_PATH=src/spicelib/devices/adms/hicum0/adms3va \
|
||||
(compile% "LC_ALL=C make -j3")
|
||||
(compile "LD_LIBRARY_PATH=src/spicelib/devices/adms/hicum0/adms3va:src/spicelib/devices/adms/myvares/adms3va \
|
||||
../build-wip-adms3/src/ngspice -p < hic0+.cir")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue