1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
This file is part of adms - http://sourceforge.net/projects/mot-adms.
adms is a code generator for the Verilog-AMS language.
Copyright (C) 2002-2012 Laurent Lemaitre <r29173@users.sourceforge.net>
This program 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 3 of the License, or
(at your option) any later version.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!DOCTYPE admst PUBLIC "-//adms//DTD admst 2.0//-" "http://mot-adms.sourceforge.net/xml-files/adms/admst.dtd">
<!--
Usage: admsXml -e croixvariable.xml
Description: create file croixvariable.va, then test implementation of #... construct
-->
<!--
$Id: getinstance.xml 505 2007-01-23 11:17:43Z r29173 $
$Log$
-->
<admst version="2.3.0" xmlns:admst="http://mot-adms.svn.sourceforge.net/viewvc/*checkout*/mot-adms/trunk/adms/admst.dtd">
<!-- create file croixvariable.va -->
<admst:variable name="module1" select="croixvariable"/>
<admst:open file="$(module1).va">
`include "discipline.h"
module $(module1)(p,n);
inout p, n;
electrical p, n;
parameter real A=1.0;
parameter real B=1.0;
real a,b;
analog
begin
begin : Loc
real a,b;
(*eq="Eq.1"*) a=1;
(*eq="Eq.2"*) b=1;
end
begin : Glob
(*eq="Eq.1"*) a=1;
(*eq="Eq.2"*) b=1;
end
end
endmodule
</admst:open>
<admst:message format="$(module1).va: file created\n"/>
<admst:read file="$(module1).va"/>
<admst:apply-templates select="module[name='$(module1)']" match="adms.implicit.xml.module"/>
<!-- test #... construct -->
<admst:template match="iterate">
<admst:value-to select="#insource" path="../attribute[name='eq']/value"/>
<admst:text format="set %(.)#insource=%(#insource)\n"/>
</admst:template>
<admst:apply-templates select="/module/reverse(assignment)/lhs" match="iterate"/>
<admst:text select="/module/reverse(assignment)/lhs" format="check %(block/name):%(.)#insource=%(#insource)\n"/>
<admst:value-to select="/#a" path="module/variable"/>
<admst:text format="-- %(/#a/datatypename)\n"/>
</admst>
|