--phy_simulators compile up to nr_dlsim
This commit is contained in:
@@ -181,7 +181,10 @@ int config_cmdlineonly_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
|
||||
return numdefvals;
|
||||
}
|
||||
|
||||
configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags) {
|
||||
configmodule_interface_t *load_configmodule(int argc,
|
||||
char **argv,
|
||||
uint32_t initflags)
|
||||
{
|
||||
char *cfgparam=NULL;
|
||||
char *modeparams=NULL;
|
||||
char *cfgmode=NULL;
|
||||
@@ -193,7 +196,8 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
|
||||
|
||||
/* first parse the command line to look for the -O option */
|
||||
for (i = 0; i<argc; i++) {
|
||||
if (strlen(argv[i]) < 2) continue;
|
||||
if (strlen(argv[i]) < 2)
|
||||
continue;
|
||||
|
||||
if ( argv[i][1] == 'O' && i < (argc -1)) {
|
||||
cfgparam = argv[i+1];
|
||||
@@ -223,7 +227,7 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
|
||||
if (cfgparam == NULL) {
|
||||
tmpflags = tmpflags | CONFIG_NOOOPT;
|
||||
|
||||
if ( initflags & CONFIG_ENABLECMDLINEONLY) {
|
||||
if ( initflags & CONFIG_ENABLECMDLINEONLY) {
|
||||
cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ;
|
||||
} else {
|
||||
cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ;
|
||||
|
||||
@@ -403,13 +403,6 @@ typedef struct __attribute__ ((__packed__)) MessageDef_s {
|
||||
|
||||
#define INSTANCE_DEFAULT (UINT16_MAX - 1)
|
||||
|
||||
/* already defined in common/utils/time_utils.h*/
|
||||
/*
|
||||
static inline int64_t clock_difftime_ns(struct timespec start, struct timespec end) {
|
||||
return (int64_t)( end.tv_sec-start.tv_sec) * (int64_t)(1000*1000*1000) + end.tv_nsec-start.tv_nsec;
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
|
||||
#include "time_utils.h"
|
||||
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
@@ -954,7 +954,7 @@ int main( int argc, char **argv ) {
|
||||
start_background_system();
|
||||
|
||||
///static configuration for NR at the moment
|
||||
if ( load_configmodule(argc,argv) == NULL) {
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == NULL) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -650,7 +650,7 @@ int main( int argc, char **argv ) {
|
||||
PHY_VARS_NR_UE *UE[MAX_NUM_CCs];
|
||||
start_background_system();
|
||||
|
||||
if ( load_configmodule(argc,argv) == NULL) {
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == NULL) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -578,25 +578,25 @@ typedef struct {
|
||||
uint16_t length;
|
||||
uint8_t pdu_index;
|
||||
uint16_t rnti;
|
||||
uint16_t nb_mod_symbols;
|
||||
uint8_t time_allocation_type;
|
||||
uint16_t nb_mod_symbols;
|
||||
uint8_t time_allocation_type;
|
||||
uint8_t freq_allocation_type;
|
||||
uint8_t start_prb;
|
||||
uint8_t n_prb;
|
||||
uint8_t start_symbol;
|
||||
uint8_t nb_symbols;
|
||||
uint8_t mcs_idx;
|
||||
uint8_t ndi;
|
||||
uint8_t nb_codewords;
|
||||
uint8_t nb_layers;
|
||||
uint16_t coding_rate;
|
||||
uint8_t modulation;
|
||||
uint8_t modulation_order;
|
||||
uint16_t transport_block_size;
|
||||
uint8_t nb_re_dmrs;
|
||||
uint8_t time_alloc_list_flag;
|
||||
uint8_t time_alloc_list;
|
||||
uint8_t rbg_list;
|
||||
uint8_t start_prb;
|
||||
uint8_t n_prb;
|
||||
uint8_t start_symbol;
|
||||
uint8_t nb_symbols;
|
||||
uint8_t mcs_idx;
|
||||
uint8_t ndi;
|
||||
uint8_t nb_codewords;
|
||||
uint8_t nb_layers;
|
||||
uint16_t coding_rate;
|
||||
uint8_t modulation;
|
||||
uint8_t modulation_order;
|
||||
uint16_t transport_block_size;
|
||||
uint8_t nb_re_dmrs;
|
||||
uint8_t time_alloc_list_flag;
|
||||
uint8_t time_alloc_list;
|
||||
uint8_t rbg_list;
|
||||
uint8_t virtual_resource_block_assignment_flag;
|
||||
uint32_t resource_block_coding;
|
||||
uint8_t redundancy_version;
|
||||
|
||||
@@ -43,15 +43,12 @@
|
||||
|
||||
extern uint8_t ccodelte_table[128],ccodelte_table_rev[128];
|
||||
|
||||
|
||||
|
||||
|
||||
static int8_t m0_table[64*16*16*16] __attribute__ ((aligned(16)));
|
||||
static int8_t m1_table[64*16*16*16] __attribute__ ((aligned(16)));
|
||||
|
||||
|
||||
// Set up Viterbi tables for SSE2 implementation
|
||||
void phy_generate_viterbi_tables_lte()
|
||||
void phy_generate_viterbi_tables_lte( void )
|
||||
{
|
||||
|
||||
int8_t w[8],in0,in1,in2;
|
||||
@@ -474,5 +471,3 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
#endif // TEST_DEBUG
|
||||
|
||||
|
||||
|
||||
@@ -25,11 +25,12 @@
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
/*#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"*/
|
||||
#include "openair1/PHY/defs_RU.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@@ -23,13 +23,14 @@
|
||||
#include "SCHED/sched_common.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
/*#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "MBSFN-SubframeConfigList.h"*/
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
#include "openair1/PHY/defs_RU.h"
|
||||
|
||||
int nr_phy_init_RU(RU_t *ru) {
|
||||
|
||||
|
||||
@@ -23,10 +23,11 @@
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
//#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
/*#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "MBSFN-SubframeConfigList.h"*/
|
||||
#include "openair1/PHY/defs_RU.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
|
||||
@@ -30,15 +30,13 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/TOOLS/alaw_lut.h"
|
||||
|
||||
|
||||
//#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include <intertask_interface.h>
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/time_utils.h"
|
||||
//#define DEBUG_DL_MOBIPASS
|
||||
//#define DEBUG_UL_MOBIPASS
|
||||
#define SUBFRAME_SKIP_NUM_MOBIPASS 8
|
||||
@@ -52,6 +50,23 @@ int dummy_cnt = 0;
|
||||
int subframe_skip_extra = 0;
|
||||
int start_flag = 1;
|
||||
int offset_cnt = 1;
|
||||
|
||||
static inline int64_t clock_difftime_ns(struct timespec start, struct timespec end)
|
||||
{
|
||||
struct timespec temp;
|
||||
int64_t temp_ns;
|
||||
|
||||
if ((end.tv_nsec-start.tv_nsec)<0) {
|
||||
temp.tv_sec = end.tv_sec-start.tv_sec-1;
|
||||
temp.tv_nsec = 1000000000+end.tv_nsec-start.tv_nsec;
|
||||
} else {
|
||||
temp.tv_sec = end.tv_sec-start.tv_sec;
|
||||
temp.tv_nsec = end.tv_nsec-start.tv_nsec;
|
||||
}
|
||||
temp_ns = (int64_t)(temp.tv_sec) * (int64_t)1000000000 + (temp.tv_nsec);
|
||||
return temp_ns;
|
||||
}
|
||||
|
||||
void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int subframe, uint8_t *seqno, uint16_t packet_type) {
|
||||
|
||||
LTE_DL_FRAME_PARMS *fp=ru->frame_parms;
|
||||
|
||||
@@ -101,14 +101,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
fp = &(eNB->frame_parms);
|
||||
nb_rx = fp->nb_antennas_rx;
|
||||
} else {
|
||||
fp = &(ru->frame_parms);
|
||||
fp = (ru->frame_parms);
|
||||
nb_rx = ru->nb_rx;
|
||||
}
|
||||
AssertFatal(fp!=NULL,"rx_prach called without valid RU or eNB descriptor\n");
|
||||
|
||||
frame_type = fp->frame_type;
|
||||
|
||||
frame_type = fp->frame_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (br_flag == 1) {
|
||||
|
||||
@@ -38,9 +38,6 @@ extern const uint8_t lin2alaw_if4p5[65536];
|
||||
// 8 bit unsigned integer to 16 bit signed integer (typecasted as uint16_t)
|
||||
extern const uint16_t alaw2lin_if4p5[256];
|
||||
|
||||
|
||||
|
||||
extern const uint8_t lin2alaw_if5[65536];
|
||||
|
||||
extern const uint16_t alaw2lin_if5[256];
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
// global var for openair performance profiler
|
||||
int opp_enabled = 0;
|
||||
|
||||
|
||||
double get_cpu_freq_GHz(void) {
|
||||
double get_cpu_freq_GHz(void)
|
||||
{
|
||||
time_stats_t ts = {0};
|
||||
reset_meas(&ts);
|
||||
ts.trials++;
|
||||
@@ -39,7 +39,9 @@ double get_cpu_freq_GHz(void) {
|
||||
printf("CPU Freq is %f \n", cpu_freq_GHz);
|
||||
return cpu_freq_GHz;
|
||||
}
|
||||
int cpumeas(int action) {
|
||||
|
||||
int cpumeas(int action)
|
||||
{
|
||||
switch (action) {
|
||||
case CPUMEAS_ENABLE:
|
||||
opp_enabled = 1;
|
||||
@@ -56,7 +58,11 @@ int cpumeas(int action) {
|
||||
|
||||
return opp_enabled;
|
||||
}
|
||||
void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name) {
|
||||
|
||||
void print_meas_now(time_stats_t *ts,
|
||||
const char *name,
|
||||
FILE *file_name)
|
||||
{
|
||||
if (opp_enabled) {
|
||||
//static double cpu_freq_GHz = 3.2;
|
||||
|
||||
@@ -69,7 +75,11 @@ void print_meas_now(time_stats_t *ts, const char *name, FILE *file_name) {
|
||||
}
|
||||
}
|
||||
|
||||
void print_meas(time_stats_t *ts, const char *name, time_stats_t *total_exec_time, time_stats_t *sf_exec_time) {
|
||||
void print_meas(time_stats_t *ts,
|
||||
const char *name,
|
||||
time_stats_t *total_exec_time,
|
||||
time_stats_t *sf_exec_time)
|
||||
{
|
||||
if (opp_enabled) {
|
||||
static int first_time = 0;
|
||||
static double cpu_freq_GHz = 0.0;
|
||||
@@ -106,7 +116,8 @@ void print_meas(time_stats_t *ts, const char *name, time_stats_t *total_exec_tim
|
||||
}
|
||||
}
|
||||
|
||||
double get_time_meas_us(time_stats_t *ts) {
|
||||
double get_time_meas_us(time_stats_t *ts)
|
||||
{
|
||||
static double cpu_freq_GHz = 0.0;
|
||||
|
||||
if (cpu_freq_GHz == 0.0)
|
||||
|
||||
+18
-7
@@ -34,6 +34,11 @@
|
||||
#define __PHY_DEFS_RU__H__
|
||||
|
||||
|
||||
#include "common_lib.h"
|
||||
#include "openairinterface5g_limits.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
|
||||
|
||||
#define MAX_BANDS_PER_RRU 4
|
||||
#define MAX_RRU_CONFIG_SIZE 1024
|
||||
|
||||
@@ -127,7 +132,7 @@ typedef struct RU_proc_t_s {
|
||||
int tti_tx;
|
||||
/// subframe to act upon for reception of prach
|
||||
int subframe_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// subframe to act upon for reception of prach BL/CE UEs
|
||||
int subframe_prach_br;
|
||||
#endif
|
||||
@@ -135,11 +140,17 @@ typedef struct RU_proc_t_s {
|
||||
int frame_rx;
|
||||
/// frame to act upon for transmission
|
||||
int frame_tx;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// subframe to act upon for transmission
|
||||
int subframe_tx;
|
||||
/// subframe to act upon for reception
|
||||
int subframe_rx;
|
||||
#endif
|
||||
/// unwrapped frame count
|
||||
int frame_tx_unwrap;
|
||||
/// frame to act upon for reception of prach
|
||||
int frame_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// frame to act upon for reception of prach
|
||||
int frame_prach_br;
|
||||
#endif
|
||||
@@ -151,7 +162,7 @@ typedef struct RU_proc_t_s {
|
||||
int instance_cnt_FH1;
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach_br;
|
||||
#endif
|
||||
@@ -174,7 +185,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_t pthread_FH1;
|
||||
/// pthread structure for RU prach processing thread
|
||||
pthread_t pthread_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread structure for RU prach processing thread BL/CE UEs
|
||||
pthread_t pthread_prach_br;
|
||||
#endif
|
||||
@@ -197,7 +208,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_attr_t attr_FH1;
|
||||
/// pthread attributes for RU prach
|
||||
pthread_attr_t attr_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread attributes for RU prach BL/CE UEs
|
||||
pthread_attr_t attr_prach_br;
|
||||
#endif
|
||||
@@ -229,7 +240,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_cond_t cond_FH1;
|
||||
/// condition variable for RU prach thread
|
||||
pthread_cond_t cond_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// condition variable for RU prach thread BL/CE UEs
|
||||
pthread_cond_t cond_prach_br;
|
||||
#endif
|
||||
@@ -252,7 +263,7 @@ typedef struct RU_proc_t_s {
|
||||
pthread_mutex_t mutex_FH1;
|
||||
/// mutex for RU prach
|
||||
pthread_mutex_t mutex_prach;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mutex for RU prach BL/CE UEs
|
||||
pthread_mutex_t mutex_prach_br;
|
||||
#endif
|
||||
|
||||
@@ -192,7 +192,7 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
|
||||
// snr=pow(10.0,.1*SNR);
|
||||
fprintf(csv_fd,"%f,",SNR);
|
||||
|
||||
for (u=0; u<2*ru->frame_parms.N_RB_DL; u++) {
|
||||
for (u=0; u<2*ru->frame_parms->N_RB_DL; u++) {
|
||||
for (aarx=0; aarx<eNB2UE[0]->nb_rx; aarx++) {
|
||||
for (aatx=0; aatx<eNB2UE[0]->nb_tx; aatx++) {
|
||||
channelx = eNB2UE[0]->chF[aarx+(aatx*eNB2UE[0]->nb_rx)][u].x;
|
||||
@@ -203,9 +203,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
|
||||
}
|
||||
|
||||
if(num_rounds>1) {
|
||||
freq_channel(eNB2UE[1], ru->frame_parms.N_RB_DL,2*ru->frame_parms.N_RB_DL + 1);
|
||||
freq_channel(eNB2UE[1], ru->frame_parms->N_RB_DL,2*ru->frame_parms->N_RB_DL + 1);
|
||||
|
||||
for (u=0; u<2*ru->frame_parms.N_RB_DL; u++) {
|
||||
for (u=0; u<2*ru->frame_parms->N_RB_DL; u++) {
|
||||
for (aarx=0; aarx<eNB2UE[1]->nb_rx; aarx++) {
|
||||
for (aatx=0; aatx<eNB2UE[1]->nb_tx; aatx++) {
|
||||
channelx = eNB2UE[1]->chF[aarx+(aatx*eNB2UE[1]->nb_rx)][u].x;
|
||||
@@ -215,9 +215,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
|
||||
}
|
||||
}
|
||||
|
||||
freq_channel(eNB2UE[2], ru->frame_parms.N_RB_DL,2*ru->frame_parms.N_RB_DL + 1);
|
||||
freq_channel(eNB2UE[2], ru->frame_parms->N_RB_DL,2*ru->frame_parms->N_RB_DL + 1);
|
||||
|
||||
for (u=0; u<2*ru->frame_parms.N_RB_DL; u++) {
|
||||
for (u=0; u<2*ru->frame_parms->N_RB_DL; u++) {
|
||||
for (aarx=0; aarx<eNB2UE[2]->nb_rx; aarx++) {
|
||||
for (aatx=0; aatx<eNB2UE[2]->nb_tx; aatx++) {
|
||||
channelx = eNB2UE[2]->chF[aarx+(aatx*eNB2UE[2]->nb_rx)][u].x;
|
||||
@@ -227,9 +227,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
|
||||
}
|
||||
}
|
||||
|
||||
freq_channel(eNB2UE[3], ru->frame_parms.N_RB_DL,2*ru->frame_parms.N_RB_DL + 1);
|
||||
freq_channel(eNB2UE[3], ru->frame_parms->N_RB_DL,2*ru->frame_parms->N_RB_DL + 1);
|
||||
|
||||
for (u=0; u<2*ru->frame_parms.N_RB_DL; u++) {
|
||||
for (u=0; u<2*ru->frame_parms->N_RB_DL; u++) {
|
||||
for (aarx=0; aarx<eNB2UE[3]->nb_rx; aarx++) {
|
||||
for (aatx=0; aatx<eNB2UE[3]->nb_tx; aatx++) {
|
||||
channelx = eNB2UE[3]->chF[aarx+(aatx*eNB2UE[3]->nb_rx)][u].x;
|
||||
@@ -990,7 +990,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
if ((transmission_mode==1) || (transmission_mode==7)) {
|
||||
for (aa=0; aa<ru->nb_tx; aa++)
|
||||
for (re=0; re<ru->frame_parms.ofdm_symbol_size; re++)
|
||||
for (re=0; re<ru->frame_parms->ofdm_symbol_size; re++)
|
||||
ru->beam_weights[0][0][aa][re] = 0x00007fff/eNB->frame_parms.nb_antennas_tx;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
cpuf = get_cpu_freq_GHz();
|
||||
|
||||
if (load_configmodule(argc, argv) == 0) {
|
||||
if (load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY) == 0) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ int main(int argc, char **argv)
|
||||
|
||||
cpuf = get_cpu_freq_GHz();
|
||||
|
||||
if ( load_configmodule(argc,argv) == 0) {
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char **argv)
|
||||
|
||||
cpuf = get_cpu_freq_GHz();
|
||||
|
||||
if ( load_configmodule(argc,argv) == 0) {
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
cpuf = get_cpu_freq_GHz();
|
||||
|
||||
if (load_configmodule(argc, argv) == 0) {
|
||||
if (load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY) == 0) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ typedef int32_t sdu_size_t;
|
||||
typedef uint32_t frame_t;
|
||||
typedef int32_t sframe_t;
|
||||
typedef uint32_t sub_frame_t;
|
||||
typedef uint32_t slot_t;
|
||||
typedef uint16_t module_id_t;
|
||||
typedef uint8_t slice_id_t;
|
||||
typedef uint8_t eNB_index_t;
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
#include "LTE_UL-CCCH-Message.h"
|
||||
#include "LTE_UL-DCCH-Message.h"
|
||||
|
||||
typedef BCCH_DL_SCH_Message_t RrcDlBcchMessage;
|
||||
typedef DL_CCCH_Message_t RrcDlCcchMessage;
|
||||
typedef DL_DCCH_Message_t RrcDlDcchMessage;
|
||||
typedef UE_EUTRA_Capability_t RrcUeEutraCapability;
|
||||
typedef UL_CCCH_Message_t RrcUlCcchMessage;
|
||||
typedef UL_DCCH_Message_t RrcUlDcchMessage;
|
||||
typedef LTE_BCCH_DL_SCH_Message_t RrcDlBcchMessage;
|
||||
typedef LTE_DL_CCCH_Message_t RrcDlCcchMessage;
|
||||
typedef LTE_DL_DCCH_Message_t RrcDlDcchMessage;
|
||||
typedef LTE_UE_EUTRA_Capability_t RrcUeEutraCapability;
|
||||
typedef LTE_UL_CCCH_Message_t RrcUlCcchMessage;
|
||||
typedef LTE_UL_DCCH_Message_t RrcUlDcchMessage;
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
|
||||
@@ -1309,7 +1309,8 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
uint16_t preamble_index,
|
||||
int16_t timing_offset, uint16_t ra_rnti
|
||||
int16_t timing_offset,
|
||||
uint16_t ra_rnti
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
|
||||
@@ -42,25 +42,23 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "COMMON/platform_constants.h"
|
||||
|
||||
#include "NR_BCCH-BCH-Message.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "NR_ServingCellConfigCommon.h"
|
||||
#include "NR_MeasConfig.h"
|
||||
|
||||
#include "nfapi_nr_interface.h"
|
||||
|
||||
#include "NR_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
|
||||
#include "PHY/defs_gNB.h"
|
||||
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "targets/ARCH/COMMON/common_lib.h"
|
||||
|
||||
|
||||
/*! \brief gNB common channels */
|
||||
typedef struct {
|
||||
@@ -70,8 +68,8 @@ typedef struct {
|
||||
int nr_band;
|
||||
uint32_t dl_CarrierFreq;
|
||||
NR_BCCH_BCH_Message_t *mib;
|
||||
TDD_Config_t *tdd_Config;
|
||||
ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
||||
NR_TDD_UL_DL_ConfigCommon_t *tdd_Config;
|
||||
NR_ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
||||
long ul_Bandwidth;
|
||||
/// Outgoing MIB PDU for PHY
|
||||
MIB_PDU MIB_pdu;
|
||||
|
||||
@@ -61,16 +61,16 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
|
||||
UL_info->rach_ind.rach_indication_body.number_of_preambles=0;
|
||||
LOG_D(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SF:%d\n",UL_info->frame,UL_info->slot, NFAPI_SFNSF2DEC(UL_info->rach_ind.sfn_sf));
|
||||
initiate_ra_proc(UL_info->module_id,
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
|
||||
UL_info->CC_id,
|
||||
NFAPI_SFNSF2SFN(UL_info->rach_ind.sfn_sf),
|
||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
@@ -28,25 +28,24 @@
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
*/
|
||||
|
||||
# include "rrc_defs.h"
|
||||
# include "rrc_extern.h"
|
||||
# include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
# include "RRC/LTE/MESSAGES/asn1_msg.h"
|
||||
# include "rrc_eNB_UE_context.h"
|
||||
# include "rrc_eNB_S1AP.h"
|
||||
# include "enb_config.h"
|
||||
# include "common/ran_context.h"
|
||||
# include "gtpv1u.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "RRC/LTE/MESSAGES/asn1_msg.h"
|
||||
#include "rrc_eNB_UE_context.h"
|
||||
#include "rrc_eNB_S1AP.h"
|
||||
#include "enb_config.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "gtpv1u.h"
|
||||
|
||||
# include "s1ap_eNB_defs.h"
|
||||
# include "s1ap_eNB_management_procedures.h"
|
||||
# include "s1ap_eNB_ue_context.h"
|
||||
#include "s1ap_eNB.h"
|
||||
#include "s1ap_eNB_defs.h"
|
||||
#include "s1ap_eNB_management_procedures.h"
|
||||
#include "s1ap_eNB_ue_context.h"
|
||||
#include "asn1_conversions.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "pdcp.h"
|
||||
#include "pdcp_primitives.h"
|
||||
#include "s1ap_eNB.h"
|
||||
|
||||
|
||||
#include "UTIL/OSA/osa_defs.h"
|
||||
#include "msc.h"
|
||||
@@ -429,7 +428,7 @@ static e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_inte
|
||||
int
|
||||
rrc_eNB_process_security(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
security_capabilities_t *security_capabilities_pP
|
||||
) {
|
||||
boolean_t changed = FALSE;
|
||||
|
||||
@@ -79,15 +79,17 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
@param configuration Pointer Configuration Request structure
|
||||
@return size of encoded bit stream in bytes*/
|
||||
|
||||
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,int Mod_id,int CC_id, gNB_RrcConfigurationReq *configuration);
|
||||
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
int Mod_id,
|
||||
int CC_id,
|
||||
gNB_RrcConfigurationReq *configuration);
|
||||
|
||||
void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
#if defined(ENABLE_ITTI)
|
||||
gNB_RrcConfigurationReq *configuration,
|
||||
#endif
|
||||
int initial_flag
|
||||
);
|
||||
int initial_flag);
|
||||
|
||||
void do_RLC_BEARER(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
@@ -107,10 +109,3 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
|
||||
void do_SpCellConfig(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
struct NR_SpCellConfig *spconfig);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
//#include "RRCConnectionSetupComplete.h"
|
||||
//#include "RRCConnectionRequest.h"
|
||||
//#include "RRCConnectionReestablishmentRequest.h"
|
||||
#include "NR_RRCReestablishmentRequest.h"
|
||||
//#include "BCCH-DL-SCH-Message.h"
|
||||
#include "NR_BCCH-BCH-Message.h"
|
||||
//#include "MCCH-Message.h"
|
||||
@@ -64,9 +65,9 @@
|
||||
//#include "AS-Context.h"
|
||||
#include "NR_UE-NR-Capability.h"
|
||||
#include "NR_MeasResults.h"
|
||||
#include "NR_MeasResults.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "NR_ServingCellConfigCommon.h"
|
||||
#include "NR_EstablishmentCause.h"
|
||||
//-------------------
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
@@ -262,22 +263,22 @@ typedef struct gNB_RRC_UE_s {
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
SCellToAddMod_r10_t sCell_config[2];
|
||||
#endif
|
||||
SRB_ToAddModList_t* SRB_configList;
|
||||
SRB_ToAddModList_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
DRB_ToAddModList_t* DRB_configList;
|
||||
DRB_ToAddModList_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
DRB_ToReleaseList_t* DRB_Release_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_SRB_ToAddModList_t* SRB_configList;
|
||||
NR_SRB_ToAddModList_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_DRB_ToAddModList_t* DRB_configList;
|
||||
NR_DRB_ToAddModList_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
NR_DRB_ToReleaseList_t* DRB_Release_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
uint8_t DRB_active[8];
|
||||
|
||||
SRB_INFO SI;
|
||||
SRB_INFO Srb0;
|
||||
SRB_INFO_TABLE_ENTRY Srb1;
|
||||
SRB_INFO_TABLE_ENTRY Srb2;
|
||||
MeasConfig_t* measConfig;
|
||||
NR_MeasConfig_t* measConfig;
|
||||
HANDOVER_INFO* handover_info;
|
||||
MeasResults_t* measResults;
|
||||
NR_MeasResults_t* measResults;
|
||||
|
||||
UE_EUTRA_Capability_t* UE_Capability;
|
||||
NR_UE_NR_Capability_t* UE_Capability;
|
||||
ImsiMobileIdentity_t imsi;
|
||||
|
||||
#if defined(ENABLE_SECURITY)
|
||||
@@ -288,8 +289,8 @@ typedef struct gNB_RRC_UE_s {
|
||||
int8_t nh_ncc;
|
||||
#endif
|
||||
/* Used integrity/ciphering algorithms */
|
||||
CipheringAlgorithm_r12_t ciphering_algorithm;
|
||||
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
|
||||
NR_CipheringAlgorithm_t ciphering_algorithm;
|
||||
e_NR_IntegrityProtAlgorithm integrity_algorithm;
|
||||
|
||||
uint8_t Status;
|
||||
rnti_t rnti;
|
||||
@@ -298,10 +299,10 @@ typedef struct gNB_RRC_UE_s {
|
||||
#if defined(ENABLE_ITTI)
|
||||
/* Information from UE RRC ConnectionRequest */
|
||||
UE_S_TMSI Initialue_identity_s_TMSI;
|
||||
EstablishmentCause_t establishment_cause;
|
||||
NR_EstablishmentCause_t establishment_cause;
|
||||
|
||||
/* Information from UE RRC ConnectionReestablishmentRequest */
|
||||
ReestablishmentCause_t reestablishment_cause;
|
||||
NR_ReestablishmentCause_t reestablishment_cause;
|
||||
|
||||
/* UE id for initial connection to S1AP */
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
@@ -39,7 +39,7 @@ extern UE_RRC_INST *UE_rrc_inst;
|
||||
|
||||
extern uint8_t DRB2LCHAN[8];
|
||||
|
||||
extern LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue;
|
||||
extern NR_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue;
|
||||
extern LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue;
|
||||
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
|
||||
#include "time_utils.h"
|
||||
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "rt_wrapper.h"
|
||||
|
||||
@@ -936,7 +936,7 @@ int main( int argc, char **argv )
|
||||
|
||||
start_background_system();
|
||||
///static configuration for NR at the moment
|
||||
if ( load_configmodule(argc,argv) == NULL) {
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == NULL) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user