Updated the code for ekv model.

This commit is contained in:
pnenzi 2007-05-13 09:55:13 +00:00
parent 61a324fec5
commit 613deca2f7
3 changed files with 63 additions and 7 deletions

View File

@ -687,11 +687,15 @@ if test "$enable_adms" = "yes"; then
VLADEVDIR=" adms/hicum0 \
adms/hicum2 \
adms/mextram "
adms/mextram \
adms/ekv \
adms/psp102 "
VLADEV=" spicelib/devices/adms/hicum0/libhicum0.a \
spicelib/devices/adms/hicum2/libhicum2.a \
spicelib/devices/adms/mextram/libmextram.a "
spicelib/devices/adms/mextram/libmextram.a \
spicelib/devices/adms/ekv/libekv.a \
spicelib/devices/adms/psp102/libpsp102.a "
fi
AC_SUBST(ADMSXML)
@ -795,6 +799,7 @@ src/spicelib/devices/Makefile \
src/spicelib/devices/adms/hicum0/Makefile \
src/spicelib/devices/adms/hicum2/Makefile \
src/spicelib/devices/adms/mextram/Makefile \
src/spicelib/devices/adms/ekv/Makefile \
src/spicelib/devices/adms/psp102/Makefile \
src/spicelib/devices/asrc/Makefile \
src/spicelib/devices/bjt/Makefile \

View File

@ -5,7 +5,11 @@
-->
<!--
$Log$
Revision 1.18 2007-05-11 07:19:58 r29173
Revision 1.19 2007-05-13 09:55:14 pnenzi
Updated the code for ekv model.
Revision 1.18 2007/05/11 07:19:58 r29173
added support to 'div' builtin function
Revision 1.17 2007/05/02 14:56:49 r29173
@ -2107,6 +2111,53 @@
</admst:new>
</admst:if>
</admst:when>
<admst:when test="[name='ekv']">
<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

@ -176,15 +176,15 @@ int add_udn(int,Evt_Udn_Info_t **);
#ifdef NDEV
#ifdef XSPICE
static int DEVNUM = 52;
static int DEVNUM = 53; /* was 52 */
#else
#define DEVNUM 52
#define DEVNUM 53 /* was 52 */
#endif
#else /* no ndev */
#ifdef XSPICE
static int DEVNUM = 51;
static int DEVNUM = 52; /* was 51 */
#else
#define DEVNUM 51
#define DEVNUM 52 /* was 51 */
#endif
#endif /* NDEV */