You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #548 the reason for fixing CSR locations was described quite well. In addition to this it would be helpful to generate a header per device which contains CSR offsets and field information.
These headers should change rarely as they define the ABI of the peripheral, but they could be copied into device drivers and avoiding needing to manually generate this information.
For example, Linux and Nuttx drivers currently will have manually hard coded register offsets and bit definitions which are used in conjunction with dynamic information from a device tree. It would be nice to guarantee the accuracy of this hard coded information by having it originally be generated from the gateware. CI tests can also validate that newly generated headers do not break the existing ABI used in public drivers.
Ideally one header would be generated per-class, vs the per-instance definitions in csr.h.
Even for bare metal code like the bios supporting multiple instances of a peripheral via csr.h is not ideal. So code like this tends to be hard coded to a single instance.
This would be helpful for any device drivers using the device tree to manage instances in a dynamic way as discussed in #1960 instead of relying on csr.h.
The text was updated successfully, but these errors were encountered:
In #548 the reason for fixing CSR locations was described quite well. In addition to this it would be helpful to generate a header per device which contains CSR offsets and field information.
These headers should change rarely as they define the ABI of the peripheral, but they could be copied into device drivers and avoiding needing to manually generate this information.
For example, Linux and Nuttx drivers currently will have manually hard coded register offsets and bit definitions which are used in conjunction with dynamic information from a device tree. It would be nice to guarantee the accuracy of this hard coded information by having it originally be generated from the gateware. CI tests can also validate that newly generated headers do not break the existing ABI used in public drivers.
Ideally one header would be generated per-class, vs the per-instance definitions in csr.h.
Even for bare metal code like the bios supporting multiple instances of a peripheral via csr.h is not ideal. So code like this tends to be hard coded to a single instance.
This would be helpful for any device drivers using the device tree to manage instances in a dynamic way as discussed in #1960 instead of relying on
csr.h
.The text was updated successfully, but these errors were encountered: