coduin / epiphany-bsp

BSP implementation for the Parallella; the world's smallest supercomputer
https://jwbuurlage.github.io/epiphany-bsp/
GNU General Public License v3.0
27 stars 14 forks source link

Shared memory layout #11

Closed Tombana closed 9 years ago

Tombana commented 9 years ago

Currently one large block of shared memory is allocated, which in turn is divided into blocks that are 'reserved' for each co-processor. Then the first integer of each co-processor-block is for example sync-state, the second integer is a push_reg variable, and so on. The host processor then polls the sync-state flags repeatedly, meaning that for every iteration it uses e_read 16 times to read out the 16 sync-state integers. Instead, the shared memory block should be used so that the first 16 integers are all the sync-state flags, the next 16 integers are the push_reg variables, and so on. With this method, the host processor only has to do an e_read once per iteration to read out all 16 sync-state flags at the same time.

Tombana commented 9 years ago

Fixed with the ebsp_comm_buf struct in external memory