From 1789868b8a6311d6490f02b082cefdc9991c44ea Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 27 Apr 2016 10:40:50 -0700 Subject: [PATCH] Track bytes from baseband and dropped when entering capture FIFO. --- firmware/baseband/stream_input.hpp | 2 ++ firmware/common/message.hpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/firmware/baseband/stream_input.hpp b/firmware/baseband/stream_input.hpp index 8a8107492..cb4bbe4e1 100644 --- a/firmware/baseband/stream_input.hpp +++ b/firmware/baseband/stream_input.hpp @@ -52,6 +52,8 @@ public: if( (bytes_written & event_bytes_mask) < (last_bytes_written & event_bytes_mask) ) { creg::m4txevent::assert(); } + config->baseband_bytes_received += length; + config->baseband_bytes_dropped = config->baseband_bytes_received - bytes_written; return written; } diff --git a/firmware/common/message.hpp b/firmware/common/message.hpp index 1c906c611..bd53d352c 100644 --- a/firmware/common/message.hpp +++ b/firmware/common/message.hpp @@ -413,6 +413,8 @@ public: struct CaptureConfig { const size_t write_size_log2; const size_t buffer_count_log2; + uint64_t baseband_bytes_received; + uint64_t baseband_bytes_dropped; FIFO* fifo; constexpr CaptureConfig( @@ -420,6 +422,8 @@ struct CaptureConfig { const size_t buffer_count_log2 ) : write_size_log2 { write_size_log2 }, buffer_count_log2 { buffer_count_log2 }, + baseband_bytes_received { 0 }, + baseband_bytes_dropped { 0 }, fifo { nullptr } { }