Browse Source

take care for different types of output variables in analogfunctions

pre-master-46
dwarning 7 years ago
committed by Holger Vogt
parent
commit
9a33791bc1
  1. 33
      src/spicelib/devices/adms/admst/analogfunction.xml

33
src/spicelib/devices/adms/admst/analogfunction.xml

@ -1008,7 +1008,16 @@ static inline double _d0_vt(double arg) { (void) arg; return (1.380650
<admst:apply-templates select="." match="v2c:converttype"/><admst:text format=" %s"/> <admst:apply-templates select="." match="v2c:converttype"/><admst:text format=" %s"/>
</admst:join>) </admst:join>)
<admst:text format="\n{\n"/> <admst:text format="\n{\n"/>
<admst:text format="double $function=0.0;\n"/>
<!-- for all output declared variables -->
<admst:for-each select="variable[output='yes']">
<admst:value-of select="name"/>
<admst:apply-templates select="." match="v2c:converttype"/>
<admst:text format=" %s"/>
<admst:if test="[type='integer']">=0</admst:if>
<admst:if test="[type='real']">=0.0</admst:if>
<admst:text format=";\n"/>
</admst:for-each>
<!-- for all local declared variables -->
<admst:for-each select="variable[input='no' and output='no']"> <admst:for-each select="variable[input='no' and output='no']">
<admst:value-of select="name"/> <admst:value-of select="name"/>
<admst:apply-templates select="." match="v2c:converttype"/> <admst:apply-templates select="." match="v2c:converttype"/>
@ -1030,12 +1039,26 @@ double $(module)_d_$(function) (<admst:join select="variable[input='yes']" separ
<admst:apply-templates select="." match="v2c:converttype"/><admst:text format=" d_%s"/> <admst:apply-templates select="." match="v2c:converttype"/><admst:text format=" d_%s"/>
</admst:join>) </admst:join>)
<admst:text format="\n{\n"/> <admst:text format="\n{\n"/>
<admst:text format="double $function=0.0;\n"/>
<admst:for-each select="$globalanalogfunction/variable[input='yes']">
<!-- for all output declared variables -->
<admst:for-each select="variable[output='yes']">
<admst:value-of select="name"/> <admst:value-of select="name"/>
<admst:variable name="ddx" select="%s"/>
<admst:text format="double $(function)_$(ddx)=0.0;\n"/>
<admst:variable name="name" select="%s"/>
<admst:apply-templates select="." match="v2c:converttype"/>
<admst:text format=" $(name)"/>
<admst:if test="[type='integer']">=0</admst:if>
<admst:if test="[type='real']">=0.0</admst:if>
<admst:text format=";\n"/>
<admst:for-each select="$globalanalogfunction/variable[input='yes']">
<admst:value-of select="name"/>
<admst:variable name="ddx" select="%s"/>
<admst:apply-templates select="." match="v2c:converttype"/>
<admst:text format=" $(name)_$(ddx)"/>
<admst:if test="[type='integer']">=0</admst:if>
<admst:if test="[type='real']">=0.0</admst:if>
<admst:text format=";\n"/>
</admst:for-each>
</admst:for-each> </admst:for-each>
<!-- for all local declared variables -->
<admst:for-each select="variable[input='no' and output='no']"> <admst:for-each select="variable[input='no' and output='no']">
<admst:value-of select="name"/> <admst:value-of select="name"/>
<admst:variable name="name" select="%s"/> <admst:variable name="name" select="%s"/>

Loading…
Cancel
Save