Commit 7361e74e authored by Rohit Gupta's avatar Rohit Gupta

Merge branch 'enhancement-10-harmony' into develop

parents 23822ea2 33fddd3a
......@@ -179,7 +179,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
# these changes are related to hardcoded path to include .h files
add_definitions(-DCMAKER)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
set(GIT_BRANCH "UNKNOWN")
......@@ -262,15 +262,7 @@ if (${ENABLE_ITTI})
endif (${ENABLE_ITTI})
add_boolean_option(RTAI False "Use RTAI")
if (${RTAI})
set(DEADLINE_SCHEDULER False)
set(CPU_AFFINITY False)
add_definitions("-DENABLE_RTAI_CLOCK")
add_definitions("-DCONFIG_RTAI_LXRT_INLINE")
include_directories ("/usr/realtime/include")
include_directories ("/usr/realtime/include/asm")
set(RTAI_SOURCE sched_dlsch.c sched_rx_pdsch.c rt_wrapper.c vcd_signal_dumper.c log.c)
endif (${RTAI})
#############################
# ASN.1 grammar C code generation & dependancies
......@@ -505,7 +497,7 @@ include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/DEFS/")
#set (option_HWEXMIMOLIB_lib "-l ")
set(HWLIB_EXMIMO_SOURCE
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c
# ${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c
)
add_library(oai_exmimodevif MODULE ${HWLIB_EXMIMO_SOURCE} )
......@@ -546,8 +538,8 @@ if (${RF_BOARD} STREQUAL "EXMIMO")
include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/")
include_directories ("${OPENAIR_TARGETS}/ARCH/EXMIMO/DEFS/")
set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c)
${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c)
# ${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c)
set(option_HW_lib "-rdynamic -ldl")
elseif (${RF_BOARD} STREQUAL "OAI_USRP")
......@@ -628,6 +620,7 @@ add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver
add_boolean_option(NAS_NETLINK False "???? Must be True to compile nasmesh driver without rtai")
add_boolean_option(OAISIM False "specific to oaisim")
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
add_boolean_option(USE_MME False "this flag is used only one time in lte-softmodem.c")
add_list_string_option(PACKAGE_NAME "NotDefined" "As per attribute name")
add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequence diagrams")
......@@ -968,6 +961,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c
......@@ -978,6 +972,8 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
......@@ -1614,10 +1610,9 @@ add_executable(lte-softmodem
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/sched_dlsch.c
${OPENAIR_TARGETS}/RT/USER/sched_rx_pdsch.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
......@@ -1650,10 +1645,9 @@ add_executable(lte-softmodem-nos1
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/sched_dlsch.c
${OPENAIR_TARGETS}/RT/USER/sched_rx_pdsch.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
......@@ -1749,6 +1743,9 @@ add_executable(oaisim
${s1ap_h}
${x2ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
......@@ -1792,6 +1789,9 @@ add_executable(oaisim_nos1
${s1ap_h}
${x2ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
......
......@@ -16,17 +16,22 @@ Obj.# Case# Test# Description
01 01 20 Build lte-softmodem.USRP.Rel10
01 01 21 Build lte-softmodem.EXMIMO.Rel10
01 01 22 Build lte-softmodem.BLADERF.Rel10
01 01 23 Build lte-softmodem.ETHERNET.Rel10
01 01 23 Build lte-softmodem.ETHERNET.Rel10 (RCC)
01 01 24 Build lte-softmodem.LMSSDR.Rel10
01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10
secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10
secu_knas.Rel10 secu_knas_encrypt_eea1.Rel10 kdf.Rel10 aes128_cmac_encrypt.Rel10 secu_knas_encrypt_eia2.Rel10)
01 01 40 Build RRH Gateway for USRP (Rel 10)
01 01 41 Build RRH Gateway for EXMIMO (Rel 10)
01 01 42 Build RRH Gateway for BLADERF (Rel 10)
01 01 43 Build RRH Gateway for LMSSDR (Rel 10)
01 01 40 Build RRH Gateway (time domain) for USRP (Rel 10)
01 01 41 Build RRH Gateway (time domain) for EXMIMO (Rel 10)
01 01 42 Build RRH Gateway (time domain) for BLADERF (Rel 10)
01 01 43 Build RRH Gateway (time domain) for LMSSDR (Rel 10)
01 01 50 Build RRU (NGFI) for USRP (Rel 10) w/ ETHERNET transport
01 01 51 Build RRU (NGFI) for EXMIMO (Rel 10) w/ ETHERNET transport
01 01 52 Build RRU (NGFI) for BLADERF (Rel 10) w/ ETHERNET transport
01 01 53 Build RRU (NGFI) for LMSSDR (Rel 10) w/ ETHERNET transport
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
......
......@@ -588,7 +588,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
RRH_pre_exec_args = testcase.findtext('RRH_pre_exec_args',default='')
RRH_main_exec = testcase.findtext('RRH_main_exec',default='')
RRH_main_exec_args = testcase.findtext('RRH_main_exec_args',default='')
RRH_terminate_missing_procs = testcase.findtext('RRH_terminate_missing_procs',default='True')
RRH_terminate_missing_procs = testcase.findtext('RRH_terminate_missing_procs',default='False')
eNBMachine = testcase.findtext('eNB',default='')
......@@ -601,7 +601,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
eNB_main_exec_args = testcase.findtext('eNB_main_exec_args',default='')
eNB_traffic_exec = testcase.findtext('eNB_traffic_exec',default='')
eNB_traffic_exec_args = testcase.findtext('eNB_traffic_exec_args',default='')
eNB_terminate_missing_procs = testcase.findtext('eNB_terminate_missing_procs',default='True')
eNB_terminate_missing_procs = testcase.findtext('eNB_terminate_missing_procs',default='False')
eNB_search_expr_true = testcase.findtext('eNB_search_expr_true','')
if re.compile('\w+').match(eNB_search_expr_true) != None:
eNB_search_expr_true = eNB_search_expr_true + ' duration=' + str(timeout_cmd-90) + 's'
......@@ -616,7 +616,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
UE_main_exec_args = testcase.findtext('UE_main_exec_args',default='')
UE_traffic_exec = testcase.findtext('UE_traffic_exec',default='')
UE_traffic_exec_args = testcase.findtext('UE_traffic_exec_args',default='')
UE_terminate_missing_procs = testcase.findtext('UE_terminate_missing_procs',default='True')
UE_terminate_missing_procs = testcase.findtext('UE_terminate_missing_procs',default='False')
UE_search_expr_true = testcase.findtext('UE_search_expr_true','')
UE_stop_script = testcase.findtext('UE_stop_script','')
if re.compile('\w+').match(UE_search_expr_true) != None:
......@@ -637,7 +637,7 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
HSS_main_exec_args = testcase.findtext('HSS_main_exec_args',default='')
EPC_traffic_exec = testcase.findtext('EPC_traffic_exec',default='')
EPC_traffic_exec_args = testcase.findtext('EPC_traffic_exec_args',default='')
EPC_terminate_missing_procs = testcase.findtext('EPC_terminate_missing_procs',default='True')
EPC_terminate_missing_procs = testcase.findtext('EPC_terminate_missing_procs',default='False')
EPC_search_expr_true = testcase.findtext('EPC_search_expr_true','')
if re.compile('\w+').match(EPC_search_expr_true) != None:
EPC_search_expr_true = EPC_search_expr_true + ' duration=' + str(timeout_cmd-90) + 's'
......@@ -1304,6 +1304,8 @@ logdirOpenaircnRepo = logdir + 'openair-cn/'
if flag_remove_logdir == True:
print "Removing directory: " + locallogdir
os.system(' rm -fr ' + locallogdir + '; mkdir -p ' + locallogdir )
else:
os.system('mkdir -p ' + locallogdir)
paramiko_logfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/log/paramiko.log')
res=os.system(' echo > ' + paramiko_logfile)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -31,6 +31,26 @@
# \author Navid Nikaein, Rohit Gupta
# To free unused memory else test setup runs out of memory
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches '
mem_threshold=0.2 #If free memory is less than this threshold, then VM drop cache is called
mem_tot=`vmstat -s -S k |grep "total memory" | awk '{print $1}'`
mem_free=`vmstat -s -S k |grep "free memory" | awk '{print $1}'`
mem_frac=`bc <<< "scale=4;$mem_free/$mem_tot"`
echo $mem_frac
#mem_frac=`bc <<< "scale=4;`echo $mem_free`/`echo $mem_tot`"`
echo "Total Memory = $mem_tot k "
echo "Free Memory = $mem_free k"
echo "Fraction free memory = $mem_frac "
res=`bc <<< "$mem_frac < 0.2" `
echo "Comparison Result = $res"
if [ "$res" == "1" ]
then
echo "Free memory less than threshold = $mem_threshold"
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches '
fi
......@@ -48,7 +48,7 @@ PRINT_STATS="False"
VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="False"
FORCE_DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="True" #Only valid when lowlatecy flag is set to False
CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
REL="Rel10"
HW="None"
TP="None"
......@@ -306,9 +306,6 @@ function main() {
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_fatal "Define a local radio head (e.g. -w EXMIMO) or a transport protocol (e.g. -t ETHERNET) to communicate with a remote radio head!"
fi
if [ "$HW" != "None" -a "$TP" != "None" ] ; then
echo_fatal "Currently eNB can not support simultaniously local and remote radio heads!!"
fi
if [ "$HW" = "None" ] ; then
echo_info "No radio head has been selected (HW set to $HW)"
fi
......@@ -333,9 +330,9 @@ function main() {
#By default: EXMIMO: enable
if [ "$FORCE_DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
if [ "$HW" = "EXMIMO" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="True"
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "ETHERNET" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="True"
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_USRP" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_BLADERF" ] ; then
......@@ -725,7 +722,9 @@ function main() {
#add exmimo compilation
#TODO EXMIMO library support
compilations \
$build_dir oai_exmimodevif \
liboai_exmimodevif.so $dbin/liboai_exmimodevif.so.$REL
echo_info "liboai_device.so is linked to EXMIMO device library"
elif [ "$HW" == "OAI_USRP" ] ; then
if [ -d "/usr/include/uhd" ] ; then
......
......@@ -179,7 +179,7 @@ install_nettle_from_source() {
cd /tmp
echo "Downloading nettle archive"
$SUDO rm -rf /tmp/nettle-2.5.tar.gz* /tmp/nettle-2.5
wget https://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz
wget http://ftp.nluug.nl/gnu/nettle/nettle-2.5.tar.gz
if [ $? -ne 0 ]; then
wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz
fi
......@@ -284,7 +284,9 @@ check_install_additional_tools (){
wvdial \
python-numpy \
sshpass \
nscd
nscd \
bc \
ntp
$SUDO pip install paramiko
$SUDO pip install pyroute2
......
......@@ -52,7 +52,7 @@
#define print_bytes2(s,x) printf("%s %x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x\n",s,(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],(x)[5],(x)[6],(x)[7],(x)[8],(x)[9],(x)[10],(x)[11],(x)[12],(x)[13],(x)[14],(x)[15],(x)[16],(x)[17],(x)[18],(x)[19],(x)[20],(x)[21],(x)[22],(x)[23],(x)[24],(x)[25],(x)[26],(x)[27],(x)[28],(x)[29],(x)[30],(x)[31])
//#define DEBUG_TURBO_ENCODER 1
#define CALLGRIND 1
//#define CALLGRIND 1
unsigned short threegpplte_interleaver_output;
unsigned long long threegpplte_interleaver_tmp;
......@@ -233,7 +233,7 @@ char interleave_compact_byte(short * base_interleaver,unsigned char * input, uns
loop++;
#endif
for (i=0; i<loop ; i++ ) {
// int cur_byte=i<<3;
// for (b=0;b<8;b++)
......@@ -441,9 +441,11 @@ char interleave_compact_byte(short * base_interleaver,unsigned char * input, uns
int input_length_words=1+((n-1)>>1);
#else
int input_length_words=1+((n-1)>>2);
#endif
#endif
for ( i=0; i< input_length_words ; i ++ ) {
#if defined(__x86_64__) || defined(__i386__)
#ifndef __AVX2__
tmp=_mm_insert_epi8(tmp,expandInput[*ptr_intl++],7);
......@@ -571,6 +573,7 @@ void threegpplte_turbo_encoder(unsigned char *input,
unsigned char systematic2[768] __attribute__((aligned(32)));
interleave_compact_byte(base_interleaver,input,systematic2,input_length_bytes);
#if defined(__x86_64__) || defined(__i386__)
......@@ -584,7 +587,7 @@ void threegpplte_turbo_encoder(unsigned char *input,
for ( state0=state1=i=0 ; i<input_length_bytes; i++ ) {
cur_s1=input[i];
cur_s2=systematic2[i];
for ( code_rate=0; code_rate<3; code_rate++) {
#if defined(__x86_64__) || defined(__i386__)
/*
......@@ -592,6 +595,7 @@ void threegpplte_turbo_encoder(unsigned char *input,
_mm_add_pi8(all_treillis[state0][cur_s1].parity1_64[code_rate],
all_treillis[state1][cur_s2].parity2_64[code_rate]));
*/
*ptr_output++ = _mm_add_pi8(all_treillis[state0][cur_s1].systematic_andp1_64[code_rate],
all_treillis[state1][cur_s2].parity2_64[code_rate]);
......
......@@ -44,6 +44,7 @@
///
///
#undef __AVX2__
#include "PHY/sse_intrin.h"
#ifndef TEST_DEBUG
......
......@@ -132,18 +132,18 @@ void log_map8(llr_t* systematic,
msg("log_map, frame_length %d\n",frame_length);
#endif
start_meas(gamma_stats) ;
if (gamma_stats) start_meas(gamma_stats) ;
compute_gamma8(m11,m10,systematic,y_parity,frame_length,term_flag) ;
stop_meas(gamma_stats);
start_meas(alpha_stats) ;
if (gamma_stats) stop_meas(gamma_stats);
if (alpha_stats) start_meas(alpha_stats) ;
compute_alpha8(alpha,beta,m11,m10,frame_length,F) ;
stop_meas(alpha_stats);
start_meas(beta_stats) ;
if (alpha_stats) stop_meas(alpha_stats);
if (beta_stats) start_meas(beta_stats) ;
compute_beta8(alpha,beta,m11,m10,frame_length,F,offset8_flag) ;
stop_meas(beta_stats);
start_meas(ext_stats) ;
if (beta_stats) stop_meas(beta_stats);
if (ext_stats) start_meas(ext_stats) ;
compute_ext8(alpha,beta,m11,m10,ext,systematic,frame_length) ;
stop_meas(ext_stats);
if (ext_stats) stop_meas(ext_stats);
}
......@@ -963,7 +963,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
}
start_meas(init_stats);
if (init_stats) start_meas(init_stats);
if ((n&15)>0) {
......@@ -1326,7 +1326,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
msg("\n");
#endif //DEBUG_LOGMAP
stop_meas(init_stats);
if (init_stats) stop_meas(init_stats);
// do log_map from first parity bit
......@@ -1338,7 +1338,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
printf("\n*******************ITERATION %d (n %d, n2 %d), ext %p\n\n",iteration_cnt,n,n2,ext);
#endif //DEBUG_LOGMAP
start_meas(intl1_stats);
if (intl1_stats) start_meas(intl1_stats);
pi4_p=pi4tab8[iind];
for (i=0; i<(n2>>4); i++) { // steady-state portion
......@@ -1379,7 +1379,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
#endif
}
stop_meas(intl1_stats);
if (intl1_stats) stop_meas(intl1_stats);
// do log_map from second parity bit
......@@ -1484,7 +1484,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
// Check if we decoded the block
if (iteration_cnt>1) {
start_meas(intl2_stats);
if (intl2_stats) start_meas(intl2_stats);
if ((n2&0x7f) == 0) { // n2 is a multiple of 128 bits
......@@ -1623,7 +1623,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
break;
}
stop_meas(intl2_stats);
if (intl2_stats) stop_meas(intl2_stats);
if ((crc == oldcrc) && (crc!=0)) {
return(iteration_cnt);
......
......@@ -53,7 +53,7 @@ uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w)
{
uint32_t RTC = (D>>5), ND, ND3;
uint32_t row,col,Kpi,index;
uint32_t row,col,Kpi;
uint32_t index3,k,k2;
#ifdef RM_DEBUG
uint32_t nulled=0;
......@@ -84,7 +84,6 @@ uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w)
#ifdef RM_DEBUG
printf("Col %d\n",col);
#endif
index = bitrev[col];
index3 = bitrev_x3[col];//3*index;
for (row=0; row<RTC; row++) {
......@@ -108,10 +107,7 @@ uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w)
#endif
index3+=96;
index+=32;
k++;
k2++;
k2++;
k++;k2+=2;
}
}
......@@ -522,7 +518,8 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
// if (rvidx==3)
// for (cnt=0;cnt<Ncb;cnt++)
// counter_buffer[rvidx][cnt]=0;
AssertFatal(Ncb>=(3*RTC<<5),"Exiting, RM condition (Ncb %d, Nir/C %d, Nsoft %d, Kw %d\n",Ncb,Nir/C,Nsoft,3*(RTC<<5));
if (Ncb>(3*(RTC<<5)))
AssertFatal(1==0,"Exiting, RM condition (Ncb %d, RTC %d, Nir/C %d, Nsoft %d, Kw %d)\n",Ncb,RTC,Nir/C,Nsoft,3*(RTC<<5));
Gp = G/Nl/Qm;
......
......@@ -153,7 +153,7 @@ int lte_segmentation(unsigned char *input_buffer,
while (k<((Kr - L)>>3)) {
output_buffers[r][k] = input_buffer[s];
// printf("encoding segment %d : byte %d => %d\n",r,k,input_buffer[s]);
// printf("encoding segment %d : byte %d (%d) => %d\n",r,k,Kr>>3,input_buffer[s]);
k++;
s++;
}
......
......@@ -31,7 +31,7 @@
#include "PHY/defs.h"
#ifdef OPENAIR_LTE
#include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
......@@ -41,18 +41,6 @@
#ifdef Rel10
#include "SCellToAddMod-r10.h"
#endif
#else
/**
\fn int phy_init(unsigned char nb_antennas_tx)
\brief Allocate and Initialize the PHY variables after receiving static configuration
@param nb_antennas_tx Number of TX antennas
*/
int phy_init(unsigned char nb_antennas_tx);
#endif
#ifdef OPENAIR_LTE
/** @addtogroup _PHY_STRUCTURES_
* @{
*/
......@@ -85,7 +73,6 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
\details Only a subset of phy_vars_eNb is initialized.
@param[out] phy_vars_eNb Pointer to eNB Variables
@param is_secondary_eNb Flag to indicate this eNB gets synch from another
@param cooperation_flag 0 for no cooperation, 1 for Delay Diversity and 2 for Distributed Alamouti
@param abstraction_flag 1 indicates memory should be allocated for abstracted MODEM
@returns 0 on success
@returns -1 if any memory allocation failed
......@@ -93,7 +80,6 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
*/
int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNb,
unsigned char is_secondary_eNb,
unsigned char cooperation_flag,
unsigned char abstraction_flag);
/** \brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB decoding + primary/secondary synch).
......@@ -337,17 +323,28 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
int CC_id);
#endif
#endif
/*! !\fn void phy_cleanup(void)
\brief Cleanup the PHY variables*/
void phy_cleanup(void);
#ifdef OPENAIR_LTE
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
#endif
void lte_param_init(unsigned char N_tx,
unsigned char N_rx,
unsigned char transmission_mode,
uint8_t extended_prefix_flag,
frame_t frame_type,
uint16_t Nid_cell,
uint8_t tdd_config,
uint8_t N_RB_DL,
uint8_t threequarter_fs,
uint8_t osf,
uint32_t perfect_ce);
/** @} */
#endif
......
......@@ -45,7 +45,7 @@
*/
//#define DEBUG_PHY
t
/*
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -9,8 +9,8 @@
#include "PHY/defs.h"
#include "PHY/extern.h"
extern PHY_VARS_eNB *PHY_vars_eNB;
extern PHY_VARS_UE *PHY_vars_UE;
extern PHY_VARS_eNB *eNB;
extern PHY_VARS_UE *UE;
void lte_param_init(unsigned char N_tx,
unsigned char N_rx,
......@@ -25,13 +25,14 @@ void lte_param_init(unsigned char N_tx,
uint32_t perfect_ce)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
LTE_DL_FRAME_PARMS *frame_parms;
int i;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
eNB = malloc(sizeof(PHY_VARS_eNB));
UE = malloc(sizeof(PHY_VARS_UE));
memset((void*)eNB,0,sizeof(PHY_VARS_eNB));
memset((void*)UE,0,sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
......@@ -39,69 +40,68 @@ void lte_param_init(unsigned char N_tx,
randominit(0);
set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->threequarter_fs = threequarter_fs;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Ncp_UL = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->nb_antennas_tx_eNB = (transmission_mode == 1)? 1 : 2;
lte_frame_parms->phich_config_common.phich_resource = oneSixth;
lte_frame_parms->phich_config_common.phich_duration = normal;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;44
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
// phy_init_top(lte_frame_parms); //allocation
PHY_vars_UE->is_secondary_ue = 0;
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
phy_init_lte_top(lte_frame_parms);
dump_frame_parms(lte_frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=0;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
frame_parms = &(eNB->frame_parms);
frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
frame_parms->N_RB_UL = N_RB_DL;
frame_parms->threequarter_fs = threequarter_fs;
frame_parms->Ncp = extended_prefix_flag;
frame_parms->Ncp_UL = extended_prefix_flag;
frame_parms->Nid_cell = Nid_cell;
frame_parms->nushift = Nid_cell%6;
frame_parms->nb_antennas_tx = N_tx;
frame_parms->nb_antennas_rx = N_rx;
frame_parms->nb_antennas_tx_eNB = N_tx;
frame_parms->phich_config_common.phich_resource = oneSixth;
frame_parms->phich_config_common.phich_duration = normal;
frame_parms->tdd_config = tdd_config;
frame_parms->frame_type = frame_type;