dol: initial dol commit
[jump.git] / dol / examples / schema / architecture.xsd
1 <?xml version="1.0"?>
2 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:arch="http://www.tik.ee.ethz.ch/~shapes/schema/ARCHITECTURE" targetNamespace="http://www.tik.ee.ethz.ch/~shapes/schema/ARCHITECTURE" elementFormDefault="qualified">
3   <xsd:include schemaLocation="generics.xsd"/>
4
5   <xsd:element name="architecture">
6     <xsd:complexType>
7       <xsd:sequence minOccurs="0" maxOccurs="unbounded">
8         <xsd:element name="variable" type="arch:variable" minOccurs="0" maxOccurs="unbounded"/>
9         <xsd:element name="function" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
10         <xsd:element name="processor" type="arch:processor" minOccurs="0" maxOccurs="unbounded"/>
11         <xsd:element name="memory" type="arch:memory" minOccurs="0" maxOccurs="unbounded"/>
12         <xsd:element name="hw_channel" type="arch:hw_channel" minOccurs="0" maxOccurs="unbounded"/>
13         <xsd:element name="iterator" type="arch:generaliterator" minOccurs="0" maxOccurs="unbounded"/>
14         <xsd:element name="readpath" type="arch:readpath" minOccurs="0" maxOccurs="unbounded"/>
15         <xsd:element name="writepath" type="arch:writepath" minOccurs="0" maxOccurs="unbounded"/>
16       </xsd:sequence>
17       <xsd:attribute name="name" type="xsd:string" use="required"/>
18     </xsd:complexType>
19   </xsd:element>
20
21   <xsd:complexType name="processor">
22     <xsd:complexContent>
23       <xsd:extension base="arch:resource">
24         <xsd:attribute name="type" use="required">
25           <xsd:simpleType>
26             <xsd:restriction base="xsd:string">
27               <xsd:enumeration value="RISC"/>
28               <xsd:enumeration value="DSP"/>
29               <xsd:enumeration value="POT"/>
30               <xsd:enumeration value="NETSIM"/>
31             </xsd:restriction>
32           </xsd:simpleType>
33         </xsd:attribute>
34       </xsd:extension>
35     </xsd:complexContent>
36   </xsd:complexType>
37
38   <xsd:complexType name="memory">
39     <xsd:complexContent>
40       <xsd:extension base="arch:resource">
41         <xsd:attribute name="type" use="required">
42           <xsd:simpleType>
43             <xsd:restriction base="xsd:string">
44               <xsd:enumeration value="ROM"/>
45               <xsd:enumeration value="RAM"/>
46               <xsd:enumeration value="REG"/>
47               <xsd:enumeration value="DXM"/>
48             </xsd:restriction>
49           </xsd:simpleType>
50         </xsd:attribute>
51       </xsd:extension>
52     </xsd:complexContent>
53   </xsd:complexType>
54
55   <xsd:complexType name="hw_channel">
56     <xsd:complexContent>
57       <xsd:extension base="arch:resource">
58         <xsd:attribute name="type" use="required">
59           <xsd:simpleType>
60             <xsd:restriction base="xsd:string">
61               <xsd:enumeration value="FIFO"/>
62               <xsd:enumeration value="BUS"/>
63               <xsd:enumeration value="DMA"/>
64               <xsd:enumeration value="SPI"/>
65               <xsd:enumeration value="BRIDGE"/>
66             </xsd:restriction>
67           </xsd:simpleType>
68         </xsd:attribute>
69       </xsd:extension>
70     </xsd:complexContent>
71   </xsd:complexType>
72
73   <xsd:complexType name="resource">
74     <xsd:complexContent>
75       <xsd:extension base="arch:element">
76         <xsd:sequence>
77           <xsd:element name="append" type="arch:append" minOccurs="0" maxOccurs="unbounded"/>
78           <xsd:element name="configuration" type="arch:configuration" minOccurs="0" maxOccurs="unbounded"/>
79         </xsd:sequence>
80       </xsd:extension>
81     </xsd:complexContent>
82   </xsd:complexType>
83
84   <xsd:complexType name="writepath">
85     <xsd:sequence minOccurs="1" maxOccurs="1">
86       <xsd:element name="append" type="arch:append" minOccurs="0" maxOccurs="unbounded"/>
87       <xsd:element name="processor" type="arch:resourcereference" minOccurs="1" maxOccurs="1"/>
88       <xsd:element name="txbuf" type="arch:resourcereference" minOccurs="1" maxOccurs="1"/>
89       <xsd:element name="hw_channel" type="arch:resourcereference" minOccurs="1" maxOccurs="unbounded"/>
90       <xsd:element name="chbuf" type="arch:resourcereference" minOccurs="1" maxOccurs="1"/>
91       <xsd:element name="configuration" type="arch:configuration" minOccurs="0" maxOccurs="unbounded"/>
92     </xsd:sequence>
93     <xsd:attribute name="name" type="xsd:string" use="required"/>
94   </xsd:complexType>
95
96   <xsd:complexType name="readpath">
97     <xsd:sequence minOccurs="1" maxOccurs="1">
98       <xsd:element name="append" type="arch:append" minOccurs="0" maxOccurs="unbounded"/>
99       <xsd:element name="processor" type="arch:resourcereference" minOccurs="1" maxOccurs="1"/>
100       <xsd:element name="chbuf" type="arch:resourcereference" minOccurs="1" maxOccurs="1"/>
101       <xsd:element name="hw_channel" type="arch:resourcereference" minOccurs="1" maxOccurs="unbounded"/>
102       <xsd:element name="rxbuf" type="arch:resourcereference" minOccurs="1" maxOccurs="1"/>
103       <xsd:element name="configuration" type="arch:configuration" minOccurs="0" maxOccurs="unbounded"/>
104     </xsd:sequence>
105     <xsd:attribute name="name" type="xsd:string" use="required"/>
106   </xsd:complexType>
107
108   <xsd:complexType name="resourcereference">
109     <xsd:sequence>
110       <xsd:element name="append" type="arch:append" minOccurs="0" maxOccurs="unbounded"/>
111     </xsd:sequence>
112     <xsd:attribute name="name" type="xsd:string" use="required"/>
113   </xsd:complexType>
114
115   <xsd:complexType name="generaliterator">
116     <xsd:complexContent>
117       <xsd:extension base="arch:iterator">
118         <xsd:sequence minOccurs="0" maxOccurs="unbounded">
119           <xsd:element name="readpath" type="arch:readpath" minOccurs="0" maxOccurs="unbounded"/>
120           <xsd:element name="writepath" type="arch:writepath" minOccurs="0" maxOccurs="unbounded"/>     
121           <xsd:element name="processor" type="arch:processor" minOccurs="0" maxOccurs="unbounded"/>
122           <xsd:element name="memory" type="arch:memory" minOccurs="0" maxOccurs="unbounded"/>
123           <xsd:element name="hw_channel" type="arch:hw_channel" minOccurs="0" maxOccurs="unbounded"/>
124           <xsd:element name="iterator" type="arch:generaliterator" minOccurs="0" maxOccurs="unbounded"/>
125         </xsd:sequence>
126       </xsd:extension>
127     </xsd:complexContent>
128   </xsd:complexType>
129
130 </xsd:schema>