Added support for pole-zero analysis (experimental).
This commit is contained in:
parent
cbbde0437d
commit
cf7e5f8d67
|
|
@ -3,7 +3,11 @@
|
|||
<!--
|
||||
$Id$
|
||||
$Log$
|
||||
Revision 1.3 2006-02-21 08:05:18 dwarning
|
||||
Revision 1.4 2006-02-26 22:09:02 pnenzi
|
||||
|
||||
Added support for pole-zero analysis (experimental).
|
||||
|
||||
Revision 1.3 2006/02/21 08:05:18 dwarning
|
||||
Introduction of alias names for modules to prevent cryptic naming.
|
||||
|
||||
Revision 1.2 2006/02/02 17:56:31 pnenzi
|
||||
|
|
@ -94,7 +98,7 @@ SPICEdev $(module)info = {
|
|||
NULL, /* DEVsetic */
|
||||
$(module)ask, /* DEVask */
|
||||
$(module)mAsk, /* DEVmodAsk */
|
||||
NULL, /* DEVpzLoad */
|
||||
$(module)pzLoad, /* DEVpzLoad */
|
||||
NULL, /* DEVconvTest */
|
||||
NULL, /* DEVsenSetup */
|
||||
NULL, /* DEVsenLoad */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
$Id$
|
||||
$Log$
|
||||
Revision 1.1 2006-02-26 22:09:03 pnenzi
|
||||
|
||||
Added support for pole-zero analysis (experimental).
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
adms is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.1.3" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#include "ngspice.h"
|
||||
#include "cktdefs.h"
|
||||
#include "complex.h"
|
||||
#include "$(module)defs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int $(module)pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
||||
{
|
||||
register $(module)model *model = ($(module)model*)inModel;
|
||||
register $(module)instance *here;
|
||||
for ( ; model != NULL; model = model->$(module)nextModel )
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance)
|
||||
{
|
||||
<admst:for-each select="jacobian[static='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s)+=here->JSVAL_%s_%s *(s->real);\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="jacobian[dynamic='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s)+=here->JDVAL_%s_%s *(s->real);\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="jacobian[dynamic='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s+1)+=here->JDVAL_%s_%s *(s->imag);\n"/>
|
||||
</admst:for-each>
|
||||
} /* End of MOSFET Instance */
|
||||
} /* End of Model Instance */
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%spzld.c">
|
||||
<admst:value-of select="/simulator/package_string"/>
|
||||
<admst:text format="/***\n*** Interface: %s\n"/>
|
||||
<admst:value-of select="/simulator/currentdate"/>
|
||||
<admst:value-of select="/simulator/fullname"/>
|
||||
<admst:text format=" *** created by: %s - %s ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%spzld.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -3,7 +3,11 @@
|
|||
<!--
|
||||
$Id$
|
||||
$Log$
|
||||
Revision 1.7 2006-02-21 18:32:04 pnenzi
|
||||
Revision 1.8 2006-02-26 22:09:01 pnenzi
|
||||
|
||||
Added support for pole-zero analysis (experimental).
|
||||
|
||||
Revision 1.7 2006/02/21 18:32:04 pnenzi
|
||||
|
||||
Added cleanfile target to remove generated .c and .h and .c.bak
|
||||
|
||||
|
|
@ -75,6 +79,7 @@ $(module).c:
|
|||
-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)/ngspiceMODULEsetup.c.xml \\
|
||||
-e \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\
|
||||
|
|
@ -97,6 +102,7 @@ lib$(module)_a_SOURCES = \\
|
|||
$(module)mask.c \\
|
||||
$(module)mpar.c \\
|
||||
$(module)par.c \\
|
||||
$(module)pzld.c \\
|
||||
$(module)setup.c \\
|
||||
$(module)temp.c
|
||||
|
||||
|
|
@ -114,6 +120,7 @@ BUILT_SOURCES = \\
|
|||
$(module)mask.c \\
|
||||
$(module)mpar.c \\
|
||||
$(module)par.c \\
|
||||
$(module)pzld.c \\
|
||||
$(module)setup.c \\
|
||||
$(module)temp.c
|
||||
|
||||
|
|
@ -132,6 +139,7 @@ CLEANFILES = \\
|
|||
$(module)mask.c \\
|
||||
$(module)mpar.c \\
|
||||
$(module)par.c \\
|
||||
$(module)pzld.c \\
|
||||
$(module)setup.c \\
|
||||
$(module)temp.c
|
||||
|
||||
|
|
@ -143,7 +151,6 @@ CLEANFILES = \\
|
|||
$(module)getic.c \\
|
||||
$(module)mdel.c \\
|
||||
$(module)noise.c \\
|
||||
$(module)pzld.c \\
|
||||
$(module)trunc.c
|
||||
|
||||
INCLUDES = -I\$(top_srcdir)/src/include
|
||||
|
|
|
|||
Loading…
Reference in New Issue