1 changed files with 104 additions and 0 deletions
@ -0,0 +1,104 @@ |
|||
<?xml version="1.0" encoding="ISO-8859-1"?> |
|||
|
|||
<!-- |
|||
$Id$ |
|||
$Log$ |
|||
Revision 1.1 2007-07-05 09:45:33 r29173 |
|||
started noise implementation (added just a template!) |
|||
|
|||
Revision 1.2 2006/03/05 09:38:41 pnenzi |
|||
|
|||
Updated version to 2.2.0 |
|||
|
|||
Revision 1.1 2006/03/01 14:30:24 pnenzi |
|||
|
|||
Added mdel, del and dest functions to interface. |
|||
|
|||
--> |
|||
|
|||
<!-- |
|||
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.2.7" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst"> |
|||
|
|||
<admst:template match="code"> |
|||
<admst:variable name="module" select="%(attribute[name='ngspicename']/value)"/> |
|||
|
|||
#include "ngspice.h" |
|||
#include "$(module)defs.h" |
|||
#include "cktdefs.h" |
|||
#include "iferrmsg.h" |
|||
#include "noisedef.h" |
|||
#include "suffix.h" |
|||
|
|||
extern void NevalSrc(); |
|||
extern double Nintegrate(); |
|||
|
|||
static char* $(module)nNames []= { |
|||
<admst:text select="contribution[flickernoise='yes']" format=""","/> |
|||
<admst:text select="contribution[whitenoise='yes']" format=""","/> |
|||
<admst:text format=""""/> |
|||
}; |
|||
|
|||
int |
|||
$(module)noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) |
|||
{ |
|||
$(module)model *firstModel = ($(module)model *) genmodel; |
|||
$(module)model *model; |
|||
$(module)instance *inst; |
|||
for (model=firstModel; model != NULL; model=model->$(module)nextModel) |
|||
{ |
|||
for (inst=model->$(module)instances; inst != NULL; inst=inst->$(module)nextInstance) |
|||
{ |
|||
if (inst->$(module)owner != ARCHme) continue; |
|||
switch (operation) |
|||
{ |
|||
case N_OPEN: |
|||
break; |
|||
case N_CALC: |
|||
switch (mode) |
|||
{ |
|||
case N_DENS: |
|||
break; |
|||
case INT_NOIZ: |
|||
break; |
|||
} |
|||
break; |
|||
case N_CLOSE: |
|||
return (OK); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
</admst:template> |
|||
|
|||
<admst:for-each select="/module"> |
|||
<admst:open file="%(attribute[name='ngspicename']/value)noise.c"> |
|||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/> |
|||
<admst:text format=" *** created by: %(/simulator/fullname) - %(/simulator/currentdate) ***/\n"/> |
|||
<admst:apply-templates select="." match="code"/> |
|||
</admst:open> |
|||
<admst:message format="%(attribute[name='ngspicename']/value)noise.c: file created\n"/> |
|||
</admst:for-each> |
|||
|
|||
</admst> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue