Commit 303bdc80 authored by Raymond Knopp's avatar Raymond Knopp

testing nr-softmodem with 1 antenna port configuration

parent c956d051
......@@ -43,11 +43,11 @@ int nr_phy_init_RU(RU_t *ru) {
nfapi_nr_config_request_scf_t *cfg;
ru->nb_log_antennas=0;
for (int n=0;n<RC.nb_L1_inst;n++) {
for (int n=0;n<RC.nb_nr_L1_inst;n++) {
cfg = &RC.gNB[n]->gNB_config;
if (cfg->carrier_config.num_tx_ant.value > ru->nb_log_antennas) ru->nb_log_antennas = cfg->carrier_config.num_tx_ant.value;
}
AssertFatal(ru->nb_log_antennas > 0 && ru->nb_log_antennas < 13, "ru->nb_log_antennas %d ! \n",ru->nb_log_antennas);
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
// Time-domain signals
ru->common.txdata = (int32_t**)malloc16(ru->nb_tx*sizeof(int32_t*));
......
......@@ -177,7 +177,7 @@ void phy_scope_gNB(FD_phy_scope_gnb *form,
float time[FRAME_LENGTH_COMPLEX_SAMPLES];
float time2[2048];
float freq[nsymb_ce*nb_antennas_rx*nb_antennas_tx];
uint32_t total_dlsch_bitrate = phy_vars_gnb->total_dlsch_bitrate;
// uint32_t total_dlsch_bitrate = phy_vars_gnb->total_dlsch_bitrate;
int coded_bits_per_codeword = 0;
uint8_t harq_pid; // in TDD config 3 it is sf-2, i.e., can be 0,1,2
int Qm = 2;
......@@ -364,7 +364,7 @@ void phy_scope_gNB(FD_phy_scope_gnb *form,
memmove( tput_enb[UE_id], &tput_enb[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) );
tput_time_enb[UE_id][TPUT_WINDOW_LENGTH-1] = (float) 0;
tput_enb[UE_id][TPUT_WINDOW_LENGTH-1] = ((float) total_dlsch_bitrate)/1000.0;
// tput_enb[UE_id][TPUT_WINDOW_LENGTH-1] = ((float) total_dlsch_bitrate)/1000.0;
fl_set_xyplot_data(form->pusch_tput,tput_time_enb[UE_id],tput_enb[UE_id],TPUT_WINDOW_LENGTH,"","","");
......
......@@ -122,16 +122,13 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
int i = 0;
int j = 0;//symbol
int aa = 0;//logical antenna number
int aa = 0;//physical antenna number
int ret = 0;
int nb_antenna_ports = fp->Lmax;
int ofdm_mask_full = (1<<(ru->nb_tx*2))-1;
int txdataF_offset = ((tti_tx%2)*fp->samples_per_slot_wCP);
if (nr_slot_select(cfg,frame_tx,slot) == NR_UPLINK_SLOT) return;
for (aa=0; aa<fp->Lmax; aa++) {
memset(ru->common.txdataF[aa],0,fp->samples_per_slot_wCP*sizeof(int32_t));
}
for (aa=0; aa<ru->nb_tx; aa++) memset(ru->common.txdataF[aa],0,fp->samples_per_slot_wCP*sizeof(int32_t));
start_meas(&ru->ofdm_total_stats);
......@@ -147,7 +144,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
feptx[i].ru = ru;
feptx[i].symbol = 0;
feptx[i].slot = slot;
feptx[i].nb_antenna_ports = nb_antenna_ports;
feptx[i].nb_antenna_ports = ru->nb_tx;
feptx[i].instance_cnt_feptx = 0;
AssertFatal(pthread_cond_signal(&feptx[i].cond_feptx) == 0,"ERROR pthread_cond_signal for feptx_ofdm_thread\n");
AssertFatal((ret=pthread_mutex_unlock(&feptx[i].mutex_feptx))==0,"mutex_lock returns %d\n",ret);
......@@ -159,7 +156,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
feptx[i+ru->nb_tx].ru = ru;
feptx[i+ru->nb_tx].symbol = fp->symbols_per_slot>>1;
feptx[i+ru->nb_tx].slot = slot;
feptx[i+ru->nb_tx].nb_antenna_ports = nb_antenna_ports;
feptx[i+ru->nb_tx].nb_antenna_ports = ru->nb_tx;
feptx[i+ru->nb_tx].instance_cnt_feptx = 0;
AssertFatal(pthread_cond_signal(&feptx[i+ru->nb_tx].cond_feptx) == 0,"ERROR pthread_cond_signal for feptx_ofdm_thread\n");
AssertFatal((ret=pthread_mutex_unlock(&feptx[i+ru->nb_tx].mutex_feptx))==0,"mutex_lock returns %d\n",ret);
......@@ -176,7 +173,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
gNB = ru->gNB_list[0];
cfg = &gNB->gNB_config;
for(i=0; i<nb_antenna_ports; ++i){
for(i=0; i<ru->nb_tx; ++i){
memcpy((void*)&ru->common.txdataF[i][j*fp->ofdm_symbol_size],
(void*)&gNB->common_vars.txdataF[i][j*fp->ofdm_symbol_size + txdataF_offset],
fp->ofdm_symbol_size*sizeof(int32_t));
......@@ -201,7 +198,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
feptx[i].ru = ru;
feptx[i].symbol = j;
feptx[i].slot = slot;
feptx[i].nb_antenna_ports = nb_antenna_ports;
feptx[i].nb_antenna_ports = ru->nb_tx;
feptx[i].instance_cnt_feptx = 0;
AssertFatal(pthread_cond_signal(&feptx[i].cond_feptx) == 0,"ERROR pthread_cond_signal for feptx_ofdm_thread\n");
AssertFatal((ret=pthread_mutex_unlock(&feptx[i].mutex_feptx))==0,"mutex_lock returns %d\n",ret);
......@@ -216,7 +213,7 @@ void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx) {
feptx[i+ru->nb_tx].ru = ru;
feptx[i+ru->nb_tx].symbol = j;
feptx[i+ru->nb_tx].slot = slot;
feptx[i+ru->nb_tx].nb_antenna_ports = nb_antenna_ports;
feptx[i+ru->nb_tx].nb_antenna_ports = ru->nb_tx;
feptx[i+ru->nb_tx].instance_cnt_feptx = 0;
AssertFatal(pthread_cond_signal(&feptx[i+ru->nb_tx].cond_feptx) == 0,"ERROR pthread_cond_signal for feptx_ofdm_thread\n");
AssertFatal((ret=pthread_mutex_unlock(&feptx[i+ru->nb_tx].mutex_feptx))==0,"mutex_lock returns %d\n",ret);
......@@ -258,12 +255,13 @@ static void *nr_feptx_thread(void *param) {
int ofdm_mask_full;
int txdataF_offset;
int32_t *txdataF;
while (!oai_exit) {
ret = 0;
if (wait_on_condition(&feptx->mutex_feptx,&feptx->cond_feptx,&feptx->instance_cnt_feptx,"NR feptx thread")<0) break;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+feptx->index+1 , 1 );
AssertFatal(feptx->ru->nb_log_antennas>0 && feptx->ru->nb_log_antennas < 13,"ru->nb_log_antennas is %d\n", feptx->ru->nb_log_antennas);
ru = feptx->ru;
slot = feptx->slot;
aa = feptx->aa;
......@@ -278,15 +276,10 @@ static void *nr_feptx_thread(void *param) {
////////////precoding////////////
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 1);
start_meas(&ru->precoding_stats);
if (ru->nb_tx == 1) {
AssertFatal(fp->N_ssb==ru->nb_tx,"Attempting to transmit %d SSB while Nb_tx = %d",fp->N_ssb,ru->nb_tx);
for (int p=0; p<nb_antenna_ports; p++) {
if ((fp->L_ssb >> p) & 0x01){
if (ru->nb_tx == 1 && ru->nb_log_antennas == 1) {
memcpy((void*)&ru->common.txdataF_BF[0][l*fp->ofdm_symbol_size],
(void*)&ru->gNB_list[0]->common_vars.txdataF[p][txdataF_offset + l*fp->ofdm_symbol_size],
(void*)&ru->gNB_list[0]->common_vars.txdataF[0][txdataF_offset + l*fp->ofdm_symbol_size],
(fp->samples_per_slot_wCP>>1)*sizeof(int32_t));
}
}
}
else {
bw = ru->beam_weights[0];
......@@ -324,15 +317,10 @@ static void *nr_feptx_thread(void *param) {
else{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 1);
start_meas(&ru->precoding_stats);
if (ru->nb_tx == 1) {
AssertFatal(fp->N_ssb==ru->nb_tx,"Attempting to transmit %d SSB while Nb_tx = %d",fp->N_ssb,ru->nb_tx);
for (int p=0; p<fp->Lmax; p++) {
if ((fp->L_ssb >> p) & 0x01){
if (ru->nb_tx == 1 && ru->nb_log_antennas) {
memcpy((void*)&ru->common.txdataF_BF[0][l*fp->ofdm_symbol_size],
(void*)&ru->common.txdataF[p][l*fp->ofdm_symbol_size],
(void*)&ru->common.txdataF[0][l*fp->ofdm_symbol_size],
fp->ofdm_symbol_size*sizeof(int32_t));
}
}
}
else {
bw = ru->beam_weights[0];
......@@ -434,29 +422,24 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
int txdataF_offset = ((tti_tx%2)*fp->samples_per_slot_wCP);
start_meas(&ru->precoding_stats);
AssertFatal(ru->nb_log_antennas > 0,"ru->nb_log_antennas is 0!\n");
if (ru->num_gNB == 1){
gNB = gNB_list[0];
if (nr_slot_select(cfg,frame_tx,slot_tx) == NR_UPLINK_SLOT) return;
for(i=0; i<fp->Lmax; ++i)
for(i=0; i<ru->nb_log_antennas; ++i)
memcpy((void*)ru->common.txdataF[i],
(void*)&gNB->common_vars.txdataF[i][txdataF_offset],
fp->samples_per_slot_wCP*sizeof(int32_t));
if (ru->nb_tx == 1) {
if (ru->nb_tx == 1 && ru->nb_log_antennas == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC , 1);
// AssertFatal(fp->N_ssb==ru->nb_tx,"Attempting to transmit %d SSB while Nb_tx = %d",fp->N_ssb,ru->nb_tx);
for (int p=0; p<fp->Lmax; p++) {
if ((fp->L_ssb >> p) & 0x01){
memcpy((void*)ru->common.txdataF_BF[0],
(void*)ru->common.txdataF[p],
fp->samples_per_slot_wCP*sizeof(int32_t));
}
}
memcpy((void*)ru->common.txdataF_BF[0],
(void*)ru->common.txdataF[0],
fp->samples_per_slot_wCP*sizeof(int32_t));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC , 0);
}// if (ru->nb_tx == 1)
......@@ -471,7 +454,7 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
tti_tx,
l,
aa,
fp->Lmax);
ru->nb_log_antennas);
}// for (aa=0;aa<ru->nb_tx;aa++)
}// for (l=0;l<fp->symbols_per_slot;l++)
}// if (ru->nb_tx == 1)
......
......@@ -126,20 +126,19 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
nr_set_ssb_first_subcarrier(cfg, fp); // setting the first subcarrier
AssertFatal(txdataF[ssb_index]!=NULL,"txdataF[%d] is null\n",ssb_index,txdataF[ssb_index]);
LOG_D(PHY,"SS TX: frame %d, slot %d, start_symbol %d\n",frame,slot, ssb_start_symbol);
nr_generate_pss(gNB->d_pss, &txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_sss(gNB->d_sss, &txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_pss(gNB->d_pss, &txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_sss(gNB->d_sss, &txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
if (cfg->carrier_config.num_tx_ant.value <= 4)
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],&txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[n_hf][ssb_index],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
else
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index],&txdataF[ssb_index][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index],&txdataF[0][txdataF_offset], AMP, ssb_start_symbol, cfg, fp);
nr_generate_pbch(&gNB->pbch,
&gNB->ssb_pdu,
gNB->nr_pbch_interleaver,
&txdataF[ssb_index][txdataF_offset],
&txdataF[0][txdataF_offset],
AMP,
ssb_start_symbol,
n_hf,cfg->carrier_config.num_tx_ant.value,
......
......@@ -401,6 +401,7 @@ typedef struct NRRrcConfigurationReq_s {
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
NR_ServingCellConfigCommon_t *scc;
int ssb_SubcarrierOffset;
int pdsch_AntennaPorts;
} gNB_RrcConfigurationReq;
......
......@@ -39,7 +39,7 @@
/* cell configuration section name */
#define GNB_CONFIG_STRING_GNB_LIST "gNBs"
#define GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET "ssb_SubcarrierOffset"
#define GNB_CONFIG_STRING_PDSCH_ANTENNAPORTS "pdsch_AntennaPorts"
#define GNB_CONFIG_STRING_PDSCHANTENNAPORTS "pdsch_AntennaPorts"
#define GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON "servingCellConfigCommon"
#define GNB_CONFIG_STRING_PHYSCELLID "physCellId"
#define GNB_CONFIG_STRING_NTIMINGADVANCEOFFSET "n_TimingAdvanceOffset"
......@@ -223,7 +223,7 @@
#define SSBPARAMS_DESC {{GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET,NULL,0,iptr:&ssb_SubcarrierOffset,defintval:0,TYPE_INT,0}}
#define PDSCHANTENNA_DESC {{GNB_CONFIG_STRING_PDSCHANTENNAPORTS,NULL,0,iptr:&pdsch_AntennaPorts,defintval:1,TYPE_INT,0}}
#define PDSCHANTENNAPARAMS_DESC {{GNB_CONFIG_STRING_PDSCHANTENNAPORTS,NULL,0,iptr:&pdsch_AntennaPorts,defintval:1,TYPE_INT,0}}
#define SCCPARAMS_DESC(scc) { \
{GNB_CONFIG_STRING_PHYSCELLID,NULL,0,i64ptr:scc->physCellId,defint64val:0,TYPE_INT64,0/*0*/}, \
......
......@@ -519,13 +519,14 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(NR_ServingCellConfigCommon_t));
int ssb_SubcarrierOffset = 0;
int pdschAntennaPorts = 1;
int pdsch_AntennaPorts = 1;
int ssb_bitmap=0xff;
memset((void*)scc,0,sizeof(NR_ServingCellConfigCommon_t));
prepare_scc(scc);
paramdef_t SCCsParams[] = SCCPARAMS_DESC(scc);
paramlist_def_t SCCsParamList = {GNB_CONFIG_STRING_SERVINGCELLCONFIGCOMMON, NULL, 0};
paramdef_t SSBsParams[] = SSBPARAMS_DESC;
paramlist_def_t SSBsParamList = {GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET, NULL, 0};
paramdef_t PDSCHANTENNAParams[] = PDSCHANTENNAPARAMS_DESC;
paramlist_def_t PDSCHANTENNAParamList = {GNB_CONFIG_STRING_PDSCHANTENNAPORTS, NULL, 0};
////////// Physical parameters
......@@ -648,8 +649,8 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
printf("SSB SCO %d\n",ssb_SubcarrierOffset);
NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset = ssb_SubcarrierOffset;
printf("pdschAntennaPorts %d\n",pdschAntennaPorts);
NRRRC_CONFIGURATION_REQ (msg_p).pdschAntennaPorts = pdschAntennaPorts;
printf("pdsch_AntennaPorts %d\n",pdsch_AntennaPorts);
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts = pdsch_AntennaPorts;
NRRRC_CONFIGURATION_REQ (msg_p).scc = scc;
}//
......
......@@ -221,7 +221,7 @@ uint16_t config_bandwidth(int mu, int nb_rb, int nr_band)
}
void config_common(int Mod_idP, NR_ServingCellConfigCommon_t *scc) {
void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigCommon_t *scc) {
nfapi_nr_config_request_scf_t *cfg = &RC.nrmac[Mod_idP]->config[0];
RC.nrmac[Mod_idP]->common_channels[0].ServingCellConfigCommon = scc;
......@@ -289,7 +289,6 @@ void config_common(int Mod_idP, NR_ServingCellConfigCommon_t *scc) {
}
}
// set tx and rx antennas to number of SSB
// Cell configuration
cfg->cell_config.phy_cell_id.value = *scc->physCellId;
......@@ -405,16 +404,18 @@ void config_common(int Mod_idP, NR_ServingCellConfigCommon_t *scc) {
cfg->ssb_table.ssb_mask_list[0].ssb_mask.tl.tag = NFAPI_NR_CONFIG_SSB_MASK_TAG;
cfg->num_tlv++;
cfg->carrier_config.num_tx_ant.value = 0;
cfg->carrier_config.num_tx_ant.value = pdsch_AntennaPorts;
AssertFatal(pdsch_AntennaPorts > 0 && pdsch_AntennaPorts < 13, "pdsch_AntennaPorts in 1...12\n");
cfg->carrier_config.num_tx_ant.tl.tag = NFAPI_NR_CONFIG_NUM_TX_ANT_TAG;
int num_ssb=0;
for (int i=0;i<32;i++) {
cfg->carrier_config.num_tx_ant.value += (cfg->ssb_table.ssb_mask_list[0].ssb_mask.value>>i)&1;
cfg->carrier_config.num_tx_ant.value += (cfg->ssb_table.ssb_mask_list[1].ssb_mask.value>>i)&1;
num_ssb += (cfg->ssb_table.ssb_mask_list[0].ssb_mask.value>>i)&1;
num_ssb += (cfg->ssb_table.ssb_mask_list[1].ssb_mask.value>>i)&1;
}
cfg->carrier_config.num_rx_ant.value = cfg->carrier_config.num_tx_ant.value;
cfg->carrier_config.num_rx_ant.tl.tag = NFAPI_NR_CONFIG_NUM_RX_ANT_TAG;
LOG_I(MAC,"Set TX/RX antenna number to %d (ssb: %x,%x)\n",cfg->carrier_config.num_tx_ant.value,cfg->ssb_table.ssb_mask_list[0].ssb_mask.value,cfg->ssb_table.ssb_mask_list[1].ssb_mask.value);
LOG_I(MAC,"Set TX/RX antenna number to %d (num ssb %d: %x,%x)\n",cfg->carrier_config.num_tx_ant.value,num_ssb,cfg->ssb_table.ssb_mask_list[0].ssb_mask.value,cfg->ssb_table.ssb_mask_list[1].ssb_mask.value);
AssertFatal(cfg->carrier_config.num_tx_ant.value > 0,"carrier_config.num_tx_ant.value %d !\n",cfg->carrier_config.num_tx_ant.value );
cfg->num_tlv++;
cfg->num_tlv++;
......@@ -475,6 +476,7 @@ void config_common(int Mod_idP, NR_ServingCellConfigCommon_t *scc) {
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int ssb_SubcarrierOffset,
int pdsch_AntennaPorts,
NR_ServingCellConfigCommon_t *scc,
int add_ue,
uint32_t rnti,
......@@ -486,7 +488,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
LOG_I(MAC,"Configuring common parameters from NR ServingCellConfig\n");
config_common(Mod_idP,
config_common(Mod_idP,
pdsch_AntennaPorts,
scc);
LOG_E(MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req);
......
......@@ -500,7 +500,9 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
uint16_t rnti = UE_list->rnti[UE_id];
DLSCH_PDU dlsch_pdu;
//PDSCH_PDU *pdsch_pdu = (PDSCH_PDU*) malloc(sizeof(PDSCH_PDU));
if (UE_list->num_UEs ==0) return;
int CCEIndex=-1;
LOG_D(MAC, "Scheduling UE specific search space DCI type 1\n");
......
......@@ -39,10 +39,12 @@ void set_cset_offset(uint16_t);
void mac_top_init_gNB(void);
void config_common(int Mod_idP,
int pdsch_AntennaPorts,
NR_ServingCellConfigCommon_t *scc
);
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int ssb_SubcarrierOffset,
int pdsch_AntennaPorts,
NR_ServingCellConfigCommon_t *scc,
int nsa_flag,
uint32_t rnti,
......
......@@ -385,13 +385,13 @@ typedef struct {
NR_BCCH_BCH_Message_t mib;
int ssb_SubcarrierOffset;
int pdsch_AntennaPorts;
NR_BCCH_DL_SCH_Message_t *siblock1;
NR_ServingCellConfigCommon_t *servingcellconfigcommon;
NR_CellGroupConfig_t *secondaryCellGroup[MAX_NR_RRC_UE_CONTEXTS];
NR_SRB_INFO SI;
NR_SRB_INFO Srb0;
int initial_csi_index[MAX_NR_RRC_UE_CONTEXTS];
int n_physical_antenna_ports;
} rrc_gNB_carrier_data_t;
//---------------------------------------------------
......
......@@ -196,6 +196,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc) {
rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts,
(NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon,
0,
0,
......@@ -288,6 +289,8 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
rrc->initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
rrc->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL);
rrc->carrier.servingcellconfigcommon = configuration->scc;
rrc->carrier.ssb_SubcarrierOffset = configuration->ssb_SubcarrierOffset;
rrc->carrier.pdsch_AntennaPorts = configuration->pdsch_AntennaPorts;
/// System Information INIT
LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" Checking release \n",PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt));
......
......@@ -115,11 +115,10 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
NR_RRCReconfiguration_IEs_t *reconfig_ies=calloc(1,sizeof(NR_RRCReconfiguration_IEs_t));
ue_context_p->ue_context.reconfig->criticalExtensions.choice.rrcReconfiguration = reconfig_ies;
carrier->initial_csi_index[rrc->Nb_ue] = 0;
carrier->n_physical_antenna_ports = 1;
fill_default_reconfig(carrier->servingcellconfigcommon,
reconfig_ies,
ue_context_p->ue_context.secondaryCellGroup,
carrier->n_physical_antenna_ports,
carrier->pdsch_AntennaPorts,
carrier->initial_csi_index[rrc->Nb_ue]);
ue_context_p->ue_context.rb_config = calloc(1,sizeof(NR_RRCReconfiguration_t));
......@@ -135,6 +134,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
// configure MAC and RLC
rrc_mac_config_req_gNB(rrc->module_id,
rrc->carrier.ssb_SubcarrierOffset,
rrc->carrier.pdsch_AntennaPorts,
NULL,
1, // add_ue flag
ue_context_p->ue_id_rnti,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment