diff options
author | Keith Packard <keithp@keithp.com> | 2012-06-27 19:47:52 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-06-27 19:47:52 -0700 |
commit | bd21c050fd8b96b33ab6859c942bf55cf2b91868 (patch) | |
tree | f5d38393e4b0c0e50bd2e23773767a77f9c896df /src/drivers/ao_packet.c | |
parent | 407cefae9cb95c5910b3bd79851776c48729e06b (diff) |
altos: Make profiling Viterbi decoder more useful
This blocks starting the decoder until all of the data have arrived so
that the time spent in the decoder is easily computed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_packet.c')
-rw-r--r-- | src/drivers/ao_packet.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/drivers/ao_packet.c b/src/drivers/ao_packet.c index 28a0c415..e020c003 100644 --- a/src/drivers/ao_packet.c +++ b/src/drivers/ao_packet.c @@ -61,6 +61,18 @@ ao_packet_recv(void) #ifdef AO_LED_GREEN ao_led_off(AO_LED_GREEN); #endif +#if AO_PROFILE + { + extern uint32_t ao_rx_start_tick, ao_rx_packet_tick, ao_rx_done_tick, ao_rx_last_done_tick; + extern uint32_t ao_fec_decode_start, ao_fec_decode_end; + + printf ("between packet: %d\n", ao_rx_start_tick - ao_rx_last_done_tick); + printf ("receive start delay: %d\n", ao_rx_packet_tick - ao_rx_start_tick); + printf ("decode time: %d\n", ao_fec_decode_end - ao_fec_decode_start); + printf ("rx cleanup: %d\n\n", ao_rx_done_tick - ao_fec_decode_end); + flush(); + } +#endif /* Check to see if we got a valid packet */ if (!dma_done) |