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
Adding a status beat to the currently open proposal Add hearbeat register #45 that codes a generic error state
Add a R_ERROR register (U8) to the harp core
Add application notes on how to use this register
Motivation
We want a way to be able to encode error states but also to be able to provide users with more information on how to potentially handle these errors.
Because errors are likely device-specific, I want to decouple the Error pointer from the error information.
Detailed Design
From past discussions, I believe this is the most up-to-date proposal:
1- Add Error register (U8) (value to be a pointer to the address of failing register or address of register with more info). Another way to see this is that zero is pointing to the WHO_AM_I register which by definition is never in error, otherwise the register can point to a register that either provides more information (e.g. enumerator with error code) or to a register directly.
2 - The Error register should emit an event each time an error is raised. Once cleared, it should go back to 0.
3 - Keep ERROR(bit2) bit in R_HEARTBEAT register. This bit is set automatically by the core code whenever the Error register is not zero. While this bit may initially appear redundant, its usefulness comes from the period nature of the heartbeat register. The heartbeat will keep sending the error bit until the error is handled and will thus provide users with a way to correctly handle the error state.
Drawbacks
Alternatives
###Error flag in every harp message (usually used for erroneous write command)
A bit hard to use since this bit has historically been reserved for interface-related errors (e.g. write to read-only reg)
Error bit in heartbeat (sent periodically with heartbeat but with no information on how the error occurred)
Subset of the full proposal
Error register with device-specific code (event register and would store the last error until cleared, to be included in read dump)
This makes it really hard to track the error codes. The proposed solution has an interesting advantage where people could code their error states in the device.yml and use the R_ERROR to point to that register.
Unresolved Questions
How to clear the error state?
One idea could be to simply write 0 to R_ERROR? The error is assumed to be cleared. If the error is remains a new event can be emitted.
Summary
This proposal would be centered around 3 changes:
R_ERROR
register (U8) to the harp coreMotivation
We want a way to be able to encode error states but also to be able to provide users with more information on how to potentially handle these errors.
Because errors are likely device-specific, I want to decouple the Error pointer from the error information.
Detailed Design
From past discussions, I believe this is the most up-to-date proposal:
1- Add Error register (U8) (value to be a pointer to the address of failing register or address of register with more info). Another way to see this is that zero is pointing to the WHO_AM_I register which by definition is never in error, otherwise the register can point to a register that either provides more information (e.g. enumerator with error code) or to a register directly.
2 - The Error register should emit an event each time an error is raised. Once cleared, it should go back to 0.
3 - Keep
ERROR
(bit2) bit inR_HEARTBEAT
register. This bit is set automatically by the core code whenever the Error register is not zero. While this bit may initially appear redundant, its usefulness comes from the period nature of the heartbeat register. The heartbeat will keep sending the error bit until the error is handled and will thus provide users with a way to correctly handle the error state.Drawbacks
Alternatives
###Error flag in every harp message (usually used for erroneous write command)
A bit hard to use since this bit has historically been reserved for interface-related errors (e.g. write to read-only reg)
Error bit in heartbeat (sent periodically with heartbeat but with no information on how the error occurred)
Subset of the full proposal
Error register with device-specific code (event register and would store the last error until cleared, to be included in read dump)
This makes it really hard to track the error codes. The proposed solution has an interesting advantage where people could code their error states in the device.yml and use the
R_ERROR
to point to that register.Unresolved Questions
How to clear the error state?
One idea could be to simply write
0
toR_ERROR
? The error is assumed to be cleared. If the error is remains a new event can be emitted.Design Meetings
#45 (comment)
The text was updated successfully, but these errors were encountered: