-
Notifications
You must be signed in to change notification settings - Fork 249
Description
Hello!
I am reaching out to discuss some enhancements we are considering for our RISC-V processors test generator. Currently, we are utilizing SAIL as our golden model. To streamline our workflow, we believe it would greatly benefit our project to receive notifications when the model undergoes changes in its state.
Our proposed solution involves implementing callbacks, which would involve invoking functions via pointers whenever a specified change occurs within the model's state. Specifically, we are seeking to incorporate the following function declarations within the SAIL code:
Type Definitions:
Callback handler: typedef struct callback_handler callback_handler;
Callback Functions:
mem_update_callback_t
xreg_update_callback_t
freg_update_callback_t
vreg_update_callback_t
pc_update_callback_t
Following the implementation of these declarations, any user would have the ability to furnish their own implementation of the handler and associated functions. Consequently, this would enable immediate actions to be executed upon any state changes within the model.
In order to integrate this functionality, we would require calls to these functions (if defined) at the time of the changes within the following function definitions:
void zphys_mem_write(struct zMemoryOpResultzIozK *zcbz3590, enum zwrite_kind zwk, uint64_t zpaddr, int64_t zwidth, lbits zdata, unit zmeta)
unit zwX(int64_t zr, uint64_t zin_v)
unit zwF(int64_t zr, uint64_t zin_v)
unit zwrite_single_vreg(sail_int znum_elem, sail_int zSEW, uint64_t zvrid, zz5vecz8z5bvz9 zv)
unit zset_next_pc(uint64_t zpc)
Could you please provide your feedback on the feasibility of incorporating this functionality into sail-riscv? We believe it could significantly enhance our testing capabilities, but we would greatly appreciate your insights and guidance on this matter.
Thank you very much for your time and consideration.
Best regards,
Ksenia Dobrovolskaya.