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 name="description" type="xs:string"/>
106 <xs:group name="interfacesElmtGroup">
108 <xs:element ref="inputs" minOccurs="0"/>
109 <xs:element ref="outputs" minOccurs="1"/>
110 <xs:element ref="bidirs" minOccurs="0"/>
115 <!-- déclaration des éléments -->
117 <xs:element name="informations">
119 <xs:group ref="informationsElmtGroup"/>
123 <xs:element name="name" type="xs:string" />
125 <xs:element name="category">
127 <xs:attribute ref="ids" use="required"/>
131 <xs:element name="parameters">
134 <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
139 <xs:element name="parameter">
141 <xs:attributeGroup ref="parameterAttrGroup"/>
145 <xs:element name="interfaces">
147 <xs:group ref="interfacesElmtGroup"/>
151 <xs:element name="control">
153 <xs:attribute ref="iface"/>
157 <xs:element name="inputs">
160 <xs:element ref="input" maxOccurs="unbounded" />
161 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
166 <xs:element name="input">
168 <xs:attributeGroup ref="inOutAttrGroup"/>
172 <xs:element name="outputs">
175 <xs:element ref="output" maxOccurs="unbounded" />
176 <xs:element ref="control" minOccurs="0" maxOccurs="unbounded" />
181 <xs:element name="output">
183 <xs:attributeGroup ref="inOutAttrGroup"/>
187 <xs:element name="bidirs">
190 <xs:element ref="bidir" maxOccurs="unbounded" />
195 <xs:element name="bidir">
197 <xs:attributeGroup ref="inOutAttrGroup"/>
201 <xs:element name="implementations">
204 <xs:element ref="implementation" maxOccurs="unbounded" />
209 <xs:element name="implementation">
211 <xs:attribute ref="path" use="required" />
216 <!-- Racine du document -->
218 <xs:element name="block">
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" />