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

Private GIT Repository
finished testbench generation
[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="typespecial">
34       <xs:restriction base="xs:string">
35         <xs:enumeration value="source"/>
36         <xs:enumeration value="sink"/>
37         <xs:enumeration value="clkconvert"/>
38       </xs:restriction>
39     </xs:simpleType>
40     
41     <xs:simpleType name="typeparam">
42       <xs:restriction base="xs:string">
43         <xs:enumeration value="string"/>
44         <xs:enumeration value="expression"/>
45         <xs:enumeration value="boolean"/>
46         <xs:enumeration value="integer"/>
47         <xs:enumeration value="natural"/>
48         <xs:enumeration value="positive"/>
49         <xs:enumeration value="real"/>
50         <xs:enumeration value="time"/>
51       </xs:restriction>
52     </xs:simpleType>
53
54     <xs:simpleType name="typeiface">
55       <xs:restriction base="xs:string">
56         <xs:enumeration value="expression"/>
57         <xs:enumeration value="boolean"/>
58         <xs:enumeration value="natural"/>
59       </xs:restriction>
60     </xs:simpleType>
61     
62     <xs:simpleType name="typeendian">
63       <xs:restriction base="xs:string">
64         <xs:enumeration value="little"/>
65         <xs:enumeration value="big"/>
66       </xs:restriction>
67     </xs:simpleType>
68
69     <xs:simpleType name="typecontext">
70       <xs:restriction base="xs:string">
71         <xs:enumeration value="generic"/>
72         <xs:enumeration value="user"/>
73         <xs:enumeration value="wb"/>
74         <xs:enumeration value="port"/>
75       </xs:restriction>
76     </xs:simpleType>
77
78     <xs:simpleType name="typepurpose">
79       <xs:restriction base="xs:string">
80         <xs:enumeration value="data"/>
81         <xs:enumeration value="clock"/>
82         <xs:enumeration value="reset"/>
83         <xs:enumeration value="wb"/>    
84       </xs:restriction>
85     </xs:simpleType>
86     
87     <xs:attribute name="wishbone" type="xs:string"/>
88     <xs:attribute name="multiplicity" type="xs:string" />
89     <xs:attribute name="width" type="xs:string"/>
90     <xs:attribute name="value" type="xs:string"/>
91     <xs:attribute name="iface" type="xs:string"/>
92     <xs:attribute name="path" type="xs:string" />
93
94
95     <!-- déclaration des groupes d'éléments -->
96
97     <xs:group name="blockElmtGroup">
98         <xs:sequence>
99             <xs:element ref="informations"/>
100             <xs:element ref="parameters"/>
101             <xs:element ref="interfaces"/>
102             <xs:element ref="implementations" minOccurs="0"/>
103         </xs:sequence>
104     </xs:group>
105
106     <xs:group name="informationsElmtGroup">
107         <xs:sequence>
108             <xs:element ref="name"/>
109             <xs:element ref="category"/>
110             <xs:element name="description" type="xs:string"/>
111         </xs:sequence>
112     </xs:group>
113
114     <xs:group name="interfacesElmtGroup">
115         <xs:sequence>
116             <xs:element ref="inputs" minOccurs="0"/>
117             <xs:element ref="outputs" minOccurs="1"/>
118             <xs:element ref="bidirs" minOccurs="0"/>
119         </xs:sequence>
120     </xs:group>
121
122
123     <!-- déclaration des éléments -->
124
125     <xs:element name="informations">
126         <xs:complexType>
127             <xs:group ref="informationsElmtGroup"/>
128         </xs:complexType>
129     </xs:element>
130
131     <xs:element name="name" type="xs:string" />
132
133     <xs:element name="category">
134         <xs:complexType>
135             <xs:attribute ref="ids" use="required"/>
136         </xs:complexType>
137     </xs:element>
138
139     <xs:element name="parameters">
140         <xs:complexType>
141             <xs:sequence>
142                 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
143             </xs:sequence>
144         </xs:complexType>
145     </xs:element>
146
147     <xs:element name="parameter">
148         <xs:complexType>
149             <xs:attributeGroup ref="parameterAttrGroup"/>
150         </xs:complexType>
151     </xs:element>
152
153     <xs:element name="interfaces">
154         <xs:complexType>
155             <xs:group ref="interfacesElmtGroup"/>
156         </xs:complexType>
157     </xs:element>
158
159     <xs:element name="control">
160         <xs:complexType>
161             <xs:attribute ref="iface"/>
162         </xs:complexType>
163     </xs:element>
164
165     <xs:element name="inputs">
166         <xs:complexType>
167             <xs:sequence>
168               <xs:element ref="input" maxOccurs="unbounded" />
169               <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
170             </xs:sequence>
171         </xs:complexType>
172     </xs:element>
173
174     <xs:element name="input">
175         <xs:complexType>
176             <xs:attributeGroup ref="inOutAttrGroup"/>
177         </xs:complexType>
178     </xs:element>
179
180     <xs:element name="outputs">
181         <xs:complexType>
182             <xs:sequence>
183               <xs:element ref="output" maxOccurs="unbounded" />
184               <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
185             </xs:sequence>
186         </xs:complexType>
187     </xs:element>
188
189     <xs:element name="output">
190         <xs:complexType>
191             <xs:attributeGroup ref="inOutAttrGroup"/>
192         </xs:complexType>
193     </xs:element>
194
195     <xs:element name="bidirs">
196         <xs:complexType>
197             <xs:sequence>
198                 <xs:element ref="bidir" maxOccurs="unbounded" />
199             </xs:sequence>
200         </xs:complexType>
201     </xs:element>
202
203     <xs:element name="bidir">
204         <xs:complexType>
205             <xs:attributeGroup ref="inOutAttrGroup"/>
206         </xs:complexType>
207     </xs:element>
208
209     <xs:element name="implementations">
210         <xs:complexType>
211             <xs:sequence>
212                 <xs:element ref="implementation" maxOccurs="unbounded" />
213             </xs:sequence>
214         </xs:complexType>
215     </xs:element>
216
217     <xs:element name="implementation">
218         <xs:complexType>
219             <xs:attribute ref="path" use="required" />
220         </xs:complexType>
221     </xs:element>
222
223
224     <!-- Racine du document -->
225
226     <xs:element name="block">
227       <xs:complexType>
228         <xs:group ref="blockElmtGroup"/>
229         <xs:attribute name="version" type="xs:string" use="optional" />
230         <xs:attribute name="special" type="typespecial" use="optional" />
231       </xs:complexType>
232     </xs:element>
233
234 </xs:schema>