blob: 2bbe4ec97c64534c268b61847784cee53ec8c573 [file] [log] [blame]
Zane Shelleyabc51c22020-11-09 21:35:35 -06001<?xml version="1.0" encoding="UTF-8"?>
2<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3 elementFormDefault="unqualified">
4
5<!-- Root element: attn_node -->
6<xsd:element name="attn_node">
7 <xsd:complexType>
8
9 <xsd:sequence>
10 <!-- Note that local_fir will eventually generate register,
11 capture_group, and rule, which is why those are optional in
12 the schema, but are still required in the binary files. -->
13 <xsd:element name="local_fir" type="local_fir" minOccurs="0"
14 maxOccurs="255"/>
15 <xsd:element name="register" type="register" minOccurs="0"
16 maxOccurs="255"/>
17 <xsd:element name="capture_group" type="capture_group" minOccurs="0"
18 maxOccurs="255"/>
19 <xsd:element name="rule" type="rule" minOccurs="0" maxOccurs="255"/>
Zane Shelleybcb43952021-07-08 22:13:57 -050020 <xsd:element name="bit" type="bit" minOccurs="0" maxOccurs="255"/>
Zane Shelleyabc51c22020-11-09 21:35:35 -060021 </xsd:sequence>
22
23 <xsd:attribute name="name" type="name_type" use="required"/>
24 <xsd:attribute name="model_ec" type="model_ec_type" use="required"/>
25 <xsd:attribute name="reg_type" type="reg_type_enum" use="required"/>
26
27 </xsd:complexType>
28</xsd:element>
29
30<!-- Element: chip/register -->
31<xsd:complexType name="register">
32
33 <xsd:sequence>
34 <xsd:element name="instance" type="instance" minOccurs="1"
35 maxOccurs="255"/>
36 </xsd:sequence>
37
38 <xsd:attribute name="name" type="name_type" use="required"/>
39 <xsd:attribute name="access" type="access_enum" use="optional"/>
40
41</xsd:complexType>
42
43<!-- Element: chip/register/instance -->
44<!-- Element: chip/local_fir/instance -->
45<xsd:complexType name="instance">
46 <xsd:attribute name="reg_inst" type="inst_type" use="required"/>
47 <xsd:attribute name="addr" type="addr_type" use="required"/>
48</xsd:complexType>
49
50<!-- Element: chip/capture_group -->
51<xsd:complexType name="capture_group">
52
53 <xsd:sequence>
54 <xsd:element name="capture_register" type="capture_register"
55 minOccurs="1" maxOccurs="255"/>
56 </xsd:sequence>
57
58 <xsd:attribute name="node_inst" type="int_range" use="required"/>
59
60</xsd:complexType>
61
62<!-- Element: chip/capture_group/capture_register -->
63<xsd:complexType name="capture_register">
64 <xsd:attribute name="reg_name" type="name_type" use="required"/>
65 <xsd:attribute name="reg_inst" type="int_range" use="required"/>
66</xsd:complexType>
67
68<!-- Element: chip/rule -->
69<xsd:complexType name="rule">
70
71 <xsd:sequence>
72 <xsd:element name="expr" type="expr" minOccurs="1" maxOccurs="1"/>
73 </xsd:sequence>
74
75 <xsd:attribute name="attn_type" type="attn_type_enum" use="required"/>
76 <xsd:attribute name="node_inst" type="int_range" use="required"/>
77
78</xsd:complexType>
79
80<!-- Element: chip/rule/expr -->
81<!-- Element: chip/rule/expr/expr... -->
82<xsd:complexType name="expr">
83
84 <xsd:sequence>
85 <xsd:element name="expr" type="expr" minOccurs="0" maxOccurs="255"/>
86 </xsd:sequence>
87
88 <xsd:attribute name="type" type="expr_type_enum" use="required"/>
89 <xsd:attribute name="value1" use="optional"/>
90 <xsd:attribute name="value2" use="optional"/>
91
92</xsd:complexType>
93
94<!-- Element: chip/bit -->
95<xsd:complexType name="bit">
96 <xsd:simpleContent>
97 <xsd:extension base="xsd:string">
98 <xsd:attribute name="pos" type="int_range" use="required"/>
99 <xsd:attribute name="child_node" type="name_type" use="optional"/>
100 <xsd:attribute name="node_inst" type="int_range" use="optional"/>
101 </xsd:extension>
102 </xsd:simpleContent>
103</xsd:complexType>
104
105<!-- Element: chip/local_fir -->
106<xsd:complexType name="local_fir">
107
108 <xsd:sequence>
109 <xsd:element name="instance" type="instance" minOccurs="1"
110 maxOccurs="255"/>
111 <xsd:element name="action" type="action" minOccurs="1"
112 maxOccurs="255"/>
113 </xsd:sequence>
114
115 <xsd:attribute name="name" type="name_type" use="required"/>
116 <xsd:attribute name="config" type="local_fir_config_enum" use="required"/>
117
118</xsd:complexType>
119
120<!-- Element: chip/local_fir/action -->
121<xsd:complexType name="action">
122
123 <xsd:attribute name="attn_type" type="attn_type_enum" use="required"/>
124 <xsd:attribute name="config" type="action_config_enum" use="required"/>
125
126</xsd:complexType>
127
128<!-- Names must be alphanumeric or underscores, no spaces or other symbols
129 allowed. -->
130<xsd:simpleType name="name_type">
131 <xsd:restriction base="xsd:string">
132 <xsd:pattern value="[a-zA-Z0-9_]+"/>
133 </xsd:restriction>
134</xsd:simpleType>
135
136<!-- A comma separated list of names (see name_type for name definition). -->
137<xsd:simpleType name="model_ec_type">
138 <xsd:restriction base="xsd:string">
139 <xsd:pattern value="[a-zA-Z0-9_]+(,[a-zA-Z0-9_]+)*"/>
140 </xsd:restriction>
141</xsd:simpleType>
142
143<!-- Instance values are integers from 0-255. -->
144<xsd:simpleType name="inst_type">
145 <xsd:restriction base="xsd:integer">
146 <xsd:minInclusive value="0"/>
147 <xsd:maxInclusive value="255"/>
148 </xsd:restriction>
149</xsd:simpleType>
150
151<!-- Instance values are integers from 0-255. -->
152<xsd:simpleType name="int_range">
153 <xsd:restriction base="xsd:string">
154 <xsd:pattern value="[0-9]+([,:][0-9]+)*"/>
155 </xsd:restriction>
156</xsd:simpleType>
157
158<!-- Instance values are integers from 0-255. -->
159<xsd:simpleType name="addr_type">
160 <xsd:restriction base="xsd:string">
161 <xsd:pattern value="0x([0-9a-fA-F]{8}|[0-9a-fA-F]{16})"/>
162 </xsd:restriction>
163</xsd:simpleType>
164
165<!-- Attention type enum. -->
166<xsd:simpleType name="attn_type_enum">
167 <xsd:restriction base="xsd:string">
168 <xsd:enumeration value="CS"/>
169 <xsd:enumeration value="RE"/>
170 <xsd:enumeration value="UCS"/>
171 <xsd:enumeration value="SPA"/>
172 <xsd:enumeration value="HA"/>
173 </xsd:restriction>
174</xsd:simpleType>
175
176<!-- Attention type enum. -->
177<xsd:simpleType name="reg_type_enum">
178 <xsd:restriction base="xsd:string">
179 <xsd:enumeration value="SCOM"/>
180 <xsd:enumeration value="IDSCOM"/>
181 </xsd:restriction>
182</xsd:simpleType>
183
184<!-- Attention type enum. -->
185<xsd:simpleType name="access_enum">
186 <xsd:restriction base="xsd:string">
187 <xsd:enumeration value="RO"/>
188 <xsd:enumeration value="WO"/>
189 <xsd:enumeration value="RW"/>
190 </xsd:restriction>
191</xsd:simpleType>
192
193<!-- Expression type enum. -->
194<xsd:simpleType name="expr_type_enum">
195 <xsd:restriction base="xsd:string">
196 <xsd:enumeration value="reg"/>
197 <xsd:enumeration value="int"/>
198 <xsd:enumeration value="and"/>
199 <xsd:enumeration value="or"/>
200 <xsd:enumeration value="not"/>
201 <xsd:enumeration value="lshift"/>
202 <xsd:enumeration value="rshift"/>
203 </xsd:restriction>
204</xsd:simpleType>
205
206<!-- Local FIR config. -->
207<xsd:simpleType name="local_fir_config_enum">
208 <xsd:restriction base="xsd:string">
209 <xsd:enumeration value=""/>
210 <xsd:enumeration value="W"/>
211 <xsd:enumeration value="2"/>
212 <xsd:enumeration value="W2"/>
213 </xsd:restriction>
214</xsd:simpleType>
215
216<!-- Local FIR action config. -->
217<xsd:simpleType name="action_config_enum">
218 <xsd:restriction base="xsd:string">
219 <xsd:pattern value="[0-1]{2,3}"/>
220 </xsd:restriction>
221</xsd:simpleType>
222
223</xsd:schema>