Merge remote-tracking branch 'origin/refactor-nr-rrc-du' into integration_2023_w15
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
//#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "NR_asn_constant.h"
|
||||
#include "RRC/NR/MESSAGES/asn1_msg.h"
|
||||
#include "RRC/NR/nr_rrc_config.h"
|
||||
#include "openair1/SIMULATION/RF/rf.h"
|
||||
#include "openair1/SIMULATION/TOOLS/sim.h"
|
||||
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
|
||||
@@ -641,8 +641,6 @@ int main(int argc, char **argv)
|
||||
RC.nb_nr_mac_CC[i] = 1;
|
||||
mac_top_init_gNB(ngran_gNB);
|
||||
gNB_mac = RC.nrmac[0];
|
||||
gNB_RRC_INST rrc;
|
||||
memset((void*)&rrc,0,sizeof(rrc));
|
||||
|
||||
gNB_mac->dl_bler.harq_round_max = num_rounds;
|
||||
|
||||
@@ -688,20 +686,16 @@ int main(int argc, char **argv)
|
||||
NR_ServingCellConfigCommon_t *scc = secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon;
|
||||
*/
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));;
|
||||
prepare_scc(scc);
|
||||
uint64_t ssb_bitmap = 1; // Enable only first SSB with index ssb_indx=0
|
||||
fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu);
|
||||
fix_scc(scc, ssb_bitmap);
|
||||
|
||||
rrc.carrier.servingcellconfigcommon = calloc(1,sizeof(*rrc.carrier.servingcellconfigcommon));
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = rrc.carrier.servingcellconfigcommon;
|
||||
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
|
||||
NR_CellGroupConfig_t *secondaryCellGroup=calloc(1,sizeof(*secondaryCellGroup));
|
||||
prepare_scc(rrc.carrier.servingcellconfigcommon);
|
||||
uint64_t ssb_bitmap = 1;
|
||||
fill_scc_sim(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu);
|
||||
ssb_bitmap = 1;// Enable only first SSB with index ssb_indx=0
|
||||
fix_scc(scc,ssb_bitmap);
|
||||
NR_ServingCellConfig_t *scd = calloc(1,sizeof(*scd));
|
||||
prepare_scd(scd);
|
||||
|
||||
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts;
|
||||
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts = {0};
|
||||
pdsch_AntennaPorts.N1 = n_tx>1 ? n_tx>>1 : 1;
|
||||
pdsch_AntennaPorts.N2 = 1;
|
||||
pdsch_AntennaPorts.XP = n_tx>1 ? 2 : 1;
|
||||
@@ -723,10 +717,11 @@ int main(int argc, char **argv)
|
||||
.do_SRS = 0,
|
||||
.force_256qam_off = false
|
||||
};
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, UE_Capability_nr, 0, 1, &conf, 0);
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, 0);
|
||||
|
||||
/* RRC parameter validation for secondaryCellGroup */
|
||||
fix_scd(scd);
|
||||
|
||||
/* -U option modify DMRS */
|
||||
if(modify_dmrs) {
|
||||
update_dmrs_config(secondaryCellGroup, dmrs_arg);
|
||||
@@ -891,11 +886,8 @@ int main(int argc, char **argv)
|
||||
AssertFatal(input_fd==NULL,"Not ready for input signal file\n");
|
||||
|
||||
//Configure UE
|
||||
rrc.carrier.MIB = (uint8_t*) malloc(4);
|
||||
rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0);
|
||||
|
||||
nr_rrc_mac_config_req_ue(0,0,0,rrc.carrier.mib.message.choice.mib, NULL, NULL, secondaryCellGroup);
|
||||
|
||||
NR_BCCH_BCH_Message_t *mib = get_new_MIB_NR(scc);
|
||||
nr_rrc_mac_config_req_ue(0, 0, 0, mib->message.choice.mib, NULL, NULL, secondaryCellGroup);
|
||||
|
||||
nr_dcireq_t dcireq;
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "openair1/SIMULATION/TOOLS/sim.h"
|
||||
#include "openair1/SIMULATION/RF/rf.h"
|
||||
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
|
||||
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
|
||||
#include "openair2/RRC/NR/nr_rrc_config.h"
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "common/utils/threadPool/thread-pool.h"
|
||||
@@ -621,21 +621,14 @@ int main(int argc, char **argv)
|
||||
for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
|
||||
RC.nb_nr_mac_CC[i] = 1;
|
||||
mac_top_init_gNB(ngran_gNB);
|
||||
//gNB_MAC_INST* gNB_mac = RC.nrmac[0];
|
||||
gNB_RRC_INST rrc;
|
||||
memset((void*)&rrc,0,sizeof(rrc));
|
||||
|
||||
rrc.carrier.servingcellconfigcommon = calloc(1,sizeof(*rrc.carrier.servingcellconfigcommon));
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = rrc.carrier.servingcellconfigcommon;
|
||||
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
|
||||
NR_CellGroupConfig_t *secondaryCellGroup=calloc(1,sizeof(*secondaryCellGroup));
|
||||
prepare_scc(rrc.carrier.servingcellconfigcommon);
|
||||
NR_ServingCellConfigCommon_t *scc = calloc(1,sizeof(*scc));;
|
||||
prepare_scc(scc);
|
||||
uint64_t ssb_bitmap;
|
||||
fill_scc_sim(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu);
|
||||
|
||||
fill_scc_sim(scc, &ssb_bitmap, N_RB_DL, N_RB_DL, mu, mu);
|
||||
fix_scc(scc,ssb_bitmap);
|
||||
|
||||
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
|
||||
prepare_scd(scd);
|
||||
|
||||
// TODO do a UECAP for phy-sim
|
||||
@@ -647,19 +640,19 @@ int main(int argc, char **argv)
|
||||
.do_SRS = 0,
|
||||
.force_256qam_off = false
|
||||
};
|
||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, &conf, 0);
|
||||
|
||||
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, NULL, 0, 1, &conf, 0);
|
||||
|
||||
/* RRC parameter validation for secondaryCellGroup */
|
||||
fix_scd(scd);
|
||||
|
||||
NR_BCCH_BCH_Message_t *mib = get_new_MIB_NR(scc);
|
||||
|
||||
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
|
||||
|
||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
// common configuration
|
||||
nr_mac_config_scc(RC.nrmac[0], conf.pdsch_AntennaPorts, n_tx, 0, 6, scc);
|
||||
nr_mac_config_mib(RC.nrmac[0], &rrc.carrier.mib);
|
||||
nr_mac_config_mib(RC.nrmac[0], mib);
|
||||
// UE dedicated configuration
|
||||
nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup);
|
||||
frame_parms->nb_antennas_tx = 1;
|
||||
@@ -731,12 +724,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
//Configure UE
|
||||
NR_UE_RRC_INST_t rrcue;
|
||||
memset(&rrcue,0,sizeof(NR_UE_RRC_INST_t));
|
||||
rrc.carrier.MIB = (uint8_t*) malloc(4);
|
||||
rrc.carrier.sizeof_MIB = do_MIB_NR(&rrc,0);
|
||||
rrcue.mib = rrc.carrier.mib.message.choice.mib;
|
||||
rrcue.scell_group_config=secondaryCellGroup;
|
||||
NR_UE_RRC_INST_t rrcue = {0};
|
||||
rrcue.mib = mib->message.choice.mib;
|
||||
rrcue.scell_group_config = secondaryCellGroup;
|
||||
nr_l2_init_ue(&rrcue);
|
||||
|
||||
NR_UE_MAC_INST_t* UE_mac = get_mac_inst(0);
|
||||
@@ -1670,7 +1660,8 @@ int main(int argc, char **argv)
|
||||
mapping_type,
|
||||
length_dmrs,
|
||||
num_dmrs_cdm_grps_no_data);
|
||||
|
||||
|
||||
free_MIB_NR(mib);
|
||||
free(test_input_bit);
|
||||
free(estimated_output_bit);
|
||||
if (gNB->ldpc_offload_flag)
|
||||
|
||||
Reference in New Issue
Block a user