reserved enough size in the fifo buffer to reorder all added proper 4 byte alignment

This commit is contained in:
2025-03-18 21:42:34 +01:00
parent e0a48e1e75
commit f056f9d31b
4 changed files with 75 additions and 36 deletions

View File

@ -106,7 +106,11 @@ class DataProcessorTestFixture {
void set_data() {
delete[] data;
data = new char[get_size()];
uint64_t max_bytes_per_bit =
num_samples % 8 == 0 ? num_samples / 8 : num_samples / 8 + 1;
uint64_t reserved_size =
get_size() - num_digital_bytes + max_bytes_per_bit * 64;
data = new char[reserved_size];
// set testing data
memset(data, dummy_value, num_analog_bytes); // set to dummy value