* Tools: Interrupts package generation in SVD parsing script

This commit is contained in:
Vovanium 2021-11-24 17:00:52 +03:00
parent 2a6a70057c
commit a40c45528c
1 changed files with 5 additions and 2 deletions

View File

@ -97,13 +97,16 @@
<xsl:variable name="file" select="concat(name, '.ads')"/>
<xsl:document href="{$file}" method="text">
package <xsl:value-of select="name"/> is
<xsl:text> package Interrupts is
</xsl:text>
<xsl:for-each select="peripherals/peripheral">
<xsl:sort select="baseAddress"/>
<xsl:for-each select="interrupt[not(value=preceding-sibling::interrupt/value)]">
<xsl:sort data-type="number" select="value"/>
<xsl:text> </xsl:text><xsl:value-of select="name"/><xsl:text> : constant Interrupt := </xsl:text><xsl:value-of select="value"/>;
<xsl:sort data-type="number" select="value"/>
<xsl:text> </xsl:text><xsl:value-of select="name"/><xsl:text> : constant := </xsl:text><xsl:value-of select="value"/>;
</xsl:for-each>
</xsl:for-each>
<xsl:text> end Interrupts;</xsl:text>
package Address_Map is
<xsl:for-each select="peripherals/peripheral">