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

Private GIT Repository
added clk/rst link when creating a block
[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 ref="description"/>
103         </xs:sequence>
104     </xs:group>
105
106     <xs:group name="descriptionElmtGroup">
107         <xs:sequence>
108             <xs:element ref="brief"/>
109             <xs:element ref="detailed"/>
110         </xs:sequence>
111     </xs:group>
112
113     <xs:group name="interfacesElmtGroup">
114         <xs:sequence>
115             <xs:element ref="inputs" minOccurs="0"/>
116             <xs:element ref="outputs" minOccurs="1"/>
117             <xs:element ref="bidirs" minOccurs="0"/>
118         </xs:sequence>
119     </xs:group>
120
121
122     <!-- déclaration des éléments -->
123
124     <xs:element name="informations">
125         <xs:complexType>
126             <xs:group ref="informationsElmtGroup"/>
127         </xs:complexType>
128     </xs:element>
129
130     <xs:element name="name" type="xs:string" />
131
132     <xs:element name="category">
133         <xs:complexType>
134             <xs:attribute ref="ids" use="required"/>
135         </xs:complexType>
136     </xs:element>
137
138     <xs:element name="description">
139         <xs:complexType>
140             <xs:group ref="descriptionElmtGroup"/>
141         </xs:complexType>
142     </xs:element>
143
144     <xs:element name="brief" type="xs:string" />
145
146     <xs:element name="detailed" type="xs:string" />
147
148     <xs:element name="parameters">
149         <xs:complexType>
150             <xs:sequence>
151                 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
152             </xs:sequence>
153         </xs:complexType>
154     </xs:element>
155
156     <xs:element name="parameter">
157         <xs:complexType>
158             <xs:attributeGroup ref="parameterAttrGroup"/>
159         </xs:complexType>
160     </xs:element>
161
162     <xs:element name="interfaces">
163         <xs:complexType>
164             <xs:group ref="interfacesElmtGroup"/>
165         </xs:complexType>
166     </xs:element>
167
168     <xs:element name="control">
169         <xs:complexType>
170             <xs:attribute ref="iface"/>
171         </xs:complexType>
172     </xs:element>
173
174     <xs:element name="inputs">
175         <xs:complexType>
176             <xs:sequence>
177               <xs:element ref="input" maxOccurs="unbounded" />
178               <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
179             </xs:sequence>
180         </xs:complexType>
181     </xs:element>
182
183     <xs:element name="input">
184         <xs:complexType>
185             <xs:attributeGroup ref="inOutAttrGroup"/>
186         </xs:complexType>
187     </xs:element>
188
189     <xs:element name="outputs">
190         <xs:complexType>
191             <xs:sequence>
192               <xs:element ref="output" maxOccurs="unbounded" />
193               <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
194             </xs:sequence>
195         </xs:complexType>
196     </xs:element>
197
198     <xs:element name="output">
199         <xs:complexType>
200             <xs:attributeGroup ref="inOutAttrGroup"/>
201         </xs:complexType>
202     </xs:element>
203
204     <xs:element name="bidirs">
205         <xs:complexType>
206             <xs:sequence>
207                 <xs:element ref="bidir" maxOccurs="unbounded" />
208             </xs:sequence>
209         </xs:complexType>
210     </xs:element>
211
212     <xs:element name="bidir">
213         <xs:complexType>
214             <xs:attributeGroup ref="inOutAttrGroup"/>
215         </xs:complexType>
216     </xs:element>
217
218     <xs:element name="implementations">
219         <xs:complexType>
220             <xs:sequence>
221                 <xs:element ref="implementation" maxOccurs="unbounded" />
222             </xs:sequence>
223         </xs:complexType>
224     </xs:element>
225
226     <xs:element name="implementation">
227         <xs:complexType>
228             <xs:attribute ref="path" use="required" />
229         </xs:complexType>
230     </xs:element>
231
232
233     <!-- Racine du document -->
234
235     <xs:element name="block">
236       <xs:complexType>
237         <xs:group ref="blockElmtGroup"/>
238         <xs:attribute name="version" type="xs:string" use="optional" />
239       </xs:complexType>
240     </xs:element>
241
242 </xs:schema>