Skip to content

Commit

Permalink
included additional timeout debugging output.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Plana committed Mar 17, 2022
1 parent b3f138c commit 5f46d2b
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
*.tab
*.txt
!/examples/*/*.txt
/examples/Makefile*
/examples/*/Makefile*
**/spiNNakerGraphFrontEnd.cfg
**/spynnaker.cfg
**/application_generated_data_files
Expand Down
7 changes: 6 additions & 1 deletion c_code/comms_i.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 21 additions & 2 deletions c_code/comms_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand Down
24 changes: 21 additions & 3 deletions c_code/comms_t.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand Down
13 changes: 12 additions & 1 deletion c_code/comms_w.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions c_code/process_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions c_code/process_t.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 18 additions & 0 deletions c_code/threshold.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;

Expand Down

0 comments on commit 5f46d2b

Please sign in to comment.