PeakRDL-ipxact
PeakRDL-ipxact copied to clipboard
Extend value parsing to interpret constant expressions
Apparently kactus2 will generate IP-XACT that contains constant expressions:
<ipxact:reset>
<ipxact:value>('hABCD) / $pow(2,0) % $pow(2,8)</ipxact:value>
<ipxact:mask>('hffff) / $pow(2,0) % $pow(2,8)</ipxact:mask>
</ipxact:reset>
Look into extending the importer to parse and evaluate these.
The above example is due to how Accellera defines IP-XACT conversions. Since this is implemented using an XSL transformation, they do not have a good mechanism to perform bit-slicing for register to field reset value conversion. Instead the XSL template performs this by wrapping it in an expression. https://github.com/kactus2/k2xml_converter/blob/master/Conversion_Rules/from1685_2009_to_1685_2014.xsl#L977
Aside from this XSL conversion side-effect, not sure how common this situation actually is. I have yet to encounter much meaningful use of expressions in IP-XACT.