Agora
1.2.0
Agora project
|
#include <gtest/gtest.h>
#include <random>
#include "gettime.h"
#include "memory_manage.h"
#include "message.h"
#include "modulation.h"
Macros | |
#define | NUM_SYMBOLS 1000 |
#define | NUM_ITERATIONS 50 |
Functions | |
static void | ApplyAwgn (complex_float *signal, complex_float *output, int len, float snr) |
static void | Run256QamSoftDemod (void(*demod_func)(const float *, int8_t *, int), const char *func_desc) |
TEST (TestDemod256QAM, SoftLoop) | |
TEST (TestDemod256QAM, SoftSSE) | |
TEST (TestDemod256QAM, SoftAVX2) | |
TEST (TestDemod256QAM, VerifyCorrectness) | |
int | main (int argc, char **argv) |
#define NUM_ITERATIONS 50 |
#define NUM_SYMBOLS 1000 |
|
static |
Adds additive white gaussian noise to the supplied signal
signal | input signal |
output | output signal |
len | length of input and output signal (number of symbols) |
snr | desired SNR in dB |
int main | ( | int | argc, |
char ** | argv | ||
) |
|
static |
Runs 256 QAM soft demodulation across several SNR values, using the provided function for demodulation. Provided to simplify testing.
demod_func | Function to use for demodulation |
func_desc | string describing function |
TEST | ( | TestDemod256QAM | , |
SoftAVX2 | |||
) |
TEST | ( | TestDemod256QAM | , |
SoftLoop | |||
) |
TEST | ( | TestDemod256QAM | , |
SoftSSE | |||
) |
TEST | ( | TestDemod256QAM | , |
VerifyCorrectness | |||
) |
Unlike the rest of the testing suite, this test verifies that all AVX implementations of 256 QAM demodulation produce the EXACT same LLR results. It treats the SSE implementation as a ground truth.
Note: the SSE implementation was verified against the loop one during testing. The loop implementation rounds floats differently, resulting in a slightly different LLR. This is why the SSE implementation is used as a ground truth.