CMSIS-SVD
Version 1.10
CMSIS System View Description
|
The SVD specification supports the array-of-registers concept. The single register description gets duplicated automatically into an array. The size of the array is specified by the <dim> element. The register names can be composed by the register name and an index-specific substring defined in <dimIndex>. The <dimIncrement> specifies the address offset between two registers. The elements below can be used to generate an array of registers.
Element Name | Description | Type | Occurrence |
---|---|---|---|
dim | The value defines the number of elements in an array of registers. | scaledNonNegativeInteger | 1..1 |
dimIncrement | If dim is specified, this element becomes mandatory. The element specifies the address increment in between two neighboring registers of the register array in the address map. | scaledNonNegativeInteger | 1..1 |
dimIndex | Specifies the substrings that replaces the s placeholder within the register name. By default, the index is a decimal value starting with 0 for the first register. | dimIndexType | 0..1 |
... <register> <dim>6</dim> <dimIncrement>4</dimIncrement> <dimIndex>A,B,C,D,E,Z</dimIndex> <name>GPIO_%s_CTRL</name> ... </register>
The code above generates: => GPIO_A_CTRL, GPIO_B_CTRL, GPIO_C_CTRL, GPIO_D_CTRL, GPIO_E_CTRL, GPIO_Z_CTRL
... <register> <dim>4</dim> <dimIncrement>4</dimIncrement> <dimIndex>3-6</dimIndex> <name>IRQ%s</name> ... </register>
The example above generates: => IRQ3, IRQ4, IRQ5, IRQ6