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
This works fine when we need to explicitly access a CSR. For example, when handling an exception, we read and write to the same set of CSRs every time and can access them by name. What these macros don't support is accessing a CSR through a register pointer like this:
The problem is that we don't have a way of getting the CSR fields or the writable_fields_bit_mask without having the name of the CSR. Open to suggestions on how to improve this. One idea would be to take the CSR structs that contain the field definitions and put them in a map indexed by the CSR number.
The text was updated successfully, but these errors were encountered:
In
arch/register_macros.hpp
, we have several macros defined for reading and writing to whole CSR registers and CSR fields:atlas/arch/register_macros.hpp
Lines 37 to 70 in 536e76a
This works fine when we need to explicitly access a CSR. For example, when handling an exception, we read and write to the same set of CSRs every time and can access them by name. What these macros don't support is accessing a CSR through a register pointer like this:
The problem is that we don't have a way of getting the CSR fields or the
writable_fields_bit_mask
without having the name of the CSR. Open to suggestions on how to improve this. One idea would be to take the CSR structs that contain the field definitions and put them in a map indexed by the CSR number.The text was updated successfully, but these errors were encountered: