Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADMS does not set the "output" element of variables per Verilog-A standard #72

Open
tvrusso opened this issue Jul 11, 2017 · 0 comments

Comments

@tvrusso
Copy link

tvrusso commented Jul 11, 2017

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.

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant