diff --git a/.gitignore b/.gitignore index 23884e3..696a56e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ *.tab *.txt !/examples/*/*.txt +/examples/Makefile* +/examples/*/Makefile* **/spiNNakerGraphFrontEnd.cfg **/spynnaker.cfg **/application_generated_data_files diff --git a/c_code/comms_i.c b/c_code/comms_i.c index f89876c..d5253ea 100644 --- a/c_code/comms_i.c +++ b/c_code/comms_i.c @@ -274,7 +274,12 @@ void i_net_stop_packet (uint key) // ------------------------------------------------------------------------ void i_dlrv_packet (void) { - // restart tick +#ifdef DEBUG + io_printf (IO_BUF, "timeout (h:%u e:%u p:%u t:%u) - restarted\n", + epoch, example_cnt, phase, tick + ); +#endif + if (phase == SPINN_FORWARD) { // initialise thread semaphore diff --git a/c_code/comms_s.c b/c_code/comms_s.c index fa4e0cb..327b6fe 100644 --- a/c_code/comms_s.c +++ b/c_code/comms_s.c @@ -468,12 +468,26 @@ void s_fsgn_packet (void) // ------------------------------------------------------------------------ void s_dlrv_packet (void) { +#ifdef DEBUG + io_printf (IO_BUF, "timeout (h:%u e:%u p:%u t:%u) - restarted!\n", + epoch, example_cnt, phase, tick + ); + io_printf (IO_BUF, "(bd:%u)\n", sb_done); + for (uint i = 0; i < scfg.num_units; i++) + { + io_printf (IO_BUF, "%2d: (fa:%u ba:%u)\n", i, + sf_arrived[i], sb_arrived[i] + ); + } + io_printf (IO_BUF, "(fptd:0x%02x bptd:0x%02x)\n", sf_thrds_pend, sb_thrds_pend); +#endif + // restart tick if (phase == SPINN_FORWARD) { #ifdef DEBUG - fsg_sent = 0; - fsg_recv = 0; + fsg_sent = 0; + fsg_recv = 0; #endif // initialise thread semaphore, @@ -490,6 +504,11 @@ void s_dlrv_packet (void) } else { +#ifdef DEBUG + bsg_sent = 0; + bsg_recv = 0; +#endif + // initialise thread semaphore, sb_thrds_pend = sb_thrds_init; diff --git a/c_code/comms_t.c b/c_code/comms_t.c index 0cd195b..80afc78 100644 --- a/c_code/comms_t.c +++ b/c_code/comms_t.c @@ -420,13 +420,26 @@ void t_net_stop_packet (uint key) // ------------------------------------------------------------------------ void t_dlrv_packet (void) { +#ifdef DEBUG + io_printf (IO_BUF, "timeout (h:%u e:%u p:%u t:%u) - restarted\n", + epoch, example_cnt, phase, tick + ); + io_printf (IO_BUF, "(tactive:%u ta:%u/%u tb:%u/%u)\n", + tf_active, tf_arrived, tcfg.num_units, + tb_arrived, tcfg.num_units + ); + io_printf (IO_BUF, "(fptd:0x%02x bptd:0x%02x)\n", + tf_thrds_pend, tb_thrds_pend + ); +#endif + // restart tick if (phase == SPINN_FORWARD) { #ifdef DEBUG - crt_sent = 0; - crt_recv = 0; - fsg_recv = 0; + crt_sent = 0; + crt_recv = 0; + fsg_recv = 0; #endif // initialise thread semaphore, @@ -444,6 +457,11 @@ void t_dlrv_packet (void) } else { +#ifdef DEBUG + bsg_sent = 0; + bsg_recv = 0; +#endif + // initialise thread semaphore, tb_thrds_pend = tb_thrds_init; diff --git a/c_code/comms_w.c b/c_code/comms_w.c index b619bd5..bc26f38 100644 --- a/c_code/comms_w.c +++ b/c_code/comms_w.c @@ -359,11 +359,22 @@ void w_net_stop_packet (uint key) // ------------------------------------------------------------------------ void w_dlrv_packet (void) { +#ifdef DEBUG + io_printf (IO_BUF, "timeout (h:%u e:%u p:%u t:%u) - restarted\n", + epoch, example_cnt, phase, tick + ); + io_printf (IO_BUF, "(fp:%u fc:%u)\n", wf_procs, wf_comms); + io_printf (IO_BUF, "(fa:%u/%u ba:%u/%u)\n", + wf_arrived, wcfg.num_rows, wb_arrived, wcfg.num_cols + ); + io_printf (IO_BUF, "(fptd:0x%02x bptd:0x%02x)\n", wf_thrds_pend, wb_thrds_pend); +#endif + // restart tick if (phase == SPINN_FORWARD) { #ifdef DEBUG - fsg_sent = 0; + fsg_sent = 0; #endif // initialise thread semaphore, diff --git a/c_code/process_s.c b/c_code/process_s.c index 8d2c883..e659325 100644 --- a/c_code/process_s.c +++ b/c_code/process_s.c @@ -276,6 +276,8 @@ void sb_advance_tick (uint unused0, uint unused1) #ifdef DEBUG tot_tick++; + bsg_sent = 0; + bsg_recv = 0; #endif // check if end of BACKPROP phase diff --git a/c_code/process_t.c b/c_code/process_t.c index 5ecb4bd..e1fba31 100644 --- a/c_code/process_t.c +++ b/c_code/process_t.c @@ -287,6 +287,8 @@ void tb_advance_tick (uint unused0, uint unused1) #ifdef DEBUG tot_tick++; + bsg_sent = 0; + bsg_recv = 0; #endif // update pointer to processing unit outputs, diff --git a/c_code/threshold.c b/c_code/threshold.c index 2c2abc3..5daaa05 100644 --- a/c_code/threshold.c +++ b/c_code/threshold.c @@ -293,6 +293,19 @@ void timeout (uint ticks, uint unused) // send deadlock recovery packet to all other cores while (!spin1_send_mc_packet(tf_dlrv_key, 0, NO_PAYLOAD)); +#ifdef DEBUG + io_printf (IO_BUF, "timeout (h:%u e:%u p:%u t:%u) - restarted\n", + epoch, example_cnt, phase, tick + ); + io_printf (IO_BUF, "(tactive:%u ta:%u/%u tb:%u/%u)\n", + tf_active, tf_arrived, tcfg.num_units, + tb_arrived, tcfg.num_units + ); + io_printf (IO_BUF, "(fptd:0x%02x bptd:0x%02x)\n", + tf_thrds_pend, tb_thrds_pend + ); +#endif + // restart tick if (phase == SPINN_FORWARD) { @@ -317,6 +330,11 @@ void timeout (uint ticks, uint unused) } else { +#ifdef DEBUG + bsg_sent = 0; + bsg_recv = 0; +#endif + // initialise thread semaphore, tb_thrds_pend = tb_thrds_init;