Track bytes from baseband and dropped when entering capture FIFO.

This commit is contained in:
Jared Boone 2016-04-27 10:40:50 -07:00
parent d63136c52e
commit 1789868b8a
2 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,8 @@ public:
if( (bytes_written & event_bytes_mask) < (last_bytes_written & event_bytes_mask) ) { if( (bytes_written & event_bytes_mask) < (last_bytes_written & event_bytes_mask) ) {
creg::m4txevent::assert(); creg::m4txevent::assert();
} }
config->baseband_bytes_received += length;
config->baseband_bytes_dropped = config->baseband_bytes_received - bytes_written;
return written; return written;
} }

View File

@ -413,6 +413,8 @@ public:
struct CaptureConfig { struct CaptureConfig {
const size_t write_size_log2; const size_t write_size_log2;
const size_t buffer_count_log2; const size_t buffer_count_log2;
uint64_t baseband_bytes_received;
uint64_t baseband_bytes_dropped;
FIFO<uint8_t>* fifo; FIFO<uint8_t>* fifo;
constexpr CaptureConfig( constexpr CaptureConfig(
@ -420,6 +422,8 @@ struct CaptureConfig {
const size_t buffer_count_log2 const size_t buffer_count_log2
) : write_size_log2 { write_size_log2 }, ) : write_size_log2 { write_size_log2 },
buffer_count_log2 { buffer_count_log2 }, buffer_count_log2 { buffer_count_log2 },
baseband_bytes_received { 0 },
baseband_bytes_dropped { 0 },
fifo { nullptr } fifo { nullptr }
{ {
} }