]> AND Private Git Repository - blast.git/blob - reference.xsd
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
changed ref/impls xsd and xml
[blast.git] / reference.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3
4     <!-- déclaration des groupes d'attributs -->
5
6     <xs:attributeGroup name="parameterAttrGroup">
7       <xs:attribute ref="name" use="required"/>
8         <xs:attribute name="type" type="typeparam" use="required"/>
9         <xs:attribute ref="wishbone" use="optional"/>
10         <xs:attribute ref="value" use="optional"/>
11         <xs:attribute ref="iface" use="optional"/>
12         <xs:attribute ref="width" use="optional"/>      
13         <xs:attribute name="context" type="typecontext" use="required"/>
14     </xs:attributeGroup>
15
16     <xs:attributeGroup name="inOutAttrGroup">
17         <xs:attribute ref="name" use="required"/>
18         <xs:attribute ref="width" use="required"/>
19         <xs:attribute name="type" type="typeiface"/>
20         <xs:attribute name="purpose" type="typepurpose" use="optional"/>
21         <xs:attribute ref="multiplicity"/>
22         <xs:attribute name="endian" type="typeendian" use="optional"/>
23         <xs:attribute ref="clock" use="optional"/>
24     </xs:attributeGroup>
25
26
27     <!-- déclaration des attributs -->
28
29     <xs:attribute name="ids" type="xs:string"/>
30     <xs:attribute name="name" type="xs:string"/>
31     <xs:attribute name="clock" type="xs:string"/>
32
33     <xs:simpleType name="typeparam">
34       <xs:restriction base="xs:string">
35         <xs:enumeration value="string"/>
36         <xs:enumeration value="expression"/>
37         <xs:enumeration value="boolean"/>
38         <xs:enumeration value="integer"/>
39         <xs:enumeration value="natural"/>
40         <xs:enumeration value="positive"/>
41         <xs:enumeration value="real"/>
42         <xs:enumeration value="time"/>
43       </xs:restriction>
44     </xs:simpleType>
45
46     <xs:simpleType name="typeiface">
47       <xs:restriction base="xs:string">
48         <xs:enumeration value="expression"/>
49         <xs:enumeration value="boolean"/>
50         <xs:enumeration value="natural"/>
51       </xs:restriction>
52     </xs:simpleType>
53     
54     <xs:simpleType name="typeendian">
55       <xs:restriction base="xs:string">
56         <xs:enumeration value="little"/>
57         <xs:enumeration value="big"/>
58       </xs:restriction>
59     </xs:simpleType>
60
61     <xs:simpleType name="typecontext">
62       <xs:restriction base="xs:string">
63         <xs:enumeration value="generic"/>
64         <xs:enumeration value="user"/>
65         <xs:enumeration value="wb"/>
66         <xs:enumeration value="port"/>
67       </xs:restriction>
68     </xs:simpleType>
69
70     <xs:simpleType name="typepurpose">
71       <xs:restriction base="xs:string">
72         <xs:enumeration value="data"/>
73         <xs:enumeration value="clock"/>
74         <xs:enumeration value="reset"/>
75         <xs:enumeration value="wb"/>    
76       </xs:restriction>
77     </xs:simpleType>
78     
79     <xs:attribute name="wishbone" type="xs:string"/>
80     <xs:attribute name="multiplicity" type="xs:string" />
81     <xs:attribute name="width" type="xs:string"/>
82     <xs:attribute name="value" type="xs:string"/>
83     <xs:attribute name="iface" type="xs:string"/>
84     <xs:attribute name="path" type="xs:string" />
85
86
87     <!-- déclaration des groupes d'éléments -->
88
89     <xs:group name="blockElmtGroup">
90         <xs:sequence>
91             <xs:element ref="informations"/>
92             <xs:element ref="parameters"/>
93             <xs:element ref="interfaces"/>
94             <xs:element ref="implementations" minOccurs="0"/>
95         </xs:sequence>
96     </xs:group>
97
98     <xs:group name="informationsElmtGroup">
99         <xs:sequence>
100             <xs:element ref="name"/>
101             <xs:element ref="category"/>
102             <xs:element name="description" type="xs:string"/>
103         </xs:sequence>
104     </xs:group>
105
106     <xs:group name="interfacesElmtGroup">
107         <xs:sequence>
108             <xs:element ref="inputs" minOccurs="0"/>
109             <xs:element ref="outputs" minOccurs="1"/>
110             <xs:element ref="bidirs" minOccurs="0"/>
111         </xs:sequence>
112     </xs:group>
113
114
115     <!-- déclaration des éléments -->
116
117     <xs:element name="informations">
118         <xs:complexType>
119             <xs:group ref="informationsElmtGroup"/>
120         </xs:complexType>
121     </xs:element>
122
123     <xs:element name="name" type="xs:string" />
124
125     <xs:element name="category">
126         <xs:complexType>
127             <xs:attribute ref="ids" use="required"/>
128         </xs:complexType>
129     </xs:element>
130
131     <xs:element name="parameters">
132         <xs:complexType>
133             <xs:sequence>
134                 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
135             </xs:sequence>
136         </xs:complexType>
137     </xs:element>
138
139     <xs:element name="parameter">
140         <xs:complexType>
141             <xs:attributeGroup ref="parameterAttrGroup"/>
142         </xs:complexType>
143     </xs:element>
144
145     <xs:element name="interfaces">
146         <xs:complexType>
147             <xs:group ref="interfacesElmtGroup"/>
148         </xs:complexType>
149     </xs:element>
150
151     <xs:element name="control">
152         <xs:complexType>
153             <xs:attribute ref="iface"/>
154         </xs:complexType>
155     </xs:element>
156
157     <xs:element name="inputs">
158         <xs:complexType>
159             <xs:sequence>
160               <xs:element ref="input" maxOccurs="unbounded" />
161               <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
162             </xs:sequence>
163         </xs:complexType>
164     </xs:element>
165
166     <xs:element name="input">
167         <xs:complexType>
168             <xs:attributeGroup ref="inOutAttrGroup"/>
169         </xs:complexType>
170     </xs:element>
171
172     <xs:element name="outputs">
173         <xs:complexType>
174             <xs:sequence>
175               <xs:element ref="output" maxOccurs="unbounded" />
176               <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
177             </xs:sequence>
178         </xs:complexType>
179     </xs:element>
180
181     <xs:element name="output">
182         <xs:complexType>
183             <xs:attributeGroup ref="inOutAttrGroup"/>
184         </xs:complexType>
185     </xs:element>
186
187     <xs:element name="bidirs">
188         <xs:complexType>
189             <xs:sequence>
190                 <xs:element ref="bidir" maxOccurs="unbounded" />
191             </xs:sequence>
192         </xs:complexType>
193     </xs:element>
194
195     <xs:element name="bidir">
196         <xs:complexType>
197             <xs:attributeGroup ref="inOutAttrGroup"/>
198         </xs:complexType>
199     </xs:element>
200
201     <xs:element name="implementations">
202         <xs:complexType>
203             <xs:sequence>
204                 <xs:element ref="implementation" maxOccurs="unbounded" />
205             </xs:sequence>
206         </xs:complexType>
207     </xs:element>
208
209     <xs:element name="implementation">
210         <xs:complexType>
211             <xs:attribute ref="path" use="required" />
212         </xs:complexType>
213     </xs:element>
214
215
216     <!-- Racine du document -->
217
218     <xs:element name="block">
219       <xs:complexType>
220         <xs:group ref="blockElmtGroup"/>
221         <xs:attribute name="version" type="xs:string" use="optional" />
222         <xs:attribute name="special" type="xs:nonNegativeInteger" use="optional" />
223       </xs:complexType>
224     </xs:element>
225
226 </xs:schema>