You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SVD schema 1.3.1 allows use of tags to define arrays/lists of peripheralType. The schema is used by svd2ada but the current implementation raises CONSTRAINT_ERROR because it doesn't recognize the dim-related tags when they appear in a peripheralType.
<xs:complexTypename="peripheralType">
<xs:sequence>
<!-- 1.3: specify uni-dimensional array of peripheral - requires name="<name>[%s]" -->
<xs:groupref="dimElementGroup"minOccurs="0"/>
<!-- name specifies the name of a peripheral. This name is used for the System View and device header file -->
dimElementGroup contains tags defining the kind of list of peripherals based on the peripheral containing the dim-tag, pretty much like it's done for registers, too.
<!-- dimElementGroup specifies the number of array elements (dim), the address offset between to consecutive array elements and an a comma seperated list of strings being used for identifying each element in the array -->
<xs:groupname="dimElementGroup">
<xs:sequence>
<xs:elementname="dim"type="scaledNonNegativeInteger"/>
<xs:elementname="dimIncrement"type="scaledNonNegativeInteger"/>
<xs:elementname="dimIndex"type="dimIndexType"minOccurs="0"/>
</xs:sequence>
</xs:group>
My assumption is that svd2ada implements the schema which is located in directory schema of this project, but this might be wrong, so I'm sorry in case I've missed something!
Support of dimElementGroup for peripheralType would reduce SVD size and complexity, and thus the resulting code, at least in case a device realizes multiple instances of an individual periphery. Using arrays could also simplify the driver implementation.
A similar effect could be achieved by use of clusters. I guess this therefore is not a major blocker... But once there's a more complex SVD which makes use of this feaure, it would be necessary to modify the file to work around this issue.
If there were plans to realize this in svd2ada, it might be worth considering an update to SVD version 1.3.9 which additionally supports dimArrayIndex in dimElementGroup. This is pretty useful when it comes to symbolic access of array elements (applicable to all tags supporting dimElementGroup, not only periphalType). Further information on this can be found here: https://www.keil.com/pack/doc/CMSIS/SVD/html/elem_special.html#elem_dimArrayIndex
The text was updated successfully, but these errors were encountered:
SVD schema 1.3.1 allows use of tags to define arrays/lists of
peripheralType
. The schema is used bysvd2ada
but the current implementation raisesCONSTRAINT_ERROR
because it doesn't recognize the dim-related tags when they appear in aperipheralType
.dimElementGroup
contains tags defining the kind of list of peripherals based on the peripheral containing the dim-tag, pretty much like it's done for registers, too.My assumption is that
svd2ada
implements the schema which is located in directoryschema
of this project, but this might be wrong, so I'm sorry in case I've missed something!Support of
dimElementGroup
forperipheralType
would reduce SVD size and complexity, and thus the resulting code, at least in case a device realizes multiple instances of an individual periphery. Using arrays could also simplify the driver implementation.A similar effect could be achieved by use of clusters. I guess this therefore is not a major blocker... But once there's a more complex SVD which makes use of this feaure, it would be necessary to modify the file to work around this issue.
If there were plans to realize this in
svd2ada
, it might be worth considering an update to SVD version 1.3.9 which additionally supportsdimArrayIndex
indimElementGroup
. This is pretty useful when it comes to symbolic access of array elements (applicable to all tags supportingdimElementGroup
, not onlyperiphalType
). Further information on this can be found here: https://www.keil.com/pack/doc/CMSIS/SVD/html/elem_special.html#elem_dimArrayIndexThe text was updated successfully, but these errors were encountered: