blob: 4c89a9f82ce80545dc53954936b4d7e4fad1b9b8 [file] [log] [blame]
Robert Rostoharba96a2c2016-07-01 22:42:12 +02001<?xml version="1.0" encoding="UTF-8"?>
GuentherMartin0d379232018-09-04 11:20:34 +02002<!--
3
Jens Reinecke61a24d02019-09-05 16:22:32 +02004 Copyright (c) 2013-2019 ARM Limited. All rights reserved.
GuentherMartin0d379232018-09-04 11:20:34 +02005
Robert Rostoharba96a2c2016-07-01 22:42:12 +02006 SPDX-License-Identifier: Apache-2.0
GuentherMartin0d379232018-09-04 11:20:34 +02007
Robert Rostoharba96a2c2016-07-01 22:42:12 +02008 Licensed under the Apache License, Version 2.0 (the License); you may
9 not use this file except in compliance with the License.
10 You may obtain a copy of the License at
GuentherMartin0d379232018-09-04 11:20:34 +020011
Joachim Krech465bd432016-11-21 09:15:30 +010012 www.apache.org/licenses/LICENSE-2.0
GuentherMartin0d379232018-09-04 11:20:34 +020013
Robert Rostoharba96a2c2016-07-01 22:42:12 +020014 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
GuentherMartin0d379232018-09-04 11:20:34 +020019
Jens Reinecke61a24d02019-09-05 16:22:32 +020020 $Date: 05. September 2019
21 $Revision: 1.3.6
GuentherMartin0d379232018-09-04 11:20:34 +020022
Jens Reinecke61a24d02019-09-05 16:22:32 +020023 Version 1.3.6:
24 - add ARMV81MML as enumeration value for cpuNameType.
25
GuentherMartin0d379232018-09-04 11:20:34 +020026 Version 1.3.5:
27 - add CM35P as enumeration value for cpuNameType.
Robert Rostoharba96a2c2016-07-01 22:42:12 +020028
Joachim Krech7a57e3f2018-09-03 09:16:46 +020029 Version 1.3.4:
30 - add dspPresent element to cpuType as SIMD instructions became optional for new processors.
GuentherMartin0d379232018-09-04 11:20:34 +020031
Joachim Krechae9507d2016-09-23 14:01:37 +020032 Version 1.3.3:
33 - update file header to Apache 2.0 License
34 - add dimableIdentifierType, as a copy of previous identifierType adding "%s",
35 - update identifierType to only allow names without %s included.
36 - remove enumerationNameType.
GuentherMartin0d379232018-09-04 11:20:34 +020037 - add headerEnumName to enumerationType and to dimArrayIndexType for peripheral arrays
Joachim Krechae9507d2016-09-23 14:01:37 +020038 overwriting hierarchically generated names
39 - add dimName to dimElementGroup. Only valid in <cluster> context, ignored otherwise.
GuentherMartin0d379232018-09-04 11:20:34 +020040
Robert Rostoharba96a2c2016-07-01 22:42:12 +020041 Version 1.3.2:
42 adding dimIndexArray to peripheral-, cluster- and register-array to describe
43 enumeration of array indices.
44
45 Version 1.3.1:
46 fixed peripheral name element type to identifierType to support %s for peripheral arrays
GuentherMartin0d379232018-09-04 11:20:34 +020047 added optional protection element to addressBlockType and added p=privileged
Robert Rostoharba96a2c2016-07-01 22:42:12 +020048
49 Version 1.3:
50 added dim to peripherals to describe an array of peripherals.
51 added nesting of clusters to support hierarchical register structures.
52 added protection element as part of the registerPropertiesGroup indicating
53 special permissions are required for accessing a register.
54 CPU Section extended with description of the Secure Attribution Unit.
GuentherMartin0d379232018-09-04 11:20:34 +020055
Robert Rostoharba96a2c2016-07-01 22:42:12 +020056 Version 1.2:
57 Cortex-M7 support items have been added as optional tags for the device header file generation:
58 fpuDP, icachePresent, dcachePresent, itcmPresent, dtcmPresent
GuentherMartin0d379232018-09-04 11:20:34 +020059
Robert Rostoharba96a2c2016-07-01 22:42:12 +020060 Version 1.1:
61 For backward compatibility all additional tags have been made optional.
62 Extensions may be mandatory for successful device header file generation
63 Other changes are related to some restructuring of the schema.
GuentherMartin0d379232018-09-04 11:20:34 +020064
Robert Rostoharba96a2c2016-07-01 22:42:12 +020065 Note that the memory section has been removed since this would limit the
66 reuse of descriptions for a series of devices.
67 -->
68
69<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.3">
70 <!-- stringType requires a none empty string of a least one character length -->
71 <xs:simpleType name="stringType">
72 <xs:restriction base="xs:string">
73 <xs:minLength value="1"/>
74 </xs:restriction>
75 </xs:simpleType>
Joachim Krech6649ddc2017-09-12 09:59:01 +020076
77 <xs:simpleType name="descriptionStringType">
78 <xs:restriction base="xs:string">
79 <xs:pattern value="[\p{IsBasicLatin}\p{IsLatin-1Supplement}]*" />
80 </xs:restriction>
81 </xs:simpleType>
GuentherMartin0d379232018-09-04 11:20:34 +020082
Robert Rostoharba96a2c2016-07-01 22:42:12 +020083 <!-- cpuType specifies a selection of Cortex-M and Secure-Cores. This list will get extended as new processors are released -->
84 <xs:simpleType name="cpuNameType">
85 <xs:restriction base="xs:token">
86 <xs:enumeration value="CM0"/>
87 <xs:enumeration value="CM0PLUS"/>
88 <xs:enumeration value="CM0+"/>
89 <xs:enumeration value="CM1"/>
90 <xs:enumeration value="SC000"/>
Joachim Krech6649ddc2017-09-12 09:59:01 +020091 <xs:enumeration value="CM23"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +020092 <xs:enumeration value="CM3"/>
Joachim Krech6649ddc2017-09-12 09:59:01 +020093 <xs:enumeration value="CM33"/>
GuentherMartin0d379232018-09-04 11:20:34 +020094 <xs:enumeration value="CM35P"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +020095 <xs:enumeration value="SC300"/>
96 <xs:enumeration value="CM4"/>
97 <xs:enumeration value="CM7"/>
Joachim Krechae9507d2016-09-23 14:01:37 +020098 <xs:enumeration value="ARMV8MML"/>
99 <xs:enumeration value="ARMV8MBL"/>
Jens Reinecke61a24d02019-09-05 16:22:32 +0200100 <xs:enumeration value="ARMV81MML"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200101 <xs:enumeration value="CA5"/>
102 <xs:enumeration value="CA7"/>
103 <xs:enumeration value="CA8"/>
104 <xs:enumeration value="CA9"/>
105 <xs:enumeration value="CA15"/>
106 <xs:enumeration value="CA17"/>
107 <xs:enumeration value="CA53"/>
108 <xs:enumeration value="CA57"/>
109 <xs:enumeration value="CA72"/>
110 <xs:enumeration value="other"/>
111 </xs:restriction>
112 </xs:simpleType>
113 <!-- revisionType specifies the CPU revision format as defined by ARM (rNpM) -->
114 <xs:simpleType name="revisionType">
115 <xs:restriction base="xs:string">
116 <xs:pattern value="r[0-9]*p[0-9]*"/>
117 </xs:restriction>
118 </xs:simpleType>
119 <!-- EndianType pre-defines the tokens for specifying the endianess of the device -->
120 <xs:simpleType name="endianType">
121 <xs:restriction base="xs:token">
122 <xs:enumeration value="little"/>
123 <xs:enumeration value="big"/>
124 <xs:enumeration value="selectable"/>
125 <xs:enumeration value="other"/>
126 </xs:restriction>
127 </xs:simpleType>
128 <!-- dataType pre-defines the tokens in line with CMSIS data type definitions -->
129 <xs:simpleType name="dataTypeType">
130 <xs:restriction base="xs:token">
131 <xs:enumeration value="uint8_t"/>
132 <xs:enumeration value="uint16_t"/>
133 <xs:enumeration value="uint32_t"/>
134 <xs:enumeration value="uint64_t"/>
135 <xs:enumeration value="int8_t"/>
136 <xs:enumeration value="int16_t"/>
137 <xs:enumeration value="int32_t"/>
138 <xs:enumeration value="int64_t"/>
139 <xs:enumeration value="uint8_t *"/>
140 <xs:enumeration value="uint16_t *"/>
141 <xs:enumeration value="uint32_t *"/>
142 <xs:enumeration value="uint64_t *"/>
143 <xs:enumeration value="int8_t *"/>
144 <xs:enumeration value="int16_t *"/>
145 <xs:enumeration value="int32_t *"/>
146 <xs:enumeration value="int64_t *"/>
147 </xs:restriction>
148 </xs:simpleType>
Joachim Krech3e5356a2020-03-09 11:23:49 +0100149
Joachim Krechae9507d2016-09-23 14:01:37 +0200150 <!-- dimableIdentifierType specifies the subset and sequence of characters used for specifying identifiers that may contain %s from dim. -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200151 <!-- this is particularly important as these are used in ANSI C Structures during the device header file generation -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200152 <xs:simpleType name="dimableIdentifierType">
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200153 <xs:restriction base="xs:string">
Joachim Krechae9507d2016-09-23 14:01:37 +0200154 <xs:pattern value="((%s)|(%s)[_A-Za-z]{1}[_A-Za-z0-9]*)|([_A-Za-z]{1}[_A-Za-z0-9]*(\[%s\])?)|([_A-Za-z]{1}[_A-Za-z0-9]*(%s)?[_A-Za-z0-9]*)"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200155 </xs:restriction>
156 </xs:simpleType>
Joachim Krechae9507d2016-09-23 14:01:37 +0200157 <!-- identifierType specifies the subset and sequence of characters used for specifying identifiers that must not contain %s from dim. -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200158 <!-- this is particularly important as these are used in ANSI C Structures during the device header file generation -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200159 <xs:simpleType name="identifierType">
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200160 <xs:restriction base="xs:string">
161 <xs:pattern value="[_A-Za-z0-9]*"/>
162 </xs:restriction>
163 </xs:simpleType>
164 <!-- V1.3: Protection Access Attribute Strings -->
165 <xs:simpleType name="protectionStringType">
166 <xs:restriction base="xs:string">
167 <!-- s = Secure -->
168 <!-- n = Non-secure -->
169 <!-- p = Privileged -->
170 <xs:pattern value="[snp]"/>
171 </xs:restriction>
172 </xs:simpleType>
173 <!-- V1.3: SAU Access Type -->
174 <xs:simpleType name="sauAccessType">
175 <xs:restriction base="xs:string">
176 <!-- c = non-secure Callable / Secure -->
177 <!-- n = Non-secure -->
178 <xs:pattern value="[cn]"/>
179 </xs:restriction>
180 </xs:simpleType>
181
182 <!-- dimIndexType specifies the subset and sequence of characters used for specifying the sequence of indices in register arrays -->
183 <xs:simpleType name="dimIndexType">
184 <xs:restriction base="xs:string">
185 <xs:pattern value="[0-9]+\-[0-9]+|[A-Z]-[A-Z]|[_0-9a-zA-Z]+(,\s*[_0-9a-zA-Z]+)+"/>
186 </xs:restriction>
187 </xs:simpleType>
Joachim Krechdc02a4b2018-02-19 13:57:44 +0100188 <!-- scaledNonNegativeInteger specifies the format in which numbers are represented in hexadecimal or decimal format -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200189 <xs:simpleType name="scaledNonNegativeInteger">
190 <xs:restriction base="xs:string">
191 <xs:pattern value="[+]?(0x|0X|#)?[0-9a-fA-F]+[kmgtKMGT]?"/>
192 </xs:restriction>
193 </xs:simpleType>
194 <!-- enumeratedValueDataType specifies the number formats for the values in enumeratedValues -->
195 <xs:simpleType name="enumeratedValueDataType">
196 <xs:restriction base="xs:string">
Joachim Krechdc02a4b2018-02-19 13:57:44 +0100197 <xs:pattern value="[+]?(((0x|0X)[0-9a-fA-F]+)|([0-9]+)|((#|0b)[01xX]+))"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200198 </xs:restriction>
199 </xs:simpleType>
200 <!-- accessType specfies the pre-defined tokens for the available accesses -->
201 <xs:simpleType name="accessType">
202 <xs:restriction base="xs:token">
203 <xs:enumeration value="read-only"/>
204 <xs:enumeration value="write-only"/>
205 <xs:enumeration value="read-write"/>
206 <xs:enumeration value="writeOnce"/>
207 <xs:enumeration value="read-writeOnce"/>
208 </xs:restriction>
209 </xs:simpleType>
210 <!-- modifiedWriteValuesType specifies the pre-defined tokens for the write side effects -->
211 <xs:simpleType name="modifiedWriteValuesType">
212 <xs:restriction base="xs:token">
213 <xs:enumeration value="oneToClear"/>
214 <xs:enumeration value="oneToSet"/>
215 <xs:enumeration value="oneToToggle"/>
216 <xs:enumeration value="zeroToClear"/>
217 <xs:enumeration value="zeroToSet"/>
218 <xs:enumeration value="zeroToToggle"/>
219 <xs:enumeration value="clear"/>
220 <xs:enumeration value="set"/>
221 <xs:enumeration value="modify"/>
222 </xs:restriction>
223 </xs:simpleType>
224 <!-- readAction type specifies the pre-defined tokens for read side effects -->
225 <xs:simpleType name="readActionType">
226 <xs:restriction base="xs:token">
227 <xs:enumeration value="clear"/>
228 <xs:enumeration value="set"/>
229 <xs:enumeration value="modify"/>
230 <xs:enumeration value="modifyExternal"/>
231 </xs:restriction>
232 </xs:simpleType>
233 <!-- enumUsageType specifies the pre-defined tokens for selecting what access types an enumeratedValues set is associated with -->
234 <xs:simpleType name="enumUsageType">
235 <xs:restriction base="xs:token">
236 <xs:enumeration value="read"/>
237 <xs:enumeration value="write"/>
238 <xs:enumeration value="read-write"/>
239 </xs:restriction>
240 </xs:simpleType>
241 <!-- bitRangeType specifies the bit numbers to be restricted values from 0 - 69 -->
242 <xs:simpleType name="bitRangeType">
243 <xs:restriction base="xs:token">
244 <xs:pattern value="\[([0-4])?[0-9]:([0-4])?[0-9]\]"/>
245 </xs:restriction>
246 </xs:simpleType>
247 <!-- writeContraintType specifies how to describe the restriction of the allowed values that can be written to a resource -->
248 <xs:complexType name="writeConstraintType">
249 <xs:choice>
250 <xs:element name="writeAsRead" type="xs:boolean"/>
251 <xs:element name="useEnumeratedValues" type="xs:boolean"/>
252 <xs:element name="range">
253 <xs:complexType>
254 <xs:sequence>
255 <xs:element name="minimum" type="scaledNonNegativeInteger"/>
256 <xs:element name="maximum" type="scaledNonNegativeInteger"/>
257 </xs:sequence>
258 </xs:complexType>
259 </xs:element>
260 </xs:choice>
261 </xs:complexType>
262 <!-- addressBlockType specifies the elements to describe an address block -->
263 <xs:complexType name="addressBlockType">
264 <xs:sequence>
265 <xs:element name="offset" type="scaledNonNegativeInteger"/>
266 <xs:element name="size" type="scaledNonNegativeInteger"/>
267 <xs:element name="usage">
268 <xs:simpleType>
269 <xs:restriction base="xs:token">
270 <xs:enumeration value="registers"/>
271 <xs:enumeration value="buffer"/>
272 <xs:enumeration value="reserved"/>
273 </xs:restriction>
274 </xs:simpleType>
275 </xs:element>
276 <!-- Version 1.3.2: optional access protection for an address block s=secure n=non-secure p=privileged -->
277 <xs:element name="protection" type="protectionStringType" minOccurs="0"/>
278 </xs:sequence>
279 </xs:complexType>
280 <!-- interruptType specifies how to describe an interrupt associated with a peripheral -->
281 <xs:complexType name="interruptType">
282 <xs:sequence>
283 <xs:element name="name" type="stringType"/>
284 <xs:element name="description" type="xs:string" minOccurs="0"/>
285 <xs:element name="value" type="xs:integer"/>
286 </xs:sequence>
287 </xs:complexType>
GuentherMartin0d379232018-09-04 11:20:34 +0200288 <!-- register properties group specifies register size, access permission and reset value
289 this is used in multiple locations. Settings are inherited downstream. -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200290 <xs:group name="registerPropertiesGroup">
291 <xs:sequence>
292 <xs:element name="size" type="scaledNonNegativeInteger" minOccurs="0"/>
293 <xs:element name="access" type="accessType" minOccurs="0"/>
294 <!-- V 1.3: extended register access protection -->
295 <xs:element name="protection" type="protectionStringType" minOccurs="0"/>
296 <xs:element name="resetValue" type="scaledNonNegativeInteger" minOccurs="0"/>
297 <xs:element name="resetMask" type="scaledNonNegativeInteger" minOccurs="0"/>
298 </xs:sequence>
299 </xs:group>
GuentherMartin0d379232018-09-04 11:20:34 +0200300 <!-- bitRangeLsbMsbStyle specifies the bit position of a field within a register
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200301 by specifying the least significant and the most significant bit position -->
302 <xs:group name="bitRangeLsbMsbStyle">
303 <xs:sequence>
304 <xs:element name="lsb" type="scaledNonNegativeInteger"/>
305 <xs:element name="msb" type="scaledNonNegativeInteger"/>
306 </xs:sequence>
307 </xs:group>
308 <!-- bitRangeOffsetWidthStyle specifies the bit position of a field within a register
309 by specifying the least significant bit position and the bitWidth of the field -->
310 <xs:group name="bitRangeOffsetWidthStyle">
311 <xs:sequence>
312 <xs:element name="bitOffset" type="scaledNonNegativeInteger"/>
GuentherMartin0d379232018-09-04 11:20:34 +0200313 <xs:element name="bitWidth" type="scaledNonNegativeInteger" minOccurs="0"/>
314 </xs:sequence>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200315 </xs:group>
GuentherMartin0d379232018-09-04 11:20:34 +0200316
Joachim Krechae9507d2016-09-23 14:01:37 +0200317 <!-- dimElementGroup specifies the number of array elements (dim), the address offset
GuentherMartin0d379232018-09-04 11:20:34 +0200318 between to consecutive array elements and an a comma seperated list of strings
Joachim Krechae9507d2016-09-23 14:01:37 +0200319 being used for identifying each element in the array -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200320 <xs:group name="dimElementGroup">
321 <xs:sequence>
322 <xs:element name="dim" type="scaledNonNegativeInteger"/>
323 <xs:element name="dimIncrement" type="scaledNonNegativeInteger"/>
324 <xs:element name="dimIndex" type="dimIndexType" minOccurs="0"/>
Joachim Krechae9507d2016-09-23 14:01:37 +0200325 <xs:element name="dimName" type="identifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200326 <xs:element name="dimArrayIndex" type="dimArrayIndexType" minOccurs="0"/>
327 </xs:sequence>
328 </xs:group>
329
330 <xs:complexType name="cpuType">
331 <xs:sequence>
332 <!-- V1.1: ARM processor name: Cortex-Mx / SCxxx -->
333 <xs:element name="name" type="cpuNameType"/>
334 <!-- V1.1: ARM defined revision of the cpu -->
335 <xs:element name="revision" type="revisionType"/>
336 <!-- V1.1: Endian specifies the endianess of the processor/device -->
337 <xs:element name="endian" type="endianType"/>
338 <!-- V1.1: mpuPresent specifies whether or not a memory protection unit is physically present -->
Joachim Krech6755c0a2017-05-09 11:51:31 +0200339 <xs:element name="mpuPresent" type="xs:boolean" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200340 <!-- V1.1: fpuPresent specifies whether or not a floating point hardware unit is physically present -->
Joachim Krech6755c0a2017-05-09 11:51:31 +0200341 <xs:element name="fpuPresent" type="xs:boolean" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200342 <!-- V1.2: fpuDP specifies a double precision floating point hardware unit is physically present-->
343 <xs:element name="fpuDP" type="xs:boolean" minOccurs="0"/>
Joachim Krech7a57e3f2018-09-03 09:16:46 +0200344 <!-- V1.3: dspPresent specifies whether the optional SIMD instructions are supported by processor -->
345 <xs:element name="dspPresent" type="xs:boolean" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200346 <!-- V1.2: icachePresent specifies that an instruction cache is physically present-->
347 <xs:element name="icachePresent" type="xs:boolean" minOccurs="0"/>
348 <!-- V1.2: dcachePresent specifies that a data cache is physically present-->
349 <xs:element name="dcachePresent" type="xs:boolean" minOccurs="0"/>
350 <!-- V1.2: itcmPresent specifies that an instruction tightly coupled memory is physically present-->
351 <xs:element name="itcmPresent" type="xs:boolean" minOccurs="0"/>
352 <!-- V1.2: dtcmPresent specifies that an data tightly coupled memory is physically present-->
353 <xs:element name="dtcmPresent" type="xs:boolean" minOccurs="0"/>
354 <!-- V1.1: vtorPresent is used for Cortex-M0+ based devices only. It indicates whether the Vector -->
355 <!-- Table Offset Register is implemented in the device or not -->
356 <xs:element name="vtorPresent" type="xs:boolean" minOccurs="0"/>
357 <!-- V1.1: nvicPrioBits specifies the number of bits used by the Nested Vectored Interrupt Controller -->
358 <!-- for defining the priority level = # priority levels -->
359 <xs:element name="nvicPrioBits" type="scaledNonNegativeInteger"/>
360 <!-- V1.1: vendorSystickConfig is set true if a custom system timer is implemented in the device -->
361 <!-- instead of the ARM specified SysTickTimer -->
362 <xs:element name="vendorSystickConfig" type="xs:boolean"/>
363 <!-- V1.3: reports the total number of interrupts implemented by the device (optional) -->
364 <xs:element name="deviceNumInterrupts" type="scaledNonNegativeInteger" minOccurs="0"/>
365 <!-- V1.3: sauRegions specifies the available number of address regions -->
366 <!-- if not specified a value of zero is assumed -->
367 <xs:element name="sauNumRegions" type="scaledNonNegativeInteger" minOccurs="0"/>
368 <!-- V1.3: SAU Regions Configuration (if fully or partially predefined) -->
369 <xs:element name="sauRegionsConfig" minOccurs="0">
370 <xs:complexType>
371 <xs:sequence>
372 <xs:element name="region" minOccurs="0" maxOccurs="unbounded">
373 <!-- addressBlockType specifies the elements to describe an address block -->
374 <xs:complexType>
375 <xs:sequence minOccurs="1" maxOccurs="unbounded">
376 <xs:element name="base" type="scaledNonNegativeInteger"/>
377 <xs:element name="limit" type="scaledNonNegativeInteger"/>
378 <xs:element name="access" type="sauAccessType"/>
379 </xs:sequence>
380 <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
381 <xs:attribute name="name" type="xs:string" use="optional"/>
382 </xs:complexType>
383 </xs:element>
384 </xs:sequence>
385 <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
386 <xs:attribute name="protectionWhenDisabled" type="protectionStringType" use="optional" default="s"/>
387 </xs:complexType>
388 </xs:element>
389 </xs:sequence>
390 </xs:complexType>
391
392 <xs:complexType name="enumeratedValueType">
393 <xs:sequence>
394 <!-- name is a ANSI C indentifier representing the value (C Enumeration) -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200395 <xs:element name="name" type="identifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200396 <!-- description contains the details about the semantics/behavior specified by this value -->
397 <xs:element name="description" type="stringType" minOccurs="0"/>
398 <xs:choice>
399 <xs:element name="value" type="enumeratedValueDataType"/>
400 <!-- isDefault specifies the name and description for all values that are not
401 specifically described individually -->
402 <xs:element name="isDefault" type="xs:boolean"/>
403 </xs:choice>
404 </xs:sequence>
405 </xs:complexType>
GuentherMartin0d379232018-09-04 11:20:34 +0200406
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200407 <xs:complexType name="enumerationType">
408 <xs:sequence>
409 <!-- name specfies a reference to this enumeratedValues section for reuse purposes
410 this name does not appear in the System Viewer nor the Header File. -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200411 <xs:element name="name" type="identifierType" minOccurs="0"/>
412 <!-- overrides the hierarchical enumeration type in the device header file. User is responsible for uniqueness across description -->
413 <xs:element name="headerEnumName" type="identifierType" minOccurs="0"/>
GuentherMartin0d379232018-09-04 11:20:34 +0200414 <!-- usage specifies whether this enumeration is to be used for read or write or
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200415 (read and write) accesses -->
416 <xs:element name="usage" type="enumUsageType" minOccurs="0"/>
417 <!-- enumeratedValue derivedFrom=<identifierType> -->
418 <xs:element name="enumeratedValue" type="enumeratedValueType" minOccurs="1" maxOccurs="unbounded"/>
419 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200420 <xs:attribute name="derivedFrom" type="identifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200421 </xs:complexType>
422
423 <xs:complexType name="dimArrayIndexType">
424 <xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200425 <xs:element name="headerEnumName" type="identifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200426 <xs:element name="enumeratedValue" type="enumeratedValueType" minOccurs="1" maxOccurs="unbounded"/>
427 </xs:sequence>
428 </xs:complexType>
429
430 <xs:complexType name="fieldType">
431 <xs:sequence>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200432 <xs:group ref="dimElementGroup" minOccurs="0"/>
433 <!-- name specifies a field's name. The System Viewer and the device header file will
434 use the name of the field as identifier -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200435 <xs:element name="name" type="dimableIdentifierType"/>
GuentherMartin0d379232018-09-04 11:20:34 +0200436 <!-- description contains reference manual level information about the function and
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200437 options of a field -->
438 <xs:element name="description" type="stringType" minOccurs="0"/>
439 <!-- alternative specifications of the bit position of the field within the register -->
440 <xs:choice minOccurs="1" maxOccurs="1">
441 <!-- bit field described by lsb followed by msb tag -->
442 <xs:group ref="bitRangeLsbMsbStyle"/>
443 <!-- bit field described by bit offset relative to Bit0 + bit width of field -->
444 <xs:group ref="bitRangeOffsetWidthStyle"/>
445 <!-- bit field described by [<msb>:<lsb>] -->
446 <xs:element name="bitRange" type="bitRangeType"/>
447 </xs:choice>
448 <!-- access describes the predefined permissions for the field. -->
449 <xs:element name="access" type="accessType" minOccurs="0"/>
450 <!-- predefined description of write side effects -->
451 <xs:element name="modifiedWriteValues" type="modifiedWriteValuesType" minOccurs="0"/>
452 <!-- writeContstraint specifies the subrange of allowed values -->
453 <xs:element name="writeConstraint" type="writeConstraintType" minOccurs="0"/>
454 <!-- readAction specifies the read side effects. -->
455 <xs:element name="readAction" type="readActionType" minOccurs="0"/>
456 <!-- enumeratedValues derivedFrom=<identifierType> -->
457 <xs:element name="enumeratedValues" type="enumerationType" minOccurs="0" maxOccurs="2">
458 </xs:element>
459 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200460 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200461 </xs:complexType>
462
463 <xs:complexType name="fieldsType">
464 <xs:sequence>
465 <!-- field derivedFrom=<identifierType> -->
466 <xs:element name="field" type="fieldType" minOccurs="1" maxOccurs="unbounded"/>
467 </xs:sequence>
468 </xs:complexType>
469
470 <xs:complexType name="registerType">
471 <xs:sequence>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200472 <xs:group ref="dimElementGroup" minOccurs="0"/>
473 <!-- name specifies the name of the register. The register name is used by System Viewer and
474 device header file generator to represent a register -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200475 <xs:element name="name" type="dimableIdentifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200476 <!-- display name specifies a register name without the restritions of an ANSIS C identifier.
477 The use of this tag is discouraged because it does not allow consistency between
478 the System View and the device header file. -->
479 <xs:element name="displayName" type="stringType" minOccurs="0"/>
480 <!-- description contains a reference manual level description about the register and it's purpose -->
481 <xs:element name="description" type="stringType" minOccurs="0"/>
482 <xs:choice>
483 <!-- alternateGroup specifies the identifier of the subgroup a register belongs to.
484 This is useful if a register has a different description per mode but a single name -->
485 <xs:element name="alternateGroup" type="identifierType" minOccurs="0"/>
486 <!-- V1.1: alternateRegister specifies an alternate register description for an address that is
487 already fully described. In this case the register name must be unique within the peripheral -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200488 <xs:element name="alternateRegister" type="dimableIdentifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200489 </xs:choice>
490 <!-- addressOffset describes the address of the register relative to the baseOffset of the peripheral -->
491 <xs:element name="addressOffset" type="scaledNonNegativeInteger"/>
492 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
493 reset value. These default values are inherited to all fields contained in this register -->
494 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
495 <!-- V1.1: dataType specifies a CMSIS compliant native dataType for a register (i.e. signed, unsigned, pointer) -->
496 <xs:element name="dataType" type="dataTypeType" minOccurs="0"/>
497 <!-- modifiedWriteValues specifies the write side effects -->
498 <xs:element name="modifiedWriteValues" type="modifiedWriteValuesType" minOccurs="0"/>
499 <!-- writeConstraint specifies the subset of allowed write values -->
500 <xs:element name="writeConstraint" type="writeConstraintType" minOccurs="0"/>
501 <!-- readAcction specifies the read side effects -->
502 <xs:element name="readAction" type="readActionType" minOccurs="0"/>
503 <!-- fields section contains all fields that belong to this register -->
504 <xs:element name="fields" type="fieldsType" minOccurs="0" maxOccurs="1"/>
505 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200506 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200507 </xs:complexType>
508
509 <!-- V1.1: A cluster is a set of registers that are composed into a C data structure in the device header file -->
510 <xs:complexType name="clusterType">
511 <xs:sequence>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200512 <xs:group ref="dimElementGroup" minOccurs="0"/>
Joachim Krechae9507d2016-09-23 14:01:37 +0200513 <xs:element name="name" type="dimableIdentifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200514 <xs:element name="description" type="xs:string"/>
515 <!-- V1.1: alternateCluster specifies an alternative description for a cluster address range that is
516 already fully described. In this case the cluster name must be unique within the peripheral -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200517 <xs:element name="alternateCluster" type="dimableIdentifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200518 <!-- V1.1: headerStructName specifies the name for the cluster structure typedef
519 used in the device header generation instead of the cluster name -->
520 <xs:element name="headerStructName" type="identifierType" minOccurs="0"/>
521 <xs:element name="addressOffset" type="scaledNonNegativeInteger"/>
522 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
523 reset value. These default values are inherited to all registers contained in this peripheral -->
524 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
525 <xs:sequence>
526 <xs:choice minOccurs="1" maxOccurs="unbounded">
527 <xs:element name="register" type="registerType" minOccurs="0" maxOccurs="unbounded"/>
528 <!-- 1.3: nesting of cluster is supported -->
529 <xs:element name="cluster" type="clusterType" minOccurs="0" maxOccurs="unbounded"/>
530 </xs:choice>
531 </xs:sequence>
532 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200533 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200534 </xs:complexType>
535
536 <!-- the registers section can have an arbitrary list of cluster and register sections -->
537 <xs:complexType name="registersType">
538 <xs:choice minOccurs="1" maxOccurs="unbounded">
539 <xs:element name="cluster" type="clusterType"/>
540 <xs:element name="register" type="registerType"/>
541 </xs:choice>
542 </xs:complexType>
543
544 <xs:complexType name="peripheralType">
545 <xs:sequence>
546 <!-- 1.3: specify uni-dimensional array of peripheral - requires name="<name>[%s]" -->
547 <xs:group ref="dimElementGroup" minOccurs="0"/>
548 <!-- name specifies the name of a peripheral. This name is used for the System View and device header file -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200549 <xs:element name="name" type="dimableIdentifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200550 <!-- version specifies the version of the peripheral descriptions -->
551 <xs:element name="version" type="stringType" minOccurs="0"/>
552 <!-- description provides a high level functional description of the peripheral -->
553 <xs:element name="description" type="stringType" minOccurs="0"/>
554 <!-- V1.1: alternatePeripheral specifies an alternative description for an address range that is
555 already fully by a peripheral described. In this case the peripheral name must be unique within the device description -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200556 <xs:element name="alternatePeripheral" type="dimableIdentifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200557 <!-- groupName assigns this peripheral to a group of peripherals. This is only used bye the System View -->
558 <xs:element name="groupName" type="xs:Name" minOccurs="0"/>
GuentherMartin0d379232018-09-04 11:20:34 +0200559 <!-- prependToName specifies a prefix that is placed in front of each register name of this peripheral.
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200560 The device header file will show the registers in a C-Struct of the peripheral without the prefix. -->
561 <xs:element name="prependToName" type="identifierType" minOccurs="0"/>
GuentherMartin0d379232018-09-04 11:20:34 +0200562 <!-- appendToName is a postfix that is appended to each register name of this peripheral. The device header
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200563 file will sho the registers in a C-Struct of the peripheral without the postfix -->
564 <xs:element name="appendToName" type="identifierType" minOccurs="0"/>
565 <!-- V1.1: headerStructName specifies the name for the peripheral structure typedef
566 used in the device header generation instead of the peripheral name -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200567 <xs:element name="headerStructName" type="dimableIdentifierType" minOccurs="0"/>
GuentherMartin0d379232018-09-04 11:20:34 +0200568 <!-- disableCondition contains a logical expression based on constants and register or bit-field values
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200569 if the condition is evaluated to true, the peripheral display will be disabled -->
570 <xs:element name="disableCondition" type="stringType" minOccurs="0"/>
571 <!-- baseAddress specifies the absolute base address of a peripheral. For derived peripherals it is mandatory
572 to specify a baseAddress. -->
573 <xs:element name="baseAddress" type="scaledNonNegativeInteger"/>
574 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
575 reset value. These default values are inherited to all registers contained in this peripheral -->
576 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
GuentherMartin0d379232018-09-04 11:20:34 +0200577 <!-- addressBlock specifies one or more address ranges that are assigned exclusively to this peripheral.
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200578 derived peripherals may have no addressBlock, however none-derived peripherals are required to specify
579 at least one address block -->
580 <xs:element name="addressBlock" type="addressBlockType" minOccurs="0" maxOccurs="unbounded"/>
581 <!-- interrupt specifies can specify one or more interrtupts by name, description and value -->
582 <xs:element name="interrupt" type="interruptType" minOccurs="0" maxOccurs="unbounded"/>
583 <!-- registers section contains all registers owned by the peripheral. In case a peripheral gets derived it does
GuentherMartin0d379232018-09-04 11:20:34 +0200584 not have its own registers section, hence this section is optional. A unique peripheral without a
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200585 registers section is not allowed -->
586 <xs:element name="registers" type="registersType" minOccurs="0" maxOccurs="1">
587 </xs:element>
588 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200589 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200590 </xs:complexType>
GuentherMartin0d379232018-09-04 11:20:34 +0200591
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200592 <!-- ==================================================== -->
593 <!-- The top level element of a description is the device -->
594 <!-- ==================================================== -->
595 <xs:element name="device" nillable="true">
596 <xs:complexType>
597 <xs:sequence>
598 <!-- V1.1: Vendor Name -->
599 <xs:element name="vendor" type="stringType" minOccurs="0"/>
600 <!-- V1.1: Vendor ID - a short name for referring to the vendor (e.g. Texas Instruments = TI) -->
601 <xs:element name="vendorID" type="identifierType" minOccurs="0"/>
602 <!-- name specifies the device name being described -->
603 <xs:element name="name" type="identifierType"/>
604 <!-- V1.1: series specifies the device series or family name -->
605 <xs:element name="series" type="stringType" minOccurs="0"/>
606 <!-- version specifies the version of the device description -->
607 <xs:element name="version" type="stringType"/>
608 <!-- description is a string describing the device features (e.g. memory size, peripherals, etc.) -->
609 <xs:element name="description" type="stringType"/>
610 <!-- V1.1: licenseText specifies the file header section to be included in any derived file -->
611 <xs:element name="licenseText" type="stringType" minOccurs="0"/>
612 <!-- V1.1: cpu specifies the details of the processor included in the device -->
613 <xs:element name="cpu" type="cpuType" minOccurs="0"/>
614 <!-- V1.1: the tag specifies the filename without extension of the CMSIS System Device include file.
615 This tag is used by the header file generator for customizing the include statement referencing the
616 CMSIS system file within the CMSIS device header file. By default the filename is "system_<device.name>"
GuentherMartin0d379232018-09-04 11:20:34 +0200617 In cases a device series shares a single system header file, the name of the series shall be used
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200618 instead of the individual device name. -->
619 <xs:element name="headerSystemFilename" type="identifierType" minOccurs="0"/>
620 <!-- V1.1: headerDefinitionPrefix specifies the string being prepended to all names of types defined in
621 generated device header file -->
622 <xs:element name="headerDefinitionsPrefix" type="identifierType" minOccurs="0"/>
623 <!-- addressUnitBits specifies the size of the minimal addressable unit in bits -->
624 <xs:element name="addressUnitBits" type="scaledNonNegativeInteger"/>
625 <!-- width specifies the number of bits for the maximum single transfer size allowed by the bus interface.
626 This sets the maximum size of a single register that can be defined for an address space -->
627 <xs:element name="width" type="scaledNonNegativeInteger"/>
628 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
629 reset value -->
630 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
631
632 <!-- peripherals is containing all peripherals -->
633 <xs:element name="peripherals">
634 <xs:complexType>
635 <xs:sequence>
636 <xs:element name="peripheral" type="peripheralType" minOccurs="1" maxOccurs="unbounded"/>
637 </xs:sequence>
638 </xs:complexType>
639 </xs:element>
640
641 <!-- Vendor Extensions: this section captures custom extensions. This section will be ignored by default -->
642 <xs:element name="vendorExtensions" minOccurs="0" maxOccurs="1">
643 <xs:complexType>
644 <xs:sequence>
645 <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded">
646 </xs:any>
647 </xs:sequence>
648 </xs:complexType>
649 </xs:element>
650 </xs:sequence>
651 <xs:attribute name="schemaVersion" type="xs:decimal" use="required"/>
652 </xs:complexType>
653 </xs:element>
654</xs:schema>
655
Joachim Krechc4773412016-02-18 09:17:07 +0100656<!-- END OF FILE -->