Commit 68479fa4 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/develop-uedirectorysplit' into develop_integration_2018_w19

Status so far:
- monolithic eNB compiles and is functional with 1 UE in FDD, 5/10/20MHz.
  For 20MHz we don't have a nice TCP downlink (on haswell).
- oaisim does not compile
- UE does not compile
- phy simulators don't compile
- many new warnings

Conflicts:
	cmake_targets/CMakeLists.txt
	openair1/PHY/LTE_TRANSPORT/transport_eNB.h
	openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
	openair1/PHY/defs_eNB.h
	openair1/SCHED/pusch_pc.c
	openair1/SCHED/sched_common.h
	openair1/SCHED_UE/phy_procedures_lte_ue.c
	openair2/LAYER2/MAC/eNB_scheduler.c
	openair2/LAYER2/MAC/eNB_scheduler_mch.c
	openair2/LAYER2/MAC/mac.h
	openair2/LAYER2/MAC/ra_procedures.c
	openair2/LAYER2/MAC/ue_procedures.c
	openair2/RRC/LTE/MESSAGES/asn1_msg.h
	openair2/RRC/LTE/rrc_UE.c
	openair2/RRC/LTE/rrc_defs.h
	targets/RT/USER/lte-softmodem.h
	targets/RT/USER/lte-ue.c
parents f488673e c73cada3
This diff is collapsed.
......@@ -8,5 +8,5 @@ set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
set(RRC_ASN1_VERSION "Rel14")
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
......@@ -35,11 +35,11 @@
#include <pthread.h>
#include "COMMON/platform_constants.h"
#include "PHY/defs.h"
#include "PHY/defs_eNB.h"
#include "PHY/types.h"
#include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_lte.h"
#include "RRC/LITE/defs.h"
#include "RRC/LTE/rrc_defs.h"
#include "flexran_agent_defs.h"
#include "gtpv1u.h"
......@@ -49,7 +49,7 @@
#include "gtpv1u_eNB_defs.h"
#include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LITE/defs_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h"
typedef struct {
/// RAN context config file name
char *config_file_name;
......
......@@ -37,7 +37,7 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <dlfcn.h>
#include "openair1/PHY/defs.h"
#include "openair1/PHY/defs_common.h"
#define LOAD_MODULE_SHLIB_MAIN
#include "common/config/config_userapi.h"
......
......@@ -48,7 +48,10 @@ extern RAN_CONTEXT_t RC;
#include "fapi_stub.h"
//#include "fapi_l1.h"
#include "UTIL/LOG/log.h"
#include "openair2/LAYER2/MAC/proto.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#define NUM_P5_PHY 2
......
......@@ -37,7 +37,8 @@
#include "vendor_ext.h"
#include "nfapi_vnf.h"
#include "PHY/defs_eNB.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
......
......@@ -29,7 +29,7 @@
#endif
#include <stdint.h>
#include <stdio.h>
#include "PHY/CODING/defs.h"
#include "PHY/CODING/coding_defs.h"
#include "extern_3GPPinterleaver.h"
//#define DEBUG_TURBO_ENCODER 1
......
......@@ -26,10 +26,10 @@
date: 09.2012
*/
#ifndef TC_MAIN
#include "defs.h"
#include "coding_defs.h"
#include "extern_3GPPinterleaver.h"
#else
#include "vars.h"
#include "coding_vars.h"
#include <stdint.h>
#endif
#include <stdio.h>
......
......@@ -27,8 +27,8 @@
*/
#include "PHY/defs.h"
#include "PHY/CODING/defs.h"
#include "PHY/defs_common.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/sse_intrin.h"
......
......@@ -42,8 +42,9 @@
#ifndef TEST_DEBUG
#include "PHY/defs.h"
#include "PHY/CODING/defs.h"
#include "PHY/impl_defs_top.h"
#include "PHY/defs_common.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "extern_3GPPinterleaver.h"
#else
......
......@@ -41,8 +41,9 @@
#include "PHY/sse_intrin.h"
#ifndef TEST_DEBUG
#include "PHY/defs.h"
#include "PHY/CODING/defs.h"
#include "PHY/impl_defs_top.h"
#include "PHY/defs_common.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "extern_3GPPinterleaver.h"
#else
......
......@@ -39,8 +39,8 @@
#include "PHY/sse_intrin.h"
#ifndef TEST_DEBUG
#include "PHY/defs.h"
#include "PHY/CODING/defs.h"
#include "PHY/defs_common.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "extern_3GPPinterleaver.h"
#else
......
......@@ -24,7 +24,7 @@
author: raymond.knopp@eurecom.fr, based on similar code for 3GPP convolutional code (UMTS) by P. Humblet (2000)
date: 10.2004
*/
#include "defs.h"
#include "coding_defs.h"
unsigned short gdot11[] = { 0133, 0171 }; // {A,B}
......
......@@ -24,7 +24,7 @@
author: raymond.knopp@eurecom.fr
date: 21.10.2009
*/
#include "defs.h"
#include "coding_defs.h"
//#define DEBUG_CCODE 1
......
......@@ -29,7 +29,7 @@
#include <stdint.h>
#include "PHY/defs.h"
#include "PHY/defs_common.h"
#define CRC24_A 0
#define CRC24_B 1
......@@ -75,20 +75,7 @@ int32_t lte_segmentation(uint8_t *input_buffer,
uint32_t *Kminus,
uint32_t *F);
/** \fn int16_t estimate_ue_tx_power(uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs)
\brief this functions calculates the delta MCS in dB based on the lte_segmentation function
\param tbs transport block size
\param nb_rb number of required rb
\param control_only a flag for the type of data
\param ncp cyclic prefix
\param use_srs a flag indicating the use of srs in the current SF
\returns ue_tx_power estimated ue tx power = delat_ mcs + bw_factor
*/
int16_t estimate_ue_tx_power(uint32_t tbs,
uint32_t nb_rb,
uint8_t control_only,
lte_prefix_type_t ncp,
uint8_t use_srs);
/** \fn uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w)
\brief This is the subblock interleaving algorithm from 36-212 (Release 8, 8.6 2009-03), pages 15-16.
......
......@@ -33,8 +33,8 @@
#include <sys/types.h>
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/defs_common.h"
#include "PHY/phy_extern.h"
#include "common/utils/load_module_shlib.h"
#include "common/utils/telnetsrv/telnetsrv.h"
......
......@@ -31,7 +31,7 @@
*/
#include "defs.h"
#include "coding_defs.h"
/*ref 36-212 v8.6.0 , pp 8-9 */
......
......@@ -28,8 +28,8 @@
#include <stdio.h>
#include <stdlib.h>
#endif
#include "PHY/defs.h"
#include "assertions.h"
#include "PHY/defs_eNB.h"
#include "PHY/LTE_TRANSPORT/transport_common.h"
//#define cmin(a,b) ((a)<(b) ? (a) : (b))
......
......@@ -24,8 +24,9 @@
author: raymond.knopp@eurecom.fr
date: 21.10.2009
*/
#include "PHY/defs.h"
#include "SCHED/extern.h"
#include "PHY/defs_eNB.h"
#include "PHY/LTE_TRANSPORT/transport_common.h"
#include "PHY/CODING/coding_defs.h"
//#define DEBUG_SEGMENTATION
......
......@@ -29,8 +29,8 @@
*/
#ifndef TEST_DEBUG
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/defs_common.h"
#include "PHY/phy_extern.h"
#else
#include <stdio.h>
#include <stdlib.h>
......
......@@ -20,9 +20,50 @@
*/
/*!\brief Initilization and reconfiguration routines for LTE PHY */
#include "defs.h"
#include "PHY/extern.h"
#include "PHY/CODING/extern.h"
#include "phy_init.h"
#include "PHY/phy_extern.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
void generate_64qam_table(void)
{
int a,b,c,index;
for (a=-1; a<=1; a+=2)
for (b=-1; b<=1; b+=2)
for (c=-1; c<=1; c+=2) {
index = (1+a)*2 + (1+b) + (1+c)/2;
qam64_table[index] = -a*(QAM64_n1 + b*(QAM64_n2 + (c*QAM64_n3))); // 0 1 2
}
}
void generate_16qam_table(void)
{
int a,b,index;
for (a=-1; a<=1; a+=2)
for (b=-1; b<=1; b+=2) {
index = (1+a) + (1+b)/2;
qam16_table[index] = -a*(QAM16_n1 + (b*QAM16_n2));
}
}
void generate_qpsk_table(void)
{
int a,index;
for (a=-1; a<=1; a+=2) {
index = (1+a)/2;
qpsk_table[index] = -a*QPSK;
}
}
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms)
{
......
......@@ -19,14 +19,17 @@
* contact@openairinterface.org
*/
#include "defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
#include "SIMULATION/TOOLS/defs.h"
#include "PHY/defs_eNB.h"
#include "phy_init.h"
#include "SCHED/sched_eNB.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h"
......@@ -721,24 +724,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups)
{
// uint8_t i;
if (eNB_flag == 0 ) {
//LOG_D(PHY,"[UE %d] configure cba group %d with rnti %x, num active cba grp %d\n", index, index, cba_rnti, num_active_cba_groups);
PHY_vars_UE_g[Mod_id][CC_id]->ulsch[index]->num_active_cba_groups=num_active_cba_groups;
PHY_vars_UE_g[Mod_id][CC_id]->ulsch[index]->cba_rnti[cba_group_id]=cba_rnti;
} else {
//for (i=index; i < NUMBER_OF_UE_MAX; i+=num_active_cba_groups){
// LOG_D(PHY,"[eNB %d] configure cba group %d with rnti %x for UE %d, num active cba grp %d\n",Mod_id, i%num_active_cba_groups, cba_rnti, i, num_active_cba_groups);
RC.eNB[Mod_id][CC_id]->ulsch[index]->num_active_cba_groups=num_active_cba_groups;
RC.eNB[Mod_id][CC_id]->ulsch[index]->cba_rnti[cba_group_id] = cba_rnti;
//}
}
}
int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
unsigned char is_secondary_eNB,
unsigned char abstraction_flag)
......
......@@ -19,14 +19,13 @@
* contact@openairinterface.org
*/
#include "defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
#include "SIMULATION/TOOLS/defs.h"
#include "phy_init.h"
#include "SCHED/sched_eNB.h"
#include "PHY/phy_extern.h"
#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h"
......
......@@ -19,19 +19,20 @@
* contact@openairinterface.org
*/
#include "defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
#include "SIMULATION/TOOLS/defs.h"
#include "phy_init.h"
#include "SCHED_UE/sched_UE.h"
#include "PHY/phy_extern_ue.h"
#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
extern uint8_t nfapi_mode;
......@@ -655,7 +656,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
int th_id;
LOG_D(PHY,"Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
......
......@@ -25,10 +25,14 @@
#include <execinfo.h>
#include <signal.h>
#include "SIMULATION/TOOLS/defs.h"
#include "SIMULATION/TOOLS/sim.h"
#include "PHY/types.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "PHY/phy_extern.h"
#include "phy_init.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
extern PHY_VARS_eNB *eNB;
extern PHY_VARS_UE *UE;
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "defs.h"
#include "phy_init.h"
#include "log.h"
uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6};
......
......@@ -22,8 +22,8 @@
#ifndef __INIT_DEFS__H__
#define __INIT_DEFS__H__
#include "PHY/defs.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
......
......@@ -20,8 +20,8 @@
*/
#include "PHY/types.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
void
phy_adjust_gain (PHY_VARS_UE *ue, uint32_t rx_power_fil_dB, uint8_t eNB_id)
......
......@@ -19,8 +19,8 @@
* contact@openairinterface.org
*/
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"