Commit c0ef3e6f authored by Laurent OpenCells's avatar Laurent OpenCells

fix gcc reported issues

parent fed90543
......@@ -3058,6 +3058,7 @@ add_executable(nr-softmodem
${T_SOURCE}
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api_to_fix.c
)
target_link_libraries (nr-softmodem
......
......@@ -83,6 +83,8 @@ get_distribution_release() {
check_supported_distribution() {
case $(get_distribution_release) in
"ubuntu20.04") return 0 ;;
"ubuntu20.10") return 0 ;;
"ubuntu21.04") return 0 ;;
esac
return 1
}
......@@ -329,6 +331,7 @@ check_install_ubuntu_packages() {
$SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in
"ubuntu20.04")
"ubuntu21.04")
specific_packages="libtasn1-6-dev libgnutls28-dev iproute2 libconfig-dev"
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
......@@ -345,7 +348,6 @@ check_install_ubuntu_packages() {
openvpn \
pkg-config \
python3-dev \
python-pexpect \
sshfs \
swig \
tshark \
......@@ -358,7 +360,6 @@ check_install_ubuntu_packages() {
iperf3 \
android-tools-adb \
wvdial \
python-numpy \
sshpass \
nscd \
bc \
......@@ -379,7 +380,6 @@ check_install_ubuntu_packages() {
git \
graphviz \
gtkwave \
guile-2.0-dev \
iperf \
iptables \
libxtables-dev \
......@@ -419,7 +419,8 @@ check_install_ubuntu_packages() {
libxpm-dev \
libboost-all-dev \
nettle-dev \
nettle-bin
nettle-bin \
libreadline-dev
fi
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
......
......@@ -52,6 +52,7 @@
FILE *g_msc_fd;
char g_msc_proto2str[MAX_MSC_PROTOS][MSC_MAX_PROTO_NAME_LENGTH];
msc_interface_t msc_interface;
typedef unsigned long msc_message_number_t;
typedef struct msc_queue_item_s {
......
......@@ -117,7 +117,7 @@ void msc_log_message(
#define MESSAGE_CHART_GENERATOR msc_interface.msc_loaded
msc_interface_t msc_interface;
extern msc_interface_t msc_interface;
#define MSC_INIT(arg1,arg2) if(msc_interface.msc_loaded) msc_interface.msc_init(arg1,arg2)
#define MSC_START_USE if(msc_interface.msc_loaded) msc_interface.msc_start_use
#define MSC_END if(msc_interface.msc_loaded) msc_interface.msc_end
......
......@@ -73,6 +73,9 @@ int sync_var=-1; //!< protected by mutex \ref sync_mutex.
int config_sync_var=-1;
volatile int oai_exit = 0;
double cpuf;
msc_interface_t msc_interface;
THREAD_STRUCT thread_struct;
uint16_t sf_ahead=4;
//uint16_t slot_ahead=6;
int otg_enabled;
......
......@@ -92,11 +92,12 @@ pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
extern uint8_t nfapi_mode; // Default to monolithic mode
THREAD_STRUCT thread_struct;
pthread_cond_t sync_cond;
pthread_mutex_t sync_mutex;
int sync_var=-1; //!< protected by mutex \ref sync_mutex.
int config_sync_var=-1;
msc_interface_t msc_interface;
volatile int start_gNB = 0;
volatile int oai_exit = 0;
......
......@@ -88,6 +88,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "executables/thread-common.h"
extern const char *duplex_mode[];
msc_interface_t msc_interface;
THREAD_STRUCT thread_struct;
// Thread variables
pthread_cond_t nfapi_sync_cond;
......
......@@ -77,6 +77,7 @@ pthread_cond_t nfapi_sync_cond;
int nfapi_sync_var=-1;
double cpuf;
THREAD_STRUCT thread_struct;
pthread_cond_t sync_cond;
pthread_mutex_t sync_mutex;
......@@ -93,7 +94,7 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
// not used but needed for link
openair0_config_t openair0_cfg[MAX_CARDS];
uint16_t slot_ahead=6;
msc_interface_t msc_interface;
AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
int flexran_agent_start(mid_t mod_id) {
......
......@@ -3,7 +3,7 @@
#include "PHY/defs_common.h"
THREAD_STRUCT thread_struct;
extern THREAD_STRUCT thread_struct;
static inline void set_parallel_conf(char *parallel_conf) {
mapping config[]= {
......
......@@ -73,7 +73,6 @@ extern pthread_mutex_t nfapi_sync_mutex;
extern int nfapi_sync_var;
extern int sync_var;
char uecap_xer_in;
extern void init_eNB_afterRU(void);
extern void init_UE_stub(int nb_inst,int,int);
......
......@@ -21,6 +21,7 @@
#if !defined(NFAPI_PNF_H__)
#define NFAPI_PNF_H__
extern nfapi_ue_release_request_body_t release_rntis;
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
......
......@@ -44,8 +44,6 @@
//#define DEBUG_TURBO_ENCODER 1
//#define CALLGRIND 1
unsigned short threegpplte_interleaver_output;
unsigned long long threegpplte_interleaver_tmp;
#if defined(__x86_64__) || defined(__i386__)
struct treillis {
......
......@@ -116,7 +116,6 @@ int test_ldpc(short No_iteration,
double sigma;
sigma = 1.0/sqrt(2*SNR);
opp_enabled=1;
cpu_freq_GHz = get_cpu_freq_GHz();
//short test_input[block_length];
unsigned char *test_input[MAX_NUM_DLSCH_SEGMENTS]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};;
//short *c; //padded codeword
......@@ -614,7 +613,6 @@ int main(int argc, char *argv[])
exit(1);
break;
}
cpu_freq_GHz = get_cpu_freq_GHz();
//printf("the decoder supports BG2, Kb=10, Z=128 & 256\n");
//printf(" range of blocklength: 1201 -> 1280, 2401 -> 2560\n");
printf("block length %d: \n", block_length);
......@@ -704,25 +702,25 @@ int main(int argc, char *argv[])
printf("SNR %f, Std iterations: %f\n",SNR, dec_iter->n_iter_std);
printf("SNR %f, Max iterations: %d\n",SNR, dec_iter->n_iter_max);
printf("\n");
printf("Encoding time mean: %15.3f us\n",(double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz);
printf("Encoding time std: %15.3f us\n",sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz,2)));
printf("Encoding time max: %15.3f us\n",(double)time_optim->max/1000.0/cpu_freq_GHz);
printf("Encoding time mean: %15.3f us\n",(double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz());
printf("Encoding time std: %15.3f us\n",sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz(),2)));
printf("Encoding time max: %15.3f us\n",(double)time_optim->max/1000.0/get_cpu_freq_GHz());
printf("\n");
printf("Decoding time mean: %15.3f us\n",(double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz);
printf("Decoding time std: %15.3f us\n",sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz,2)));
printf("Decoding time max: %15.3f us\n",(double)time_decoder->max/1000.0/cpu_freq_GHz);
printf("Decoding time mean: %15.3f us\n",(double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz());
printf("Decoding time std: %15.3f us\n",sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz(),2)));
printf("Decoding time max: %15.3f us\n",(double)time_decoder->max/1000.0/get_cpu_freq_GHz());
fprintf(fd,"%f %f %f %f %f %f %f %f %f %f %f %f %d \n",
SNR,
(double)decoded_errors[i]/(double)n_trials ,
(double)errors_bit/(double)n_trials/(double)block_length/(double)n_segments ,
errors_bit_uncoded/(double)n_trials/(double)n_segments ,
(double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz,
sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_optim->diff/time_optim->trials/1000.0/cpu_freq_GHz,2)),
(double)time_optim->max/1000.0/cpu_freq_GHz,
(double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz,
sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(cpu_freq_GHz,2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/cpu_freq_GHz,2)),
(double)time_decoder->max/1000.0/cpu_freq_GHz,
(double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz(),
sqrt((double)time_optim->diff_square/time_optim->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_optim->diff/time_optim->trials/1000.0/get_cpu_freq_GHz(),2)),
(double)time_optim->max/1000.0/get_cpu_freq_GHz(),
(double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz(),
sqrt((double)time_decoder->diff_square/time_decoder->trials/pow(1000,2)/pow(get_cpu_freq_GHz(),2)-pow((double)time_decoder->diff/time_decoder->trials/1000.0/get_cpu_freq_GHz(),2)),
(double)time_decoder->max/1000.0/get_cpu_freq_GHz(),
dec_iter->n_iter_mean,
dec_iter->n_iter_std,
dec_iter->n_iter_max
......
......@@ -113,7 +113,6 @@ int main(int argc, char *argv[])
//Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.)
time_stats_t timeEncoder,timeDecoder;
opp_enabled=1;
cpu_freq_GHz = get_cpu_freq_GHz();
reset_meas(&timeEncoder);
reset_meas(&timeDecoder);
randominit(0);
......@@ -324,9 +323,9 @@ if (logFlag){
#endif
//Iteration times are in microseconds.
timeEncoderCumulative+=(timeEncoder.diff/(cpu_freq_GHz*1000.0));
timeDecoderCumulative+=(timeDecoder.diff/(cpu_freq_GHz*1000.0));
if (logFlag) fprintf(logFile,",%f,%d,%u,%f,%f\n", SNR, nBitError, blockErrorState, (timeEncoder.diff/(cpu_freq_GHz*1000.0)), (timeDecoder.diff/(cpu_freq_GHz*1000.0)));
timeEncoderCumulative+=(timeEncoder.diff/(get_cpu_freq_GHz()*1000.0));
timeDecoderCumulative+=(timeDecoder.diff/(get_cpu_freq_GHz()*1000.0));
if (logFlag) fprintf(logFile,",%f,%d,%u,%f,%f\n", SNR, nBitError, blockErrorState, (timeEncoder.diff/(get_cpu_freq_GHz()*1000.0)), (timeDecoder.diff/(get_cpu_freq_GHz()*1000.0)));
if (nBitError<0) {
blockErrorCumulative++;
......@@ -348,7 +347,7 @@ if (logFlag){
printf("[ListSize=%d] SNR=%+8.3f, BLER=%9.6f, BER=%12.9f, t_Encoder=%9.3fus, t_Decoder=%9.3fus\n",
decoderListSize, SNR, ((double)blockErrorCumulative/iterations),
((double)bitErrorCumulative / (iterations*testLength)),
(double)timeEncoder.diff/timeEncoder.trials/(cpu_freq_GHz*1000.0),(double)timeDecoder.diff/timeDecoder.trials/(cpu_freq_GHz*1000.0));
(double)timeEncoder.diff/timeEncoder.trials/(get_cpu_freq_GHz()*1000.0),(double)timeDecoder.diff/timeDecoder.trials/(get_cpu_freq_GHz()*1000.0));
//(timeEncoderCumulative/iterations),timeDecoderCumulative/iterations);
if (blockErrorCumulative==0 && bitErrorCumulative==0) break;
......
......@@ -13,7 +13,6 @@ int main(int argc, char *argv[])
{
time_stats_t timeEncoder,timeDecoder;
opp_enabled=1;
cpu_freq_GHz = get_cpu_freq_GHz();
reset_meas(&timeEncoder);
reset_meas(&timeDecoder);
randominit(0);
......@@ -141,8 +140,8 @@ int main(int argc, char *argv[])
SNR,
((double)bitErrorCumulative / (iterations*messageLength)),
((double)blockErrorCumulative/iterations),
((double)timeEncoder.diff/timeEncoder.trials)/(cpu_freq_GHz),
((double)timeDecoder.diff/timeDecoder.trials)/(cpu_freq_GHz*1000.0));
((double)timeEncoder.diff/timeEncoder.trials)/(get_cpu_freq_GHz()),
((double)timeDecoder.diff/timeDecoder.trials)/(get_cpu_freq_GHz()*1000.0));
blockErrorCumulative=0;
bitErrorCumulative=0;
......
......@@ -21,6 +21,18 @@
#include "nr_refsig.h"
#include "nr_mod_table.h"
short nr_qpsk_mod_table[8];
int32_t nr_16qam_mod_table[16];
#if defined(__SSE2__)
__m128i nr_qpsk_byte_mod_table[2048];
#endif
int64_t nr_16qam_byte_mod_table[1024];
int64_t nr_64qam_mod_table[4096];
int32_t nr_256qam_mod_table[512];
void nr_generate_modulation_table() {
float sqrt2 = 0.70711;
......
......@@ -29,16 +29,16 @@
#define NR_MOD_TABLE_QAM64_OFFSET 23
#define NR_MOD_TABLE_QAM256_OFFSET 87
short nr_qpsk_mod_table[8];
extern short nr_qpsk_mod_table[8];
int32_t nr_16qam_mod_table[16];
extern int32_t nr_16qam_mod_table[16];
#if defined(__SSE2__)
__m128i nr_qpsk_byte_mod_table[2048];
extern __m128i nr_qpsk_byte_mod_table[2048];
#endif
int64_t nr_16qam_byte_mod_table[1024];
extern int64_t nr_16qam_byte_mod_table[1024];
int64_t nr_64qam_mod_table[4096];
extern int64_t nr_64qam_mod_table[4096];
int32_t nr_256qam_mod_table[512];
extern int32_t nr_256qam_mod_table[512];
#endif
......@@ -120,8 +120,7 @@ EXTERN int64_t *pss_corr_ue[NUMBER_PSS_SEQUENCE]
;
/* profiling structure */
EXTERN double cpuf;
time_stats_t generic_time[TIME_LAST];
EXTERN time_stats_t generic_time[TIME_LAST];
#ifndef DEFINE_HEADER_ONLY
......
......@@ -54,6 +54,42 @@
*
*********************************************************************/
/* Table 5.2.2.2-2: Definition of phi ( n ) for M ZC = 12 */
const char phi_M_ZC_12[12*U_GROUP_NUMBER]
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
/* 0 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
/* 1 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
/* 2 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
/* 3 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
/* 4 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
/* 5 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
/* 6 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
/* 7 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
/* 8 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
/* 9 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
/* 10 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
/* 11 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
/* 12 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
/* 13 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
/* 14 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
/* 15 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
/* 16 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
/* 17 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
/* 18 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
/* 20 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
/* 21 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
/* 22 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
/* 23 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
/* 24 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
/* 25 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
/* 26 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
/* 27 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
/* 28 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
/* 29 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
}
;
int16_t *base_sequence_less_than_36(unsigned int M_ZC,
unsigned int u,
unsigned int scaling)
......
......@@ -58,7 +58,7 @@
#define INDEX_SB_LESS_32 (4) /* index of dftsizes array for which subcarrier number is less than 36 */
const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
EXTERN const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
/* this table is derivated from TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration which gives m_SRS_b then all possible values of sequence length is */
/* M_sc_b_SRS = m_SRS_b * N_SC_RB/K_TC with K_TC = 2 or K_TC = 4 as specified in TS 38.211 6.4.1.4.3 */
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
......@@ -82,7 +82,7 @@ m_SRS_b 224 116, 240 256 264 272 144 152 160 168 176 184
;
/* table of largest prime number lower than uplink allocated resource elements "ul_allocated_re" */
const uint16_t ref_ul_primes[SRS_SB_CONF]
EXTERN const uint16_t ref_ul_primes[SRS_SB_CONF]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240, */
......@@ -101,10 +101,10 @@ const uint16_t ref_ul_primes[SRS_SB_CONF]
;
/* Low-PAPR base sequence; see TS 38.211 clause 5.2.2 */
int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
EXTERN int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
/* 38.211 table Table 5.2.2.2-1: Definition of phi(n) for M_ZC = 6 */
const char phi_M_ZC_6[6*U_GROUP_NUMBER]
EXTERN const char phi_M_ZC_6[6*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 */
......@@ -141,47 +141,9 @@ const char phi_M_ZC_6[6*U_GROUP_NUMBER]
}
#endif
;
/* Table 5.2.2.2-2: Definition of phi ( n ) for M ZC = 12 */
const char phi_M_ZC_12[12*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
/* 0 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
/* 1 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
/* 2 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
/* 3 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
/* 4 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
/* 5 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
/* 6 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
/* 7 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
/* 8 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
/* 9 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
/* 10 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
/* 11 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
/* 12 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
/* 13 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
/* 14 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
/* 15 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
/* 16 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
/* 17 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
/* 18 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
/* 20 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
/* 21 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
/* 22 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
/* 23 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
/* 24 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
/* 25 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
/* 26 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
/* 27 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
/* 28 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
/* 29 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
}
#endif
;
/* Table 5.2.2.2-3: Definition of phi (n ) for M_ZC = 18 */
const char phi_M_ZC_18[18*U_GROUP_NUMBER]
EXTERN const char phi_M_ZC_18[18*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
......@@ -220,7 +182,7 @@ const char phi_M_ZC_18[18*U_GROUP_NUMBER]
;
/* Table 5.2.2.2-4: Definition of phi (n ) for M_ZC = 24 */
const char phi_M_ZC_24[24*U_GROUP_NUMBER]
EXTERN const char phi_M_ZC_24[24*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
......@@ -260,10 +222,10 @@ const char phi_M_ZC_24[24*U_GROUP_NUMBER]
/************** FUNCTION ******************************************/
int16_t *base_sequence_36_or_larger(unsigned int M_ZC, unsigned int u, unsigned int v, unsigned int scaling, unsigned int if_dmrs_seq);
EXTERN int16_t *base_sequence_36_or_larger(unsigned int M_ZC, unsigned int u, unsigned int v, unsigned int scaling, unsigned int if_dmrs_seq);
int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling);
EXTERN int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling);
/*!
\brief This function generate the sounding reference symbol (SRS) for the uplink.
@param tables of srs
......@@ -278,7 +240,7 @@ void free_ul_reference_signal_sequences(void);
#define MAX_INDEX_DMRS_UL_ALLOCATED_REs 53
const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
EXTERN const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
/* Number of possible DMRS REs based on PRBs allocated for PUSCH. Array has values until 273 RBs (100Mhz BW)
Number of PUSCH RBs allocated should be able to be expressed as 2topowerofn*3topowerofn*5tothepowerofn
According to 3GPP spec 38.211 section 6.3.1.4
......@@ -307,7 +269,7 @@ const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
/* Table of largest prime number N_ZC < possible DMRS REs M_ZC, this array has values until 100Mhz
According to 3GPP spec 38.211 section 5.2.2.1
Table used in calculating DMRS low papr type1 sequence for transform precoding */
const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
EXTERN const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/*DMRS REs 6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96, */
......@@ -331,8 +293,8 @@ const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
;
/// PUSCH DMRS for transform precoding
int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
EXTERN int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
EXTERN int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
int16_t get_index_for_dmrs_lowpapr_seq(int16_t num_dmrs_res);
void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling);
void free_gnb_lowpapr_sequences(void);
......
......@@ -44,7 +44,6 @@ FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
char title[255];
unsigned char scope_enb_num_ue = 2;
static pthread_t forms_thread; //xforms
int otg_enabled=0;
void reset_stats(FL_OBJECT *button, long arg) {
int i,j,k;
......@@ -131,7 +130,7 @@ int enbscope_autoinit(void) {
sprintf (title, "LTE UL SCOPE eNB for CC_id %d, UE %d",CC_id,UE_id);
fl_show_form (form_enb[CC_id][UE_id]->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
if (otg_enabled) {
if (0) {
fl_set_button(form_enb[CC_id][UE_id]->button_0,1);
fl_set_object_label(form_enb[CC_id][UE_id]->button_0,"DL Traffic ON");
} else {
......
......@@ -27,7 +27,6 @@
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#define TPUT_WINDOW_LENGTH 100
int otg_enabled;
FL_COLOR rx_antenna_colors[4] = {FL_RED,FL_BLUE,FL_GREEN,FL_YELLOW};
......@@ -57,11 +56,9 @@ static void ia_receiver_on_off( FL_OBJECT *button, long arg) {
static void dl_traffic_on_off( FL_OBJECT *button, long arg) {
if (fl_get_button(button)) {
fl_set_object_label(button, "DL Traffic ON");
otg_enabled = 1;
fl_set_object_color(button, FL_GREEN, FL_GREEN);
} else {
fl_set_object_label(button, "DL Traffic OFF");
otg_enabled = 0;
fl_set_object_color(button, FL_RED, FL_RED);
}
}
......@@ -131,7 +128,6 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void ) {
fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 20, 600, 240, 40, "" );
fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER );
fl_set_button(fdui->button_0,0);
otg_enabled = 0;
fl_set_object_label(fdui->button_0, "DL Traffic OFF");
fl_set_object_color(fdui->button_0, FL_RED, FL_RED);
fl_set_object_callback(fdui->button_0, dl_traffic_on_off, 0 );
......
......@@ -27,16 +27,19 @@
// global var for openair performance profiler
int opp_enabled = 0;
double cpu_freq_GHz __attribute__ ((aligned(32)))=0.0;
double get_cpu_freq_GHz(void)
{
time_stats_t ts = {0};
reset_meas(&ts);
ts.trials++;
ts.in = rdtsc_oai();
sleep(1);
ts.diff = (rdtsc_oai()-ts.in);
cpu_freq_GHz = (double)ts.diff/1000000000;
printf("CPU Freq is %f \n", cpu_freq_GHz);
if (cpu_freq_GHz <1 ) {
time_stats_t ts = {0};
reset_meas(&ts);
ts.trials++;
ts.in = rdtsc_oai();
sleep(1);
ts.diff = (rdtsc_oai()-ts.in);
cpu_freq_GHz = (double)ts.diff/1000000000;
printf("CPU Freq is %f \n", cpu_freq_GHz);
}
return cpu_freq_GHz;
}
......
......@@ -33,7 +33,6 @@
#include <linux/types.h>
// global var to enable openair performance profiler
extern int opp_enabled;
double cpu_freq_GHz __attribute__ ((aligned(32)));;
#if defined(__x86_64__) || defined(__i386__)
typedef struct {
......
......@@ -214,10 +214,8 @@ typedef enum {
#define NB_SRS_PERIOD (17)
const uint16_t srs_period[NB_SRS_PERIOD]
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
static const uint16_t srs_period[NB_SRS_PERIOD]
= { 1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}
#endif
;
/// SRS_Resource of SRS_Config information element from 38.331 RRC specifications
......@@ -796,7 +794,6 @@ typedef struct {
uint8_t initial_CS_indexes[MAX_NB_CYCLIC_SHIFT];
} initial_pucch_resource_t;
const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE]; /* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
/* structure with all possible fields for pucch format from 0 to 4 */
typedef struct {
......@@ -1051,11 +1048,6 @@ typedef struct {
#define NB_SR_PERIOD (15)
const uint16_t scheduling_request_periodicity[NB_SR_PERIOD]
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
= { 0, 0, 1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640 }
#endif
;
typedef enum {
sr_sym2 = 0,
......
......@@ -51,7 +51,7 @@
#define MBMS_NFAPI_SCHEDULER
nfapi_ue_release_request_body_t release_rntis;
extern nfapi_ue_release_request_body_t release_rntis;
int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t harq_pid, uint8_t bw_factor) {
uint32_t Nre,sumKr,MPR_x100,Kr,r;
......
......@@ -40,6 +40,7 @@
#include <openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h>
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include <openair1/PHY/impl_defs_nr.h>
#ifndef NO_RAT_NR
......@@ -54,10 +55,172 @@
#endif
/* TS 36.213 Table 9.2.3-3: Mapping of values for one HARQ-ACK bit to sequences */
static const int sequence_cyclic_shift_1_harq_ack_bit[2]
/* HARQ-ACK Value 0 1 */
/* Sequence cyclic shift */ = { 0, 6 }
;
/* TS 36.213 Table 9.2.5-2: Mapping of values for two HARQ-ACK bits and positive SR to sequences */
static const int sequence_cyclic_shift_2_harq_ack_bits_positive_sr[4]
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
/* Sequence cyclic shift */ = { 1, 4, 10, 7 }
;
uint8_t nr_is_cqi_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
uint8_t nr_is_ri_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
static const uint16_t scheduling_request_periodicity[NB_SR_PERIOD]
= { 0, 0, 1, 2, 4, 5, 8, 10, 16, 20, 40, 80, 160, 320, 640 }
;
/* TS 38.213 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR and CSI in a PUCCH */
/* this is a counter of number of pucch format 4 per subframe */
static int nb_pucch_format_4_in_subframes[LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] = { 0 } ;
/* TS 36.213 Table 9.2.5.2-1: Code rate corresponding to higher layer parameter PUCCH-F2-maximum-coderate, */
/* or PUCCH-F3-maximum-coderate, or PUCCH-F4-maximum-coderate */
/* add one additional element set to 0 for parsing the array until this end */
/* stored values are code rates * 100 */
//static const int code_rate_r_time_100[8] = { (0.08 * 100), (0.15 * 100), (0.25*100), (0.35*100), (0.45*100), (0.60*100), (0.80*100), 0 } ;
/* TS 38.213 Table 9.2.3-4: Mapping of values for two HARQ-ACK bits to sequences */
static const int sequence_cyclic_shift_2_harq_ack_bits[4]
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
/* Sequence cyclic shift */ = { 0, 3, 9, 6 }
;
/* TS 38.211 Table 6.4.1.3.3.2-1: DM-RS positions for PUCCH format 3 and 4 */
static const int nb_symbols_excluding_dmrs[NB_SYMBOL_MINUS_FOUR][2][2]
= {
/* No additional DMRS Additional DMRS */
/* PUCCH length No hopping hopping No hopping hopping */
/* index 0 1 0 1 */
/* 4 */ {{ 3 , 2 } , { 3 , 2 }},
/* 5 */ {{ 3 , 3 } , { 3 , 3 }},
/* 6 */ {{ 4 , 4 } , { 4 , 4 }},
/* 7 */ {{ 5 , 5 } , { 5 , 5 }},
/* 8 */ {{ 6 , 6 } , { 6 , 6 }},
/* 9 */ {{ 7 , 7 } , { 7 , 7 }},
/* 10 */ {{ 8 , 8 } , { 6 , 6 }},
/* 11 */ {{ 9 , 9 } , { 7 , 7 }},
/* 12 */ {{ 10 , 10 } , { 8 , 8 }},
/* 13 */ {{ 11 , 11 } , { 9 , 9 }},
/* 14 */ {{ 12 , 12 } , { 10 , 10 }},
}
;
/* TS 36.213 Table 9.2.5-1: Mapping of values for one HARQ-ACK bit and positive SR to sequences */
static const int sequence_cyclic_shift_1_harq_ack_bit_positive_sr[2]
/* HARQ-ACK Value 0 1 */
/* Sequence cyclic shift */ = { 3, 9 }
;
static float RSRP_meas_mapping_nr[98]
= {
-140,
-139,
-138,
-137,
-136,
-135,
-134,
-133,
-132,
-131,
-130,
-129,
-128,
-127,
-126,
-125,
-124,
-123,
-122,
-121,
-120,
-119,
-118,
-117,
-116,
-115,
-114,
-113,
-112,
-111,
-110,
-109,
-108,
-107,
-106,
-105,
-104,
-103,
-102,
-101,
-100,
-99,
-98,
-97,
-96,
-95,
-94,
-93,
-92,
-91,
-90,
-89,
-88,
-87,
-86,
-85,
-84,
-83,
-82,
-81,
-80,
-79,
-78,
-77,
-76,
-75,
-74,
-73,
-72,
-71,
-70,
-69,
-68,
-67,
-66,
-65,
-64,
-63,
-62,
-61,
-60,
-59,
-58,
-57,
-56,
-55,
-54,
-53,
-52,
-51,
-50,
-49,
-48,
-47,
-46,
-45,
-44,
-43
}
;
long
binary_search_float_nr(
float elements[],
......@@ -202,6 +365,30 @@ void nr_generate_pucch3_4(int32_t **txdataF,
*
*********************************************************************/
/* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE]
=
{
/* format first symbol Number of symbols PRB offset nb index for set of initial CS */
/* 0 */ { pucch_format0_nr, 12, 2, 0, 2, { 0, 3, 0, 0 } },
/* 1 */ { pucch_format0_nr, 12, 2, 0, 3, { 0, 4, 8, 0 } },
/* 2 */ { pucch_format0_nr, 12, 2, 3, 3, { 0, 4, 8, 0 } },
/* 3 */ { pucch_format1_nr, 10, 4, 0, 2, { 0, 6, 0, 0 } },
/* 4 */ { pucch_format1_nr, 10, 4, 0, 4, { 0, 3, 6, 9 } },
/* 5 */ { pucch_format1_nr, 10, 4, 2, 4, { 0, 3, 6, 9 } },
/* 6 */ { pucch_format1_nr, 10, 4, 4, 4, { 0, 3, 6, 9 } },
/* 7 */ { pucch_format1_nr, 4, 10, 0, 2, { 0, 6, 0, 0 } },
/* 8 */ { pucch_format1_nr, 4, 10, 0, 4, { 0, 3, 6, 9 } },
/* 9 */ { pucch_format1_nr, 4, 10, 2, 4, { 0, 3, 6, 9 } },
/* 10 */ { pucch_format1_nr, 4, 10, 4, 4, { 0, 3, 6, 9 } },
/* 11 */ { pucch_format1_nr, 0, 14, 0, 2, { 0, 6, 0, 0 } },
/* 12 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
/* 13 */ { pucch_format1_nr, 0, 14, 2, 4, { 0, 3, 6, 9 } },
/* 14 */ { pucch_format1_nr, 0, 14, 4, 4, { 0, 3, 6, 9 } },
/* 15 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
}
;
bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t *proc, bool reset_harq)
{
uint8_t sr_payload = 0;
......
......@@ -60,214 +60,12 @@
/************** VARIABLES *****************************************/
float RSRP_meas_mapping_nr[98]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
= {
-140,
-139,
-138,
-137,
-136,
-135,
-134,
-133,
-132,
-131,
-130,
-129,
-128,
-127,
-126,
-125,
-124,
-123,
-122,
-121,
-120,
-119,
-118,
-117,
-116,
-115,
-114,
-113,
-112,
-111,
-110,
-109,
-108,
-107,
-106,
-105,
-104,
-103,
-102,
-101,
-100,
-99,
-98,
-97,
-96,
-95,
-94,
-93,
-92,
-91,
-90,
-89,
-88,
-87,
-86,
-85,
-84,
-83,
-82,
-81,
-80,
-79,
-78,
-77,
-76,
-75,
-74,
-73,
-72,
-71,
-70,
-69,
-68,
-67,
-66,
-65,
-64,
-63,
-62,
-61,
-60,
-59,
-58,
-57,
-56,
-55,
-54,
-53,
-52,
-51,
-50,
-49,
-48,
-47,
-46,
-45,
-44,
-43
}
#endif
;
/* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
=
{
/* format first symbol Number of symbols PRB offset nb index for set of initial CS */
/* 0 */ { pucch_format0_nr, 12, 2, 0, 2, { 0, 3, 0, 0 } },
/* 1 */ { pucch_format0_nr, 12, 2, 0, 3, { 0, 4, 8, 0 } },
/* 2 */ { pucch_format0_nr, 12, 2, 3, 3, { 0, 4, 8, 0 } },
/* 3 */ { pucch_format1_nr, 10, 4, 0, 2, { 0, 6, 0, 0 } },
/* 4 */ { pucch_format1_nr, 10, 4, 0, 4, { 0, 3, 6, 9 } },
/* 5 */ { pucch_format1_nr, 10, 4, 2, 4, { 0, 3, 6, 9 } },
/* 6 */ { pucch_format1_nr, 10, 4, 4, 4, { 0, 3, 6, 9 } },
/* 7 */ { pucch_format1_nr, 4, 10, 0, 2, { 0, 6, 0, 0 } },
/* 8 */ { pucch_format1_nr, 4, 10, 0, 4, { 0, 3, 6, 9 } },
/* 9 */ { pucch_format1_nr, 4, 10, 2, 4, { 0, 3, 6, 9 } },
/* 10 */ { pucch_format1_nr, 4, 10, 4, 4, { 0, 3, 6, 9 } },
/* 11 */ { pucch_format1_nr, 0, 14, 0, 2, { 0, 6, 0, 0 } },
/* 12 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
/* 13 */ { pucch_format1_nr, 0, 14, 2, 4, { 0, 3, 6, 9 } },
/* 14 */ { pucch_format1_nr, 0, 14, 4, 4, { 0, 3, 6, 9 } },
/* 15 */ { pucch_format1_nr, 0, 14, 0, 4, { 0, 3, 6, 9 } },
}
#endif
;
/* TS 36.213 Table 9.2.3-3: Mapping of values for one HARQ-ACK bit to sequences */
const int sequence_cyclic_shift_1_harq_ack_bit[2]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
/* HARQ-ACK Value 0 1 */
/* Sequence cyclic shift */ = { 0, 6 }
#endif
;
/* TS 38.213 Table 9.2.3-4: Mapping of values for two HARQ-ACK bits to sequences */
const int sequence_cyclic_shift_2_harq_ack_bits[4]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
/* Sequence cyclic shift */ = { 0, 3, 9, 6 }
#endif
;
/* TS 36.213 Table 9.2.5-1: Mapping of values for one HARQ-ACK bit and positive SR to sequences */
const int sequence_cyclic_shift_1_harq_ack_bit_positive_sr[2]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
/* HARQ-ACK Value 0 1 */
/* Sequence cyclic shift */ = { 3, 9 }
#endif
;
/* TS 36.213 Table 9.2.5-2: Mapping of values for two HARQ-ACK bits and positive SR to sequences */
const int sequence_cyclic_shift_2_harq_ack_bits_positive_sr[4]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
/* HARQ-ACK Value (0,0) (0,1) (1,0) (1,1) */
/* Sequence cyclic shift */ = { 1, 4, 10, 7 }
#endif
;
/* TS 36.213 Table 9.2.5.2-1: Code rate corresponding to higher layer parameter PUCCH-F2-maximum-coderate, */
/* or PUCCH-F3-maximum-coderate, or PUCCH-F4-maximum-coderate */
/* add one additional element set to 0 for parsing the array until this end */
/* stored values are code rates * 100 */
const int code_rate_r_time_100[8]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
= { (0.08 * 100), (0.15 * 100), (0.25*100), (0.35*100), (0.45*100), (0.60*100), (0.80*100), 0 }
#endif
;
#define NB_SYMBOL_MINUS_FOUR (11)
#define I_PUCCH_NO_ADDITIONAL_DMRS (0)
#define I_PUCCH_ADDITIONAL_DMRS (1)
#define I_PUCCH_NO_HOPPING (0)
#define I_PUCCH_HOPING (1)
/* TS 38.211 Table 6.4.1.3.3.2-1: DM-RS positions for PUCCH format 3 and 4 */
const int nb_symbols_excluding_dmrs[NB_SYMBOL_MINUS_FOUR][2][2]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
= {
/* No additional DMRS Additional DMRS */
/* PUCCH length No hopping hopping No hopping hopping */
/* index 0 1 0 1 */
/* 4 */ {{ 3 , 2 } , { 3 , 2 }},
/* 5 */ {{ 3 , 3 } , { 3 , 3 }},
/* 6 */ {{ 4 , 4 } , { 4 , 4 }},
/* 7 */ {{ 5 , 5 } , { 5 , 5 }},
/* 8 */ {{ 6 , 6 } , { 6 , 6 }},
/* 9 */ {{ 7 , 7 } , { 7 , 7 }},
/* 10 */ {{ 8 , 8 } , { 6 , 6 }},
/* 11 */ {{ 9 , 9 } , { 7 , 7 }},
/* 12 */ {{ 10 , 10 } , { 8 , 8 }},
/* 13 */ {{ 11 , 11 } , { 9 , 9 }},
/* 14 */ {{ 12 , 12 } , { 10 , 10 }},
}
#endif
;
/* TS 38.213 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR and CSI in a PUCCH */
/* this is a counter of number of pucch format 4 per subframe */
int nb_pucch_format_4_in_subframes[LTE_NUMBER_OF_SUBFRAMES_PER_FRAME]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
= { 0 }
#endif
;
/*************** FUNCTIONS ****************************************/
......
......@@ -46,13 +46,13 @@ void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastAc
}
double squareRoot(time_stats_t *ptr) {
double timeBase=1/(1000*cpu_freq_GHz);
double timeBase=1/(1000*get_cpu_freq_GHz());
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
pow((double)ptr->diff/ptr->trials*timeBase,2));
}
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz);
double timeBase=1/(1000*get_cpu_freq_GHz());
printf("%-43s %6.2f us (%d trials)\n",
txt,
(double)ptr->diff/ptr->trials*timeBase,
......@@ -69,7 +69,7 @@ void printStatIndent(time_stats_t *ptr, char *txt) {
}
void printStatIndent2(time_stats_t *ptr, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz);
double timeBase=1/(1000*get_cpu_freq_GHz());
printf(" |__ %-34s %6.2f us (%3d trials)\n",
txt,
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
......@@ -77,7 +77,7 @@ void printStatIndent2(time_stats_t *ptr, char *txt) {
}
void printStatIndent3(time_stats_t *ptr, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz);
double timeBase=1/(1000*get_cpu_freq_GHz());
printf(" |__ %-30s %6.2f us (%3d trials)\n",
txt,
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
......
......@@ -65,11 +65,14 @@ void feptx_ofdm(RU_t *ru, int frame, int subframe);
void feptx_prec(RU_t *ru, int frame, int subframe);
double cpuf;
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
//#define MCS_COUNT 23//added for PHY abstraction
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
int otg_enabled=0;
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
/*the following parameters are used to control the processing times calculations*/
double t_tx_max = -1000000000; /*!< \brief initial max process time for tx */
double t_rx_max = -1000000000; /*!< \brief initial max process time for rx */
......
......@@ -57,7 +57,7 @@
#include "executables/split_headers.h"
double cpuf;
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
//#define MCS_COUNT 23//added for PHY abstraction
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
......@@ -70,6 +70,9 @@ node_desc_t *ue_data[NUMBER_OF_UE_MAX];
extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16];
//extern char* namepointer_chMag ;
int xforms=0;
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
FD_lte_phy_scope_enb *form_enb;
char title[255];
......
......@@ -63,7 +63,7 @@
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "NR_RRCReconfiguration.h"
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
#include "SIMULATION/LTE_PHY/common_sim.h"
#include <openair2/LAYER2/MAC/mac_vars.h>
......@@ -83,6 +83,10 @@ uint16_t sf_ahead=4 ;
uint16_t sl_ahead=0;
//uint8_t nfapi_mode = 0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
msc_interface_t msc_interface;
// dummy functions
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
......
......@@ -65,6 +65,7 @@ extern uint16_t prach_root_sequence_map0_3[838];
openair0_config_t openair0_cfg[MAX_CARDS];
//uint8_t nfapi_mode=0;
uint16_t sl_ahead = 0;
msc_interface_t msc_interface;
//void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
......
......@@ -57,7 +57,7 @@
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "common/utils/threadPool/thread-pool.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#define inMicroS(a) (((double)(a))/(get_cpu_freq_GHz()*1000.0))
#include "SIMULATION/LTE_PHY/common_sim.h"
#include <openair2/LAYER2/MAC/mac_vars.h>
......@@ -81,6 +81,9 @@ uint16_t sl_ahead=0;
double cpuf;
//uint8_t nfapi_mode = 0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
msc_interface_t msc_interface;
extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration
......
......@@ -26,6 +26,7 @@
#include "sim.h"
uint16_t LUTSin[ResolSinCos+1];
/* linear phase noise model */
void phase_noise(double ts, int16_t * InRe, int16_t * InIm)
{
......
......@@ -468,7 +468,6 @@ double N_RB2channel_bandwidth(uint16_t N_RB);
*/
//look-up table for the sine (cosine) function
#define ResolSinCos 100
uint16_t LUTSin[ResolSinCos+1];
void InitSinLUT( void );
void phase_noise(double ts, int16_t * InRe, int16_t * InIm);
......
......@@ -51,8 +51,6 @@ typedef struct {
pthread_mutex_t *mutex;
} mac_stats_updates_context_t;
/*Array holding the last stats reports for each eNB. Used for continuous reporting*/
mac_stats_updates_context_t mac_stats_context[NUM_MAX_ENB];
/*Functions to initialize and destroy the struct required for the
*continuous stats update report*/
......
......@@ -49,8 +49,6 @@ typedef struct
/*To Be Extended*/
}rrc_meas_stats;
/* RRC CMI statistics */
rrc_meas_stats * meas_stats;
/* FLEXRAN AGENT-RRC Interface */
......
......@@ -70,7 +70,6 @@ typedef struct {
pthread_mutex_t *mutex;
} stats_updates_context_t;
stats_updates_context_t stats_context[NUM_MAX_ENB];
/**********************************
* FlexRAN protocol messages helper
......
......@@ -30,7 +30,7 @@
#include "common/utils/LOG/log.h"
flexran_agent_channel_t *agent_channel[NUM_MAX_ENB][FLEXRAN_AGENT_MAX];
flexran_agent_channel_instance_t channel_instance;
static flexran_agent_channel_instance_t channel_instance;
int flexran_agent_channel_id = 0;
int flexran_agent_msg_send(mid_t mod_id, agent_id_t agent_id, void *data, int size, int priority) {
......
#include <stdint.h>
#include <openair2/COMMON/platform_constants.h>
#include <openair2/LAYER2/PDCP_v10.1.0/pdcp.h>
pdcp_enb_t pdcp_enb[MAX_NUM_CCs];
uint32_t Pdcp_stats_tx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
uint32_t Pdcp_stats_tx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_throughput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
uint32_t Pdcp_stats_rx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_goodput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_outoforder[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
......@@ -85,10 +85,6 @@ void ue_mac_reset(module_id_t module_idP, uint8_t eNB_index) {
ue_init_mac(module_idP); //This will hopefully do the rest of the MAC reset procedure
}
int32_t **rxdata;
int32_t **txdata;
int
rrc_mac_config_req_ue(module_id_t Mod_idP,
int CC_idP,
......
......@@ -537,9 +537,6 @@ typedef struct {
// global variables
nprach_parameters_NB_IoT_t nprach_list[3];
//DLSF Table
DLSF_INFO_t DLSF_information;
#endif /*__LAYER2_MAC_DEFS_NB_IoT_H__ */
......@@ -83,9 +83,57 @@ hash_table_t *pdcp_coll_p = NULL;
static int mbms_socket = -1;
#endif
uint32_t Pdcp_stats_tx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
uint32_t Pdcp_stats_tx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_throughput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
uint32_t Pdcp_stats_rx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_goodput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_outoforder[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
int pdcp_pc5_sockfd;
struct sockaddr_in prose_ctrl_addr;
struct sockaddr_in prose_pdcp_addr;
struct sockaddr_in pdcp_sin;
/* pdcp module parameters and related functions*/
static pdcp_params_t pdcp_params= {0,NULL};
rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
signed int pdcp_2_nas_irq;
pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];
pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
static pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
static pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
static sdu_size_t pdcp_input_sdu_remaining_size_to_read;
static sdu_size_t pdcp_output_header_bytes_to_write;
static sdu_size_t pdcp_output_sdu_bytes_to_write;
notifiedFIFO_t pdcp_sdu_list;
pdcp_enb_t pdcp_enb[MAX_NUM_CCs];
uint64_t get_pdcp_optmask(void) {
return pdcp_params.optmask;
......
......@@ -91,34 +91,34 @@ extern int pdcp_instance_cnt;
int init_pdcp_thread(void);
void cleanup_pdcp_thread(void);
uint32_t Pdcp_stats_tx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
uint32_t Pdcp_stats_tx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_throughput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_tx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
uint32_t Pdcp_stats_rx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_goodput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
uint32_t Pdcp_stats_rx_outoforder[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
extern uint32_t Pdcp_stats_tx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_throughput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_tx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_window_ms[MAX_eNB][MAX_MOBILES_PER_ENB];
extern uint32_t Pdcp_stats_rx[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_bytes[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_bytes_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_sn[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_goodput_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_aiat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_aiat_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_iat[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
extern uint32_t Pdcp_stats_rx_outoforder[MAX_eNB][MAX_MOBILES_PER_ENB][NB_RB_MAX];
void pdcp_update_perioidical_stats(const protocol_ctxt_t *const ctxt_pP);
......@@ -138,7 +138,7 @@ typedef struct pdcp_enb_s {
} pdcp_enb_t;
pdcp_enb_t pdcp_enb[MAX_NUM_CCs];
extern pdcp_enb_t pdcp_enb[MAX_NUM_CCs];
typedef struct pdcp_stats_s {
time_stats_t pdcp_run;
......@@ -455,10 +455,10 @@ struct pdcp_netlink_element_s {
//TTN for D2D (PC5S)
#define PDCP_SOCKET_PORT_NO 9999 //temporary value
#define PC5_SIGNALLING_PAYLOAD_SIZE 100 //should be updated with a correct value
int pdcp_pc5_sockfd;
struct sockaddr_in prose_ctrl_addr;
struct sockaddr_in prose_pdcp_addr;
struct sockaddr_in pdcp_sin;
extern int pdcp_pc5_sockfd;
extern struct sockaddr_in prose_ctrl_addr;
extern struct sockaddr_in prose_pdcp_addr;
extern struct sockaddr_in pdcp_sin;
void pdcp_pc5_socket_init(void);
typedef struct {
......@@ -500,28 +500,18 @@ typedef struct {
#define REORDERING_WINDOW_SN_7BIT 64
#define REORDERING_WINDOW_SN_12BIT 2048
signed int pdcp_2_nas_irq;
pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];
pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
extern signed int pdcp_2_nas_irq;
extern pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];
extern pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
// for UE code conly
rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
sdu_size_t pdcp_output_sdu_bytes_to_write;
sdu_size_t pdcp_output_header_bytes_to_write;
notifiedFIFO_t pdcp_sdu_list;
int pdcp_sent_a_sdu;
pdcp_data_req_header_t pdcp_input_header;
unsigned char pdcp_input_sdu_buffer[MAX_IP_PACKET_SIZE];
sdu_size_t pdcp_input_index_header;
sdu_size_t pdcp_input_sdu_size_read;
sdu_size_t pdcp_input_sdu_remaining_size_to_read;
extern rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
extern rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
extern unsigned int pdcp_eNB_UE_instance_to_rnti_index;
extern notifiedFIFO_t pdcp_sdu_list;
#define PDCP_COLL_KEY_VALUE(mODULE_iD, rNTI, iS_eNB, rB_iD, iS_sRB) \
((hash_key_t)mODULE_iD | \
......
......@@ -319,13 +319,15 @@ error:
}
int proto_agent_get_ack_result(mod_id_t mod_id, const void *params, Protocol__FlexsplitMessage **msg) {
/* code useless in this status: return 0 anyways
rlc_op_status_t result = 0;
//printf("PROTO_AGENT: handling the data_req_ack message\n");
printf("PROTO_AGENT: handling the data_req_ack message\n");
Protocol__FlexsplitMessage *input = (Protocol__FlexsplitMessage *)params;
Protocol__FspRlcDataReqAck *data_ack = input->data_req_ack;
result = data_ack->result;
//printf("PROTO_AGENT: ACK RESULT IS %u\n", result);
printf("PROTO_AGENT: ACK RESULT IS %u\n", result);
ack_result = result;
*/
return 0;
}
......
......@@ -62,7 +62,6 @@ typedef int (*proto_agent_message_destruction_callback)(
);
uint32_t ack_result;
/**********************************
* progRAN protocol messages helper
......
......@@ -30,7 +30,7 @@
#include "common/utils/LOG/log.h"
proto_agent_channel_t *proto_channel[NUMBER_OF_eNB_MAX][ENB_AGENT_MAX];
proto_agent_channel_instance_t channel_instance;
static proto_agent_channel_instance_t channel_instance;
int proto_agent_channel_id = 0;
int proto_agent_register_channel(mod_id_t mod_id, proto_agent_channel_t *channel, proto_agent_id_t agent_id) {
......
......@@ -80,6 +80,8 @@ static int g_send_id_read_index[2];
static struct mac_data_ind g_tx_delayed_indications[MAX_TIME_DELAYED_PDU_DUE_TO_HARQ];
static struct mac_data_ind g_rx_delayed_indications[MAX_TIME_DELAYED_PDU_DUE_TO_HARQ];
static rlc_um_entity_t um_tx;
static rlc_um_entity_t um_rx;
static int8_t *g_sdus[] = {"En dépit de son volontarisme affiché, le premier ministre est de plus en plus décrié pour son incompétence. La tension politique et dans l'opinion publique est encore montée d'un cran au Japon, sur fond d'inquiétantes nouvelles, avec du plutonium détecté dans le sol autour de la centrale de Fukushima. Le premier ministre Naoto Kan a solennellement déclaré que son gouvernement était «en état d'alerte maximum». Tout en reconnaissant que la situation restait «imprévisible». Ce volontarisme affiché par le premier ministre - que Nicolas Sarkozy rencontrera demain lors d'une visite au Japon - ne l'a pas empêché d'être la cible de violentes critiques de la part de parlementaires sur sa gestion de la crise. Attaqué sur le manque de transparence, il a assuré qu'il rendait publiques toutes les informations en sa possession. Un député de l'opposition, Yosuke Isozaki, a aussi reproché à Naoto Kan de ne pas avoir ordonné l'évacuation des populations dans la zone comprise entre 20 et 30 km autour de la centrale. «Peut-il y avoir quelque chose de plus irresponsable que cela ?», a-t-il lancé. Pour l'heure, la zone d'évacuation est limitée à un rayon de 20 km, seul le confinement étant recommandé pour les 10 km suivants. Sur ce sujet, les autorités japonaises ont été fragilisées mardi par les déclarations de Greenpeace, affirmant que ses experts avaient détecté une radioactivité dangereuse à 40 km de la centrale. L'organisation écologiste a appelé à une extension de la zone d'évacuation, exhortant Tokyo à «cesser de privilégier la politique aux dépens de la science». L'Agence japonaise de sûreté nucléaire a balayé ces critiques.",
......
......@@ -21,8 +21,6 @@
# ifndef __RLC_UM_TEST_H__
# define __RLC_UM_TEST_H__
rlc_um_entity_t um_tx;
rlc_um_entity_t um_rx;
void rlc_um_v9_3_0_test_windows_5(void);
void rlc_um_v9_3_0_test_windows_10(void);
......
......@@ -36,6 +36,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "targets/COMMON/openairinterface5g_limits.h"
#include "assertions.h"
#include <rlc.h>
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
......@@ -51,6 +52,24 @@ extern boolean_t pdcp_data_ind(
#define DEBUG_RLC_PDCP_INTERFACE 1
//#define TRACE_RLC_PAYLOAD 1
#define DEBUG_RLC_DATA_REQ 1
void (*rlc_rrc_data_conf)(
const protocol_ctxt_t *const ctxtP,
const rb_id_t rb_idP,
const mui_t muiP,
const rlc_tx_status_t statusP) __attribute__ ((aligned(32)));
void (*rlc_rrc_data_ind)(
const protocol_ctxt_t *const ctxtP,
const rb_id_t rb_idP,
const sdu_size_t sdu_sizeP,
const uint8_t *const sduP) __attribute__ ((aligned(32)));
logical_chan_id_t rlc_mbms_rbid2lcid_ue [MAX_MOBILES_PER_ENB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
logical_chan_id_t rlc_mbms_rbid2lcid_eNB[MAX_eNB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
hash_table_t *rlc_coll_p __attribute__ ((aligned(32)));
//-----------------------------------------------------------------------------
void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char *dataP, const signed long sizeP)
......
......@@ -133,13 +133,13 @@ typedef struct {
#define RLC_MAX_MBMS_LC (LTE_maxSessionPerPMCH * LTE_maxServiceCount)
#define RLC_MAX_LC ((max_val_LTE_DRB_Identity+1)* MAX_MOBILES_PER_ENB)
void (*rlc_rrc_data_ind)(
extern void (*rlc_rrc_data_ind)(
const protocol_ctxt_t *const ctxtP,
const rb_id_t rb_idP,
const sdu_size_t sdu_sizeP,
const uint8_t *const sduP) __attribute__ ((aligned(32)));
void (*rlc_rrc_data_conf)(
extern void (*rlc_rrc_data_conf)(
const protocol_ctxt_t *const ctxtP,
const rb_id_t rb_idP,
const mui_t muiP,
......@@ -184,8 +184,8 @@ typedef struct rlc_mbms_id_s {
//rlc_mbms_t rlc_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
//rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
extern rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
extern rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
#define rlc_mbms_enb_get_lcid_by_rb_id(Enb_mOD,rB_iD) rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD]
;
......@@ -201,8 +201,8 @@ rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_
rlc_mbms_rbid2lcid_ue[uE_mOD][rB_iD] = lOG_cH_iD; \
} while (0);
logical_chan_id_t rlc_mbms_rbid2lcid_ue [MAX_MOBILES_PER_ENB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
logical_chan_id_t rlc_mbms_rbid2lcid_eNB[MAX_eNB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
extern logical_chan_id_t rlc_mbms_rbid2lcid_ue [MAX_MOBILES_PER_ENB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
extern logical_chan_id_t rlc_mbms_rbid2lcid_eNB[MAX_eNB][NB_RB_MBMS_MAX]; /*!< \brief Pairing logical channel identifier with radio bearer identifer. */
#define RLC_COLL_KEY_VALUE(eNB_iD, rNTI, iS_eNB, rB_iD, iS_sRB) \
......@@ -250,7 +250,7 @@ logical_chan_id_t rlc_mbms_rbid2lcid_eNB[MAX_eNB][NB_RB_MBMS_MAX];
(((hash_key_t)(sESSION_ID)) << 37) | \
(((hash_key_t)(0x0000000000000001)) << 63))
hash_table_t *rlc_coll_p __attribute__ ((aligned(32)));
extern hash_table_t *rlc_coll_p __attribute__ ((aligned(32)));
/*! \fn tbs_size_t mac_rlc_serialize_tb (char* bufferP, list_t transport_blocksP)
* \brief Serialize a list of transport blocks coming from RLC in order to be processed by MAC.
......
......@@ -320,7 +320,6 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
return ret;
}
int oai_emulation;
rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
......
......@@ -265,7 +265,6 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
return ret;
}
int oai_emulation;
rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP,
......
......@@ -39,6 +39,7 @@
#include "local.h"
#include "proto_extern.h"
MODULE_LICENSE("GPL");
#define OAI_IP_DRIVER_NETLINK_ID 31
#define NL_DEST_PID 1
......
......@@ -41,8 +41,8 @@
#define MAX_IF_MODULES 100
//#define UL_HARQ_PRINT
NR_IF_Module_t *if_inst[MAX_IF_MODULES];
NR_Sched_Rsp_t Sched_INFO[MAX_IF_MODULES][MAX_NUM_CCs];
static NR_IF_Module_t *nr_if_inst[MAX_IF_MODULES];
static NR_Sched_Rsp_t NR_Sched_INFO[MAX_IF_MODULES][MAX_NUM_CCs];
extern int oai_nfapi_harq_indication(nfapi_harq_indication_t *harq_ind);
extern int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind);
extern int oai_nfapi_cqi_indication(nfapi_cqi_indication_t *cqi_ind);
......@@ -178,8 +178,8 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
#endif
module_id_t module_id = UL_info->module_id;
int CC_id = UL_info->CC_id;
NR_Sched_Rsp_t *sched_info = &Sched_INFO[module_id][CC_id];
NR_IF_Module_t *ifi = if_inst[module_id];
NR_Sched_Rsp_t *sched_info = &NR_Sched_INFO[module_id][CC_id];
NR_IF_Module_t *ifi = nr_if_inst[module_id];
gNB_MAC_INST *mac = RC.nrmac[module_id];
LOG_D(PHY,"SFN/SF:%d%d module_id:%d CC_id:%d UL_info[rach_pdus:%d rx_ind:%d crcs:%d]\n",
UL_info->frame,UL_info->slot,
......@@ -253,17 +253,17 @@ NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {
AssertFatal(Mod_id<MAX_MODULES,"Asking for Module %d > %d\n",Mod_id,MAX_IF_MODULES);
LOG_I(PHY,"Installing callbacks for IF_Module - UL_indication\n");
if (if_inst[Mod_id]==NULL) {
if_inst[Mod_id] = (NR_IF_Module_t*)malloc(sizeof(NR_IF_Module_t));
memset((void*)if_inst[Mod_id],0,sizeof(NR_IF_Module_t));
if (nr_if_inst[Mod_id]==NULL) {
nr_if_inst[Mod_id] = (NR_IF_Module_t*)malloc(sizeof(NR_IF_Module_t));
memset((void*)nr_if_inst[Mod_id],0,sizeof(NR_IF_Module_t));
LOG_I(MAC,"Allocating shared L1/L2 interface structure for instance %d @ %p\n",Mod_id,if_inst[Mod_id]);
LOG_I(MAC,"Allocating shared L1/L2 interface structure for instance %d @ %p\n",Mod_id,nr_if_inst[Mod_id]);
if_inst[Mod_id]->CC_mask=0;
if_inst[Mod_id]->NR_UL_indication = NR_UL_indication;
AssertFatal(pthread_mutex_init(&if_inst[Mod_id]->if_mutex,NULL)==0,
"allocation of if_inst[%d]->if_mutex fails\n",Mod_id);
nr_if_inst[Mod_id]->CC_mask=0;
nr_if_inst[Mod_id]->NR_UL_indication = NR_UL_indication;
AssertFatal(pthread_mutex_init(&nr_if_inst[Mod_id]->if_mutex,NULL)==0,
"allocation of nr_if_inst[%d]->if_mutex fails\n",Mod_id);
}
return if_inst[Mod_id];
return nr_if_inst[Mod_id];
}
......@@ -7,8 +7,8 @@
#include "nfapi/oai_integration/vendor_ext.h"
#define MAX_IF_MODULES 100
IF_Module_t *if_inst[MAX_IF_MODULES];
Sched_Rsp_t Sched_INFO[MAX_IF_MODULES][MAX_NUM_CCs];
static IF_Module_t *if_inst[MAX_IF_MODULES];
static Sched_Rsp_t Sched_INFO[MAX_IF_MODULES][MAX_NUM_CCs];
extern int oai_nfapi_harq_indication(nfapi_harq_indication_t *harq_ind);
extern int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind);
......
......@@ -54,6 +54,7 @@ extern nfapi_tx_request_pdu_t* tx_request_pdu[1023][10][10];
extern uint16_t sf_ahead;
static eth_params_t stub_eth_params;
void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
......
......@@ -27,12 +27,11 @@ extern nfapi_dl_config_request_t* dl_config_req;
extern nfapi_ul_config_request_t* ul_config_req;
extern nfapi_hi_dci0_request_t* hi_dci0_req;
int tx_req_num_elems;
extern int tx_req_num_elems;
//below 2 difinitions move to lte-ue.c to add initialization when difinition.
//int next_ra_frame;
//module_id_t next_Mod_id;
eth_params_t stub_eth_params;
......
......@@ -330,7 +330,7 @@ void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index ) {
preconfigpool->data_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12 = 0;
// 40 ms SL Period
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.present = LTE_SubframeBitmapSL_r12_PR_bs40_r12;
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf = CALLOC(1,5);
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf = CALLOC(5,1);
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.size = 5;
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.bits_unused = 0;
// last 36 subframes for PSCCH
......@@ -338,7 +338,7 @@ void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index ) {
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf[1] = 0xFF;
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf[2] = 0xFF;
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf[3] = 0xFF;
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf[5] = 0xFF;
preconfigpool->data_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs40_r12.buf[4] = 0xFF;
preconfigpool->dataHoppingConfig_r12.hoppingParameter_r12 = 0;
preconfigpool->dataHoppingConfig_r12.numSubbands_r12 = LTE_SL_HoppingConfigComm_r12__numSubbands_r12_ns1;
preconfigpool->dataHoppingConfig_r12.rb_Offset_r12 = 0;
......
......@@ -72,6 +72,7 @@
#include "nr_nas_msg_sim.h"
#endif
NR_UE_RRC_INST_t *NR_UE_rrc_inst;
/* NAS Attach request with IMSI */
static const char nr_nas_attach_req_imsi[] = {
0x07, 0x41,
......
......@@ -36,6 +36,6 @@
#include "rrc_defs.h"
NR_UE_RRC_INST_t *NR_UE_rrc_inst;
extern NR_UE_RRC_INST_t *NR_UE_rrc_inst;
#endif
......@@ -51,6 +51,7 @@
#include "gtpv1u_eNB_defs.h"
#include "gtpv1u_eNB_task.h"
#include "rrc_eNB_GTPV1U.h"
#include <common/utils/msc/msc.h>
#undef GTP_DUMP_SOCKET
......
......@@ -33,6 +33,7 @@
# include "memory.h"
#include "nas_user.h"
#include <common/utils/msc/msc.h>
// FIXME make command line option for NAS_UE_AUTOSTART
# define NAS_UE_AUTOSTART 1
......
......@@ -42,7 +42,6 @@
#include <unistd.h>
#include <errno.h>
#include <linux/sysctl.h>
#include <sys/sysctl.h>
#include "common_lib.h"
#include "ethernet_lib.h"
......
......@@ -35,6 +35,7 @@
#include <sched.h>
#include "rt_wrapper.h"
#include <common/utils/msc/msc.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
......@@ -102,6 +103,8 @@ pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
msc_interface_t msc_interface;
uint16_t sf_ahead=4;
......
......@@ -95,6 +95,7 @@ extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
int tx_req_num_elems;
extern uint16_t sf_ahead;
//extern int tx_req_UE_MAC1();
......
......@@ -86,6 +86,7 @@
#include "lte-softmodem.h"
msc_interface_t msc_interface;
/* temporary compilation wokaround (UE/eNB split */
uint16_t sf_ahead;
......
......@@ -44,6 +44,7 @@
#include <sys/sysinfo.h>
#include "rt_wrapper.h"
#include <errno.h>
#include <common/utils/msc/msc.h>
#include "openair1/PHY/defs_common.h"
......
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