NR MIMO 2x2 Support

This commit provides CSI reporting support
which is required for MIMO.  It also updates
the configuration files, provides sample BLER
simualtion files for packet dropping in the
MIMO 2x2 case. It also includes the hooks
and functions (e.g., updating UCI2_3_4 PDU field)
for MIMO 2x2 support. This commit will not include
any channel abstraction code or modelling.
This commit is contained in:
Melissa Elkadi
2022-10-18 15:24:48 +02:00
committed by Robert Schmidt
parent 3bc86d69c0
commit f8efb13b7d
46 changed files with 8052 additions and 114 deletions
+10 -5
View File
@@ -264,10 +264,10 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
send_nsa_standalone_msg(&UL_INFO, rach_ind->header.message_id);
for (int i = 0; i < rach_ind->number_of_pdus; i++)
{
free(rach_ind->pdu_list[i].preamble_list);
free_and_zero(rach_ind->pdu_list[i].preamble_list);
}
free(rach_ind->pdu_list);
free(rach_ind);
free_and_zero(rach_ind->pdu_list);
free_and_zero(rach_ind);
nr_Msg1_transmitted(0, 0, NFAPI_SFNSLOT2SFN(sfn_slot), 0);
}
if (dl_tti_request)
@@ -280,8 +280,7 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
NFAPI_SFNSLOT2SFN(dl_tti_sfn_slot), NFAPI_SFNSLOT2SLOT(dl_tti_sfn_slot));
if (get_softmodem_params()->nsa)
save_nr_measurement_info(dl_tti_request);
free(dl_tti_request);
dl_tti_request = NULL;
free_and_zero(dl_tti_request);
}
else if (dl_tti_request->dl_tti_request_body.nPDUs > 0 && tx_data_request->Number_of_PDUs > 0)
{
@@ -437,6 +436,12 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
mac->dl_info.slot = slot;
mac->dl_info.dci_ind = NULL;
mac->dl_info.rx_ind = NULL;
if (ch_info) {
mac->nr_ue_emul_l1.pmi = ch_info->csi[0].pmi;
mac->nr_ue_emul_l1.ri = ch_info->csi[0].ri;
mac->nr_ue_emul_l1.cqi = ch_info->csi[0].cqi;
free_and_zero(ch_info);
}
if (is_nr_DL_slot(get_softmodem_params()->nsa ?
mac->scc->tdd_UL_DL_ConfigurationCommon :
+19 -7
View File
@@ -85,6 +85,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "nr_nas_msg_sim.h"
#include <openair1/PHY/MODULATION/nr_modulation.h>
#include "openair2/GNB_APP/gnb_paramdef.h"
extern const char *duplex_mode[];
THREAD_STRUCT thread_struct;
@@ -161,7 +162,7 @@ uint8_t abstraction_flag=0;
nr_bler_struct nr_bler_data[NR_NUM_MCS];
static void init_bler_table(void);
static void init_bler_table(char*);
/*---------------------BMC: timespec helpers -----------------------------*/
@@ -391,6 +392,17 @@ void *rrc_enb_process_msg(void *notUsed) {
return NULL;
}
static void get_channel_model_mode() {
paramdef_t GNBParams[] = GNBPARAMS_DESC;
config_get(GNBParams, sizeof(GNBParams)/sizeof(paramdef_t), NULL);
int num_xp_antennas = *GNBParams[GNB_PDSCH_ANTENNAPORTS_XP_IDX].iptr;
if (num_xp_antennas == 2)
init_bler_table("NR_MIMO2x2_AWGN_RESULTS_DIR");
else
init_bler_table("NR_AWGN_RESULTS_DIR");
}
int main( int argc, char **argv ) {
int set_exe_prio = 1;
@@ -468,8 +480,8 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE **));
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE *)*MAX_NUM_CCs);
if (get_softmodem_params()->emulate_l1) {
RCconfig_nr_ue_L1();
init_bler_table();
RCconfig_nr_ue_macrlc();
get_channel_model_mode();
}
if (get_softmodem_params()->do_ra)
@@ -550,12 +562,12 @@ int main( int argc, char **argv ) {
}
// Read in each MCS file and build BLER-SINR-TB table
static void init_bler_table(void) {
static void init_bler_table(char *env_string) {
memset(nr_bler_data, 0, sizeof(nr_bler_data));
const char *awgn_results_dir = getenv("AWGN_RESULTS_DIR");
const char *awgn_results_dir = getenv(env_string);
if (!awgn_results_dir) {
LOG_W(NR_MAC, "No $AWGN_RESULTS_DIR\n");
LOG_W(NR_MAC, "No %s\n", env_string);
return;
}
@@ -577,7 +589,7 @@ static void init_bler_table(void) {
continue;
}
if (nlines > NUM_SINR) {
if (nlines > NR_NUM_SINR) {
LOG_E(NR_MAC, "BLER FILE ERROR - num lines greater than expected - file: %s\n", fName);
abort();
}