From 5822c850cb6adffd839a372730b009aa7e092371 Mon Sep 17 00:00:00 2001 From: laurent <laurent.thomas@free.fr> Date: Fri, 30 Sep 2016 12:34:57 +0200 Subject: [PATCH] small2 --- cmake_targets/tools/build_helper | 4 ++-- openair1/PHY/defs.h | 9 +++++++++ openair1/PHY/extern.h | 8 +++++++- openair1/PHY/impl_defs_lte.h | 10 ++++++++-- openair2/X2AP/x2ap_common.h | 2 ++ targets/RT/USER/lte-enb.c | 8 ++++++-- 6 files changed, 34 insertions(+), 7 deletions(-) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 94e80e2358..9c6f846f6c 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -332,7 +332,7 @@ check_install_oai_software() { wget $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so - $SUDO apt-get install libgnutls-dev nettle-dev nettle-bin + $SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin install_asn1c_from_source } @@ -342,7 +342,7 @@ install_asn1c_from_source(){ echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log " ( $SUDO rm -rf /tmp/asn1c - git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c + $SUDO GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c cd /tmp/asn1c ./configure make -j`nproc` diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index abf6038543..e8eae39ad6 100755 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -53,6 +53,11 @@ # define msg mexPrintf #else # ifdef OPENAIR2 +# if ENABLE_RAL +# include "collection/hashtable/hashtable.h" +# include "COMMON/ral_messages_types.h" +# include "UTIL/queue.h" +# endif # include "log.h" # define msg(aRGS...) LOG_D(PHY, ##aRGS) # else @@ -138,6 +143,9 @@ static inline void* malloc16_clear( size_t size ) #define NB_BANDS_MAX 8 +#ifdef OCP_FRAMEWORK +#include <enums.h> +#else typedef enum {normal_txrx=0,rx_calib_ue=1,rx_calib_ue_med=2,rx_calib_ue_byp=3,debug_prach=4,no_L2_connect=5,calib_prach_tx=6,rx_dump_frame=7,loop_through_memory=8} runmode_t; enum transmission_access_mode { @@ -161,6 +169,7 @@ typedef enum { synch_to_ext_device=0, // synch to RF or Ethernet device synch_to_other // synch to another source (timer, other CC_id) } eNB_timing_t; +#endif typedef struct UE_SCAN_INFO_s { /// 10 best amplitudes (linear) for each pss signals diff --git a/openair1/PHY/extern.h b/openair1/PHY/extern.h index 8a5bf5e8f5..009057838b 100755 --- a/openair1/PHY/extern.h +++ b/openair1/PHY/extern.h @@ -47,11 +47,17 @@ extern int number_of_cards; //extern PHY_CONFIG *PHY_config; //extern PHY_VARS *PHY_vars; - +#ifndef OCP_FRAMEWORK extern PHY_VARS_UE ***PHY_vars_UE_g; extern PHY_VARS_eNB ***PHY_vars_eNB_g; extern PHY_VARS_RN **PHY_vars_RN_g; extern LTE_DL_FRAME_PARMS *lte_frame_parms_g; +#else +#define MAX_UE 10 +#define MAX_eNB 20 +extern PHY_VARS_UE * PHY_vars_UE_g[MAX_UE][MAX_NUM_CCs]; +extern PHY_VARS_eNB * PHY_vars_eNB_g[MAX_eNB][MAX_NUM_CCs]; +#endif extern MAC_xface *mac_xface; diff --git a/openair1/PHY/impl_defs_lte.h b/openair1/PHY/impl_defs_lte.h index bed2057800..eed53bce09 100644 --- a/openair1/PHY/impl_defs_lte.h +++ b/openair1/PHY/impl_defs_lte.h @@ -62,7 +62,9 @@ #define MAX_MBSFN_AREA 8 - +#ifdef OCP_FRAMEWORK +#include "enums.h" +#else typedef enum {TDD=1,FDD=0} lte_frame_type_t; typedef enum {EXTENDED=1,NORMAL=0} lte_prefix_type_t; @@ -82,7 +84,7 @@ typedef enum { one=6, two=12 } PHICH_RESOURCE_t; - +#endif /// PHICH-Config from 36.331 RRC spec typedef struct { /// Parameter: PHICH-Duration, see TS 36.211 (Table 6.9.3-1). @@ -169,10 +171,12 @@ typedef struct { } UL_REFERENCE_SIGNALS_PUSCH_t; /// Enumeration for parameter Hopping-mode \ref PUSCH_CONFIG_COMMON::hoppingMode. +#ifndef OCP_FRAMEWORK typedef enum { interSubFrame=0, intraAndInterSubFrame=1 } PUSCH_HOPPING_t; +#endif /// PUSCH-ConfigCommon from 36.331 RRC spec. typedef struct { @@ -337,6 +341,7 @@ typedef struct { uint8_t filterCoefficient; } UL_POWER_CONTROL_DEDICATED; +#ifndef OCP_FRAMEWORK /// Enumeration for parameter \f$\alpha\f$ \ref UL_POWER_CONTROL_CONFIG_COMMON::alpha. typedef enum { al0=0, @@ -348,6 +353,7 @@ typedef enum { al09=6, al1=7 } PUSCH_alpha_t; +#endif /// \note UNUSED typedef enum { diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h index 04ad77f8e3..b2f8617572 100755 --- a/openair2/X2AP/x2ap_common.h +++ b/openair2/X2AP/x2ap_common.h @@ -290,8 +290,10 @@ # define X2AP_PORT 36422 #endif +#ifndef TRUE #define TRUE 1 #define FALSE 0 +#endif extern int asn_debug; extern int asn1_xer_print; diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 1023ccc04f..cf4f6e9568 100644 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -190,10 +190,10 @@ static inline void thread_top_init(char *thread_name, if (sched_setattr(0, &attr, flags) < 0 ) { perror("[SCHED] eNB tx thread: sched_setattr failed\n"); - exit_fun("Error setting deadline scheduler"); + exit(1); } - LOG_I( HW, "[SCHED] eNB %s deadline thread (TID %ld) started on CPU %d\n", gettid(), thread_name,sched_getcpu() ); + LOG_I( HW, "[SCHED] eNB RXn-TXnp4 deadline thread (TID %ld) started on CPU %d\n", gettid(), sched_getcpu() ); #else //LOW_LATENCY int policy, s, j; @@ -1352,7 +1352,9 @@ void init_eNB_proc(int inst) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { eNB = PHY_vars_eNB_g[inst][CC_id]; +#ifndef OCP_FRAMEWORK LOG_I(PHY,"Initializing eNB %d CC_id %d (%s,%s),\n",inst,CC_id,eNB_functions[eNB->node_function],eNB_timing[eNB->node_timing]); +#endif proc = &eNB->proc; proc_rxtx = proc->proc_rxtx; @@ -1625,7 +1627,9 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst eNB->node_timing = node_timing[CC_id]; eNB->abstraction_flag = 0; eNB->single_thread_flag = single_thread_flag; +#ifndef OCP_FRAMEWORK LOG_I(PHY,"Initializing eNB %d CC_id %d : (%s,%s)\n",inst,CC_id,eNB_functions[node_function[CC_id]],eNB_timing[node_timing[CC_id]]); +#endif switch (node_function[CC_id]) { case NGFI_RRU_IF5: -- GitLab