SystemRDL / PeakRDL-ipxact

Import and export IP-XACT XML register models
http://peakrdl-ipxact.readthedocs.io
GNU General Public License v3.0
31 stars 10 forks source link

Volatile property interpretation #22

Closed markcohen32 closed 10 months ago

markcohen32 commented 10 months ago

Hi,

I'd like to know how the parser treats <ipxact:volatile>true</ipxact:volatile> for fields. Is there a property that is being added to fields?

Thanks

amykyta3 commented 10 months ago

Since volatile is not a direct property in SystemRDL, there is no direct translation possible. Instead, <ipxact:volatile> is used in some areas to make a best guess as to what RDL properties to use, namely the value for the hw property.

For example if IP-XACT specifies read-write access, but not volatile, then that implies an rdl property of hw=r. However if IP-XACT specifies that it is volatile, then at the very least it implies that the hardware can change its value, and therefore assumes the RDL property is hw=rw

Implementation of this is here: https://github.com/SystemRDL/PeakRDL-ipxact/blob/main/src/peakrdl_ipxact/importer.py#L631-L640