Merge remote-tracking branch 'origin/develop-SA-CBRA-CUDU' into NR_SA_F1AP_5GRECORDS
Conflicts: executables/nr-uesoftmodem.c openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c openair2/RRC/NR/L2_nr_interface.c
This commit is contained in:
@@ -1319,7 +1319,7 @@ int main ( int argc, char **argv ) {
|
||||
|
||||
// end of CI modifications
|
||||
//getchar();
|
||||
if(IS_SOFTMODEM_DOFORMS)
|
||||
if(IS_SOFTMODEM_DOSCOPE)
|
||||
load_softscope("enb", NULL);
|
||||
|
||||
itti_wait_tasks_end();
|
||||
@@ -1328,7 +1328,7 @@ int main ( int argc, char **argv ) {
|
||||
// stop threads
|
||||
|
||||
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) {
|
||||
if(IS_SOFTMODEM_DOFORMS)
|
||||
if(IS_SOFTMODEM_DOSCOPE)
|
||||
end_forms();
|
||||
|
||||
LOG_I(ENB_APP,"stopping MODEM threads\n");
|
||||
|
||||
+3
-2
@@ -89,7 +89,7 @@ static int DEFBFW[] = {0x00007fff};
|
||||
|
||||
#include "s1ap_eNB.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
|
||||
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
|
||||
|
||||
|
||||
#include "T.h"
|
||||
@@ -1593,7 +1593,8 @@ void *ru_thread( void *param ) {
|
||||
for (aa=0;aa<ru->nb_rx;aa++)
|
||||
memcpy((void*)RC.gNB[0]->common_vars.rxdataF[aa],
|
||||
(void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
|
||||
if (IS_SOFTMODEM_DOSCOPE && RC.gNB[0]->scopeData)
|
||||
((scopeData_t*)RC.gNB[0]->scopeData)->slotFunc(ru->common.rxdataF[0],proc->tti_rx, RC.gNB[0]->scopeData);
|
||||
// Do PRACH RU processing
|
||||
|
||||
int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST);
|
||||
|
||||
@@ -378,6 +378,30 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
}
|
||||
}
|
||||
|
||||
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==1)){
|
||||
if (gnb_nb > 0) {
|
||||
if(NGAP_CONF_MODE){
|
||||
if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) {
|
||||
LOG_E(NGAP, "Create task for NGAP failed\n");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
LOG_E(NGAP, "Ngap task not created\n");
|
||||
}
|
||||
|
||||
if(!emulate_rf){
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_GTPV1_U, &nr_gtpv1u_gNB_task, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gnb_nb > 0) {
|
||||
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
|
||||
@@ -829,9 +853,6 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
#endif
|
||||
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
|
||||
|
||||
// if(IS_SOFTMODEM_NOS1)
|
||||
// init_pdcp();
|
||||
|
||||
if (RC.nb_nr_inst > 0) {
|
||||
nr_read_config_and_init();
|
||||
} else {
|
||||
@@ -840,9 +861,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
}
|
||||
|
||||
if (RC.nb_nr_inst > 0) {
|
||||
|
||||
if(IS_SOFTMODEM_NOS1)
|
||||
init_pdcp();
|
||||
init_pdcp();
|
||||
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
|
||||
@@ -942,8 +961,8 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
printf("RC.nb_RU:%d\n", RC.nb_RU);
|
||||
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
|
||||
printf("ALL RUs ready - init gNBs\n");
|
||||
if(IS_SOFTMODEM_DOFORMS) {
|
||||
sleep(1);
|
||||
if(IS_SOFTMODEM_DOSCOPE) {
|
||||
sleep(1);
|
||||
scopeParms_t p;
|
||||
p.argc=&argc;
|
||||
p.argv=argv;
|
||||
|
||||
@@ -87,6 +87,10 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "executables/thread-common.h"
|
||||
|
||||
#if defined(ITTI_SIM) || defined(RFSIM_NAS)
|
||||
#include "nr_nas_msg_sim.h"
|
||||
#endif
|
||||
|
||||
extern const char *duplex_mode[];
|
||||
|
||||
// Thread variables
|
||||
@@ -189,11 +193,17 @@ int create_tasks_nrue(uint32_t ue_nb) {
|
||||
LOG_E(NR_RRC, "Create task for RRC UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) {
|
||||
LOG_E(NR_RRC, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
itti_wait_ready(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
int CC_id;
|
||||
|
||||
@@ -569,7 +579,7 @@ int main( int argc, char **argv ) {
|
||||
configure_linux();
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
|
||||
if(IS_SOFTMODEM_DOFORMS) {
|
||||
if(IS_SOFTMODEM_DOSCOPE) {
|
||||
load_softscope("nr",PHY_vars_UE_g[0][0]);
|
||||
}
|
||||
|
||||
@@ -584,7 +594,10 @@ int main( int argc, char **argv ) {
|
||||
protocol_ctxt_t ctxt_pP = {0};
|
||||
ctxt_pP.enb_flag = ENB_FLAG_NO;
|
||||
ctxt_pP.rnti = 0x1234;
|
||||
rrc_ue_generate_RRCSetupRequest(&ctxt_pP, 0);
|
||||
RC.nrrrc = (gNB_RRC_INST **)malloc(1*sizeof(gNB_RRC_INST *));
|
||||
RC.nrrrc[0] = (gNB_RRC_INST*)malloc(sizeof(gNB_RRC_INST));
|
||||
RC.nrrrc[0]->node_type = ngran_gNB;
|
||||
nr_rrc_ue_generate_RRCSetupRequest(ctxt_pP.module_id, 0);
|
||||
if (create_tasks_nrue(1) < 0) {
|
||||
printf("cannot create ITTI tasks\n");
|
||||
exit(-1); // need a softer mode
|
||||
|
||||
@@ -996,7 +996,7 @@ int main( int argc, char **argv ) {
|
||||
(void *)NULL, "time_meas", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
|
||||
if(IS_SOFTMODEM_DOFORMS) {
|
||||
if(IS_SOFTMODEM_DOSCOPE) {
|
||||
scopeParms_t tmp= {&argc, argv, &ru, RC.gNB[0]};
|
||||
load_softscope("nr",&tmp);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ void get_common_options(uint32_t execmask) {
|
||||
}
|
||||
|
||||
if (do_forms) {
|
||||
set_softmodem_optmask(SOFTMODEM_DOFORMS_BIT);
|
||||
set_softmodem_optmask(SOFTMODEM_DOSCOPE_BIT);
|
||||
}
|
||||
|
||||
if(parallel_config != NULL) set_parallel_conf(parallel_config);
|
||||
|
||||
@@ -188,7 +188,7 @@ extern "C"
|
||||
#define SOFTMODEM_RFSIM_BIT (1<<10)
|
||||
#define SOFTMODEM_BASICSIM_BIT (1<<11)
|
||||
#define SOFTMODEM_SIML1_BIT (1<<12)
|
||||
#define SOFTMODEM_DOFORMS_BIT (1<<15)
|
||||
#define SOFTMODEM_DOSCOPE_BIT (1<<15)
|
||||
#define SOFTMODEM_RECPLAY_BIT (1<<16)
|
||||
#define SOFTMODEM_ENB_BIT (1<<20)
|
||||
#define SOFTMODEM_GNB_BIT (1<<21)
|
||||
@@ -204,7 +204,7 @@ extern "C"
|
||||
#define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT)
|
||||
#define IS_SOFTMODEM_BASICSIM ( get_softmodem_optmask() & SOFTMODEM_BASICSIM_BIT)
|
||||
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
|
||||
#define IS_SOFTMODEM_DOFORMS ( get_softmodem_optmask() & SOFTMODEM_DOFORMS_BIT)
|
||||
#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT)
|
||||
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
|
||||
#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT)
|
||||
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
|
||||
|
||||
Reference in New Issue
Block a user