This PR adjusts your example C and Markdown generators to account for this (very often overlooked) feature of IP-XACT: addressUnitBits.
The IP-XACT addressUnitBits property defines the scale factor used for address increments. In most cases, this property is not used and defaults to 8. However often some of the "big-name" vendors will provide IP definitions that use a less common AUB value of 16 or 32 in order to communicate that the addressing is word-based rather than byte-based. This means that for every +1 increment in IP-XACT baseAddress or addressOffset, the true byte address increment is +2 or +4 respectively.
Some colleagues of mine were using your C header generator example and were confused why the resulting address offsets were off by a factor of 2.
Description from the IP-XACT spec:
This diagram is another way to visualize the concept which is somewhat helpful:
Hi Olof!
This PR adjusts your example C and Markdown generators to account for this (very often overlooked) feature of IP-XACT: addressUnitBits.
The IP-XACT
addressUnitBits
property defines the scale factor used for address increments. In most cases, this property is not used and defaults to 8. However often some of the "big-name" vendors will provide IP definitions that use a less common AUB value of 16 or 32 in order to communicate that the addressing is word-based rather than byte-based. This means that for every +1 increment in IP-XACTbaseAddress
oraddressOffset
, the true byte address increment is +2 or +4 respectively. Some colleagues of mine were using your C header generator example and were confused why the resulting address offsets were off by a factor of 2.Description from the IP-XACT spec:
This diagram is another way to visualize the concept which is somewhat helpful: