|
|
@ -30,173 +30,207 @@
|
|
|
|
#define PMI_SELECT_TEST_NOF_CASES 16
|
|
|
|
#define PMI_SELECT_TEST_NOF_CASES 16
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
typedef struct {
|
|
|
|
cf_t h[2][2];
|
|
|
|
cf_t h[2][2]; /* Channel estimate */
|
|
|
|
float n;
|
|
|
|
float n; /* Noise estimation */
|
|
|
|
float snri_1l[4];
|
|
|
|
float snri_1l[4]; /* SINR Approximation for 1 layer (linear) */
|
|
|
|
float snri_2l[2];
|
|
|
|
float snri_2l[2]; /* SINR Approximation for 2 layers (linear) */
|
|
|
|
uint32_t pmi[2];
|
|
|
|
uint32_t pmi[2]; /* Precoding Matrix Indicator for 1 and 2 layers */
|
|
|
|
|
|
|
|
uint32_t ri; /* Rank indicator */
|
|
|
|
|
|
|
|
float k; /* Condition number (κ) in dB */
|
|
|
|
} pmi_select_test_case_gold_t;
|
|
|
|
} pmi_select_test_case_gold_t;
|
|
|
|
|
|
|
|
|
|
|
|
static pmi_select_test_case_gold_t pmi_select_test_case_gold [PMI_SELECT_TEST_NOF_CASES] = {
|
|
|
|
static pmi_select_test_case_gold_t pmi_select_test_case_gold [PMI_SELECT_TEST_NOF_CASES] = {
|
|
|
|
{ /* Test case 1 */
|
|
|
|
{ /* Test case 1 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{+0.103430f+0.455920f*_Complex_I, +0.042050f+0.751883f*_Complex_I},
|
|
|
|
{+0.861552f+0.205546f*_Complex_I, +0.955538f-0.052364f*_Complex_I},
|
|
|
|
{-0.641951f-0.053356f*_Complex_I, +0.217847f+0.504428f*_Complex_I}
|
|
|
|
{-0.812807f-0.287487f*_Complex_I, +0.323470f-0.048843f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.181048,
|
|
|
|
.n = 0.671022,
|
|
|
|
.snri_1l = {5.793827f, 2.505115f, 3.350922f, 4.948020f},
|
|
|
|
.snri_1l = {1.233339f, 2.567786f, 2.065012f, 1.736113f},
|
|
|
|
.snri_2l = {2.015732f, 1.848130f},
|
|
|
|
.snri_2l = {0.893739f, 0.841600f},
|
|
|
|
.pmi = {0, 0},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
|
|
|
|
.ri = 2,
|
|
|
|
|
|
|
|
.k = 4.6758,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 2 */
|
|
|
|
{ /* Test case 2 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.957328f-0.624816f*_Complex_I, -0.741457f-0.657570f*_Complex_I},
|
|
|
|
{+0.919290f+0.824394f*_Complex_I, -0.821831f-0.797741f*_Complex_I},
|
|
|
|
{+0.720104f+0.351137f*_Complex_I, +0.593419f-0.200211f*_Complex_I}
|
|
|
|
{+0.595485f-0.413411f*_Complex_I, +0.181551f-0.896824f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.935527,
|
|
|
|
.n = 0.504128,
|
|
|
|
.snri_1l = {0.475069f, 3.077055f, 1.078656f, 2.473467f},
|
|
|
|
.snri_1l = {5.697916f, 2.631874f, 4.143253f, 4.186538f},
|
|
|
|
.snri_2l = {0.747362f, 0.594324f},
|
|
|
|
.snri_2l = {1.897704f, 1.718554f},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
.pmi = {0, 0},
|
|
|
|
|
|
|
|
.ri = 2,
|
|
|
|
|
|
|
|
.k = 4.8715,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 3 */
|
|
|
|
{ /* Test case 3 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.047530f-0.118039f*_Complex_I, -0.195528f-0.724032f*_Complex_I},
|
|
|
|
{+0.536752f-0.093497f*_Complex_I, -0.434029f+0.474769f*_Complex_I},
|
|
|
|
{-0.619953f+0.960678f*_Complex_I, -0.325868f-0.120700f*_Complex_I}
|
|
|
|
{-0.549280f+0.019771f*_Complex_I, -0.337421f-0.234972f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.803842,
|
|
|
|
.n = 0.905483,
|
|
|
|
.snri_1l = {1.331730f, 1.164592f, 1.660155f, 0.836167f},
|
|
|
|
.snri_1l = {0.363469f, 0.941684f, 0.408025f, 0.897129f},
|
|
|
|
.snri_2l = {0.554942f, 0.579321f},
|
|
|
|
.snri_2l = {0.311544f, 0.307074f},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 6.2219,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 4 */
|
|
|
|
{ /* Test case 4 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{+0.635330f-0.751786f*_Complex_I, -0.536944f-0.185884f*_Complex_I},
|
|
|
|
{+0.930515f-0.233960f*_Complex_I, +0.256535f+0.982387f*_Complex_I},
|
|
|
|
{+0.282517f-0.864615f*_Complex_I, -0.484380f-0.780479f*_Complex_I}
|
|
|
|
{-0.735938f-0.426345f*_Complex_I, +0.236604f+0.412383f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.529556,
|
|
|
|
.n = 0.535206,
|
|
|
|
.snri_1l = {5.128973f, 0.465969f, 2.812367f, 2.782574f},
|
|
|
|
.snri_1l = {2.487298f, 2.932872f, 4.009672f, 1.410498f},
|
|
|
|
.snri_2l = {1.381190f, 0.818813f},
|
|
|
|
.snri_2l = {1.082110f, 1.248639f},
|
|
|
|
.pmi = {0, 0},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
|
|
|
|
.ri = 2,
|
|
|
|
|
|
|
|
.k = 5.9758,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 5 */
|
|
|
|
{ /* Test case 5 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.576996f+0.964470f*_Complex_I, -0.948065f+0.902764f*_Complex_I},
|
|
|
|
{-0.613578f-0.908683f*_Complex_I, +0.378870f+0.770083f*_Complex_I},
|
|
|
|
{+0.988240f-0.056784f*_Complex_I, +0.489282f+0.975071f*_Complex_I}
|
|
|
|
{-0.899090f+0.679589f*_Complex_I, -0.631132f-0.763690f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.852921,
|
|
|
|
.n = 0.410415,
|
|
|
|
.snri_1l = {2.772684f, 3.261802f, 5.698031f, 0.336455f},
|
|
|
|
.snri_1l = {2.929140f, 7.281276f, 7.632612f, 2.577804f},
|
|
|
|
.snri_2l = {0.768370f, 1.469069f},
|
|
|
|
.snri_2l = {2.045272f, 2.159393f},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
|
|
|
|
.ri = 2,
|
|
|
|
|
|
|
|
.k = 6.8485,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 6 */
|
|
|
|
{ /* Test case 6 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.381846f-0.998609f*_Complex_I, +0.903472f-0.393687f*_Complex_I},
|
|
|
|
{-0.759543f+0.979731f*_Complex_I, +0.144185f-0.300384f*_Complex_I},
|
|
|
|
{-0.772703f-0.261637f*_Complex_I, -0.765452f-0.759318f*_Complex_I}
|
|
|
|
{+0.898780f-0.582955f*_Complex_I, -0.487230f+0.331654f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.711912,
|
|
|
|
.n = 0.973345,
|
|
|
|
.snri_1l = {2.998736f, 2.538860f, 5.099274f, 0.438323f},
|
|
|
|
.snri_1l = {0.151784f, 3.077111f, 2.165454f, 1.063441f},
|
|
|
|
.snri_2l = {0.809381f, 1.371548f},
|
|
|
|
.snri_2l = {0.755981f, 0.503361f},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 18.0800,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 7 */
|
|
|
|
{ /* Test case 7 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{+0.915028f-0.780771f*_Complex_I, -0.355424f+0.447925f*_Complex_I},
|
|
|
|
{+0.245400f-0.537444f*_Complex_I, -0.872924f-0.895583f*_Complex_I},
|
|
|
|
{+0.577968f+0.765204f*_Complex_I, +0.342972f-0.999014f*_Complex_I}
|
|
|
|
{-0.252981f+0.803513f*_Complex_I, -0.667497f+0.586583f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.101944,
|
|
|
|
.n = 0.373014,
|
|
|
|
.snri_1l = {12.424177f, 24.940449f, 5.411339f, 31.953288f},
|
|
|
|
.snri_1l = {3.403660f, 5.744504f, 7.385295f, 1.762868f},
|
|
|
|
.snri_2l = {4.610588f, 7.664146f},
|
|
|
|
.snri_2l = {1.642126f, 2.130892f},
|
|
|
|
.pmi = {3, 1},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
|
|
|
|
.ri = 2,
|
|
|
|
|
|
|
|
.k = 7.1484,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 8 */
|
|
|
|
{ /* Test case 8 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.259232f-0.654765f*_Complex_I, +0.829378f-0.793859f*_Complex_I},
|
|
|
|
{+0.664109f-0.281444f*_Complex_I, +0.507669f-0.822295f*_Complex_I},
|
|
|
|
{+0.997978f+0.212295f*_Complex_I, -0.659012f-0.176220f*_Complex_I}
|
|
|
|
{+0.243726f-0.316646f*_Complex_I, -0.211814f+0.097341f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.255783,
|
|
|
|
.n = 0.460547,
|
|
|
|
.snri_1l = {3.345813f, 9.635433f, 6.767844f, 6.213402f},
|
|
|
|
.snri_1l = {1.948731f, 1.673386f, 2.389606f, 1.232511f},
|
|
|
|
.snri_2l = {3.215386f, 2.640976f},
|
|
|
|
.snri_2l = {0.623422f, 0.659548f},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 9.8582,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 9 */
|
|
|
|
{ /* Test case 9 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.596630f+0.244853f*_Complex_I, -0.624622f+0.316537f*_Complex_I},
|
|
|
|
{+0.290905f-0.072573f*_Complex_I, +0.027042f+0.179635f*_Complex_I},
|
|
|
|
{+0.767545f-0.645831f*_Complex_I, +0.262828f+0.251697f*_Complex_I}
|
|
|
|
{+0.628853f-0.625656f*_Complex_I, -0.805634f+0.222660f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.876456,
|
|
|
|
.n = 0.051942,
|
|
|
|
.snri_1l = {0.367264f, 1.965908f, 1.215674f, 1.117498f},
|
|
|
|
.snri_1l = {20.229536f, 10.736104f, 15.206118f, 15.759523f},
|
|
|
|
.snri_2l = {0.579923f, 0.479609f},
|
|
|
|
.snri_2l = {2.426844f, 2.175025f},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
.pmi = {0, 0},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 12.8396,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 10 */
|
|
|
|
{ /* Test case 10 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.643594f+0.172442f*_Complex_I, +0.291148f-0.026254f*_Complex_I},
|
|
|
|
{+0.151454f-0.701886f*_Complex_I, +0.684689f-0.943441f*_Complex_I},
|
|
|
|
{+0.768244f+0.678173f*_Complex_I, -0.498968f-0.896649f*_Complex_I}
|
|
|
|
{-0.000548f+0.513340f*_Complex_I, -0.121950f+0.592212f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.739473,
|
|
|
|
.n = 0.293556,
|
|
|
|
.snri_1l = {1.104856f, 2.455074f, 2.920106f, 0.639825f},
|
|
|
|
.snri_1l = {0.848833f, 7.679596f, 3.011330f, 5.517099f},
|
|
|
|
.snri_2l = {0.557672f, 0.658911f},
|
|
|
|
.snri_2l = {1.442768f, 0.788147f},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 22.0345,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 11 */
|
|
|
|
{ /* Test case 11 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{+0.109032f-0.285542f*_Complex_I, -0.141055f+0.318945f*_Complex_I},
|
|
|
|
{-0.769587f+0.330477f*_Complex_I, -0.249817f+0.920280f*_Complex_I},
|
|
|
|
{+0.559445f-0.211656f*_Complex_I, -0.206665f-0.643045f*_Complex_I}
|
|
|
|
{+0.657787f+0.886236f*_Complex_I, +0.683553f-0.774601f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.054295,
|
|
|
|
.n = 0.648287,
|
|
|
|
.snri_1l = {8.472397f, 10.480333f, 4.074631f, 14.878099f},
|
|
|
|
.snri_1l = {1.312873f, 4.697041f, 5.064183f, 0.945731f},
|
|
|
|
.snri_2l = {2.121444f, 2.979095f},
|
|
|
|
.snri_2l = {0.993660f, 1.125611f},
|
|
|
|
.pmi = {3, 1},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 12.9593,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 12 */
|
|
|
|
{ /* Test case 12 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.505758f-0.710501f*_Complex_I, +0.803627f+0.023333f*_Complex_I},
|
|
|
|
{-0.038392f+0.542607f*_Complex_I, -0.866959f-0.879276f*_Complex_I},
|
|
|
|
{+0.964886f+0.987055f*_Complex_I, -0.031782f+0.525138f*_Complex_I}
|
|
|
|
{+0.795542f-0.475085f*_Complex_I, -0.005540f+0.302139f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.966024,
|
|
|
|
.n = 0.133604,
|
|
|
|
.snri_1l = {0.612742f, 3.102514f, 1.227107f, 2.488149f},
|
|
|
|
.snri_1l = {6.257962f, 14.479088f, 15.459994f, 5.277056f},
|
|
|
|
.snri_2l = {0.848010f, 0.701000f},
|
|
|
|
.snri_2l = {3.523645f, 3.845011f},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 7.6196,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 13 */
|
|
|
|
{ /* Test case 13 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{+0.859761f-0.737655f*_Complex_I, -0.527019f+0.509133f*_Complex_I},
|
|
|
|
{+0.277091f-0.237022f*_Complex_I, -0.230114f-0.399963f*_Complex_I},
|
|
|
|
{-0.804956f-0.303794f*_Complex_I, -0.180451f-0.100433f*_Complex_I}
|
|
|
|
{+0.531396f-0.319721f*_Complex_I, +0.305831f+0.837853f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.199335,
|
|
|
|
.n = 0.456267,
|
|
|
|
.snri_1l = {4.402551f, 8.656756f, 10.092319f, 2.966987f},
|
|
|
|
.snri_1l = {1.272387f, 2.072182f, 1.744873f, 1.599696f},
|
|
|
|
.snri_2l = {2.048224f, 2.462759f},
|
|
|
|
.snri_2l = {0.720254f, 0.700519f},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
|
|
|
|
.ri = 2,
|
|
|
|
|
|
|
|
.k = 5.9972,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 14 */
|
|
|
|
{ /* Test case 14 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{+0.473036f+0.227467f*_Complex_I, -0.593265f-0.308456f*_Complex_I},
|
|
|
|
{-0.115006f+0.764806f*_Complex_I, -0.091628f-0.960249f*_Complex_I},
|
|
|
|
{+0.536321f+0.445264f*_Complex_I, -0.517440f-0.765554f*_Complex_I}
|
|
|
|
{+0.890564f-0.316470f*_Complex_I, -0.561762f+0.532055f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.180788,
|
|
|
|
.n = 0.342804,
|
|
|
|
.snri_1l = {10.671400f, 0.736020f, 3.584109f, 7.823311f},
|
|
|
|
.snri_1l = {2.060602f, 6.750694f, 8.002153f, 0.809143f},
|
|
|
|
.snri_2l = {2.029078f, 0.914443f},
|
|
|
|
.snri_2l = {1.036665f, 1.575640f},
|
|
|
|
.pmi = {0, 0},
|
|
|
|
.pmi = {2, 1},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 18.9097,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 15 */
|
|
|
|
{ /* Test case 15 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{-0.612271f+0.338114f*_Complex_I, -0.278903f+0.914426f*_Complex_I},
|
|
|
|
{+0.237613f+0.203137f*_Complex_I, -0.093958f+0.298835f*_Complex_I},
|
|
|
|
{-0.191213f-0.136670f*_Complex_I, -0.548440f+0.607628f*_Complex_I}
|
|
|
|
{-0.979675f-0.314559f*_Complex_I, +0.198162f-0.013401f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.798189,
|
|
|
|
.n = 0.701774,
|
|
|
|
.snri_1l = {2.309797f, 0.356735f, 0.731443f, 1.935089f},
|
|
|
|
.snri_1l = {0.466961f, 1.376956f, 0.827475f, 1.016442f},
|
|
|
|
.snri_2l = {0.577612f, 0.490806f},
|
|
|
|
.snri_2l = {0.386935f, 0.354722f},
|
|
|
|
.pmi = {0, 0},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 11.2469,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ /* Test case 16 */
|
|
|
|
{ /* Test case 16 */
|
|
|
|
.h = {
|
|
|
|
.h = {
|
|
|
|
{+0.990482f+0.513519f*_Complex_I, -0.576391f+0.922553f*_Complex_I},
|
|
|
|
{+0.775605f+0.528142f*_Complex_I, -0.889884f+0.975918f*_Complex_I},
|
|
|
|
{-0.341962f+0.139785f*_Complex_I, +0.524684f+0.217012f*_Complex_I}
|
|
|
|
{-0.803276f-0.749350f*_Complex_I, +0.299566f-0.271046f*_Complex_I}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
.n = 0.365092,
|
|
|
|
.n = 0.676230,
|
|
|
|
.snri_1l = {2.942635f, 4.964827f, 4.761949f, 3.145513f},
|
|
|
|
.snri_1l = {0.661772f, 5.245671f, 3.261470f, 2.645973f},
|
|
|
|
.snri_2l = {1.291431f, 1.267123f},
|
|
|
|
.snri_2l = {1.354145f, 0.857372f},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
.pmi = {1, 0},
|
|
|
|
|
|
|
|
.ri = 1,
|
|
|
|
|
|
|
|
.k = 10.7137,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|