Merge branch 'episys/david/adding_NR_to_NUM_MCS' into 'episys/master-nsa'
Added NR to NUM_MCS for nr channel modeling. See merge request aburger/openairinterface5g!109
This commit is contained in:
@@ -158,7 +158,7 @@ uint32_t N_RB_DL = 106;
|
||||
*/
|
||||
uint8_t abstraction_flag = 0;
|
||||
|
||||
nr_bler_struct nr_bler_data[NUM_MCS];
|
||||
nr_bler_struct nr_bler_data[NR_NUM_MCS];
|
||||
|
||||
static void init_bler_table(void);
|
||||
|
||||
@@ -561,7 +561,7 @@ static void init_bler_table(void)
|
||||
abort();
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < NUM_MCS; i++)
|
||||
for (unsigned int i = 0; i < NR_NUM_MCS; i++)
|
||||
{
|
||||
char fName[1024];
|
||||
snprintf(fName, sizeof(fName), "%s/openair1/SIMULATION/NR_PHY/BLER_SIMULATIONS/AWGN/AWGN_results/mcs%d_awgn_5G.csv", openair_dir, i);
|
||||
|
||||
@@ -1404,13 +1404,13 @@ static int get_mcs_from_sinr(float sinr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sinr > (nr_bler_data[NUM_MCS-1].bler_table[nr_bler_data[NUM_MCS-1].length - 1][0]))
|
||||
if (sinr > (nr_bler_data[NR_NUM_MCS-1].bler_table[nr_bler_data[NR_NUM_MCS-1].length - 1][0]))
|
||||
{
|
||||
LOG_I(NR_MAC, "The SINR found is larger than last MCS table\n");
|
||||
return NUM_MCS-1;
|
||||
return NR_NUM_MCS-1;
|
||||
}
|
||||
|
||||
for (int n = NUM_MCS-1; n >= 0; n--)
|
||||
for (int n = NR_NUM_MCS-1; n >= 0; n--)
|
||||
{
|
||||
CHECK_INDEX(nr_bler_data, n);
|
||||
float largest_sinr = (nr_bler_data[n].bler_table[nr_bler_data[n].length - 1][0]);
|
||||
@@ -1429,7 +1429,7 @@ static int get_cqi_from_mcs(void)
|
||||
{
|
||||
static const int mcs_to_cqi[] = {0, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8,
|
||||
9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15};
|
||||
assert(NUM_ELEMENTS(mcs_to_cqi) == NUM_MCS);
|
||||
assert(NUM_ELEMENTS(mcs_to_cqi) == NR_NUM_MCS);
|
||||
int slot = 0;
|
||||
while (slot < NUM_NFAPI_SLOT)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "nfapi_nr_interface_scf.h"
|
||||
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
#define NUM_MCS 29
|
||||
#define NR_NUM_MCS 29
|
||||
#define NUM_SINR 100
|
||||
#define NUM_BLER_COL 13
|
||||
#define NUM_NFAPI_SLOT 20
|
||||
@@ -74,7 +74,7 @@ typedef struct
|
||||
float bler_table[NUM_SINR][NUM_BLER_COL];
|
||||
} nr_bler_struct;
|
||||
|
||||
extern nr_bler_struct nr_bler_data[NUM_MCS];
|
||||
extern nr_bler_struct nr_bler_data[NR_NUM_MCS];
|
||||
|
||||
typedef enum {
|
||||
ONLY_PUSCH,
|
||||
|
||||
Reference in New Issue
Block a user