First commit for EKV model support (as a not source model).

This commit is contained in:
pnenzi 2001-05-13 13:24:12 +00:00
parent 20948c8d1c
commit 3d557b762b
5 changed files with 46 additions and 11 deletions

View File

@ -28,3 +28,9 @@
/* Define if we want noise integration code */
#undef INT_NOISE
/* Undefine HAVE_EKV since it is not included in the standard distribution */
#undef HAVE_EKV
/* Undefine HAVE_GNUREADLINE */
#undef HAVE_GNUREADLINE

View File

@ -44,10 +44,9 @@ dnl --enable-experimental : define EXPERIMENTAL_CODE for the code
AC_ARG_ENABLE(experimental,
[ --enable-experimental Enables some experimental code])
dnl --have-ekv: define HAVE_EKV in the code. This is for EKV model support
dnl --enable-ekv: define HAVE_EKV in the code. This is for EKV model support
AC_ARG_ENABLE(ekv,
[ --enable-ekv Enable ekv model *not in standard distribution*])
[ --enable-ekv Enables ekv model *not in standard distribution*])
dnl Enable maintainer commands only if requested
AM_MAINTAINER_MODE
@ -182,10 +181,6 @@ dnl Check for getopt function and if not found uses a local copy:
AC_CHECK_FUNC(getopt, GETOPTSRC="", GETOPTSRC= "getopt.h getopt.c getopt1.c")
AC_SUBST(GETOPTSRC)
AC_MSG_RESULT(Checking for readline library:)
dnl Check for the readline library
AC_CHECK_LIB(readline, AC_DEFINE(HAVE_GNUREADLINE) LIBS="$LIBS -lreadline")
# Expand the prefix variable (this is really annoying!)
if eval "test x$prefix = xNONE"; then
dprefix=$ac_default_prefix
@ -220,11 +215,28 @@ if test "$enable_experimental" = "yes"; then
AC_DEFINE(EXPERIMENTAL_CODE)
AC_MSG_RESULT(EXPERIMENTAL_CODE enabled)
fi
if test "$enable_ekv" = "yes"; then
AC_DEFINE(HAVE_EKV)
AC_MSG_RESULT(Model EKV included)
EKVDIR=ekv
AC_DEFINE(HAVE_EKV)
EKVDIR="ekv"
EKVLIB="spicelib/devices/ekv/libekv.la"
else
EKVDIR=""
EKVLIB=""
fi
AC_SUBST(EKVDIR)
AC_SUBST(EKVLIB)
dnl --with-readline : the user wants to use readline library
AC_ARG_WITH(readline,
[ --with-readline Use the readline package: SEE README],
AC_MSG_RESULT(Checking for readline library:)
dnl Check for the readline library:
AC_CHECK_LIB(readline,readline, AC_DEFINE(HAVE_GNUREADLINE) LIBS="$LIBS -lreadline")
)
AC_OUTPUT( \
@ -253,7 +265,7 @@ src/spicelib/devices/cccs/Makefile \
src/spicelib/devices/ccvs/Makefile \
src/spicelib/devices/csw/Makefile \
src/spicelib/devices/dio/Makefile \
src/spicelib/devices/dio/Makefile \
src/spicelib/devices/ekv/Makefile \
src/spicelib/devices/ind/Makefile \
src/spicelib/devices/isrc/Makefile \
src/spicelib/devices/hfet1/Makefile \

View File

@ -34,6 +34,7 @@ DYNAMIC_DEVICELIBS = \
spicelib/devices/ccvs/libccvs.la \
spicelib/devices/csw/libcsw.la \
spicelib/devices/dio/libdio.la \
@EKVLIB@ \
spicelib/devices/ind/libind.la \
spicelib/devices/isrc/libisrc.la \
spicelib/devices/hfet1/libhfet.la \

View File

@ -18,6 +18,7 @@ SUBDIRS = \
ccvs \
csw \
dio \
@EKVDIR@ \
ind \
isrc \
hfet1 \

View File

@ -35,7 +35,10 @@
#include "dev.h"
#define DEVICES_USED "asrc bjt bjt2 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"
#define DEVICES_USED "asrc bjt bjt2 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 (ekv)"
/*
* Analyses
@ -93,8 +96,15 @@
#include "vcvs/vcvsitf.h"
#include "vsrc/vsrcitf.h"
#ifdef HAVE_EKV
#include "ekv/ekvitf.h"
#define DEVNUM 41
#else
#define DEVNUM 40
#endif
SPICEdev *DEVices[DEVNUM];
@ -144,7 +154,12 @@ spice_init_devices(void)
DEVices[37] = get_vccs_info();
DEVices[38] = get_vcvs_info();
DEVices[39] = get_vsrc_info();
#ifdef HAVE_EKV
DEVices[40] = get_ekv_info();
assert(41 == DEVNUM);
#else
assert(40 == DEVNUM);
#endif
}