You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Verilog-A standard (http://www.accellera.org/images/downloads/standards/v-ams/VAMS-LRM-2-4.pdf, section 3.2.1) states that module-scoped variables that have "desc" and/or "units" attributes should be considered "output variables". Output variables would typically be used for .OP output and other purposes.
ADMS does NOT set the "output" field of the variableprototype at all, even though the commentary in the adms.xml file indicates that this is what it should mean.
For Xyce, we're looking into how to add capability to our back-end to generate appropriate code to provide access to such variables from a netlist. Having this output field set right would have helped.
For the time being, we're working around it by having a little preprocessing template that sets the "output" flag ourselves. This is it:
<admst:template match="markOutputVariables">
<admst:for-each select="variable[input!='yes' and (exists(attribute[name='desc']) or exists(attribute[name='units'])) and module/name=block/name]">
<admst:value-to select="output" string="yes"/>
</admst:for-each>
</admst:template>
One would simply apply this template at the top of a back-end to get all the output marking right.
<admst:apply-templates select="/module" match="markOutputVariables"/>
It would be good if adms.implicit.xml did something like this already.
The text was updated successfully, but these errors were encountered:
tvrusso
added a commit
to tvrusso/ADMS
that referenced
this issue
Nov 28, 2022
Per issue Qucs#72, the implicit rules in adms.implicit.xml only
flag a variable in the data tree with "output=yes" in the data tree if
they have the attribute 'ask="yes"'.
The LRM (Verilog-AMS LRM version 2.4, section 3.2.1) says that
module-scoped variables with either "desc" or "units" attributes
should be designated as output variables.
This commit modifies adms.implicit.xml to set the "output" field of the
data tree to "yes" if the variable is not an input
variable (parameter) and is module scoped, and if it has either a "desc"
or a "units" (or both) attribute.
The Xyce team has been using a patched adms.implicit.xml with this
modification for a couple of years, and I had simply forgotten that
I'd opened issue Qucs#72 asking that it be done in ADMS itself.
Qucs#72
Per issue Qucs#72, the implicit rules in adms.implicit.xml only
flag a variable in the data tree with "output=yes" in the data tree if
they have the attribute 'ask="yes"'.
The LRM (Verilog-AMS LRM version 2.4, section 3.2.1) says that
module-scoped variables with either "desc" or "units" attributes
should be designated as output variables.
This commit modifies adms.implicit.xml to set the "output" field of the
data tree to "yes" if the variable is not an input
variable (parameter) and is module scoped, and if it has either a "desc"
or a "units" (or both) attribute.
The Xyce team has been using a patched adms.implicit.xml with this
modification for a couple of years, and I had simply forgotten that
I'd opened issue Qucs#72 asking that it be done in ADMS itself.
Qucs#72
The Verilog-A standard (http://www.accellera.org/images/downloads/standards/v-ams/VAMS-LRM-2-4.pdf, section 3.2.1) states that module-scoped variables that have "desc" and/or "units" attributes should be considered "output variables". Output variables would typically be used for .OP output and other purposes.
ADMS does NOT set the "output" field of the variableprototype at all, even though the commentary in the adms.xml file indicates that this is what it should mean.
For Xyce, we're looking into how to add capability to our back-end to generate appropriate code to provide access to such variables from a netlist. Having this output field set right would have helped.
For the time being, we're working around it by having a little preprocessing template that sets the "output" flag ourselves. This is it:
<admst:template match="markOutputVariables">
<admst:for-each select="variable[input!='yes' and (exists(attribute[name='desc']) or exists(attribute[name='units'])) and module/name=block/name]">
<admst:value-to select="output" string="yes"/>
</admst:for-each>
</admst:template>
One would simply apply this template at the top of a back-end to get all the output marking right.
<admst:apply-templates select="/module" match="markOutputVariables"/>
It would be good if adms.implicit.xml did something like this already.
The text was updated successfully, but these errors were encountered: