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="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"/>
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"/>
54 <xs:simpleType name="typeendian">
55 <xs:restriction base="xs:string">
56 <xs:enumeration value="little"/>
57 <xs:enumeration value="big"/>
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"/>
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"/>
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" />
87 <!-- déclaration des groupes d'éléments -->
89 <xs:group name="blockElmtGroup">
91 <xs:element ref="informations"/>
92 <xs:element ref="parameters"/>
93 <xs:element ref="interfaces"/>
94 <xs:element ref="implementations" minOccurs="0"/>
98 <xs:group name="informationsElmtGroup">
100 <xs:element ref="name"/>
101 <xs:element ref="category"/>
102 <xs:element ref="description"/>
106 <xs:group name="descriptionElmtGroup">
108 <xs:element ref="brief"/>
109 <xs:element ref="detailed"/>
113 <xs:group name="interfacesElmtGroup">
115 <xs:element ref="inputs" minOccurs="0"/>
116 <xs:element ref="outputs" minOccurs="1"/>
117 <xs:element ref="bidirs" minOccurs="0"/>
122 <!-- déclaration des éléments -->
124 <xs:element name="informations">
126 <xs:group ref="informationsElmtGroup"/>
130 <xs:element name="name" type="xs:string" />
132 <xs:element name="category">
134 <xs:attribute ref="ids" use="required"/>
138 <xs:element name="description">
140 <xs:group ref="descriptionElmtGroup"/>
144 <xs:element name="brief" type="xs:string" />
146 <xs:element name="detailed" type="xs:string" />
148 <xs:element name="parameters">
151 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
156 <xs:element name="parameter">
158 <xs:attributeGroup ref="parameterAttrGroup"/>
162 <xs:element name="interfaces">
164 <xs:group ref="interfacesElmtGroup"/>
168 <xs:element name="control">
170 <xs:attribute ref="iface"/>
174 <xs:element name="inputs">
177 <xs:element ref="input" maxOccurs="unbounded" />
178 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
183 <xs:element name="input">
185 <xs:attributeGroup ref="inOutAttrGroup"/>
189 <xs:element name="outputs">
192 <xs:element ref="output" maxOccurs="unbounded" />
193 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
198 <xs:element name="output">
200 <xs:attributeGroup ref="inOutAttrGroup"/>
204 <xs:element name="bidirs">
207 <xs:element ref="bidir" maxOccurs="unbounded" />
212 <xs:element name="bidir">
214 <xs:attributeGroup ref="inOutAttrGroup"/>
218 <xs:element name="implementations">
221 <xs:element ref="implementation" maxOccurs="unbounded" />
226 <xs:element name="implementation">
228 <xs:attribute ref="path" use="required" />
233 <!-- Racine du document -->
235 <xs:element name="block">
237 <xs:group ref="blockElmtGroup"/>
238 <xs:attribute name="version" type="xs:string" use="optional" />