Commit bac52409 authored by Mitch Burnett's avatar Mitch Burnett
Browse files

Rework of mcnt packet processing logic

The old mcnt packet processing logic would result in blocks being filled out of
order and was also not very reliable when processing packets that arrived
significantly later than the pipeline was currently processing.

These changes address these issues making it so that the pipeline can now handle
late packets and restart at the mcnt it is currently seeing at the network. This
also greatly reduces the amount of bad blocks seen by in RTBF mode because the
logic better handles placing packets and we don't advance mcnts unnecessarily
resulting in marking blocks as filled to early.
parent 888a0621
......@@ -61,7 +61,7 @@ static void * run(hashpipe_thread_args_t * args) {
break;
}
}
//uint64_t start_mcnt = db_in->block[curblock_in].header.mcnt;
uint64_t start_mcnt = db_in->block[curblock_in].header.mcnt;
int good_data = (int)(db_in->block[curblock_in].header.good_data);
char BANK[5];
......@@ -73,7 +73,7 @@ static void * run(hashpipe_thread_args_t * args) {
char filename[256];
sprintf(filename, "/dev/null");
//sprintf(filename, "%s/TGBT16A_508_01/TMP/BF/beamformer_%s_mcnt_%lld.out", data_dir, BANK, (long long)start_mcnt);
//fprintf(stderr, "Saving to %s mcnt: %lld\n", filename, (long long)start_mcnt);
fprintf(stderr, "Saving to %s mcnt: %lld\n", filename, (long long)start_mcnt);
//printf("RTBF: mcnt: %lld\n", (long long)start_mcnt);
if (SAVE) {
float * p = (float *)db_in->block[curblock_in].data;
......
......@@ -119,6 +119,7 @@
// Number of packets per block
#define N_PACKETS_PER_BLOCK (N_BYTES_PER_BLOCK / N_BYTES_PER_PAYLOAD)
#define N_REAL_PACKETS_PER_BLOCK (N_REAL_BYTES_PER_BLOCK / N_BYTES_PER_PAYLOAD)
#define N_PACKETS_PER_BLOCK_PER_F (N_PACKETS_PER_BLOCK / N_FENGINES)
// Macro to compute data word offset for complex data word
#define Nm (N_TIME_PER_BLOCK/N_TIME_PER_PACKET) // Number of mcnts per block
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment