bespoke-silicon-group / bsg_manycore

Tile based architecture designed for computing efficiency, scalability and generality
Other
221 stars 58 forks source link

Assertion for bsg_set_tile_x_y completion #634

Open dpetrisko opened 2 years ago

dpetrisko commented 2 years ago

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?