File: arobavariable.xml

package info (click to toggle)
adms 2.3.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,592 kB
  • sloc: xml: 7,167; perl: 4,866; ansic: 3,147; lex: 1,128; yacc: 691; sh: 323; makefile: 110
file content (73 lines) | stat: -rw-r--r-- 2,546 bytes parent folder | download | duplicates (4)
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
71
72
73
<?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 arobavariable.xml
  Description: create file arobavariable.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 arobavariable.va -->
  <admst:variable name="module1" select="arobavariable"/>
  <admst:open file="$(module1).va">
`include &quot;discipline.h&quot;
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 : A
      real a,b;
      a=1;
      b=1;
    end
    begin : B
      a=1;
      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:push into="@(%(upper-case(module)))" select="module"/>
    <admst:push into="@scope" select="block/name"/>
    <admst:push into="@itself" select="."/>
    <admst:text format="set %(@(%(upper-case(module)))).%(@scope).%(@itself)\n"/>
  </admst:template>
  <admst:for-each select="/module/assignment">
    <admst:apply-templates select="lhs" match="iterate"/>
  </admst:for-each>
  <admst:text select="/module/assignment/lhs" format="check %(@AROBAVARIABLE/datatypename).%(@scope).%(@itself)\n"/>
</admst>