Merge remote-tracking branch 'develop' into NR_10MHz
This commit is contained in:
@@ -1056,7 +1056,7 @@ void terminate_task(module_id_t mod_id, task_id_t from, task_id_t to) {
|
||||
LOG_I(ENB_APP, "sending TERMINATE_MESSAGE from task %s (%d) to task %s (%d)\n",
|
||||
itti_get_task_name(from), from, itti_get_task_name(to), to);
|
||||
MessageDef *msg;
|
||||
msg = itti_alloc_new_message (from, TERMINATE_MESSAGE);
|
||||
msg = itti_alloc_new_message (from, 0, TERMINATE_MESSAGE);
|
||||
itti_send_msg_to_task (to, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
|
||||
}
|
||||
|
||||
@@ -1107,7 +1107,7 @@ int restart_L1L2(module_id_t enb_id) {
|
||||
itti_mark_task_ready(TASK_RRC_ENB);
|
||||
/* pass a reconfiguration request which will configure everything down to
|
||||
* RC.eNB[i][j]->frame_parms, too */
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, 0, RRC_CONFIGURATION_REQ);
|
||||
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
init_eNB_afterRU();
|
||||
@@ -1141,7 +1141,7 @@ int main ( int argc, char **argv ) {
|
||||
if (opp_enabled ==1)
|
||||
reset_opp_meas();
|
||||
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
itti_init(TASK_MAX, tasks_info);
|
||||
init_opt();
|
||||
#ifndef PACKAGE_VERSION
|
||||
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
||||
@@ -1196,7 +1196,7 @@ int main ( int argc, char **argv ) {
|
||||
AssertFatal(create_tasks(1)==0,"cannot create ITTI tasks\n");
|
||||
|
||||
for (int enb_id = 0; enb_id < RC.nb_inst; enb_id++) {
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, RRC_CONFIGURATION_REQ);
|
||||
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
|
||||
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
|
||||
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
|
||||
#define CONFIG_HLP_L2MONP "Enable L2 pcap messages on localhost \n"
|
||||
#define CONFIG_HLP_MAC "Disable the MAC procedures at UE side (default is enabled)\n"
|
||||
#define CONFIG_HLP_VCD "Enable VCD (generated file will is named openair_dump_eNB.vcd, read it with target/RT/USER/eNB.gtkw\n"
|
||||
#define CONFIG_HLP_TQFS "Apply three-quarter of sampling frequency, 23.04 Msps to reduce the data rate on USB/PCIe transfers (only valid for 20 MHz)\n"
|
||||
#define CONFIG_HLP_TPORT "tracer port\n"
|
||||
|
||||
@@ -603,7 +603,7 @@ void wait_gNBs(void) {
|
||||
void terminate_task(task_id_t task_id, module_id_t mod_id) {
|
||||
LOG_I(GNB_APP, "sending TERMINATE_MESSAGE to task %s (%d)\n", itti_get_task_name(task_id), task_id);
|
||||
MessageDef *msg;
|
||||
msg = itti_alloc_new_message (ENB_APP, TERMINATE_MESSAGE);
|
||||
msg = itti_alloc_new_message (ENB_APP, 0, TERMINATE_MESSAGE);
|
||||
itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
|
||||
}
|
||||
|
||||
@@ -678,7 +678,7 @@ int restart_L1L2(module_id_t gnb_id) {
|
||||
|
||||
/* pass a reconfiguration request which will configure everything down to
|
||||
* RC.eNB[i][j]->frame_parms, too */
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, 0, RRC_CONFIGURATION_REQ);
|
||||
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[gnb_id]->configuration;
|
||||
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
|
||||
/* TODO XForms might need to be restarted, but it is currently (09/02/18)
|
||||
@@ -782,9 +782,9 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
itti_init(TASK_MAX, tasks_info);
|
||||
// initialize mscgen log after ITTI
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
|
||||
|
||||
|
||||
init_opt();
|
||||
|
||||
+9
-72
@@ -18,49 +18,16 @@
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
#include "executables/thread-common.h"
|
||||
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
|
||||
#include "NR_MAC_UE/mac.h"
|
||||
//#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "fapi_nr_ue_l1.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/MODULATION/modulation_UE.h"
|
||||
#include "NR_MAC_UE/mac_proto.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
|
||||
#include "SCHED_NR_UE/phy_frame_config_nr.h"
|
||||
#include "SCHED_NR_UE/defs.h"
|
||||
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/system.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
|
||||
#include "T.h"
|
||||
|
||||
#ifdef XFORMS
|
||||
#include "PHY/TOOLS/nr_phy_scope.h"
|
||||
|
||||
extern char do_forms;
|
||||
#endif
|
||||
|
||||
// Missing stuff?
|
||||
int next_ra_frame = 0;
|
||||
module_id_t next_Mod_id = 0;
|
||||
|
||||
extern double cpuf;
|
||||
//static nfapi_nr_config_request_t config_t;
|
||||
//static nfapi_nr_config_request_t* config =&config_t;
|
||||
|
||||
/*
|
||||
* NR SLOT PROCESSING SEQUENCE
|
||||
*
|
||||
@@ -124,16 +91,12 @@ extern double cpuf;
|
||||
#define DURATION_RX_TO_TX (6) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
|
||||
#endif
|
||||
|
||||
#define FRAME_PERIOD 100000000ULL
|
||||
#define DAQ_PERIOD 66667ULL
|
||||
|
||||
typedef enum {
|
||||
pss=0,
|
||||
pbch=1,
|
||||
si=2
|
||||
pss = 0,
|
||||
pbch = 1,
|
||||
si = 2
|
||||
} sync_mode_t;
|
||||
|
||||
|
||||
void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
|
||||
uint8_t UE_id,
|
||||
uint8_t abstraction_flag)
|
||||
@@ -258,7 +221,7 @@ static void UE_synch(void *arg) {
|
||||
double rx_gain_off = 0;
|
||||
nr_get_carrier_frequencies(&UE->frame_parms, &dl_carrier, &ul_carrier);
|
||||
|
||||
if (nr_initial_sync( &syncD->proc, UE, UE->mode,2) == 0) {
|
||||
if (nr_initial_sync(&syncD->proc, UE, 2) == 0) {
|
||||
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
|
||||
hw_slot_offset = ((UE->rx_offset<<1) / UE->frame_parms.samples_per_subframe * UE->frame_parms.slots_per_subframe) +
|
||||
round((float)((UE->rx_offset<<1) % UE->frame_parms.samples_per_subframe)/UE->frame_parms.samples_per_slot0);
|
||||
@@ -394,26 +357,17 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
|
||||
if(UE->if_inst != NULL && UE->if_inst->dl_indication != NULL) {
|
||||
nr_downlink_indication_t dl_indication;
|
||||
memset((void*)&dl_indication, 0, sizeof(dl_indication));
|
||||
|
||||
dl_indication.module_id = UE->Mod_id;
|
||||
dl_indication.gNB_index = gNB_id;
|
||||
dl_indication.cc_id = UE->CC_id;
|
||||
dl_indication.frame = proc->frame_rx;
|
||||
dl_indication.slot = proc->nr_slot_rx;
|
||||
dl_indication.thread_id = proc->thread_id;
|
||||
|
||||
nr_fill_dl_indication(&dl_indication, NULL, NULL, proc, UE, gNB_id);
|
||||
UE->if_inst->dl_indication(&dl_indication, NULL);
|
||||
}
|
||||
|
||||
// Process Rx data for one sub-frame
|
||||
#ifdef UE_SLOT_PARALLELISATION
|
||||
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL );
|
||||
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL );
|
||||
#else
|
||||
uint64_t a=rdtsc();
|
||||
phy_procedures_nrUE_RX( UE, proc, 0, UE->mode,get_nrUE_params()->nr_dlsch_parallel);
|
||||
LOG_D(PHY,"phy_procedures_nrUE_RX: slot:%d, time %lu\n", proc->nr_slot_rx, (rdtsc()-a)/3500);
|
||||
//printf(">>> nr_ue_pdcch_procedures ended\n");
|
||||
phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel);
|
||||
LOG_D(PHY, "In %s: slot %d, time %lu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc()-a)/3500);
|
||||
#endif
|
||||
|
||||
if(IS_SOFTMODEM_NOS1){
|
||||
@@ -424,23 +378,6 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
}
|
||||
}
|
||||
|
||||
// no UL for now
|
||||
/*
|
||||
if (UE->mac_enabled==1) {
|
||||
// trigger L2 to run ue_scheduler thru IF module
|
||||
// [TODO] mapping right after NR initial sync
|
||||
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
|
||||
UE->ul_indication.module_id = 0;
|
||||
UE->ul_indication.gNB_index = 0;
|
||||
UE->ul_indication.cc_id = 0;
|
||||
UE->ul_indication.frame = proc->frame_rx;
|
||||
UE->ul_indication.slot = proc->nr_slot_rx;
|
||||
UE->ul_indication.thread_id = proc->thread_id;
|
||||
UE->if_inst->ul_indication(&UE->ul_indication);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -284,7 +284,6 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
|
||||
tx_gain[0][CC_id] = tx_gain[0][0];
|
||||
|
||||
// Set UE variables
|
||||
|
||||
UE->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off;
|
||||
UE->tx_total_gain_dB = (int)tx_gain[CC_id][0];
|
||||
UE->tx_power_max_dBm = tx_max_power[CC_id];
|
||||
@@ -485,7 +484,7 @@ int main( int argc, char **argv ) {
|
||||
set_taus_seed (0);
|
||||
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
itti_init(TASK_MAX, tasks_info);
|
||||
|
||||
init_opt() ;
|
||||
load_nrLDPClib();
|
||||
|
||||
@@ -50,15 +50,15 @@
|
||||
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&(fp->nb_antennas_rx), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&(fp->nb_antennas_tx), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&(fp->nb_antennas_rx), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&(fp->nb_antennas_tx), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(UE->UE_scan_carrier), defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB, 0, iptr:&(fp->N_RB_DL), defintval:25, TYPE_UINT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
|
||||
@@ -348,9 +348,9 @@ void init_main_gNB(void) {
|
||||
LOG_I(PHY, "%s() RC.nb_nr_inst:%d RC.nrrrc:%p\n", __FUNCTION__, RC.nb_nr_inst, RC.nrrrc);
|
||||
int gnb_id=0; // only 1 gnb per process, index 0 for now
|
||||
RC.nrrrc[gnb_id] = (gNB_RRC_INST *)calloc(sizeof(gNB_RRC_INST),1);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_GNB_APP, NRRRC_CONFIGURATION_REQ);
|
||||
MessageDef *msg_p = itti_alloc_new_message (TASK_GNB_APP, 0, NRRRC_CONFIGURATION_REQ);
|
||||
RCconfig_NRRRC(msg_p,gnb_id, RC.nrrrc[gnb_id]);
|
||||
openair_rrc_gNB_configuration(GNB_INSTANCE_TO_MODULE_ID(ITTI_MSG_INSTANCE(msg_p)), &NRRRC_CONFIGURATION_REQ(msg_p));
|
||||
openair_rrc_gNB_configuration(GNB_INSTANCE_TO_MODULE_ID(ITTI_MSG_DESTINATION_INSTANCE(msg_p)), &NRRRC_CONFIGURATION_REQ(msg_p));
|
||||
//AssertFatal(itti_create_task(TASK_GNB_APP, gNB_app_task, NULL) >= 0, "");
|
||||
AssertFatal(itti_create_task(TASK_RRC_GNB, rrc_gnb_task, NULL) >= 0, "");
|
||||
//AssertFatal(itti_create_task(TASK_X2AP, x2ap_task, NULL) >= 0, "");
|
||||
@@ -928,7 +928,7 @@ int main( int argc, char **argv ) {
|
||||
get_common_options(SOFTMODEM_GNB_BIT );
|
||||
AssertFatal(!CONFIG_ISFLAGSET(CONFIG_ABORT),"Getting configuration failed\n");
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
itti_init(TASK_MAX, tasks_info);
|
||||
set_taus_seed (0);
|
||||
init_opt();
|
||||
init_pdcp();
|
||||
|
||||
Reference in New Issue
Block a user