Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend value parsing to interpret constant expressions #18

Open
amykyta3 opened this issue Jun 8, 2023 · 0 comments
Open

Extend value parsing to interpret constant expressions #18

amykyta3 opened this issue Jun 8, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@amykyta3
Copy link
Member

amykyta3 commented Jun 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant