Metadata-Version: 2.4
Name: peakrdl-ethercat-xml
Version: 0.1.0
Summary: A PeakRDL module that generates an ESI description XML for EtherCAT (see ETG.2000 for details) from a SystemRDL file
Author-email: Dmytro Levit <dmytro.levit@xfel.eu>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/DmytroLevit/peakrdl-ethercat-xml
Project-URL: Repository, https://github.com/DmytroLevit/peakrdl-ethercat-xml
Project-URL: Changelog, https://github.com/DmytroLevit/peakrdl-ethercat-xml/blob/main/CHANGELOG
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: peakrdl>=1.4
Dynamic: license-file

This repository implements a PeakRDL module that generates an ESI description XML for EtherCAT (see ETG.2000 for details) from a SystemRDL file.
The generated file only describes register mapping, therefore it should be copied into the main ESI file of the subdevice inside the `device` tag and after the definition of the sync managers (tag `sm`).

---------------------
Structure of XML file
---------------------

Since the address is only defined in the sync manager configuration, the registers do not carry address information.
Instead, you should consider the memory to be a contiguous bit space and get the address of the fields by counting all fields before the one you are interested in.
Therefore, if there is a gap between fields, this PeakRDL module fills it with a reserved bitfield space. These fields carry a unique name with schema `Reserved_##`.

The `Index` tag relates to the data type.
The `SubIndex` tag is an entry identifier unique to this object (PDO or PDI). It increments on each entry.

-------------------
Local Installation:
-------------------

```pip install .```

--------------
Usage Example:
--------------

```peakrdl ethercat-xml <path/to/system.rdl> -o <output/path>```
