If it's possible in some way, it would be nice if there was a warning / error for not calling and letting bsg_set_tile_xy complete before calling other bsg functions. The issue that I've seen is basically trying to debug code, it's natural to do
int main() {
bsg_printf("Starting main");
bsg_set_tile_x_y();
bsg_printf("Tile set");
}
This is broken, because the endpoint locking relies on bsg_x_y being set. But it breaks in a really unintuitive way, since packets get returned to the wrong cores. Perhaps bsg_set_tile_x_y could set a software bit which is checked by bsg_functions? Or there could be a hardware info assertion that x_y has not been written at least once before packets start sending. Thoughts?
As an aside, is this requirement documented anywhere?
If it's possible in some way, it would be nice if there was a warning / error for not calling and letting bsg_set_tile_xy complete before calling other bsg functions. The issue that I've seen is basically trying to debug code, it's natural to do
This is broken, because the endpoint locking relies on bsg_x_y being set. But it breaks in a really unintuitive way, since packets get returned to the wrong cores. Perhaps bsg_set_tile_x_y could set a software bit which is checked by bsg_functions? Or there could be a hardware info assertion that x_y has not been written at least once before packets start sending. Thoughts?
As an aside, is this requirement documented anywhere?