Fix #582, USER_MODE flag removed
This commit is contained in:
@@ -587,7 +587,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
|||||||
add_boolean_option(ENABLE_SECURITY True "Enable LTE integrity and ciphering between RRC UE and eNB")
|
add_boolean_option(ENABLE_SECURITY True "Enable LTE integrity and ciphering between RRC UE and eNB")
|
||||||
add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB")
|
add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB")
|
||||||
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
||||||
add_boolean_option(USER_MODE True "????")
|
|
||||||
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
|
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
|
||||||
|
|
||||||
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
||||||
@@ -2136,7 +2135,6 @@ get_directory_property(DirDefs COMPILE_DEFINITIONS )
|
|||||||
foreach( d ${DirDefs} )
|
foreach( d ${DirDefs} )
|
||||||
set(module_cc_opt_tmp "${module_cc_opt_tmp} -D${d}")
|
set(module_cc_opt_tmp "${module_cc_opt_tmp} -D${d}")
|
||||||
endforeach()
|
endforeach()
|
||||||
string(REPLACE "-DUSER_MODE" "" module_cc_opt ${module_cc_opt_tmp})
|
|
||||||
get_directory_property( DirDefs INCLUDE_DIRECTORIES )
|
get_directory_property( DirDefs INCLUDE_DIRECTORIES )
|
||||||
foreach( d ${DirDefs} )
|
foreach( d ${DirDefs} )
|
||||||
set(module_cc_opt "${module_cc_opt} -I${d}")
|
set(module_cc_opt "${module_cc_opt} -I${d}")
|
||||||
|
|||||||
@@ -75,5 +75,4 @@ set ( SECU False )
|
|||||||
set ( SMBV False )
|
set ( SMBV False )
|
||||||
set ( TEST_OMG False )
|
set ( TEST_OMG False )
|
||||||
set ( USE_MME "R10" )
|
set ( USE_MME "R10" )
|
||||||
set ( USER_MODE True )
|
|
||||||
set ( XER_PRINT True )
|
set ( XER_PRINT True )
|
||||||
|
|||||||
@@ -76,5 +76,4 @@ set ( SPECTRA False )
|
|||||||
set ( TEST_OMG False )
|
set ( TEST_OMG False )
|
||||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||||
set ( USE_MME "R10" )
|
set ( USE_MME "R10" )
|
||||||
set ( USER_MODE True )
|
|
||||||
set ( XER_PRINT False )
|
set ( XER_PRINT False )
|
||||||
|
|||||||
@@ -78,6 +78,5 @@ set ( UPDATE_RELEASE_9 True)
|
|||||||
set ( UPDATE_RELEASE_10 True)
|
set ( UPDATE_RELEASE_10 True)
|
||||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||||
set ( USE_MME "R10" )
|
set ( USE_MME "R10" )
|
||||||
set ( USER_MODE True )
|
|
||||||
set ( XER_PRINT False )
|
set ( XER_PRINT False )
|
||||||
set ( XFORMS False )
|
set ( XFORMS False )
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ set ( SPECTRA False )
|
|||||||
set ( TEST_OMG False )
|
set ( TEST_OMG False )
|
||||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||||
set ( USE_MME "R10" )
|
set ( USE_MME "R10" )
|
||||||
set ( USER_MODE True )
|
|
||||||
set ( XER_PRINT False )
|
set ( XER_PRINT False )
|
||||||
set ( DEBUG_PHY False )
|
set ( DEBUG_PHY False )
|
||||||
set ( DEBUG_PHY_PROC False)
|
set ( DEBUG_PHY_PROC False)
|
||||||
|
|||||||
@@ -80,6 +80,5 @@ set ( TEST_S1C_MME True )
|
|||||||
|
|
||||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||||
set ( USE_MME "R10" )
|
set ( USE_MME "R10" )
|
||||||
set ( USER_MODE True )
|
|
||||||
set ( XER_PRINT False )
|
set ( XER_PRINT False )
|
||||||
set ( XFORMS False )
|
set ( XFORMS False )
|
||||||
|
|||||||
@@ -27,11 +27,7 @@
|
|||||||
#ifndef _ITTI_TYPES_H_
|
#ifndef _ITTI_TYPES_H_
|
||||||
#define _ITTI_TYPES_H_
|
#define _ITTI_TYPES_H_
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#else
|
|
||||||
#include <linux/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1))
|
#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1))
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ set(OPENAIR_NFAPIINC $ENV{NFAPI_DIR} )
|
|||||||
|
|
||||||
set(CMAKE_INSTALL_PREFIX $ENV{OPENAIR_TARGETS})
|
set(CMAKE_INSTALL_PREFIX $ENV{OPENAIR_TARGETS})
|
||||||
|
|
||||||
add_definitions (-DRel14 -DCMAKER -DENABLE_FXP -DENABLE_ITTI -DENABLE_NAS_UE_LOGGING -DENABLE_SECURITY -DENABLE_USE_CPU_EXECUTION_TIME -DENABLE_USE_MME -DENABLE_VCD -DENB_AGENT -DENB_MODE -DETHERNET=1 -DEXMIMO_IOT -DJUMBO_FRAME -DLINK_ENB_PDCP_TO_GTPV1U -DLOG_NO_THREAD -DMAC_CONTEXT -DMAX_NUM_CCs=1 -DNAS_BUILT_IN_UE -DNAS_UE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2 -DNEW_FFT -DNO_RRM -DNone=1 -DOAI_NW_DRIVER_USE_NETLINK -DOPENAIR1 -DOPENAIR2 -DOPENAIR_LTE -DPC_DSP -DPC_TARGET -DPHYSIM -DPHY_CONTEXT -DPUCCH -DRel10=1 -DS1AP_VERSION=R10 -DTRACE_RLC_MUTEX -DUSER_MODE -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3)
|
add_definitions (-DRel14 -DCMAKER -DENABLE_FXP -DENABLE_ITTI -DENABLE_NAS_UE_LOGGING -DENABLE_SECURITY -DENABLE_USE_CPU_EXECUTION_TIME -DENABLE_USE_MME -DENABLE_VCD -DENB_AGENT -DENB_MODE -DETHERNET=1 -DEXMIMO_IOT -DJUMBO_FRAME -DLINK_ENB_PDCP_TO_GTPV1U -DLOG_NO_THREAD -DMAC_CONTEXT -DMAX_NUM_CCs=1 -DNAS_BUILT_IN_UE -DNAS_UE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2 -DNEW_FFT -DNO_RRM -DNone=1 -DOAI_NW_DRIVER_USE_NETLINK -DOPENAIR1 -DOPENAIR2 -DOPENAIR_LTE -DPC_DSP -DPC_TARGET -DPHYSIM -DPHY_CONTEXT -DPUCCH -DRel10=1 -DS1AP_VERSION=R10 -DTRACE_RLC_MUTEX -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3)
|
||||||
add_compile_options( -fPIC -march=native -Ofast)
|
add_compile_options( -fPIC -march=native -Ofast)
|
||||||
|
|
||||||
include_directories( ./ ${OPENAIR_COMMON_DIR} ${OPENAIR_DIR} ${OPENAIR1_DIR} ${OPENAIR2_DIR} ${OPENAIR2_COMMON_DIR} ${OPENAIR2_DIR}/UTIL/LOG
|
include_directories( ./ ${OPENAIR_COMMON_DIR} ${OPENAIR_DIR} ${OPENAIR1_DIR} ${OPENAIR2_DIR} ${OPENAIR2_COMMON_DIR} ${OPENAIR2_DIR}/UTIL/LOG
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ RATE12CC_SRC = ccoding_byte.c viterbi.c crc_byte.c
|
|||||||
all: 3gpplte_sse
|
all: 3gpplte_sse
|
||||||
|
|
||||||
3gpplte_sse: $(TURBO_SRC)
|
3gpplte_sse: $(TURBO_SRC)
|
||||||
gcc -O3 -gdwarf-2 -mfloat-abi=hard -mfpu=neon -lm -lgcc -lrt ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DTC_MAIN -DNB_ANTENNAS_RX=1 -o 3gpplte_sse 3gpplte_sse.c -Wall -g -ggdb -DTC_MAIN
|
gcc -O3 -gdwarf-2 -mfloat-abi=hard -mfpu=neon -lm -lgcc -lrt ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DTC_MAIN -DNB_ANTENNAS_RX=1 -o 3gpplte_sse 3gpplte_sse.c -Wall -g -ggdb -DTC_MAIN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ OPENAIR2_TOP = $(OPENAIR2_DIR)
|
|||||||
OPENAIR3 = $(OPENAIR3_DIR)
|
OPENAIR3 = $(OPENAIR3_DIR)
|
||||||
|
|
||||||
|
|
||||||
CFLAGS += -DNODE_RG -DUSER_MODE -DPC_TARGET -DNO_UL_REF -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DOPENAIR_LTE -DMAX_NUM_CCs=1
|
CFLAGS += -DNODE_RG -DPC_TARGET -DNO_UL_REF -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DOPENAIR_LTE -DMAX_NUM_CCs=1
|
||||||
|
|
||||||
ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES
|
ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES
|
||||||
|
|
||||||
|
|||||||
@@ -31,13 +31,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define __NO_VERSION__
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#include "PHY/types.h"
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,6 @@
|
|||||||
date: 21.10.2009
|
date: 21.10.2009
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TEST_DEBUG
|
#ifndef TEST_DEBUG
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "PHY/extern.h"
|
#include "PHY/extern.h"
|
||||||
@@ -126,7 +122,7 @@ void print_shorts(__m128i x,char *s) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#endif // USER_MODE
|
#endif // DEBUG_VITERBI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!\brief Initilization and reconfiguration routines for LTE PHY */
|
/*!\brief Initilization and reconfiguration routines for LTE PHY */
|
||||||
#ifndef USER_MODE
|
|
||||||
#define __NO_VERSION__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "PHY/extern.h"
|
#include "PHY/extern.h"
|
||||||
#include "MAC_INTERFACE/extern.h"
|
#include "MAC_INTERFACE/extern.h"
|
||||||
|
|||||||
@@ -149,10 +149,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
int temp, i, aa, max_pos = 0,ind;
|
int temp, i, aa, max_pos = 0,ind;
|
||||||
int max_val=0;
|
int max_val=0;
|
||||||
short Re,Im,ncoef;
|
short Re,Im,ncoef;
|
||||||
#ifdef USER_MODE
|
|
||||||
#ifdef DEBUG_PHY
|
#ifdef DEBUG_PHY
|
||||||
char fname[100],vname[100];
|
char fname[100],vname[100];
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ncoef = 32768 - coef;
|
ncoef = 32768 - coef;
|
||||||
@@ -187,12 +185,10 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
1);
|
1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef USER_MODE
|
|
||||||
#ifdef DEBUG_PHY
|
#ifdef DEBUG_PHY
|
||||||
sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa);
|
sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa);
|
||||||
sprintf(vname,"srs_time_%d%d",ind,aa);
|
sprintf(vname,"srs_time_%d%d",ind,aa);
|
||||||
write_output(fname,vname,lte_eNB_srs->srs_ch_estimates_time[aa],frame_parms->ofdm_symbol_size*2,2,1);
|
write_output(fname,vname,lte_eNB_srs->srs_ch_estimates_time[aa],frame_parms->ofdm_symbol_size*2,2,1);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "filt16_32.h"
|
#include "filt16_32.h"
|
||||||
|
|||||||
@@ -19,9 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "SCHED/defs.h"
|
#include "SCHED/defs.h"
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|||||||
@@ -19,9 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "SCHED/phy_procedures_emos.h"
|
#include "SCHED/phy_procedures_emos.h"
|
||||||
|
|||||||
@@ -19,9 +19,7 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
int16_t cond_num_threshold = 0;
|
int16_t cond_num_threshold = 0;
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
void print_shorts(char *s,short *x)
|
void print_shorts(char *s,short *x)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -57,8 +56,6 @@ void print_ints(char *s,int *x)
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int16_t get_PL(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
|
int16_t get_PL(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
|
|||||||
eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
|
eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
|
||||||
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
|
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
|
||||||
|
|
||||||
#if defined(USER_MODE)
|
|
||||||
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
|
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
|
||||||
|
|
||||||
if (Msc_idx_ptr)
|
if (Msc_idx_ptr)
|
||||||
@@ -101,26 +100,14 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
uint8_t b;
|
|
||||||
|
|
||||||
for (b=0; b<33; b++)
|
|
||||||
if (Msc_RS==dftsizes[b])
|
|
||||||
Msc_RS_idx = b;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// LOG_I(PHY,"subframe %d, Ns %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe,Ns,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift);
|
// LOG_I(PHY,"subframe %d, Ns %d, l %d, Msc_RS = %d, Msc_RS_idx = %d, u %d, v %d, cyclic_shift %d\n",subframe,Ns,l,Msc_RS, Msc_RS_idx,u,v,cyclic_shift);
|
||||||
#ifdef DEBUG_CH
|
#ifdef DEBUG_CH
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
|
|
||||||
if (Ns==0)
|
if (Ns==0)
|
||||||
write_output("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1);
|
write_output("drs_seq0.m","drsseq0",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1);
|
||||||
else
|
else
|
||||||
write_output("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1);
|
write_output("drs_seq1.m","drsseq1",ul_ref_sigs_rx[u][v][Msc_RS_idx],2*Msc_RS,2,1);
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -489,12 +476,10 @@ int32_t lte_srs_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
15,
|
15,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#ifdef DEBUG_SRS
|
#ifdef DEBUG_SRS
|
||||||
sprintf(fname,"srs_ch_est%d.m",aa);
|
sprintf(fname,"srs_ch_est%d.m",aa);
|
||||||
sprintf(vname,"srs_est%d",aa);
|
sprintf(vname,"srs_est%d",aa);
|
||||||
write_output(fname,vname,srs_vars->srs_ch_estimates[aa],frame_parms->ofdm_symbol_size,1,1);
|
write_output(fname,vname,srs_vars->srs_ch_estimates[aa],frame_parms->ofdm_symbol_size,1,1);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,8 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|||||||
@@ -21,10 +21,8 @@
|
|||||||
|
|
||||||
// 6.10.2.2 MBSFN reference signals Mapping to resource elements
|
// 6.10.2.2 MBSFN reference signals Mapping to resource elements
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|||||||
@@ -30,10 +30,8 @@
|
|||||||
* \warning
|
* \warning
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
|
|||||||
@@ -29,11 +29,9 @@
|
|||||||
* \note
|
* \note
|
||||||
* \warning
|
* \warning
|
||||||
*/
|
*/
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "PHY/extern.h"
|
#include "PHY/extern.h"
|
||||||
#include "SCHED/defs.h"
|
#include "SCHED/defs.h"
|
||||||
|
|||||||
@@ -801,8 +801,6 @@ int dlsch_abstraction_EESM(double* sinr_dB, uint8_t TM, uint32_t rb_alloc[4], ui
|
|||||||
|
|
||||||
bler = interp(sinr_eff,&sinr_bler_map[mcs][0][0],&sinr_bler_map[mcs][1][0],table_length[mcs]);
|
bler = interp(sinr_eff,&sinr_bler_map[mcs][0][0],&sinr_bler_map[mcs][1][0],table_length[mcs]);
|
||||||
|
|
||||||
#ifdef USER_MODE // need to be adapted for the emulation in the kernel space
|
|
||||||
|
|
||||||
if (uniformrandom() < bler) {
|
if (uniformrandom() < bler) {
|
||||||
LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM);
|
LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM);
|
||||||
return(1);
|
return(1);
|
||||||
@@ -810,8 +808,6 @@ int dlsch_abstraction_EESM(double* sinr_dB, uint8_t TM, uint32_t rb_alloc[4], ui
|
|||||||
LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM);
|
LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f, TM %d)\n",mcs,sinr_eff,bler, TM);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs,uint8_t dl_power_off)
|
int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs,uint8_t dl_power_off)
|
||||||
@@ -884,8 +880,6 @@ int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], ui
|
|||||||
|
|
||||||
bler = interp(sinr_eff,&sinr_bler_map[mcs][0][0],&sinr_bler_map[mcs][1][0],table_length[mcs]);
|
bler = interp(sinr_eff,&sinr_bler_map[mcs][0][0],&sinr_bler_map[mcs][1][0],table_length[mcs]);
|
||||||
|
|
||||||
#ifdef USER_MODE // need to be adapted for the emulation in the kernel space
|
|
||||||
|
|
||||||
if (uniformrandom() < bler) {
|
if (uniformrandom() < bler) {
|
||||||
LOG_N(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
LOG_N(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
||||||
return(0);
|
return(0);
|
||||||
@@ -893,8 +887,6 @@ int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], ui
|
|||||||
LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -37,11 +37,7 @@
|
|||||||
#include "PHY/sse_intrin.h"
|
#include "PHY/sse_intrin.h"
|
||||||
#include "T.h"
|
#include "T.h"
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define NOCYGWIN_STATIC static
|
|
||||||
#else
|
|
||||||
#define NOCYGWIN_STATIC
|
#define NOCYGWIN_STATIC
|
||||||
#endif
|
|
||||||
|
|
||||||
/* dynamic shift for LLR computation for TM3/4
|
/* dynamic shift for LLR computation for TM3/4
|
||||||
* set as command line argument, see lte-softmodem.c
|
* set as command line argument, see lte-softmodem.c
|
||||||
@@ -6027,9 +6023,6 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF,
|
|||||||
|
|
||||||
//==============================================================================================
|
//==============================================================================================
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
|
|
||||||
|
|
||||||
void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid)
|
void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid)
|
||||||
{
|
{
|
||||||
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
|
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
|
||||||
@@ -6119,7 +6112,6 @@ void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t subframe,unsigned int *c
|
|||||||
|
|
||||||
// printf("log2_maxh = %d\n",ue->pdsch_vars[eNB_id]->log2_maxh);
|
// printf("log2_maxh = %d\n",ue->pdsch_vars[eNB_id]->log2_maxh);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_DEMOD
|
#ifdef DEBUG_DLSCH_DEMOD
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
|
|||||||
// cyclic_shift1 = 0;
|
// cyclic_shift1 = 0;
|
||||||
Msc_RS = 12*nb_rb;
|
Msc_RS = 12*nb_rb;
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
|
Msc_idx_ptr = (uint16_t*) bsearch(&Msc_RS, dftsizes, 33, sizeof(uint16_t), compareints);
|
||||||
|
|
||||||
if (Msc_idx_ptr)
|
if (Msc_idx_ptr)
|
||||||
@@ -91,20 +90,6 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
uint8_t b;
|
|
||||||
|
|
||||||
for (b=0; b<33; b++)
|
|
||||||
if (Msc_RS==dftsizes[b])
|
|
||||||
Msc_RS_idx = b;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#ifdef DEBUG_DRS
|
|
||||||
printf("[PHY] drs_modulation: Msc_RS = %d, Msc_RS_idx = %d,cyclic_shift %d, u0 %d, v0 %d, u1 %d, v1 %d,cshift0 %d,cshift1 %d\n",Msc_RS, Msc_RS_idx,cyclic_shift,u0,v0,u1,v1,cyclic_shift0,cyclic_shift1);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
for (l = (3 - frame_parms->Ncp),u=u0,v=v0,cyclic_shift=cyclic_shift0;
|
for (l = (3 - frame_parms->Ncp),u=u0,v=v0,cyclic_shift=cyclic_shift0;
|
||||||
l<frame_parms->symbols_per_tti;
|
l<frame_parms->symbols_per_tti;
|
||||||
l += (7 - frame_parms->Ncp),u=u1,v=v1,cyclic_shift=cyclic_shift1) {
|
l += (7 - frame_parms->Ncp),u=u1,v=v1,cyclic_shift=cyclic_shift1) {
|
||||||
|
|||||||
@@ -29,11 +29,9 @@
|
|||||||
* \note
|
* \note
|
||||||
* \warning
|
* \warning
|
||||||
*/
|
*/
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "PHY/extern.h"
|
#include "PHY/extern.h"
|
||||||
#include "SCHED/defs.h"
|
#include "SCHED/defs.h"
|
||||||
|
|||||||
@@ -237,10 +237,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
|
|||||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
// one frame delay
|
|
||||||
ue->proc.proc_rxtx[i].frame_rx ++;
|
|
||||||
#endif
|
|
||||||
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_INITIAL_SYNCH
|
#ifdef DEBUG_INITIAL_SYNCH
|
||||||
|
|||||||
@@ -258,13 +258,11 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_PBCH
|
#ifdef DEBUG_PBCH
|
||||||
#ifdef USER_MODE
|
|
||||||
write_output("pbch_encoded_output2.m","pbch_encoded_out2",
|
write_output("pbch_encoded_output2.m","pbch_encoded_out2",
|
||||||
pbch_coded_data2,
|
pbch_coded_data2,
|
||||||
pbch_coded_bits,
|
pbch_coded_bits,
|
||||||
1,
|
1,
|
||||||
4);
|
4);
|
||||||
#endif //USER_MODE
|
|
||||||
#endif //DEBUG_PBCH
|
#endif //DEBUG_PBCH
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG_PBCH_ENCODING
|
#ifdef DEBUG_PBCH_ENCODING
|
||||||
@@ -286,8 +284,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
|
|||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_PBCH
|
#ifdef DEBUG_PBCH
|
||||||
#ifdef USER_MODE
|
|
||||||
|
|
||||||
if (frame_mod4==0) {
|
if (frame_mod4==0) {
|
||||||
write_output("pbch_e.m","pbch_e",
|
write_output("pbch_e.m","pbch_e",
|
||||||
eNB_pbch->pbch_e,
|
eNB_pbch->pbch_e,
|
||||||
@@ -298,8 +294,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
|
|||||||
for (i=0; i<16; i++)
|
for (i=0; i<16; i++)
|
||||||
printf("e[%d] %d\n",i,eNB_pbch->pbch_e[i]);
|
printf("e[%d] %d\n",i,eNB_pbch->pbch_e[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //USER_MODE
|
|
||||||
#endif //DEBUG_PBCH
|
#endif //DEBUG_PBCH
|
||||||
// scrambling
|
// scrambling
|
||||||
|
|
||||||
@@ -307,8 +301,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
|
|||||||
eNB_pbch->pbch_e,
|
eNB_pbch->pbch_e,
|
||||||
pbch_E);
|
pbch_E);
|
||||||
#ifdef DEBUG_PBCH
|
#ifdef DEBUG_PBCH
|
||||||
#ifdef USER_MODE
|
|
||||||
|
|
||||||
if (frame_mod4==0) {
|
if (frame_mod4==0) {
|
||||||
write_output("pbch_e_s.m","pbch_e_s",
|
write_output("pbch_e_s.m","pbch_e_s",
|
||||||
eNB_pbch->pbch_e,
|
eNB_pbch->pbch_e,
|
||||||
@@ -319,8 +311,6 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
|
|||||||
for (i=0; i<16; i++)
|
for (i=0; i<16; i++)
|
||||||
printf("e_s[%d] %d\n",i,eNB_pbch->pbch_e[i]);
|
printf("e_s[%d] %d\n",i,eNB_pbch->pbch_e[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //USER_MODE
|
|
||||||
#endif //DEBUG_PBCH
|
#endif //DEBUG_PBCH
|
||||||
} // frame_mod4==0
|
} // frame_mod4==0
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,6 @@
|
|||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
#include "LAYER2/MAC/defs.h"
|
#include "LAYER2/MAC/defs.h"
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "T.h"
|
#include "T.h"
|
||||||
|
|
||||||
//#define DEBUG_PHICH 1
|
//#define DEBUG_PHICH 1
|
||||||
|
|||||||
@@ -341,7 +341,6 @@ uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133,
|
|||||||
61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70
|
61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
|
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -362,7 +361,6 @@ void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
|
|||||||
fclose(fd);
|
fclose(fd);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// This function computes the du
|
// This function computes the du
|
||||||
void fill_du(uint8_t prach_fmt)
|
void fill_du(uint8_t prach_fmt)
|
||||||
|
|||||||
@@ -180,7 +180,6 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints);
|
Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints);
|
||||||
|
|
||||||
if (Msc_idx_ptr)
|
if (Msc_idx_ptr)
|
||||||
@@ -190,19 +189,6 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else //stdlib not availiable in RTAI
|
|
||||||
|
|
||||||
if (Msc_RS==216)
|
|
||||||
Msc_RS_idx = 12;
|
|
||||||
else if (Msc_RS==144)
|
|
||||||
Msc_RS_idx = 9;
|
|
||||||
else {
|
|
||||||
LOG_E(PHY,"generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_SRS
|
#ifdef DEBUG_SRS
|
||||||
LOG_D(PHY,"generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d, k0 = %d\n",Msc_RS, Msc_RS_idx,k0);
|
LOG_D(PHY,"generate_srs_tx: Msc_RS = %d, Msc_RS_idx = %d, k0 = %d\n",Msc_RS, Msc_RS_idx,k0);
|
||||||
#endif
|
#endif
|
||||||
@@ -279,7 +265,6 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints);
|
Msc_idx_ptr = (uint16_t*) bsearch((uint16_t*) &Msc_RS, (uint16_t*) dftsizes, 33, sizeof(uint16_t), compareints);
|
||||||
|
|
||||||
if (Msc_idx_ptr)
|
if (Msc_idx_ptr)
|
||||||
@@ -289,19 +274,6 @@ int generate_srs_rx(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else //stdlib not availiable in RTAI
|
|
||||||
|
|
||||||
if (Msc_RS==216)
|
|
||||||
Msc_RS_idx = 12;
|
|
||||||
else if (Msc_RS==144)
|
|
||||||
Msc_RS_idx = 9;
|
|
||||||
else {
|
|
||||||
LOG_E(PHY,"generate_srs: index for Msc_RS=%d not implemented\n",Msc_RS);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_SRS
|
#ifdef DEBUG_SRS
|
||||||
LOG_I(PHY,"generate_srs_rx: Msc_RS = %d, Msc_RS_idx = %d, k0=%d\n",Msc_RS, Msc_RS_idx,k0);
|
LOG_I(PHY,"generate_srs_rx: Msc_RS = %d, Msc_RS_idx = %d, k0=%d\n",Msc_RS, Msc_RS_idx,k0);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1616,8 +1616,6 @@ int ulsch_abstraction(double* sinr_dB, uint8_t TM, uint8_t mcs,uint16_t nrb, uin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USER_MODE // need to be adapted for the emulation in the kernel space
|
|
||||||
|
|
||||||
if (uniformrandom() < bler) {
|
if (uniformrandom() < bler) {
|
||||||
LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
LOG_I(OCM,"abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
||||||
return(0);
|
return(0);
|
||||||
@@ -1625,8 +1623,6 @@ int ulsch_abstraction(double* sinr_dB, uint8_t TM, uint8_t mcs,uint16_t nrb, uin
|
|||||||
LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
LOG_I(OCM,"abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1935,8 +1931,6 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USER_MODE // need to be adapted for the emulation in the kernel space
|
|
||||||
|
|
||||||
if (uniformrandom() < bler) {
|
if (uniformrandom() < bler) {
|
||||||
printf("abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
printf("abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
||||||
return(0);
|
return(0);
|
||||||
@@ -1944,9 +1938,6 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb
|
|||||||
printf("abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
printf("abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -23,11 +23,7 @@
|
|||||||
#include "PHY/extern.h"
|
#include "PHY/extern.h"
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
#include "kHz_7_5.h"
|
#include "kHz_7_5.h"
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#else
|
|
||||||
#include "rtai_math.h"
|
|
||||||
#endif
|
|
||||||
#include "PHY/sse_intrin.h"
|
#include "PHY/sse_intrin.h"
|
||||||
|
|
||||||
short conjugate75[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ;
|
short conjugate75[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ;
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
lte_dfts_sse4: lte_dfts.c
|
lte_dfts_sse4: lte_dfts.c
|
||||||
gcc -O2 -msse4.1 -g -ggdb -o lte_dfts_sse4 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
gcc -O2 -msse4.1 -g -ggdb -o lte_dfts_sse4 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
||||||
|
|
||||||
lte_dfts_avx2: lte_dfts.c
|
lte_dfts_avx2: lte_dfts.c
|
||||||
gcc -O2 -mavx2 -g -ggdb -o lte_dfts_avx2 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
gcc -O2 -mavx2 -g -ggdb -o lte_dfts_avx2 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
||||||
|
|
||||||
lte_dfts_avx2.s: lte_dfts.c
|
lte_dfts_avx2.s: lte_dfts.c
|
||||||
gcc -O2 -mavx2 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
gcc -O2 -mavx2 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
||||||
|
|
||||||
lte_dfts_sse4.s: lte_dfts.c
|
lte_dfts_sse4.s: lte_dfts.c
|
||||||
gcc -O2 -msse4.1 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DUSER_MODE -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
gcc -O2 -msse4.1 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
|
||||||
|
|
||||||
dft_cycles_avx2: lte_dfts_avx2
|
dft_cycles_avx2: lte_dfts_avx2
|
||||||
./lte_dfts_avx2 | egrep cycles
|
./lte_dfts_avx2 | egrep cycles
|
||||||
|
|||||||
@@ -20,10 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
//#include "MAC_INTERFACE/extern.h"
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
int16_t conjug[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ;
|
int16_t conjug[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ;
|
||||||
@@ -267,4 +264,4 @@ int multadd_cpx_vector(int16_t *x1,
|
|||||||
_mm_empty();
|
_mm_empty();
|
||||||
_m_empty();
|
_m_empty();
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,6 @@ void bit8_txmux(int32_t length,int32_t offset);
|
|||||||
|
|
||||||
void bit8_rxdemux(int32_t length,int32_t offset);
|
void bit8_rxdemux(int32_t length,int32_t offset);
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
/*!\fn int32_t write_output(const char *fname, const char *vname, void *data, int length, int dec, char format);
|
/*!\fn int32_t write_output(const char *fname, const char *vname, void *data, int length, int dec, char format);
|
||||||
\brief Write output file from signal data
|
\brief Write output file from signal data
|
||||||
@param fname output file name
|
@param fname output file name
|
||||||
@@ -297,7 +296,6 @@ void bit8_rxdemux(int32_t length,int32_t offset);
|
|||||||
@param format data format (0 = real 16-bit, 1 = complex 16-bit,2 real 32-bit, 3 complex 32-bit,4 = real 8-bit, 5 = complex 8-bit)
|
@param format data format (0 = real 16-bit, 1 = complex 16-bit,2 real 32-bit, 3 complex 32-bit,4 = real 8-bit, 5 = complex 8-bit)
|
||||||
*/
|
*/
|
||||||
int32_t write_output(const char *fname, const char *vname, void *data, int length, int dec, char format);
|
int32_t write_output(const char *fname, const char *vname, void *data, int length, int dec, char format);
|
||||||
#endif
|
|
||||||
|
|
||||||
void Zero_Buffer(void *,uint32_t);
|
void Zero_Buffer(void *,uint32_t);
|
||||||
void Zero_Buffer_nommx(void *buf,uint32_t length);
|
void Zero_Buffer_nommx(void *buf,uint32_t length);
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -180,5 +178,3 @@ int write_output(const char *fname,const char *vname,void *data,int length,int d
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USER_MODE
|
|
||||||
|
|||||||
@@ -19,11 +19,9 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|||||||
@@ -22,11 +22,7 @@
|
|||||||
#ifndef __openair_TYPES_H__
|
#ifndef __openair_TYPES_H__
|
||||||
#define __openair_TYPES_H__
|
#define __openair_TYPES_H__
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#else
|
|
||||||
#include <linux/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*__openair_TYPES_H__ */
|
#endif /*__openair_TYPES_H__ */
|
||||||
|
|||||||
@@ -24,40 +24,6 @@
|
|||||||
#ifndef __SCHED_EXTERN_H__
|
#ifndef __SCHED_EXTERN_H__
|
||||||
#define __SCHED_EXTERN_H__
|
#define __SCHED_EXTERN_H__
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define __NO_VERSION__
|
|
||||||
|
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/version.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/bitops.h>
|
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#include <asm/segment.h>
|
|
||||||
#include <asm/page.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef RTAI_ENABLED
|
|
||||||
#include <rtai.h>
|
|
||||||
//#include <rtai_posix.h>
|
|
||||||
#include <rtai_fifos.h>
|
|
||||||
#include <rtai_sched.h>
|
|
||||||
#include <rtai_sem.h>
|
|
||||||
//#include "rt_compat.h"
|
|
||||||
|
|
||||||
#else
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* USER_MODE */
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
//#include "dlc_engine.h"
|
//#include "dlc_engine.h"
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ fifo_dump_emos_UE emos_dump_UE;
|
|||||||
|
|
||||||
#include "T.h"
|
#include "T.h"
|
||||||
|
|
||||||
|
#include "PHY/TOOLS/defs.h"
|
||||||
|
|
||||||
#define DLSCH_RB_ALLOC 0x1fbf // skip DC RB (total 23/25 RBs)
|
#define DLSCH_RB_ALLOC 0x1fbf // skip DC RB (total 23/25 RBs)
|
||||||
#define DLSCH_RB_ALLOC_12 0x0aaa // skip DC RB (total 23/25 RBs)
|
#define DLSCH_RB_ALLOC_12 0x0aaa // skip DC RB (total 23/25 RBs)
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,8 @@
|
|||||||
#include "UTIL/OCG/OCG_extern.h"
|
#include "UTIL/OCG/OCG_extern.h"
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
|
|
||||||
#ifdef USER_MODE
|
#include "multicast_link.h"
|
||||||
# include "multicast_link.h"
|
#include "pgm_link.h"
|
||||||
# include "pgm_link.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char rx_bufferP[BYPASS_RX_BUFFER_SIZE];
|
char rx_bufferP[BYPASS_RX_BUFFER_SIZE];
|
||||||
unsigned int num_bytesP = 0;
|
unsigned int num_bytesP = 0;
|
||||||
@@ -90,10 +88,8 @@ void init_bypass (void)
|
|||||||
void bypass_init (tx_handler_t tx_handlerP, rx_handler_t rx_handlerP)
|
void bypass_init (tx_handler_t tx_handlerP, rx_handler_t rx_handlerP)
|
||||||
{
|
{
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
#if defined(USER_MODE)
|
|
||||||
multicast_link_start (bypass_rx_handler, oai_emulation.info.multicast_group,
|
multicast_link_start (bypass_rx_handler, oai_emulation.info.multicast_group,
|
||||||
oai_emulation.info.multicast_ifname);
|
oai_emulation.info.multicast_ifname);
|
||||||
#endif //USER_MODE
|
|
||||||
tx_handler = tx_handlerP;
|
tx_handler = tx_handlerP;
|
||||||
rx_handler = rx_handlerP;
|
rx_handler = rx_handlerP;
|
||||||
Master_list_rx=0;
|
Master_list_rx=0;
|
||||||
@@ -448,35 +444,6 @@ int bypass_rx_data(unsigned int frame, unsigned int last_slot,
|
|||||||
return bytes_read;
|
return bytes_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************************************/
|
|
||||||
#ifndef USER_MODE
|
|
||||||
int bypass_rx_handler(unsigned int fifo, int rw)
|
|
||||||
{
|
|
||||||
/******************************************************************************************************/
|
|
||||||
int bytes_read;
|
|
||||||
int bytes_processed=0;
|
|
||||||
int header_bytes; //, elapsed_time;
|
|
||||||
//printk("[BYPASS] BYPASS_RX_HANDLER IN...\n");
|
|
||||||
header_bytes= rtf_get(fifo_bypass_phy_user2kern, rx_bufferP,
|
|
||||||
sizeof(bypass_proto2multicast_header_t) );
|
|
||||||
|
|
||||||
if (header_bytes> 0) {
|
|
||||||
bytes_read = rtf_get(fifo_bypass_phy_user2kern, &rx_bufferP[header_bytes],
|
|
||||||
((bypass_proto2multicast_header_t *) (&rx_bufferP[0]))->size);
|
|
||||||
|
|
||||||
// printk("BYTES_READ=%d\n",bytes_read);
|
|
||||||
if (bytes_read > 0) {
|
|
||||||
num_bytesP=header_bytes+bytes_read;
|
|
||||||
emul_low_mutex_var=0;
|
|
||||||
//printk("BYPASS_PHY SIGNAL MAC_LOW...\n");
|
|
||||||
pthread_cond_signal(&emul_low_cond);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// }
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#else //USER_MODE
|
|
||||||
/******************************************************************************************************/
|
/******************************************************************************************************/
|
||||||
void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer)
|
void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer)
|
||||||
{
|
{
|
||||||
@@ -503,7 +470,6 @@ void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
/******************************************************************************************************/
|
/******************************************************************************************************/
|
||||||
void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
|
void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
|
||||||
@@ -511,50 +477,12 @@ void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
|
|||||||
{
|
{
|
||||||
/******************************************************************************************************/
|
/******************************************************************************************************/
|
||||||
if (Master_list_rx != oai_emulation.info.master_list) {
|
if (Master_list_rx != oai_emulation.info.master_list) {
|
||||||
#ifndef USER_MODE
|
|
||||||
rtf_put(fifo_mac_bypass, &tt, 1);
|
|
||||||
/* the Rx window is still opened (Re)signal bypass_phy (emulate MAC signal) */
|
|
||||||
#endif
|
|
||||||
bypass_rx_data(frame, last_slot, next_slot, is_master);
|
bypass_rx_data(frame, last_slot, next_slot, is_master);
|
||||||
} else {
|
} else {
|
||||||
Master_list_rx = 0;
|
Master_list_rx = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
/***************************************************************************/
|
|
||||||
int multicast_link_write_sock (int groupP, char *dataP, unsigned int sizeP)
|
|
||||||
{
|
|
||||||
/***************************************************************************/
|
|
||||||
int tx_bytes=0;
|
|
||||||
|
|
||||||
pthread_mutex_lock(&Tx_mutex);
|
|
||||||
|
|
||||||
while(!Tx_mutex_var) {
|
|
||||||
pthread_cond_wait(&Tx_cond,&Tx_mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
Tx_mutex_var=0;
|
|
||||||
N_P=(int)((sizeP-sizeof (bypass_proto2multicast_header_t))/1000)+2;
|
|
||||||
tx_bytes += rtf_put (fifo_bypass_phy_kern2user, &dataP[tx_bytes],
|
|
||||||
sizeof (bypass_proto2multicast_header_t));
|
|
||||||
|
|
||||||
while(tx_bytes<sizeP) {
|
|
||||||
if(sizeP-tx_bytes<=1000) {
|
|
||||||
tx_bytes += rtf_put (fifo_bypass_phy_kern2user, &dataP[tx_bytes],
|
|
||||||
sizeP-tx_bytes);
|
|
||||||
} else {
|
|
||||||
tx_bytes += rtf_put (fifo_bypass_phy_kern2user, &dataP[tx_bytes],1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//RG_tx_mutex_var=0;
|
|
||||||
pthread_mutex_unlock(&Tx_mutex);
|
|
||||||
|
|
||||||
return tx_bytes;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ENABLE_PGM_TRANSPORT)
|
#if defined(ENABLE_PGM_TRANSPORT)
|
||||||
void bypass_tx_nack(unsigned int frame, unsigned int next_slot)
|
void bypass_tx_nack(unsigned int frame, unsigned int next_slot)
|
||||||
{
|
{
|
||||||
@@ -715,19 +643,3 @@ void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int
|
|||||||
messg->master_id, messg->seq_num);
|
messg->master_id, messg->seq_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
/*********************************************************************************************************************/
|
|
||||||
int bypass_tx_handler(unsigned int fifo, int rw)
|
|
||||||
{
|
|
||||||
/***************************************************************************/
|
|
||||||
if(++N_R==N_P) {
|
|
||||||
rtf_reset(fifo_bypass_phy_kern2user);
|
|
||||||
|
|
||||||
Tx_mutex_var=1;
|
|
||||||
N_R=0;
|
|
||||||
|
|
||||||
pthread_cond_signal(&Tx_cond);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,11 +31,7 @@
|
|||||||
#ifndef __BYPASS_SESSION_LAYER_EXTERN_H__
|
#ifndef __BYPASS_SESSION_LAYER_EXTERN_H__
|
||||||
# define __BYPASS_SESSION_LAYER_EXTERN_H__
|
# define __BYPASS_SESSION_LAYER_EXTERN_H__
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include <rtai_posix.h>
|
|
||||||
#else
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif //RTAI_ENABLED
|
|
||||||
|
|
||||||
extern unsigned char Emulation_status;
|
extern unsigned char Emulation_status;
|
||||||
extern unsigned char emu_tx_status;
|
extern unsigned char emu_tx_status;
|
||||||
|
|||||||
@@ -54,9 +54,7 @@
|
|||||||
#include "socket.h"
|
#include "socket.h"
|
||||||
#include "multicast_link.h"
|
#include "multicast_link.h"
|
||||||
|
|
||||||
#ifdef USER_MODE
|
#include "UTIL/LOG/log.h"
|
||||||
# include "UTIL/LOG/log.h"
|
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
extern unsigned short Master_id;
|
extern unsigned short Master_id;
|
||||||
|
|
||||||
|
|||||||
@@ -39,14 +39,6 @@ int bypass_rx_data(unsigned int frame, unsigned int last_slot,
|
|||||||
unsigned int next_slot, uint8_t is_master);
|
unsigned int next_slot, uint8_t is_master);
|
||||||
void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
|
void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
|
||||||
unsigned int next_slot, uint8_t is_master);
|
unsigned int next_slot, uint8_t is_master);
|
||||||
#ifndef USER_MODE
|
|
||||||
int multicast_link_write_sock (int groupP, char *dataP, unsigned int sizeP);
|
|
||||||
int bypass_tx_handler(unsigned int fifo, int rw);
|
|
||||||
int bypass_rx_handler(unsigned int fifo, int rw);
|
|
||||||
#else
|
|
||||||
void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void bypass_tx_data (emu_transport_info_t Type, unsigned int frame, unsigned int next_slot);
|
void bypass_tx_data (emu_transport_info_t Type, unsigned int frame, unsigned int next_slot);
|
||||||
|
|
||||||
void emulation_tx_rx(void);
|
void emulation_tx_rx(void);
|
||||||
|
|||||||
@@ -41,9 +41,7 @@
|
|||||||
//#include "openair_defs.h"
|
//#include "openair_defs.h"
|
||||||
#include "socket.h"
|
#include "socket.h"
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#define msg printf
|
#define msg printf
|
||||||
#endif
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
socket_setnonblocking (int sockP)
|
socket_setnonblocking (int sockP)
|
||||||
|
|||||||
@@ -28,11 +28,7 @@
|
|||||||
* \email: navid.nikaein@eurecom.fr
|
* \email: navid.nikaein@eurecom.fr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include <rtai_posix.h>
|
|
||||||
#else
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
#ifndef __BYPASS_SESSION_LAYER_VARS_H__
|
#ifndef __BYPASS_SESSION_LAYER_VARS_H__
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ OPENAIR1_TOP = $(OPENAIR1_DIR)
|
|||||||
OPENAIR2_TOP = $(OPENAIR2_DIR)
|
OPENAIR2_TOP = $(OPENAIR2_DIR)
|
||||||
OPENAIR3 = $(OPENAIR3_DIR)
|
OPENAIR3 = $(OPENAIR3_DIR)
|
||||||
|
|
||||||
CFLAGS += -DMAX_NUM_CCs=1 -Wall -DPHYSIM -DNODE_RG -DUSER_MODE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO -DLOG_NO_THREAD # -Wno-packed-bitfield-compat
|
CFLAGS += -DMAX_NUM_CCs=1 -Wall -DPHYSIM -DNODE_RG -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1 -DMALLOC_CHECK_=1 -DENABLE_VCD_FIFO -DLOG_NO_THREAD # -Wno-packed-bitfield-compat
|
||||||
|
|
||||||
# enable C99 mode
|
# enable C99 mode
|
||||||
CFLAGS += -std=gnu99
|
CFLAGS += -std=gnu99
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
include $(OPENAIR_DIR)/common/utils/Makefile.inc
|
include $(OPENAIR_DIR)/common/utils/Makefile.inc
|
||||||
OBJS = rf.o ../../PHY/TOOLS/file_output.o ../TOOLS/rangen_double.o
|
OBJS = rf.o ../../PHY/TOOLS/file_output.o ../TOOLS/rangen_double.o
|
||||||
CFLAGS += -DRF_MAIN -DUSER_MODE -DDEBUG_PHY
|
CFLAGS += -DRF_MAIN -DDEBUG_PHY
|
||||||
|
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
gcc -o rf $(OBJS) -lm
|
gcc -o rf $(OBJS) -lm
|
||||||
|
|||||||
@@ -19,12 +19,10 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,8 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#else
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/rtai.h>
|
|
||||||
#endif
|
|
||||||
#ifdef RTAI_ENABLED
|
#ifdef RTAI_ENABLED
|
||||||
#include <rtai.h>
|
#include <rtai.h>
|
||||||
#include <rtai_sched.h>
|
#include <rtai_sched.h>
|
||||||
@@ -55,21 +50,14 @@ unsigned int taus(void)
|
|||||||
void set_taus_seed(unsigned int seed_init)
|
void set_taus_seed(unsigned int seed_init)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
struct drand48_data buffer;
|
struct drand48_data buffer;
|
||||||
unsigned long result = 0;
|
unsigned long result = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (seed_init == 0) {
|
if (seed_init == 0) {
|
||||||
s0 = (unsigned int)time(NULL);
|
s0 = (unsigned int)time(NULL);
|
||||||
s1 = (unsigned int)time(NULL);
|
s1 = (unsigned int)time(NULL);
|
||||||
s2 = (unsigned int)time(NULL);
|
s2 = (unsigned int)time(NULL);
|
||||||
} else {
|
} else {
|
||||||
#ifndef USER_MODE
|
|
||||||
s0 = (unsigned int)0x1e23d852;
|
|
||||||
s1 = (unsigned int)0x81f38a1c;
|
|
||||||
s2 = (unsigned int)0xfe1a133e;
|
|
||||||
#else
|
|
||||||
/* Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
/* Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
||||||
srand48_r((long int)seed_init, &buffer);
|
srand48_r((long int)seed_init, &buffer);
|
||||||
mrand48_r(&buffer, (long int *)&result);
|
mrand48_r(&buffer, (long int *)&result);
|
||||||
@@ -78,7 +66,6 @@ void set_taus_seed(unsigned int seed_init)
|
|||||||
s1 = result;
|
s1 = result;
|
||||||
mrand48_r(&buffer, (long int *)&result);
|
mrand48_r(&buffer, (long int *)&result);
|
||||||
s2 = result;
|
s2 = result;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -87,10 +74,8 @@ void set_taus_seed(unsigned int seed_init)
|
|||||||
void set_taus_seed(unsigned int seed_init)
|
void set_taus_seed(unsigned int seed_init)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
struct drand48_data buffer;
|
struct drand48_data buffer;
|
||||||
unsigned long result = 0;
|
unsigned long result = 0;
|
||||||
#endif
|
|
||||||
s0 = (unsigned int)0x1e23d852;
|
s0 = (unsigned int)0x1e23d852;
|
||||||
s1 = (unsigned int)0x81f38a1c;
|
s1 = (unsigned int)0x81f38a1c;
|
||||||
s2 = (unsigned int)0xfe1a133e;
|
s2 = (unsigned int)0xfe1a133e;
|
||||||
@@ -102,11 +87,6 @@ void set_taus_seed(unsigned int seed_init)
|
|||||||
s1 = (unsigned int)time(NULL);
|
s1 = (unsigned int)time(NULL);
|
||||||
s2 = (unsigned int)time(NULL);
|
s2 = (unsigned int)time(NULL);
|
||||||
} else {
|
} else {
|
||||||
#ifndef USER_MODE
|
|
||||||
s0 = (unsigned int)0x1e23d852;
|
|
||||||
s1 = (unsigned int)0x81f38a1c;
|
|
||||||
s2 = (unsigned int)0xfe1a133e;
|
|
||||||
#else
|
|
||||||
// Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
// Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
||||||
srand48_r((long int)seed_init, &buffer);
|
srand48_r((long int)seed_init, &buffer);
|
||||||
mrand48_r(&buffer, (long int *)&result);
|
mrand48_r(&buffer, (long int *)&result);
|
||||||
@@ -115,7 +95,6 @@ void set_taus_seed(unsigned int seed_init)
|
|||||||
s1 = result;
|
s1 = result;
|
||||||
mrand48_r(&buffer, (long int *)&result);
|
mrand48_r(&buffer, (long int *)&result);
|
||||||
s2 = result;
|
s2 = result;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,12 +22,6 @@
|
|||||||
#ifndef __openair_DEFS_H__
|
#ifndef __openair_DEFS_H__
|
||||||
#define __openair_DEFS_H__
|
#define __openair_DEFS_H__
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#if !defined (msg)
|
#if !defined (msg)
|
||||||
@@ -49,44 +43,7 @@
|
|||||||
#define PAGE_MASK 0xfffff000
|
#define PAGE_MASK 0xfffff000
|
||||||
#define virt_to_phys(x) (x)
|
#define virt_to_phys(x) (x)
|
||||||
|
|
||||||
#else // USER_MODE
|
|
||||||
#include <rtai.h>
|
|
||||||
#define msg rt_printk
|
|
||||||
|
|
||||||
#ifdef BIGPHYSAREA
|
|
||||||
|
|
||||||
#define bigmalloc(x) (bigphys_malloc(x))
|
|
||||||
#define bigmalloc16(x) (bigphys_malloc(x))
|
|
||||||
|
|
||||||
#define malloc16(x) (bigphys_malloc(x))
|
|
||||||
#define free16(y,x)
|
|
||||||
|
|
||||||
#define bigfree(y,x)
|
|
||||||
|
|
||||||
#else // BIGPHYSAREA
|
|
||||||
|
|
||||||
#define bigmalloc(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0))
|
|
||||||
#define bigmalloc16(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0))
|
|
||||||
#define bigfree(y,x) (dma_free_coherent(pdev[0],(x),(void *)(y),dummy_dma_ptr))
|
|
||||||
#define malloc16(x) (kmalloc(x,GFP_KERNEL))
|
|
||||||
#define free16(y,x) (kfree(y))
|
|
||||||
|
|
||||||
#endif // BIGPHYSAREA
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CBMIMO1
|
|
||||||
#define openair_get_mbox() (*(unsigned int *)mbox)
|
|
||||||
#else //CBMIMO1
|
|
||||||
#define openair_get_mbox() (*(unsigned int *)PHY_vars->mbox>>1)
|
|
||||||
#endif //CBMIMO1
|
|
||||||
|
|
||||||
|
|
||||||
#endif // USERMODE
|
|
||||||
|
|
||||||
// #define bzero(s,n) (memset((s),0,(n)))
|
|
||||||
|
|
||||||
#define cmax(a,b) ((a>b) ? (a) : (b))
|
#define cmax(a,b) ((a>b) ? (a) : (b))
|
||||||
#define cmin(a,b) ((a<b) ? (a) : (b))
|
#define cmin(a,b) ((a<b) ? (a) : (b))
|
||||||
#endif // /*__openair_DEFS_H__ */
|
#endif // /*__openair_DEFS_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,18 +22,4 @@
|
|||||||
#ifndef __openair_TYPES_H__
|
#ifndef __openair_TYPES_H__
|
||||||
#define __openair_TYPES_H__
|
#define __openair_TYPES_H__
|
||||||
|
|
||||||
//#ifdef USER_MODE
|
|
||||||
//#include <stdint.h>
|
|
||||||
//typedef int8_t s8; /* 8 bit signed integer */
|
|
||||||
//typedef int16_t s16; /* 16 bit signed integer */
|
|
||||||
//typedef int32_t s32; /* 32 bit signed integer */
|
|
||||||
//typedef int64_t s64; /* 64 bit signed integer */
|
|
||||||
|
|
||||||
//typedef uint8_t u8; /* 8 bit unsigned integer */
|
|
||||||
//typedef uint16_t u16; /* 16 bit unsigned integer */
|
|
||||||
//typedef uint32_t u32; /* 32 bit unsigned integer */
|
|
||||||
//typedef uint64_t u64; /* 64 bit unsigned integer */
|
|
||||||
//#else
|
|
||||||
//#include <linux/types.h>
|
|
||||||
//#endif
|
|
||||||
#endif /*__openair_TYPES_H__ */
|
#endif /*__openair_TYPES_H__ */
|
||||||
|
|||||||
@@ -43,7 +43,6 @@
|
|||||||
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
|
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#ifdef LARGE_SCALE
|
#ifdef LARGE_SCALE
|
||||||
# define NB_MODULES_MAX 128
|
# define NB_MODULES_MAX 128
|
||||||
# define NB_NODE_MAX 128
|
# define NB_NODE_MAX 128
|
||||||
@@ -51,11 +50,6 @@
|
|||||||
# define NB_MODULES_MAX 32
|
# define NB_MODULES_MAX 32
|
||||||
# define NB_NODE_MAX 32
|
# define NB_NODE_MAX 32
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
# define NB_MODULES_MAX 1
|
|
||||||
# define NB_NODE_MAX 1
|
|
||||||
#endif //PHY_EMUL
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef JUMBO_FRAME
|
#ifdef JUMBO_FRAME
|
||||||
# define MAX_IP_PACKET_SIZE 10000 // 9000
|
# define MAX_IP_PACKET_SIZE 10000 // 9000
|
||||||
@@ -132,9 +126,7 @@
|
|||||||
#define UNUSED_PARAM_MBMS_SESSION_ID 0
|
#define UNUSED_PARAM_MBMS_SESSION_ID 0
|
||||||
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
|
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#define printk printf
|
#define printk printf
|
||||||
#endif
|
|
||||||
|
|
||||||
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
|
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,7 @@
|
|||||||
#ifndef __PLATFORM_TYPES_H__
|
#ifndef __PLATFORM_TYPES_H__
|
||||||
# define __PLATFORM_TYPES_H__
|
# define __PLATFORM_TYPES_H__
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
#include "itti_types.h"
|
#include "itti_types.h"
|
||||||
|
|||||||
@@ -21,44 +21,12 @@
|
|||||||
|
|
||||||
#ifndef _RTOS_HEADER_H_
|
#ifndef _RTOS_HEADER_H_
|
||||||
# define _RTOS_HEADER_H_
|
# define _RTOS_HEADER_H_
|
||||||
# if defined(RTAI) && !defined(USER_MODE)
|
# include <stdio.h>
|
||||||
// CONVERSION BETWEEN POSIX PTHREAD AND RTAI FUNCTIONS
|
# include <stdlib.h>
|
||||||
/*
|
# include <string.h>
|
||||||
# define pthread_mutex_init pthread_mutex_init_rt
|
# include <math.h>
|
||||||
# define pthread_mutexattr_init pthread_mutexattr_init_rt
|
# include <pthread.h>
|
||||||
# define pthread_mutex_lock pthread_mutex_lock_rt
|
# include <assert.h>
|
||||||
# define pthread_mutex_unlock pthread_mutex_unlock_rt
|
# define rtf_get read
|
||||||
# define pthread_mutex_destroy pthread_mutex_destroy_rt
|
# define rtf_put write
|
||||||
# define pthread_cond_init pthread_cond_init_rt
|
|
||||||
# define pthread_cond_wait pthread_cond_wait_rt
|
|
||||||
# define pthread_cond_signal pthread_cond_signal_rt
|
|
||||||
# define pthread_cond_destroy pthread_cond_destroy_rt
|
|
||||||
# define pthread_attr_init pthread_attr_init_rt
|
|
||||||
# define pthread_attr_setschedparam pthread_attr_setschedparam_rt
|
|
||||||
# define pthread_create pthread_create_rt
|
|
||||||
# define pthread_cancel pthread_cancel_rt
|
|
||||||
# define pthread_delete_np pthread_cancel_rt
|
|
||||||
# define pthread_attr_setstacksize pthread_attr_setstacksize_rt
|
|
||||||
# define pthread_self rt_whoami
|
|
||||||
*/
|
|
||||||
# include <asm/rtai.h>
|
|
||||||
# include <rtai.h>
|
|
||||||
# include <rtai_posix.h>
|
|
||||||
# include <rtai_fifos.h>
|
|
||||||
# include <rtai_sched.h>
|
|
||||||
# ifdef CONFIG_PROC_FS
|
|
||||||
# include <rtai_proc_fs.h>
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
# ifdef USER_MODE
|
|
||||||
# include <stdio.h>
|
|
||||||
# include <stdlib.h>
|
|
||||||
# include <string.h>
|
|
||||||
# include <math.h>
|
|
||||||
# include <pthread.h>
|
|
||||||
# include <assert.h>
|
|
||||||
# define rtf_get read
|
|
||||||
# define rtf_put write
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -39,15 +39,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
//#include "COMMON/openair_defs.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "PHY/LTE_TRANSPORT/defs.h"
|
#include "PHY/LTE_TRANSPORT/defs.h"
|
||||||
@@ -109,9 +103,7 @@
|
|||||||
//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high
|
//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#define printk printf
|
#define printk printf
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
/*!\brief Maximum number of logical channl group IDs */
|
/*!\brief Maximum number of logical channl group IDs */
|
||||||
#define MAX_NUM_LCGID 4
|
#define MAX_NUM_LCGID 4
|
||||||
|
|||||||
@@ -32,10 +32,6 @@
|
|||||||
#ifndef __MAC_EXTERN_H__
|
#ifndef __MAC_EXTERN_H__
|
||||||
#define __MAC_EXTERN_H__
|
#define __MAC_EXTERN_H__
|
||||||
|
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
//#include "stdio.h"
|
|
||||||
#endif //USER_MODE
|
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
|
|||||||
@@ -247,10 +247,6 @@ int rlcmac_init_global_param(void)
|
|||||||
void mac_top_cleanup(void)
|
void mac_top_cleanup(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
pdcp_module_cleanup();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (NB_UE_INST > 0) {
|
if (NB_UE_INST > 0) {
|
||||||
free(UE_mac_inst);
|
free(UE_mac_inst);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,12 +59,6 @@
|
|||||||
|
|
||||||
//#define ICIC 0
|
//#define ICIC 0
|
||||||
|
|
||||||
/*
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define msg debug_msg
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* this function checks that get_eNB_UE_stats returns
|
/* this function checks that get_eNB_UE_stats returns
|
||||||
* a non-NULL pointer for all the active CCs of an UE
|
* a non-NULL pointer for all the active CCs of an UE
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -71,11 +71,6 @@
|
|||||||
|
|
||||||
extern uint8_t usim_test;
|
extern uint8_t usim_test;
|
||||||
|
|
||||||
/*
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define msg debug_msg
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
mapping BSR_names[] = {
|
mapping BSR_names[] = {
|
||||||
{"NONE", 0},
|
{"NONE", 0},
|
||||||
{"SHORT BSR", 1},
|
{"SHORT BSR", 1},
|
||||||
|
|||||||
@@ -32,9 +32,6 @@
|
|||||||
|
|
||||||
#ifndef __MAC_VARS_H__
|
#ifndef __MAC_VARS_H__
|
||||||
#define __MAC_VARS_H__
|
#define __MAC_VARS_H__
|
||||||
#ifdef USER_MODE
|
|
||||||
//#include "stdio.h"
|
|
||||||
#endif //USER_MODE
|
|
||||||
#include "PHY/defs.h"
|
#include "PHY/defs.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "COMMON/mac_rrc_primitives.h"
|
#include "COMMON/mac_rrc_primitives.h"
|
||||||
|
|||||||
@@ -30,9 +30,6 @@
|
|||||||
#define PDCP_C
|
#define PDCP_C
|
||||||
//#define DEBUG_PDCP_FIFO_FLUSH_SDU
|
//#define DEBUG_PDCP_FIFO_FLUSH_SDU
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include <rtai_fifos.h>
|
|
||||||
#endif
|
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#include "hashtable.h"
|
#include "hashtable.h"
|
||||||
#include "pdcp.h"
|
#include "pdcp.h"
|
||||||
@@ -691,7 +688,7 @@ pdcp_data_ind(
|
|||||||
payload_offset=0;
|
payload_offset=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
#if defined(OAI_EMU)
|
||||||
|
|
||||||
if (oai_emulation.info.otg_enabled == 1) {
|
if (oai_emulation.info.otg_enabled == 1) {
|
||||||
//unsigned int dst_instance;
|
//unsigned int dst_instance;
|
||||||
@@ -983,7 +980,7 @@ pdcp_run (
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
#if defined(OAI_EMU)
|
||||||
pdcp_fifo_read_input_sdus_from_otg(ctxt_pP);
|
pdcp_fifo_read_input_sdus_from_otg(ctxt_pP);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ extern int otg_enabled;
|
|||||||
#include "pdcp.h"
|
#include "pdcp.h"
|
||||||
#include "pdcp_primitives.h"
|
#include "pdcp_primitives.h"
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -48,9 +47,6 @@ extern int otg_enabled;
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#define rtf_put write
|
#define rtf_put write
|
||||||
#define rtf_get read
|
#define rtf_get read
|
||||||
#else
|
|
||||||
#include <rtai_fifos.h>
|
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
#include "../MAC/extern.h"
|
#include "../MAC/extern.h"
|
||||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||||
@@ -808,7 +804,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
|
|||||||
module_id_t dst_id; // dst for otg
|
module_id_t dst_id; // dst for otg
|
||||||
rb_id_t rb_id;
|
rb_id_t rb_id;
|
||||||
unsigned int pkt_size=0;
|
unsigned int pkt_size=0;
|
||||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
#if defined(OAI_EMU)
|
||||||
module_id_t src_id;
|
module_id_t src_id;
|
||||||
static unsigned int pkt_cnt_enb=0, pkt_cnt_ue=0;
|
static unsigned int pkt_cnt_enb=0, pkt_cnt_ue=0;
|
||||||
|
|
||||||
@@ -818,7 +814,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
|
|||||||
#endif
|
#endif
|
||||||
protocol_ctxt_t ctxt;
|
protocol_ctxt_t ctxt;
|
||||||
// we need to add conditions to avoid transmitting data when the UE is not RRC connected.
|
// we need to add conditions to avoid transmitting data when the UE is not RRC connected.
|
||||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
#if defined(OAI_EMU)
|
||||||
|
|
||||||
if (oai_emulation.info.otg_enabled ==1 ) {
|
if (oai_emulation.info.otg_enabled ==1 ) {
|
||||||
// module_id is source id
|
// module_id is source id
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ pdcp_netlink_init(
|
|||||||
struct sched_param sched_param;
|
struct sched_param sched_param;
|
||||||
|
|
||||||
reset_meas(&ip_pdcp_stats_tmp);
|
reset_meas(&ip_pdcp_stats_tmp);
|
||||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
#if defined(OAI_EMU)
|
||||||
nb_inst_enb = oai_emulation.info.nb_enb_local;
|
nb_inst_enb = oai_emulation.info.nb_enb_local;
|
||||||
nb_inst_ue = oai_emulation.info.nb_ue_local;
|
nb_inst_ue = oai_emulation.info.nb_ue_local;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -73,10 +73,6 @@
|
|||||||
# include "RLC-Config.h"
|
# include "RLC-Config.h"
|
||||||
//# include "rlc_am_test.h"
|
//# include "rlc_am_test.h"
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
//# include "rlc_am_very_simple_test.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define PROTOCOL_RLC_AM_CTXT_FMT PROTOCOL_CTXT_FMT"[%s %02u]"
|
#define PROTOCOL_RLC_AM_CTXT_FMT PROTOCOL_CTXT_FMT"[%s %02u]"
|
||||||
#define PROTOCOL_RLC_AM_CTXT_ARGS(CTXT_Pp, rLC_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\
|
#define PROTOCOL_RLC_AM_CTXT_ARGS(CTXT_Pp, rLC_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\
|
||||||
|
|||||||
@@ -21,9 +21,7 @@
|
|||||||
|
|
||||||
#define RLC_AM_MODULE 1
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_INIT_C 1
|
#define RLC_AM_INIT_C 1
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "rlc_am.h"
|
#include "rlc_am.h"
|
||||||
#include "LAYER2/MAC/extern.h"
|
#include "LAYER2/MAC/extern.h"
|
||||||
|
|||||||
@@ -268,11 +268,9 @@ rlc_am_reassemble_pdu(
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#if USER_MODE
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(0 != 0);
|
assert(0 != 0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (pdu_info->fi) {
|
switch (pdu_info->fi) {
|
||||||
@@ -382,19 +380,13 @@ rlc_am_reassemble_pdu(
|
|||||||
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
if (pdu_info->hidden_size > 0) { // normally should always be > 0 but just for help debug
|
||||||
// data is already ok, done by last loop above
|
// data is already ok, done by last loop above
|
||||||
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
rlc_am_reassembly (ctxt_pP, rlc_pP, &pdu_info->payload[j], pdu_info->hidden_size);
|
||||||
} else {
|
|
||||||
#if USER_MODE
|
|
||||||
//assert (5!=5);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//rlc_pP->reassembly_missing_sn_detected = 0;
|
//rlc_pP->reassembly_missing_sn_detected = 0;
|
||||||
break;
|
break;
|
||||||
#if USER_MODE
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(1 != 1);
|
assert(1 != 1);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,7 @@
|
|||||||
#define RLC_AM_MODULE 1
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_SEGMENT_C 1
|
#define RLC_AM_SEGMENT_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if USER_MODE
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -468,9 +466,7 @@ void rlc_am_segment_10 (
|
|||||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
|
||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
#if USER_MODE
|
|
||||||
assert(1!=1);
|
assert(1!=1);
|
||||||
#endif
|
|
||||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||||
pdu_mngt_p->payload_size += sdu_mngt_p->sdu_remaining_size;
|
pdu_mngt_p->payload_size += sdu_mngt_p->sdu_remaining_size;
|
||||||
pdu_remaining_size = pdu_remaining_size - sdu_mngt_p->sdu_remaining_size;
|
pdu_remaining_size = pdu_remaining_size - sdu_mngt_p->sdu_remaining_size;
|
||||||
|
|||||||
@@ -36,9 +36,7 @@
|
|||||||
# include "list.h"
|
# include "list.h"
|
||||||
# include "mem_block.h"
|
# include "mem_block.h"
|
||||||
# include "rlc_am_constants.h"
|
# include "rlc_am_constants.h"
|
||||||
//#ifdef USER_MODE
|
|
||||||
# include "mac_rlc_primitives.h"
|
# include "mac_rlc_primitives.h"
|
||||||
//#endif //USER_MODE
|
|
||||||
# include "mac_primitives.h"
|
# include "mac_primitives.h"
|
||||||
# include "rlc_primitives.h"
|
# include "rlc_primitives.h"
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -22,9 +22,7 @@
|
|||||||
#define RLC_AM_MODULE 1
|
#define RLC_AM_MODULE 1
|
||||||
#define RLC_AM_WINDOWS_C 1
|
#define RLC_AM_WINDOWS_C 1
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if USER_MODE
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -682,10 +682,6 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
|
|||||||
{
|
{
|
||||||
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP;
|
rlc_um_entity_t *rlc_p = (rlc_um_entity_t *) rlc_pP;
|
||||||
|
|
||||||
#if ! USER_MODE
|
|
||||||
unsigned long int rlc_um_time_us;
|
|
||||||
int min, sec, usec;
|
|
||||||
#endif
|
|
||||||
#if TRACE_RLC_UM_PDU
|
#if TRACE_RLC_UM_PDU
|
||||||
#if ENABLE_ITTI
|
#if ENABLE_ITTI
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
|
|||||||
@@ -64,9 +64,6 @@
|
|||||||
# include "rlc_um_receiver.h"
|
# include "rlc_um_receiver.h"
|
||||||
# include "rlc_um_segment.h"
|
# include "rlc_um_segment.h"
|
||||||
# include "rlc_um_test.h"
|
# include "rlc_um_test.h"
|
||||||
#ifdef USER_MODE
|
|
||||||
//# include "rlc_um_very_simple_test.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PROTOCOL_RLC_UM_CTXT_FMT PROTOCOL_CTXT_FMT"[%s %02u] %s()"
|
#define PROTOCOL_RLC_UM_CTXT_FMT PROTOCOL_CTXT_FMT"[%s %02u] %s()"
|
||||||
#define PROTOCOL_RLC_UM_CTXT_ARGS(CTXT_Pp, rLC_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\
|
#define PROTOCOL_RLC_UM_CTXT_ARGS(CTXT_Pp, rLC_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp),\
|
||||||
|
|||||||
@@ -23,9 +23,7 @@
|
|||||||
#define RLC_UM_REASSEMBLY_C 1
|
#define RLC_UM_REASSEMBLY_C 1
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if USER_MODE
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
#if ENABLE_ITTI
|
#if ENABLE_ITTI
|
||||||
# include "platform_types.h"
|
# include "platform_types.h"
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
|
|||||||
@@ -25,9 +25,7 @@
|
|||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "platform_constants.h"
|
#include "platform_constants.h"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if USER_MODE
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#include "msc.h"
|
#include "msc.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
@@ -367,10 +365,8 @@ rlc_um_segment_10 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP
|
|||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
#if USER_MODE
|
|
||||||
#if !EXMIMO
|
#if !EXMIMO
|
||||||
assert(1!=1);
|
assert(1!=1);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||||
// reduce the size of the PDU
|
// reduce the size of the PDU
|
||||||
@@ -754,9 +750,7 @@ rlc_um_segment_5 (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t *rlc_pP)
|
|||||||
sdu_mngt_p->sdu_remaining_size,
|
sdu_mngt_p->sdu_remaining_size,
|
||||||
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
pdu_remaining_size - sdu_mngt_p->sdu_remaining_size);
|
||||||
#endif
|
#endif
|
||||||
#if USER_MODE
|
|
||||||
assert(1!=1);
|
assert(1!=1);
|
||||||
#endif
|
|
||||||
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
memcpy(data, data_sdu_p, sdu_mngt_p->sdu_remaining_size);
|
||||||
// reduce the size of the PDU
|
// reduce the size of the PDU
|
||||||
continue_fill_pdu_with_sdu = 0;
|
continue_fill_pdu_with_sdu = 0;
|
||||||
|
|||||||
@@ -36,9 +36,7 @@
|
|||||||
# include "rlc_um_constants.h"
|
# include "rlc_um_constants.h"
|
||||||
# include "mac_primitives.h"
|
# include "mac_primitives.h"
|
||||||
# include "rlc_primitives.h"
|
# include "rlc_primitives.h"
|
||||||
//#ifdef USER_MODE
|
|
||||||
# include "mac_rlc_primitives.h"
|
# include "mac_rlc_primitives.h"
|
||||||
//#endif //USER_MODE
|
|
||||||
//-----------------------
|
//-----------------------
|
||||||
/**
|
/**
|
||||||
* @addtogroup _rlc_um_impl_
|
* @addtogroup _rlc_um_impl_
|
||||||
|
|||||||
@@ -662,10 +662,6 @@ public_rlc(rlc_op_status_t rlc_stat_req (
|
|||||||
public_rlc(int rlc_module_init(void);)
|
public_rlc(int rlc_module_init(void);)
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
#ifndef USER_MODE
|
|
||||||
#define assert(x) ((x)?msg("rlc assertion fails\n"):0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define RLC_FG_COLOR_BLACK "\e[0;30m"
|
#define RLC_FG_COLOR_BLACK "\e[0;30m"
|
||||||
#define RLC_FG_COLOR_RED "\e[0;31m"
|
#define RLC_FG_COLOR_RED "\e[0;31m"
|
||||||
|
|||||||
@@ -31,10 +31,8 @@
|
|||||||
#ifndef __RLC_PRIMITIVES_H__
|
#ifndef __RLC_PRIMITIVES_H__
|
||||||
# define __RLC_PRIMITIVES_H__
|
# define __RLC_PRIMITIVES_H__
|
||||||
|
|
||||||
# ifdef USER_MODE
|
# include <stdio.h>
|
||||||
# include <stdio.h>
|
# include <stdlib.h>
|
||||||
# include <stdlib.h>
|
|
||||||
# endif
|
|
||||||
# include "platform_types.h"
|
# include "platform_types.h"
|
||||||
# include "platform_constants.h"
|
# include "platform_constants.h"
|
||||||
# include "mem_block.h"
|
# include "mem_block.h"
|
||||||
|
|||||||
@@ -29,21 +29,7 @@
|
|||||||
# @ingroup _openair2
|
# @ingroup _openair2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
#include <inttypes.h>
|
||||||
# include <inttypes.h>
|
|
||||||
#else
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
|
|
||||||
# ifndef PRIu64
|
|
||||||
# if __WORDSIZE == 64
|
|
||||||
# define PRIu64 "lu"
|
|
||||||
# else
|
|
||||||
# define PRIu64 "llu"
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "LAYER2/RLC/rlc.h"
|
#include "LAYER2/RLC/rlc.h"
|
||||||
#include "LAYER2/MAC/defs.h"
|
#include "LAYER2/MAC/defs.h"
|
||||||
@@ -404,11 +390,7 @@ int dump_eNB_l2_stats(char *buffer, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PROC
|
#ifdef PROC
|
||||||
#ifndef USER_MODE
|
|
||||||
static int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length)
|
|
||||||
#else
|
|
||||||
int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length)
|
int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
|
||||||
int len = 0,fg,Overhead, Sign;
|
int len = 0,fg,Overhead, Sign;
|
||||||
@@ -691,36 +673,4 @@ int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
static struct proc_dir_entry *proc_openair2_root;
|
|
||||||
/*
|
|
||||||
* Initialize the module and add the /proc file.
|
|
||||||
*/
|
|
||||||
int add_openair2_stats()
|
|
||||||
{
|
|
||||||
struct proc_dir_entry *pde;
|
|
||||||
|
|
||||||
proc_openair2_root = proc_mkdir("openair2",0);
|
|
||||||
// pde = proc_create_entry("lchan_stats", S_IFREG | S_IRUGO, proc_openair2_root);
|
|
||||||
pde = proc_create_data("lchan_stats", S_IFREG | S_IRUGO, proc_openair2_root, NULL,openair2_stats_read);
|
|
||||||
|
|
||||||
if (!pde) {
|
|
||||||
printk("[OPENAIR][ERROR] can't create proc entry !\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Unregister the file when the module is closed.
|
|
||||||
*/
|
|
||||||
void remove_openair_stats()
|
|
||||||
{
|
|
||||||
|
|
||||||
if (proc_openair2_root) {
|
|
||||||
printk("[OPENAIR][CLEANUP] Removing openair proc entry\n");
|
|
||||||
remove_proc_entry("lchan_stats", proc_openair2_root);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,55 +27,15 @@
|
|||||||
________________________________________________________________*/
|
________________________________________________________________*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define __NO_VERSION__
|
|
||||||
#else
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "COMMON/openair_types.h"
|
#include "COMMON/openair_types.h"
|
||||||
#include "MAC/extern.h"
|
#include "MAC/extern.h"
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------------------------//
|
|
||||||
MAC_RLC_XFACE* mac_rrc_register(RRC_XFACE* RRC_xface)
|
|
||||||
{
|
|
||||||
//-----------------------------------------------------------------------------------------------------------//
|
|
||||||
if(Is_rrc_registered) {
|
|
||||||
msg("[OPENAIR][MAC][RRC_REGISTER] RRC interface already registered, aborting ...\n");
|
|
||||||
return NULL;
|
|
||||||
} else {
|
|
||||||
msg("[OPENAIR][MAC][RRC_REGISTER] Registering RRC Interface, Mac_rlc_xface=%p\n",Mac_rlc_xface);
|
|
||||||
Rrc_xface=RRC_xface;
|
|
||||||
Is_rrc_registered=1;
|
|
||||||
return Mac_rlc_xface;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------------------------------//
|
|
||||||
int mac_rrc_unregister(RRC_XFACE *RRC_xface)
|
|
||||||
{
|
|
||||||
//-----------------------------------------------------------------------------------------------------------//
|
|
||||||
if (Rrc_xface == RRC_xface) {
|
|
||||||
msg("[OPENAIR][MAC XFACE][RRC_UNREGISTER] Unregistering RRC interface\n");
|
|
||||||
Rrc_xface=NULL;
|
|
||||||
Is_rrc_registered=0;
|
|
||||||
return(0);
|
|
||||||
} else {
|
|
||||||
msg("[OPENAIR][MAC XFACE][RRC_UNREGISTER] Not the right interface descriptor pointer!!!, aborting ...\n");
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(mac_rrc_register);
|
|
||||||
EXPORT_SYMBOL(mac_rrc_unregister);
|
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ ASN1_DIR = $(OPENAIR2_DIR)
|
|||||||
#GRAAL_DIR =$(UPDIR)/non_access_stratum/driver/nasmt
|
#GRAAL_DIR =$(UPDIR)/non_access_stratum/driver/nasmt
|
||||||
#RRC_DIR =$(UPDIR)/access_stratum/l3/rrc
|
#RRC_DIR =$(UPDIR)/access_stratum/l3/rrc
|
||||||
|
|
||||||
#CFLAGS += -Wall -g -DDEBUG_RRC_STATE -DUSER_MODE -DNODE_RG -DNODE_MT
|
#CFLAGS += -Wall -g -DDEBUG_RRC_STATE -DNODE_RG -DNODE_MT
|
||||||
CFLAGS += -std=gnu99 -I$(KERNEL_DIR) -DUSER_MODE -DNB_ANTENNAS_RX=1
|
CFLAGS += -std=gnu99 -I$(KERNEL_DIR) -DNB_ANTENNAS_RX=1
|
||||||
|
|
||||||
ifdef CELL_RRM
|
ifdef CELL_RRM
|
||||||
CFLAGS += -DNODE_RG
|
CFLAGS += -DNODE_RG
|
||||||
|
|||||||
@@ -187,9 +187,6 @@ MACPHY_DATA_REQ *new_macphy_data_req(unsigned char Mod_id)
|
|||||||
|
|
||||||
return((MACPHY_DATA_REQ*)0);
|
return((MACPHY_DATA_REQ*)0);
|
||||||
}
|
}
|
||||||
#ifndef USER_MODE
|
|
||||||
EXPORT_SYMBOL(new_macphy_data_req);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif //PHY_CONTEXT
|
#endif //PHY_CONTEXT
|
||||||
@@ -262,13 +259,7 @@ void macphy_data_ind(unsigned char Mod_id,unsigned char Pdu_type,void *pdu,unsig
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
msg("[OPENAIR][MAC][ERROR] No more PHY_RESOURCES !!!!\n");
|
msg("[OPENAIR][MAC][ERROR] No more PHY_RESOURCES !!!!\n");
|
||||||
#ifdef USER_MODE
|
|
||||||
exit(-1);
|
exit(-1);
|
||||||
#else
|
|
||||||
print_active_indications();
|
|
||||||
print_active_requests();
|
|
||||||
mac_xface->macphy_exit();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,3 @@ unsigned int mac_registered;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
EXPORT_SYMBOL(mac_xface);
|
|
||||||
#endif //PHY_EMUL
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,45 +28,10 @@
|
|||||||
* \email: navid.nikaein@eurecom.fr
|
* \email: navid.nikaein@eurecom.fr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#else //USER_MODE
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/bitops.h>
|
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#include <asm/segment.h>
|
|
||||||
#include <asm/page.h>
|
|
||||||
#include <asm/delay.h>
|
|
||||||
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/mman.h>
|
|
||||||
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/version.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
#include <linux/errno.h>
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef KERNEL2_6
|
|
||||||
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef KERNEL2_4
|
|
||||||
#include <linux/malloc.h>
|
|
||||||
#include <linux/wrapper.h>
|
|
||||||
#endif
|
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
#include "openair_defs.h"
|
#include "openair_defs.h"
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdlib.h> /* for atoi(3) */
|
#include <stdlib.h> /* for atoi(3) */
|
||||||
@@ -36,14 +35,7 @@
|
|||||||
#include <string.h> /* for strerror(3) */
|
#include <string.h> /* for strerror(3) */
|
||||||
#include <sysexits.h> /* for EX_* exit codes */
|
#include <sysexits.h> /* for EX_* exit codes */
|
||||||
#include <errno.h> /* for errno */
|
#include <errno.h> /* for errno */
|
||||||
#else
|
|
||||||
#include <linux/module.h> /* Needed by all modules */
|
|
||||||
#endif
|
|
||||||
#ifdef USER_MODE
|
|
||||||
//#include "RRC/LITE/defs.h"
|
|
||||||
//#include "COMMON/mac_rrc_primitives.h"
|
|
||||||
#include "UTIL/LOG/log.h"
|
#include "UTIL/LOG/log.h"
|
||||||
#endif
|
|
||||||
#include <asn_application.h>
|
#include <asn_application.h>
|
||||||
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
||||||
#include <per_encoder.h>
|
#include <per_encoder.h>
|
||||||
@@ -90,16 +82,8 @@
|
|||||||
|
|
||||||
#include "common/ran_context.h"
|
#include "common/ran_context.h"
|
||||||
|
|
||||||
//#include "PHY/defs.h"
|
#if !defined (msg)
|
||||||
#ifndef USER_MODE
|
#define msg printf
|
||||||
#define msg printk
|
|
||||||
#ifndef errno
|
|
||||||
int errno;
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
# if !defined (msg)
|
|
||||||
# define msg printf
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define XER_PRINT
|
//#define XER_PRINT
|
||||||
@@ -483,9 +467,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"[eNB] SystemInformationBlockType1 Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
LOG_D(RRC,"[eNB] SystemInformationBlockType1 Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
return(-1);
|
return(-1);
|
||||||
@@ -1013,9 +995,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
msg("[RRC] ASN1 : SI encoding failed for SIB23\n");
|
msg("[RRC] ASN1 : SI encoding failed for SIB23\n");
|
||||||
@@ -1102,9 +1082,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %zd bits (%zd bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
|
LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %zd bits (%zd bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
|
||||||
#endif
|
|
||||||
|
|
||||||
return((enc_rval.encoded+7)/8);
|
return((enc_rval.encoded+7)/8);
|
||||||
|
|
||||||
@@ -1185,9 +1163,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"RRCConnectionSetupComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
LOG_D(RRC,"RRCConnectionSetupComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
return((enc_rval.encoded+7)/8);
|
return((enc_rval.encoded+7)/8);
|
||||||
|
|
||||||
@@ -1247,9 +1223,7 @@ do_RRCConnectionReconfigurationComplete(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
return((enc_rval.encoded+7)/8);
|
return((enc_rval.encoded+7)/8);
|
||||||
}
|
}
|
||||||
@@ -1636,10 +1610,8 @@ do_RRCConnectionSetup(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"RRCConnectionSetup Encoded %zd bits (%zd bytes), ecause %d\n",
|
LOG_D(RRC,"RRCConnectionSetup Encoded %zd bits (%zd bytes), ecause %d\n",
|
||||||
enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
|
enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
|
||||||
#endif
|
|
||||||
|
|
||||||
// FREEMEM(SRB_list);
|
// FREEMEM(SRB_list);
|
||||||
// free(SRB1_config);
|
// free(SRB1_config);
|
||||||
@@ -1709,13 +1681,11 @@ do_SecurityModeCommand(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n",
|
||||||
ctxt_pP->module_id,
|
ctxt_pP->module_id,
|
||||||
ctxt_pP->rnti,
|
ctxt_pP->rnti,
|
||||||
enc_rval.encoded,
|
enc_rval.encoded,
|
||||||
(enc_rval.encoded+7)/8);
|
(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(RRC,"[eNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n",
|
LOG_E(RRC,"[eNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n",
|
||||||
@@ -1787,13 +1757,11 @@ do_UECapabilityEnquiry(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
|
||||||
ctxt_pP->module_id,
|
ctxt_pP->module_id,
|
||||||
ctxt_pP->rnti,
|
ctxt_pP->rnti,
|
||||||
enc_rval.encoded,
|
enc_rval.encoded,
|
||||||
(enc_rval.encoded+7)/8);
|
(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(RRC,"[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %x\n",
|
LOG_E(RRC,"[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %x\n",
|
||||||
@@ -1953,13 +1921,11 @@ do_RRCConnectionReconfiguration(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#ifdef USER_MODE
|
|
||||||
LOG_I(RRC,"RRCConnectionReconfiguration Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
LOG_I(RRC,"RRCConnectionReconfiguration Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
// for (i=0;i<30;i++)
|
// for (i=0;i<30;i++)
|
||||||
// msg("%x.",buffer[i]);
|
// msg("%x.",buffer[i]);
|
||||||
// msg("\n");
|
// msg("\n");
|
||||||
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
return((enc_rval.encoded+7)/8);
|
return((enc_rval.encoded+7)/8);
|
||||||
}
|
}
|
||||||
@@ -2014,10 +1980,8 @@ do_RRCConnectionReestablishmentReject(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %zd bits (%zd bytes)\n",
|
||||||
enc_rval.encoded,(enc_rval.encoded+7)/8);
|
enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
return((enc_rval.encoded+7)/8);
|
return((enc_rval.encoded+7)/8);
|
||||||
}
|
}
|
||||||
@@ -2075,10 +2039,8 @@ do_RRCConnectionReject(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"RRCConnectionReject Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC,"RRCConnectionReject Encoded %zd bits (%zd bytes)\n",
|
||||||
enc_rval.encoded,(enc_rval.encoded+7)/8);
|
enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
return((enc_rval.encoded+7)/8);
|
return((enc_rval.encoded+7)/8);
|
||||||
}
|
}
|
||||||
@@ -2266,9 +2228,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"[eNB] MCCH Message Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
LOG_D(RRC,"[eNB] MCCH Message Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
msg("[RRC] ASN1 : MCCH encoding failed for MBSFNAreaConfiguration\n");
|
msg("[RRC] ASN1 : MCCH encoding failed for MBSFNAreaConfiguration\n");
|
||||||
@@ -2400,9 +2360,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
printf("Measurement Report Encoded %zu bits (%zu bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
printf("Measurement Report Encoded %zu bits (%zu bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
return((enc_rval.encoded+7)/8);
|
return((enc_rval.encoded+7)/8);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdlib.h> /* for atoi(3) */
|
#include <stdlib.h> /* for atoi(3) */
|
||||||
@@ -36,9 +35,6 @@
|
|||||||
#include <string.h> /* for strerror(3) */
|
#include <string.h> /* for strerror(3) */
|
||||||
#include <sysexits.h> /* for EX_* exit codes */
|
#include <sysexits.h> /* for EX_* exit codes */
|
||||||
#include <errno.h> /* for errno */
|
#include <errno.h> /* for errno */
|
||||||
#else
|
|
||||||
#include <linux/module.h> /* Needed by all modules */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <asn_application.h>
|
#include <asn_application.h>
|
||||||
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
||||||
|
|||||||
@@ -31,11 +31,9 @@
|
|||||||
#ifndef __OPENAIR_RRC_DEFS_H__
|
#ifndef __OPENAIR_RRC_DEFS_H__
|
||||||
#define __OPENAIR_RRC_DEFS_H__
|
#define __OPENAIR_RRC_DEFS_H__
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "collection/tree.h"
|
#include "collection/tree.h"
|
||||||
#include "rrc_types.h"
|
#include "rrc_types.h"
|
||||||
@@ -47,11 +45,6 @@
|
|||||||
|
|
||||||
#include "LAYER2/MAC/defs.h"
|
#include "LAYER2/MAC/defs.h"
|
||||||
|
|
||||||
//#include "COMMON/openair_defs.h"
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#include <rtai.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "SystemInformationBlockType1.h"
|
#include "SystemInformationBlockType1.h"
|
||||||
#include "SystemInformation.h"
|
#include "SystemInformation.h"
|
||||||
#include "RRCConnectionReconfiguration.h"
|
#include "RRCConnectionReconfiguration.h"
|
||||||
|
|||||||
@@ -27,41 +27,6 @@
|
|||||||
________________________________________________________________*/
|
________________________________________________________________*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
#define __NO_VERSION__
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/bitops.h>
|
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#include <asm/segment.h>
|
|
||||||
#include <asm/page.h>
|
|
||||||
#include <asm/delay.h>
|
|
||||||
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/mman.h>
|
|
||||||
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/version.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/fs.h>
|
|
||||||
|
|
||||||
#include <linux/errno.h>
|
|
||||||
#ifdef KERNEL2_6
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef KERNEL2_4
|
|
||||||
#include <linux/malloc.h>
|
|
||||||
#include <linux/wrapper.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "vars.h"
|
#include "vars.h"
|
||||||
|
|
||||||
@@ -72,75 +37,3 @@ extern void *bigphys_malloc(int);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
|
|
||||||
/*------------------------------------------------*/
|
|
||||||
/* Prototypes */
|
|
||||||
/*------------------------------------------------*/
|
|
||||||
#ifdef KERNEL2_4
|
|
||||||
static int init_module( void );
|
|
||||||
static void cleanup_module(void);
|
|
||||||
#else
|
|
||||||
static int openair_rrc_init_module( void );
|
|
||||||
static void openair_rrc_cleanup_module(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef KERNEL2_6
|
|
||||||
static int __init openair_rrc_init_module( void )
|
|
||||||
#else
|
|
||||||
int init_module( void )
|
|
||||||
#endif //KERNEL2_6
|
|
||||||
{
|
|
||||||
printk("[OPENAIR][RRC][INIT] inserting module\n");
|
|
||||||
|
|
||||||
|
|
||||||
Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE));
|
|
||||||
|
|
||||||
if(Rrc_xface == NULL) {
|
|
||||||
printk("[RRC] FATAL EROOR: Could not allocate memory for Rrc_xface !!!\n");
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Mac_rlc_xface=mac_rrc_register(Rrc_xface);
|
|
||||||
|
|
||||||
if( Mac_rlc_xface == NULL ) {
|
|
||||||
printk("[OPENAIR][RRC][INIT] Could not get RRC descriptor\n");
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
printk("[OPENAIR][RRC][INIT] Got RRC descriptor , Rcc_xface %p,Mac_rlc_xface=%p \n",Rrc_xface,Mac_rlc_xface);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(rrc_init_global_param()==-1) {
|
|
||||||
printk("[OPENAIR][RRC][INIT] FATAL ERROR: INIT_GLOBAL_PARAM_NOK\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef KERNEL2_6
|
|
||||||
static void __exit openair_rrc_cleanup_module(void)
|
|
||||||
#else
|
|
||||||
void cleanup_module(void)
|
|
||||||
#endif //KERNEL2_6
|
|
||||||
{
|
|
||||||
#ifndef NO_RRM
|
|
||||||
rtf_destroy(RRC2RRM_FIFO);
|
|
||||||
rtf_destroy(RRM2RRC_FIFO);
|
|
||||||
#endif //NO_RRM
|
|
||||||
printk("[OPENAIR][RRC][CLEANUP] cleanup module\n");
|
|
||||||
mac_rrc_unregister(Rrc_xface);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MODULE_AUTHOR
|
|
||||||
("Lionel GAUTHIER <lionel.gauthier@eurecom.fr>, Raymond KNOPP <raymond.knopp@eurecom.fr>, Aawatif MENOUNI <aawatif.menouni@eurecom.fr>,Dominique NUSSBAUM <dominique.nussbaum@eurecom.fr>, Michelle WETTERWALD <michelle.wetterwald@eurecom.fr>, Maxime GUILLAUD <maxime.guillaud@eurecom.fr, Hicham ANOUAR <hicham.anouar@eurecom.fr>");
|
|
||||||
MODULE_DESCRIPTION ("openair RRC layer module");
|
|
||||||
MODULE_LICENSE ("GPL");
|
|
||||||
module_init (openair_rrc_init_module);
|
|
||||||
module_exit (openair_rrc_cleanup_module);
|
|
||||||
|
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,10 +66,8 @@
|
|||||||
#include "OCG.h"
|
#include "OCG.h"
|
||||||
#include "OCG_extern.h"
|
#include "OCG_extern.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef USER_MODE
|
|
||||||
#include "RRC/NAS/nas_config.h"
|
#include "RRC/NAS/nas_config.h"
|
||||||
#include "RRC/NAS/rb_config.h"
|
#include "RRC/NAS/rb_config.h"
|
||||||
#endif
|
|
||||||
#if ENABLE_RAL
|
#if ENABLE_RAL
|
||||||
#include "rrc_UE_ral.h"
|
#include "rrc_UE_ral.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -1730,9 +1728,7 @@ rrc_ue_process_securityModeCommand(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC, "securityModeComplete Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8);
|
LOG_D(RRC, "securityModeComplete Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) {
|
for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) {
|
||||||
LOG_T(RRC, "%02x.", buffer[i]);
|
LOG_T(RRC, "%02x.", buffer[i]);
|
||||||
@@ -1835,9 +1831,7 @@ rrc_ue_process_ueCapabilityEnquiry(
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
LOG_D(RRC,"UECapabilityInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
LOG_D(RRC,"UECapabilityInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) {
|
for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) {
|
||||||
LOG_T(RRC, "%02x.", buffer[i]);
|
LOG_T(RRC, "%02x.", buffer[i]);
|
||||||
@@ -4246,10 +4240,6 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i
|
|||||||
|
|
||||||
#endif // rel10
|
#endif // rel10
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
EXPORT_SYMBOL(Rlc_info_am_config);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ENABLE_ITTI)
|
#if defined(ENABLE_ITTI)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void *rrc_ue_task( void *args_p )
|
void *rrc_ue_task( void *args_p )
|
||||||
|
|||||||
@@ -97,9 +97,7 @@ rrc_init_global_param(
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
|
|
||||||
//#ifdef USER_MODE
|
|
||||||
// Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE));
|
// Rrc_xface = (RRC_XFACE*)malloc16(sizeof(RRC_XFACE));
|
||||||
//#endif //USRE_MODE
|
|
||||||
|
|
||||||
// Rrc_xface->openair_rrc_top_init = openair_rrc_top_init;
|
// Rrc_xface->openair_rrc_top_init = openair_rrc_top_init;
|
||||||
// Rrc_xface->openair_rrc_eNB_init = openair_rrc_eNB_init;
|
// Rrc_xface->openair_rrc_eNB_init = openair_rrc_eNB_init;
|
||||||
|
|||||||
@@ -63,12 +63,10 @@
|
|||||||
#include "MeasResults.h"
|
#include "MeasResults.h"
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
#include "RRC/NAS/nas_config.h"
|
||||||
# include "RRC/NAS/nas_config.h"
|
#include "RRC/NAS/rb_config.h"
|
||||||
# include "RRC/NAS/rb_config.h"
|
#include "OCG.h"
|
||||||
# include "OCG.h"
|
#include "OCG_extern.h"
|
||||||
# include "OCG_extern.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ENABLE_SECURITY)
|
#if defined(ENABLE_SECURITY)
|
||||||
# include "UTIL/OSA/osa_defs.h"
|
# include "UTIL/OSA/osa_defs.h"
|
||||||
|
|||||||
@@ -292,10 +292,5 @@ int send_msg_fifo(int *s, msg_t *fmsg)
|
|||||||
|
|
||||||
int send_msg(void *s, msg_t *smsg)
|
int send_msg(void *s, msg_t *smsg)
|
||||||
{
|
{
|
||||||
#ifdef USER_MODE
|
|
||||||
send_msg_sock((sock_rrm_t *)s, smsg);
|
send_msg_sock((sock_rrm_t *)s, smsg);
|
||||||
#else
|
|
||||||
send_msg_fifo((int *)s,smsg);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,8 +101,6 @@ extern "C" {
|
|||||||
#define START_MSG_PUSU 0xCC
|
#define START_MSG_PUSU 0xCC
|
||||||
|
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
@@ -128,16 +126,6 @@ char *recv_msg( sock_rrm_t *s ) ;
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else //USER_MODE
|
|
||||||
#include <rtai_fifos.h>
|
|
||||||
|
|
||||||
#define RRC2RRM_FIFO 14
|
|
||||||
#define RRM2RRC_FIFO 15
|
|
||||||
int send_msg_fifo(int *s ,msg_t *msg ) ;
|
|
||||||
#endif //USER_MODE
|
|
||||||
|
|
||||||
int send_msg(void *, msg_t *);
|
int send_msg(void *, msg_t *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -65,17 +65,12 @@ void fn_rrc (void)
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
msg_head_t *Header ;
|
msg_head_t *Header ;
|
||||||
#ifdef USER_MODE
|
|
||||||
char *Data;
|
char *Data;
|
||||||
#else
|
|
||||||
int bytes_read;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
L2_ID Mac_id;
|
L2_ID Mac_id;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
Header = (msg_head_t *) recv_msg(&S_rrc) ;
|
Header = (msg_head_t *) recv_msg(&S_rrc) ;
|
||||||
|
|
||||||
if(Header==NULL) {
|
if(Header==NULL) {
|
||||||
@@ -83,52 +78,9 @@ void fn_rrc (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Data_to_read=Header->size;
|
Data_to_read=Header->size;
|
||||||
#else
|
|
||||||
|
|
||||||
if(Header_read_idx < Header_size) {
|
|
||||||
bytes_read = rtf_get (RRM2RRC_FIFO,&Header_buf[Header_read_idx],Header_size-Header_read_idx);
|
|
||||||
|
|
||||||
if(bytes_read >0) {
|
|
||||||
msg("RRC: GET FIFOS RETURNS %d bytes, header %d\n",bytes_read,Header_read_idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
Header_read_idx+=bytes_read;
|
|
||||||
|
|
||||||
if(Header_read_idx == Header_size) {
|
|
||||||
Header = (msg_head_t *) Header_buf;
|
|
||||||
Data_to_read=Header->size;
|
|
||||||
msg("RRC: Header read completed, data size %d\n",Data_to_read);
|
|
||||||
}
|
|
||||||
//msg("[fn_rrc]TTI %d: rcv_msg return Null\n",Rrc_xface->Frame_index);
|
|
||||||
else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Data_to_read > 0 ) {
|
if (Data_to_read > 0 ) {
|
||||||
#ifdef USER_MODE
|
|
||||||
Data = (char *) (Header +1) ;
|
Data = (char *) (Header +1) ;
|
||||||
#else
|
|
||||||
bytes_read = rtf_get (RRM2RRC_FIFO,&Data[Data_read_idx],Data_to_read);
|
|
||||||
|
|
||||||
if(bytes_read >0) {
|
|
||||||
msg("RRC: GET FIFOS RETURNS %d bytes, Data_to_read %d\n",bytes_read,Data_to_read);
|
|
||||||
}
|
|
||||||
|
|
||||||
Data_to_read-=bytes_read;
|
|
||||||
Data_read_idx+=bytes_read;
|
|
||||||
|
|
||||||
if(Data_to_read > 0 ) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg("RRC: DATA read completed, data size %d\n",Data_to_read);
|
|
||||||
Header_read_idx=0;
|
|
||||||
Data_read_idx=0;
|
|
||||||
Data_to_read=0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
msg("Got MSG of Type %d on Inst %d\n",Header->msg_type,Header->inst);
|
msg("Got MSG of Type %d on Inst %d\n",Header->msg_type,Header->inst);
|
||||||
|
|||||||
@@ -29,25 +29,8 @@ ________________________________________________________________*/
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#include "openair_types.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
//#include "openair_proto.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef USER_MODE
|
|
||||||
char bcmp(void *x, void *y,int Size )
|
|
||||||
{
|
|
||||||
unsigned char i;
|
|
||||||
|
|
||||||
for(i=0; i<Size; i++)
|
|
||||||
if(*(char*)(x+i)!= *(char*)(y+i)) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------------------------------//
|
//------------------------------------------------------------------------------------------------------------------//
|
||||||
@@ -63,7 +46,6 @@ uint16_t find_free_dtch_position(uint8_t Mod_id, uint16_t UE_CH_index)
|
|||||||
|
|
||||||
for(i=j; i<NB_RAB_MAX; i++) { //first RAB IS BROADCAST DTCH
|
for(i=j; i<NB_RAB_MAX; i++) { //first RAB IS BROADCAST DTCH
|
||||||
|
|
||||||
//msg("i=%d\n",i);
|
|
||||||
if(CH_rrc_inst[Mod_id].Rab[i][UE_CH_index].Active==0) {
|
if(CH_rrc_inst[Mod_id].Rab[i][UE_CH_index].Active==0) {
|
||||||
return( i);
|
return( i);
|
||||||
}
|
}
|
||||||
@@ -130,11 +112,7 @@ uint8_t find_rrc_info_index(uint8_t Mod_id,uint8_t CH_id)
|
|||||||
if(Rrc_inst[Mod_id].Rrc_info[i].Info.UE_info.CH_id == CH_id) return i;
|
if(Rrc_inst[Mod_id].Rrc_info[i].Info.UE_info.CH_id == CH_id) return i;
|
||||||
}
|
}
|
||||||
error_msg("[OPENAIR][RRC] RRC_INFO_INDEX: FATAL ERROR: Not yet Pre_Synchronized with CH ???%d\n",CH_id);
|
error_msg("[OPENAIR][RRC] RRC_INFO_INDEX: FATAL ERROR: Not yet Pre_Synchronized with CH ???%d\n",CH_id);
|
||||||
#ifndef USER_MODE
|
|
||||||
// mac_xface->macphy_exit();
|
|
||||||
#else
|
|
||||||
exit(-1);
|
exit(-1);
|
||||||
#endif
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -38,11 +38,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#define LIST2_C
|
#define LIST2_C
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#ifdef USER_MODE
|
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#else
|
|
||||||
#define NULL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -336,9 +332,7 @@ list2_display (list2_t * listP)
|
|||||||
nb_elements++;
|
nb_elements++;
|
||||||
}
|
}
|
||||||
msg (" found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
msg (" found nb_elements %d nb_elements %d\n", nb_elements, listP->nb_elements);
|
||||||
#ifdef USER_MODE
|
|
||||||
AssertFatal(nb_elements == listP->nb_elements, "Bad count of elements %d != %d", nb_elements, listP->nb_elements);
|
AssertFatal(nb_elements == listP->nb_elements, "Bad count of elements %d != %d", nb_elements, listP->nb_elements);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,10 +42,8 @@
|
|||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
|
||||||
#ifdef RTAI
|
#ifdef RTAI
|
||||||
# include <rtai.h>
|
# include <rtai.h>
|
||||||
# include <rtai_fifos.h>
|
# include <rtai_fifos.h>
|
||||||
@@ -164,24 +162,14 @@ void log_getconfig(log_t *g_log) {
|
|||||||
|
|
||||||
int logInit (void)
|
int logInit (void)
|
||||||
{
|
{
|
||||||
#ifdef USER_MODE
|
|
||||||
#ifndef RTAI
|
#ifndef RTAI
|
||||||
int i;
|
int i;
|
||||||
#endif
|
#endif
|
||||||
g_log = calloc(1, sizeof(log_t));
|
g_log = calloc(1, sizeof(log_t));
|
||||||
|
|
||||||
#else
|
|
||||||
g_log = kmalloc(sizeof(log_t), GFP_KERNEL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (g_log == NULL) {
|
if (g_log == NULL) {
|
||||||
#ifdef USER_MODE
|
|
||||||
perror ("cannot allocated memory for log generation module \n");
|
perror ("cannot allocated memory for log generation module \n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
#else
|
|
||||||
printk("cannot allocated memory for log generation module \n");
|
|
||||||
return(-1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -519,11 +507,7 @@ int logInit (void)
|
|||||||
rtf_create (FIFO_PRINTF_NO, FIFO_PRINTF_SIZE);
|
rtf_create (FIFO_PRINTF_NO, FIFO_PRINTF_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USER_MODE
|
|
||||||
printf("log init done\n");
|
printf("log init done\n");
|
||||||
#else
|
|
||||||
printk("log init done\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
# define __LOG_H__
|
# define __LOG_H__
|
||||||
|
|
||||||
/*--- INCLUDES ---------------------------------------------------------------*/
|
/*--- INCLUDES ---------------------------------------------------------------*/
|
||||||
#ifdef USER_MODE
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -53,9 +52,6 @@
|
|||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#else
|
|
||||||
#include "rtai_fifos.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@@ -282,20 +278,11 @@ void *log_thread_function(void * list);
|
|||||||
* @ingroup _macro
|
* @ingroup _macro
|
||||||
* @brief Macro used to call tr_log_full_ex with file, function and line information
|
* @brief Macro used to call tr_log_full_ex with file, function and line information
|
||||||
* @{*/
|
* @{*/
|
||||||
#ifdef USER_MODE
|
|
||||||
//#define logIt(component, level, format, args...) do {logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args);} while(0);
|
|
||||||
#ifdef LOG_NO_THREAD
|
#ifdef LOG_NO_THREAD
|
||||||
#define logIt(component, level, format, args...) logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
#define logIt(component, level, format, args...) logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||||
#else //default
|
#else //default
|
||||||
#define logIt(component, level, format, args...) logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
#define logIt(component, level, format, args...) logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args)
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
#ifdef LOG_NO_THREAD
|
|
||||||
#define logIt(component, level, format, args...) logRecord_mt(NULL, __FUNCTION__, __LINE__, component, level, format, ##args)
|
|
||||||
#else // default
|
|
||||||
#define logIt(component, level, format, args...) logRecord(NULL, __FUNCTION__, __LINE__, component, level, format, ##args)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
/* @}*/
|
/* @}*/
|
||||||
|
|
||||||
/*----------------macro definitions for reading log configuration from the config module */
|
/*----------------macro definitions for reading log configuration from the config module */
|
||||||
@@ -326,7 +313,6 @@ void *log_thread_function(void * list);
|
|||||||
* @{*/
|
* @{*/
|
||||||
|
|
||||||
// debugging macros
|
// debugging macros
|
||||||
#ifdef USER_MODE
|
|
||||||
# if T_TRACER
|
# if T_TRACER
|
||||||
# include "T.h"
|
# include "T.h"
|
||||||
# define LOG_I(c, x...) T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x))
|
# define LOG_I(c, x...) T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x))
|
||||||
@@ -364,17 +350,6 @@ void *log_thread_function(void * list);
|
|||||||
# define LOG_T(c, x...) logIt(c, LOG_TRACE, x)
|
# define LOG_T(c, x...) logIt(c, LOG_TRACE, x)
|
||||||
# endif /*DISABLE_LOG_X*/
|
# endif /*DISABLE_LOG_X*/
|
||||||
# endif /* T_TRACER */
|
# endif /* T_TRACER */
|
||||||
#else /* USER_MODE */
|
|
||||||
# define LOG_G(c, x...) printk(x)
|
|
||||||
# define LOG_A(c, x...) printk(x)
|
|
||||||
# define LOG_C(c, x...) printk(x)
|
|
||||||
# define LOG_E(c, x...) printk(x)
|
|
||||||
# define LOG_W(c, x...) printk(x)
|
|
||||||
# define LOG_N(c, x...) printk(x)
|
|
||||||
# define LOG_I(c, x...) printk(x)
|
|
||||||
# define LOG_D(c, x...) printk(x)
|
|
||||||
# define LOG_T(c, x...) printk(x)
|
|
||||||
#endif
|
|
||||||
/* @}*/
|
/* @}*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user