1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
4 <!-- déclaration des groupes d'attributs -->
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"/>
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"/>
27 <!-- déclaration des attributs -->
29 <xs:attribute name="ids" type="xs:string"/>
30 <xs:attribute name="name" type="xs:string"/>
31 <xs:attribute name="clock" type="xs:string"/>
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"/>
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"/>
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"/>
62 <xs:simpleType name="typeendian">
63 <xs:restriction base="xs:string">
64 <xs:enumeration value="little"/>
65 <xs:enumeration value="big"/>
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"/>
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"/>
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" />
95 <!-- déclaration des groupes d'éléments -->
97 <xs:group name="blockElmtGroup">
99 <xs:element ref="informations"/>
100 <xs:element ref="parameters"/>
101 <xs:element ref="interfaces"/>
102 <xs:element ref="implementations" minOccurs="0"/>
106 <xs:group name="informationsElmtGroup">
108 <xs:element ref="name"/>
109 <xs:element ref="category"/>
110 <xs:element name="description" type="xs:string"/>
114 <xs:group name="interfacesElmtGroup">
116 <xs:element ref="inputs" minOccurs="0"/>
117 <xs:element ref="outputs" minOccurs="1"/>
118 <xs:element ref="bidirs" minOccurs="0"/>
123 <!-- déclaration des éléments -->
125 <xs:element name="informations">
127 <xs:group ref="informationsElmtGroup"/>
131 <xs:element name="name" type="xs:string" />
133 <xs:element name="category">
135 <xs:attribute ref="ids" use="required"/>
139 <xs:element name="parameters">
142 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
147 <xs:element name="parameter">
149 <xs:attributeGroup ref="parameterAttrGroup"/>
153 <xs:element name="interfaces">
155 <xs:group ref="interfacesElmtGroup"/>
159 <xs:element name="control">
161 <xs:attribute ref="iface"/>
165 <xs:element name="inputs">
168 <xs:element ref="input" maxOccurs="unbounded" />
169 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
174 <xs:element name="input">
176 <xs:attributeGroup ref="inOutAttrGroup"/>
180 <xs:element name="outputs">
183 <xs:element ref="output" maxOccurs="unbounded" />
184 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
189 <xs:element name="output">
191 <xs:attributeGroup ref="inOutAttrGroup"/>
195 <xs:element name="bidirs">
198 <xs:element ref="bidir" maxOccurs="unbounded" />
203 <xs:element name="bidir">
205 <xs:attributeGroup ref="inOutAttrGroup"/>
209 <xs:element name="implementations">
212 <xs:element ref="implementation" maxOccurs="unbounded" />
217 <xs:element name="implementation">
219 <xs:attribute ref="path" use="required" />
224 <!-- Racine du document -->
226 <xs:element name="block">
228 <xs:group ref="blockElmtGroup"/>
229 <xs:attribute name="version" type="xs:string" use="optional" />
230 <xs:attribute name="special" type="typespecial" use="optional" />