Agora  1.2.0
Agora project
test_256qam_demod.cc File Reference
#include <gtest/gtest.h>
#include <random>
#include "gettime.h"
#include "memory_manage.h"
#include "message.h"
#include "modulation.h"
Include dependency graph for test_256qam_demod.cc:

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)
 

Macro Definition Documentation

◆ NUM_ITERATIONS

#define NUM_ITERATIONS   50

◆ NUM_SYMBOLS

#define NUM_SYMBOLS   1000

Function Documentation

◆ ApplyAwgn()

static void ApplyAwgn ( complex_float signal,
complex_float output,
int  len,
float  snr 
)
static

Adds additive white gaussian noise to the supplied signal

Parameters
signalinput signal
outputoutput signal
lenlength of input and output signal (number of symbols)
snrdesired SNR in dB
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

◆ Run256QamSoftDemod()

static void Run256QamSoftDemod ( void(*)(const float *, int8_t *, int)  demod_func,
const char *  func_desc 
)
static

Runs 256 QAM soft demodulation across several SNR values, using the provided function for demodulation. Provided to simplify testing.

Parameters
demod_funcFunction to use for demodulation
func_descstring describing function
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TEST() [1/4]

TEST ( TestDemod256QAM  ,
SoftAVX2   
)
Here is the call graph for this function:

◆ TEST() [2/4]

TEST ( TestDemod256QAM  ,
SoftLoop   
)
Here is the call graph for this function:

◆ TEST() [3/4]

TEST ( TestDemod256QAM  ,
SoftSSE   
)
Here is the call graph for this function:

◆ TEST() [4/4]

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.

Here is the call graph for this function: