Commit dec41a2a authored by Cedric Roux's avatar Cedric Roux

Merge branch 'develop_integration_w02' into 'develop'

Develop integration w02

See merge request !82
parents 8d3368b7 0af4c170
...@@ -37,11 +37,6 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}) ...@@ -37,11 +37,6 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
project (OpenAirInterface) project (OpenAirInterface)
#add_definitions("-DEMIT_ASN_DEBUG=1")
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms7002m lms7002m)
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR lmsSDR)
add_subdirectory(${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/Si5351C Si5351C)
########################################### ###########################################
# macros to define options as there is numerous options in oai # macros to define options as there is numerous options in oai
################################################ ################################################
...@@ -512,7 +507,7 @@ set(HWLIB_BLADERF_SOURCE ...@@ -512,7 +507,7 @@ set(HWLIB_BLADERF_SOURCE
add_library(oai_bladerfdevif MODULE ${HWLIB_BLADERF_SOURCE} ) add_library(oai_bladerfdevif MODULE ${HWLIB_BLADERF_SOURCE} )
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/") include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/")
set (option_HWLMSSDRLIB_lib "-l LMS_SDR -l LMS7002M -l Si5351C")
set(HWLIB_LMSSDR_SOURCE set(HWLIB_LMSSDR_SOURCE
${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
) )
...@@ -559,16 +554,12 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF") ...@@ -559,16 +554,12 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR") elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB") include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms7002m")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/Si5351C")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lmsSDR/LMS_StreamBoard")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu") LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lmsSDR") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lmsSDR")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lms7002m") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lms7002m")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/Si5351C") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/Si5351C")
set(HW_SOURCE ${HW_SOURCE} ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp) set(HW_SOURCE ${HW_SOURCE} ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp)
set(option_HW_lib "-lLMS_SDR -lLMS7002M -lSi5351C -rdynamic -ldl") set(option_HW_lib "-lLimeSuite -rdynamic -ldl")
elseif (${RF_BOARD} STREQUAL "CPRIGW") elseif (${RF_BOARD} STREQUAL "CPRIGW")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
...@@ -1845,14 +1836,6 @@ Message("-- HW_SOURCE=${HW_SOURCE}") ...@@ -1845,14 +1836,6 @@ Message("-- HW_SOURCE=${HW_SOURCE}")
Message("-- option_TP_lib=${option_TP_lib}") Message("-- option_TP_lib=${option_TP_lib}")
Message("-- TRANSPORT_SOURCE=${TRANSPORT_SOURCE}") Message("-- TRANSPORT_SOURCE=${TRANSPORT_SOURCE}")
if (${RF_BOARD} STREQUAL "OAI_LMSSDR")
add_dependencies(lte-softmodem LMS7002M LMS_SDR Si5351C)
add_dependencies(lte-softmodem-nos1 LMS7002M LMS_SDR Si5351C)
add_dependencies(rrh_gw LMS7002M LMS_SDR Si5351C)
endif (${RF_BOARD} STREQUAL "OAI_LMSSDR")
# USIM process # USIM process
################# #################
#add_executable(usim #add_executable(usim
......
#!/bin/bash
#WARNING: this file may not work properly, be sure to know what you
#do when using it
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
################################################################################
# file init_nas_s1
# brief loads the ue_ip module and sets up IP for the UE
# you may want to edit it to fit your settings (replace oip0 by oipX for
# instance)
# author Florian Kaltenberger
#
#######################################
LTEIF=oip0
#OPENAIR_DIR=/home/oai/svn-oai/openair4G
load_module() {
mod_name=${1##*/}
mod_name=${mod_name%.*}
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
then
echo "module $mod_name already loaded: I remove it first"
sudo rmmod $mod_name
fi
echo loading $mod_name
sudo insmod $1
}
load_module $OPENAIR_DIR/targets/bin/ue_ip.ko
if [ "$1" = "UE" ]; then
echo "bring up oip0 interface for UE"
ifconfig oip0 up
fi
ip route flush cache
sleep 1
sysctl -w net.ipv4.conf.all.log_martians=1
echo "Disabling reverse path filtering"
sysctl -w net.ipv4.conf.all.rp_filter=0
ip route flush cache
# Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then
echo "200 lte " >> /etc/iproute2/rt_tables
fi
ip rule add fwmark 1 table lte
ip route add default dev $LTEIF table lte
...@@ -71,7 +71,5 @@ typedef struct { ...@@ -71,7 +71,5 @@ typedef struct {
#define INSTANCE_DEFAULT (UINT16_MAX - 1) #define INSTANCE_DEFAULT (UINT16_MAX - 1)
#define INSTANCE_ALL (UINT16_MAX) #define INSTANCE_ALL (UINT16_MAX)
typedef uint16_t instance_t;
#endif #endif
...@@ -211,7 +211,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id, ...@@ -211,7 +211,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
fp->MBSFN_config[i].fourFrames_flag = 0; fp->MBSFN_config[i].fourFrames_flag = 0;
fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %ld\n", i, LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
fp->MBSFN_config[i].mbsfn_SubframeConfig); fp->MBSFN_config[i].mbsfn_SubframeConfig);
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration } else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
fp->MBSFN_config[i].fourFrames_flag = 1; fp->MBSFN_config[i].fourFrames_flag = 1;
...@@ -220,7 +220,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id, ...@@ -220,7 +220,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)| (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16); (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16);
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %ld\n", i, LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
fp->MBSFN_config[i].mbsfn_SubframeConfig); fp->MBSFN_config[i].mbsfn_SubframeConfig);
} }
} }
...@@ -331,7 +331,7 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id, ...@@ -331,7 +331,7 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
fp->MBSFN_config[i].fourFrames_flag = 0; fp->MBSFN_config[i].fourFrames_flag = 0;
fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %ld\n", i, LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
fp->MBSFN_config[i].mbsfn_SubframeConfig); fp->MBSFN_config[i].mbsfn_SubframeConfig);
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration } else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
fp->MBSFN_config[i].fourFrames_flag = 1; fp->MBSFN_config[i].fourFrames_flag = 1;
...@@ -340,7 +340,7 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id, ...@@ -340,7 +340,7 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)| (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16); (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]<<16);
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %ld\n", i, LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
fp->MBSFN_config[i].mbsfn_SubframeConfig); fp->MBSFN_config[i].mbsfn_SubframeConfig);
} }
} }
...@@ -357,7 +357,7 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_ ...@@ -357,7 +357,7 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][CC_id]->frame_parms; LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][CC_id]->frame_parms;
LOG_I(PHY,"[UE%d] Applying MBSFN_Area_id %d for index %d\n",Mod_id,mbsfn_AreaId_r9,mbsfn_Area_idx); LOG_I(PHY,"[UE%d] Applying MBSFN_Area_id %ld for index %d\n",Mod_id,mbsfn_AreaId_r9,mbsfn_Area_idx);
if (mbsfn_Area_idx == 0) { if (mbsfn_Area_idx == 0) {
fp->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9; fp->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9;
...@@ -376,7 +376,7 @@ void phy_config_sib13_eNB(uint8_t Mod_id,int CC_id,int mbsfn_Area_idx, ...@@ -376,7 +376,7 @@ void phy_config_sib13_eNB(uint8_t Mod_id,int CC_id,int mbsfn_Area_idx,
LTE_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms; LTE_DL_FRAME_PARMS *fp = &PHY_vars_eNB_g[Mod_id][CC_id]->frame_parms;
LOG_I(PHY,"[eNB%d] Applying MBSFN_Area_id %d for index %d\n",Mod_id,mbsfn_AreaId_r9,mbsfn_Area_idx); LOG_I(PHY,"[eNB%d] Applying MBSFN_Area_id %ld for index %d\n",Mod_id,mbsfn_AreaId_r9,mbsfn_Area_idx);
if (mbsfn_Area_idx == 0) { if (mbsfn_Area_idx == 0) {
fp->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9; fp->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9;
...@@ -398,7 +398,7 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB) ...@@ -398,7 +398,7 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
physicalConfigDedicated = eNB->physicalConfigDedicated[UE_id]; physicalConfigDedicated = eNB->physicalConfigDedicated[UE_id];
if (physicalConfigDedicated != NULL) { if (physicalConfigDedicated != NULL) {
LOG_I(PHY,"[eNB %d] Frame %d: Sent physicalConfigDedicated=%p for UE %d\n",eNB->Mod_id,physicalConfigDedicated,UE_id); LOG_I(PHY,"[eNB %d] Sent physicalConfigDedicated=%p for UE %d\n",eNB->Mod_id,physicalConfigDedicated,UE_id);
LOG_D(PHY,"------------------------------------------------------------------------\n"); LOG_D(PHY,"------------------------------------------------------------------------\n");
if (physicalConfigDedicated->pdsch_ConfigDedicated) { if (physicalConfigDedicated->pdsch_ConfigDedicated) {
...@@ -653,7 +653,7 @@ void phy_config_dedicated_eNB(uint8_t Mod_id, ...@@ -653,7 +653,7 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
int8_t UE_id = find_ue(rnti,eNB); int8_t UE_id = find_ue(rnti,eNB);
if (UE_id == -1) { if (UE_id == -1) {
LOG_E( PHY, "[eNB %"PRIu8"] find_ue() returns -1\n"); LOG_E( PHY, "[eNB %"PRIu8"] find_ue() returns -1\n", Mod_id);
return; return;
} }
...@@ -725,13 +725,13 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, ...@@ -725,13 +725,13 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
if ((dl_CarrierFreq_r10>=36000) && (dl_CarrierFreq_r10<=36199)) { if ((dl_CarrierFreq_r10>=36000) && (dl_CarrierFreq_r10<=36199)) {
carrier_freq_local = 1900000000 + (dl_CarrierFreq_r10-36000)*100000; //band 33 from 3GPP 36.101 v 10.9 Table 5.7.3-1 carrier_freq_local = 1900000000 + (dl_CarrierFreq_r10-36000)*100000; //band 33 from 3GPP 36.101 v 10.9 Table 5.7.3-1
LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id); LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %ld) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id);
} else if ((dl_CarrierFreq_r10>=6150) && (dl_CarrierFreq_r10<=6449)) { } else if ((dl_CarrierFreq_r10>=6150) && (dl_CarrierFreq_r10<=6449)) {
carrier_freq_local = 832000000 + (dl_CarrierFreq_r10-6150)*100000; //band 20 from 3GPP 36.101 v 10.9 Table 5.7.3-1 carrier_freq_local = 832000000 + (dl_CarrierFreq_r10-6150)*100000; //band 20 from 3GPP 36.101 v 10.9 Table 5.7.3-1
// this is actually for the UL only, but we use it for DL too, since there is no TDD mode for this band // this is actually for the UL only, but we use it for DL too, since there is no TDD mode for this band
LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id); LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %ld) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id);
} else { } else {
LOG_E(PHY,"[eNB %d] Frame %d: ARFCN %d of SCell %d for UE %d not supported\n",Mod_id,/*eNB->frame*/0,dl_CarrierFreq_r10,CC_id,UE_id); LOG_E(PHY,"[eNB %d] Frame %d: ARFCN %ld of SCell %d for UE %d not supported\n",Mod_id,/*eNB->frame*/0,dl_CarrierFreq_r10,CC_id,UE_id);
} }
if (physicalConfigDedicatedSCell_r10) { if (physicalConfigDedicatedSCell_r10) {
......
This diff is collapsed.
...@@ -118,7 +118,6 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_ ...@@ -118,7 +118,6 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
unsigned char exit_flag = 0,i,j,r,aa,layer; unsigned char exit_flag = 0,i,j,r,aa,layer;
int re; int re;
unsigned char bw_scaling =1; unsigned char bw_scaling =1;
uint8_t nb_antennas_tx = frame_parms->nb_antennas_tx;
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: case 6:
......
...@@ -121,7 +121,7 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -121,7 +121,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
break; break;
default: default:
LOG_E(PHY,"[UE %d][FATAL] Frame %d subframe %d: Unknown PDSCH format %d\n",ue->proc.proc_rxtx[0].frame_rx,subframe,type); LOG_E(PHY,"[UE][FATAL] Frame %d subframe %d: Unknown PDSCH format %d\n",ue->proc.proc_rxtx[0].frame_rx,subframe,type);
return(-1); return(-1);
break; break;
} }
......
...@@ -595,7 +595,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -595,7 +595,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
int use2ndpilots = (frame_parms->mode1_flag==1)?1:0; int use2ndpilots = (frame_parms->mode1_flag==1)?1:0;
uint32_t tti_offset,aa; uint32_t tti_offset; //,aa;
uint8_t re; uint8_t re;
uint8_t qam64_table_offset_re = 0; uint8_t qam64_table_offset_re = 0;
uint8_t qam64_table_offset_im = 0; uint8_t qam64_table_offset_im = 0;
......
...@@ -1393,7 +1393,7 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1393,7 +1393,7 @@ void rx_phich(PHY_VARS_UE *ue,
} }
} else { } else {
//#ifdef DEBUG_PHICH //#ifdef DEBUG_PHICH
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d\n", LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d (Mlimit %d)\n",
ue->Mod_id,harq_pid, ue->Mod_id,harq_pid,
proc->frame_rx, proc->frame_rx,
subframe, subframe,
......
...@@ -555,6 +555,7 @@ void generate_pucch2x(int32_t **txdataF, ...@@ -555,6 +555,7 @@ void generate_pucch2x(int32_t **txdataF,
N_UL_symb = (fp->Ncp==0) ? 7 : 6; N_UL_symb = (fp->Ncp==0) ? 7 : 6;
data_ind = 0; data_ind = 0;
zptr = z; zptr = z;
nprime = 0;
for (ns=(subframe<<1),u=u0,v=v0; ns<(2+(subframe<<1)); ns++,u=u1,v=v1) { for (ns=(subframe<<1),u=u0,v=v0; ns<(2+(subframe<<1)); ns++,u=u1,v=v1) {
if ((ns&1) == 0) if ((ns&1) == 0)
......
...@@ -190,7 +190,7 @@ LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag) ...@@ -190,7 +190,7 @@ LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag)
return(ulsch); return(ulsch);
} }
LOG_E(PHY,"new_ue_ulsch exit flag, size of %d , %d\n",exit_flag, sizeof(LTE_UE_ULSCH_t)); LOG_E(PHY,"new_ue_ulsch exit flag, size of %d , %zu\n",exit_flag, sizeof(LTE_UE_ULSCH_t));
free_ue_ulsch(ulsch); free_ue_ulsch(ulsch);
return(NULL); return(NULL);
...@@ -234,7 +234,7 @@ uint32_t ulsch_encoding(uint8_t *a, ...@@ -234,7 +234,7 @@ uint32_t ulsch_encoding(uint8_t *a,
PHY_MEASUREMENTS *meas = &ue->measurements; PHY_MEASUREMENTS *meas = &ue->measurements;
LTE_UE_ULSCH_t *ulsch=ue->ulsch[eNB_id]; LTE_UE_ULSCH_t *ulsch=ue->ulsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id]; LTE_UE_DLSCH_t **dlsch = ue->dlsch[eNB_id];
uint16_t rnti; uint16_t rnti = 0xffff;
if (!ulsch) { if (!ulsch) {
LOG_E(PHY,"Null ulsch ptr %p\n",ulsch); LOG_E(PHY,"Null ulsch ptr %p\n",ulsch);
......
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs){ int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coeffs){
FILE *calibF_fd; FILE *calibF_fd;
int i,j,l,calibF_e; int i,j,calibF_e;
calibF_fd = fopen(calibF_fname,"r"); calibF_fd = fopen(calibF_fname,"r");
...@@ -14,7 +15,7 @@ int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coef ...@@ -14,7 +15,7 @@ int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coef
for(i=0;i<nb_ant;i++){ for(i=0;i<nb_ant;i++){
for(j=0;j<nb_freq*2;j++){ for(j=0;j<nb_freq*2;j++){
fscanf(calibF_fd, "%d", &calibF_e); if (fscanf(calibF_fd, "%d", &calibF_e) != 1) abort();
tdd_calib_coeffs[i][j] = (int16_t)calibF_e; tdd_calib_coeffs[i][j] = (int16_t)calibF_e;
} }
} }
...@@ -22,11 +23,15 @@ int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coef ...@@ -22,11 +23,15 @@ int f_read(char *calibF_fname, int nb_ant, int nb_freq, int32_t **tdd_calib_coef
printf("%d\n",(int)tdd_calib_coeffs[1][599]); printf("%d\n",(int)tdd_calib_coeffs[1][599]);
} else } else
printf("%s not found, running with defaults\n",calibF_fname); printf("%s not found, running with defaults\n",calibF_fname);
/* TODO: what to return? is this code used at all? */
return 0;
} }
int estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_estimates, int32_t **tdd_calib_coeffs, int nb_ant, int nb_freq) { int estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_estimates, int32_t **tdd_calib_coeffs, int nb_ant, int nb_freq) {
/* TODO: what to return? is this code used at all? */
return 0;
} }
...@@ -44,6 +49,8 @@ int compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates, ...@@ -44,6 +49,8 @@ int compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates,
default : default :
break; break;
} }
/* TODO: what to return? is this code used at all? */
return 0;
} }
// temporal test function // temporal test function
......
...@@ -124,7 +124,6 @@ static inline void* malloc16_clear( size_t size ) ...@@ -124,7 +124,6 @@ static inline void* malloc16_clear( size_t size )
#include "PHY/TOOLS/defs.h" #include "PHY/TOOLS/defs.h"
#include "platform_types.h" #include "platform_types.h"
#define OPENAIR_LTE
#ifdef OPENAIR_LTE #ifdef OPENAIR_LTE
#include "PHY/LTE_TRANSPORT/defs.h" #include "PHY/LTE_TRANSPORT/defs.h"
......
...@@ -788,7 +788,7 @@ void generate_eNB_dlsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC ...@@ -788,7 +788,7 @@ void generate_eNB_dlsch_params(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,DCI_ALLOC
eNB->dlsch[(uint8_t)UE_id][0]->nCCE[subframe] = dci_alloc->firstCCE; eNB->dlsch[(uint8_t)UE_id][0]->nCCE[subframe] = dci_alloc->firstCCE;
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for ue DCI (PDSCH %"PRIx16") => %"PRIu8"/%u\n",eNB->Mod_id,frame,subframe, LOG_D(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for ue DCI (PDSCH %"PRIx16") => %"PRIu8"\n",eNB->Mod_id,frame,subframe,
dci_alloc->rnti,eNB->dlsch[(uint8_t)UE_id][0]->nCCE[subframe]); dci_alloc->rnti,eNB->dlsch[(uint8_t)UE_id][0]->nCCE[subframe]);
#if defined(SMBV) #if defined(SMBV)
...@@ -900,7 +900,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d ...@@ -900,7 +900,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,LTE_eNB_DLSCH_t *d
int i; int i;
LOG_D(PHY, LOG_D(PHY,
"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH with input size = %"PRIu16", G %d, nb_rb %"PRIu16", mcs %"PRIu8", pmi_alloc %"PRIx16", rv %"PRIu8" (round %"PRIu8")\n", "[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH with input size = %"PRIu16", G %d, nb_rb %"PRIu16", mcs %"PRIu8", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
eNB->Mod_id, dlsch->rnti,harq_pid, eNB->Mod_id, dlsch->rnti,harq_pid,
frame, subframe, input_buffer_length, frame, subframe, input_buffer_length,
get_G(fp, get_G(fp,
...@@ -2784,7 +2784,7 @@ void do_prach(PHY_VARS_eNB *eNB) { ...@@ -2784,7 +2784,7 @@ void do_prach(PHY_VARS_eNB *eNB) {
// wake up thread for PRACH RX // wake up thread for PRACH RX
if (pthread_mutex_lock(&proc->mutex_prach) != 0) { if (pthread_mutex_lock(&proc->mutex_prach) != 0) {
LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB PRACH thread %d (IC %d)\n", proc->instance_cnt_prach ); LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB PRACH thread %d (IC %d)\n", proc->thread_index, proc->instance_cnt_prach);
exit_fun( "error locking mutex_prach" ); exit_fun( "error locking mutex_prach" );
return; return;
} }
......
...@@ -346,7 +346,9 @@ void process_timing_advance_rar(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint16_t ti ...@@ -346,7 +346,9 @@ void process_timing_advance_rar(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint16_t ti
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_I(PHY,"[UE %d] AbsoluteSubFrame %d.%d, received (rar) timing_advance %d, HW timing advance %d\n",ue->Mod_id,proc->frame_rx, proc->subframe_rx, ue->timing_advance); /* TODO: fix this log, what is 'HW timing advance'? */
/*LOG_I(PHY,"[UE %d] AbsoluteSubFrame %d.%d, received (rar) timing_advance %d, HW timing advance %d\n",ue->Mod_id,proc->frame_rx, proc->subframe_rx, ue->timing_advance);*/
LOG_I(PHY,"[UE %d] AbsoluteSubFrame %d.%d, received (rar) timing_advance %d\n",ue->Mod_id,proc->frame_rx, proc->subframe_rx, ue->timing_advance);
#endif #endif
} }
...@@ -938,7 +940,7 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue, ...@@ -938,7 +940,7 @@ uint16_t get_n1_pucch(PHY_VARS_UE *ue,
} // switch tdd_config } // switch tdd_config
} }
LOG_E(PHY,"[UE%d] : Frame %d phy_procedures_lte.c: get_n1pucch, exit without proper return\n",proc->frame_tx); LOG_E(PHY,"[UE%d] : Frame %d phy_procedures_lte.c: get_n1pucch, exit without proper return\n", ue->Mod_id, proc->frame_tx);
return(-1); return(-1);
} }
...@@ -1154,7 +1156,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -1154,7 +1156,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
frame_tx, frame_tx,
eNB_id, eNB_id,
subframe_tx); subframe_tx);
LOG_D(PHY,"Got prach_resources for eNB %d address %d, RRCCommon %d\n",eNB_id,ue->prach_resources[eNB_id],UE_mac_inst[ue->Mod_id].radioResourceConfigCommon); LOG_D(PHY,"Got prach_resources for eNB %d address %p, RRCCommon %p\n",eNB_id,ue->prach_resources[eNB_id],UE_mac_inst[ue->Mod_id].radioResourceConfigCommon);
LOG_D(PHY,"Prach resources %p\n",ue->prach_resources[eNB_id]); LOG_D(PHY,"Prach resources %p\n",ue->prach_resources[eNB_id]);
} }
} }
...@@ -1370,7 +1372,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1370,7 +1372,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
LOG_D(PHY,"Generating PUSCH (Abssubframe: %d.%d): harq-Id: %d, round: %d, MaxReTrans: %d \n",frame_tx,subframe_tx,harq_pid,ue->ulsch[eNB_id]->harq_processes[harq_pid]->round,ue->ulsch[eNB_id]->Mlimit); LOG_D(PHY,"Generating PUSCH (Abssubframe: %d.%d): harq-Id: %d, round: %d, MaxReTrans: %d \n",frame_tx,subframe_tx,harq_pid,ue->ulsch[eNB_id]->harq_processes[harq_pid]->round,ue->ulsch[eNB_id]->Mlimit);
if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->round >= (ue->ulsch[eNB_id]->Mlimit - 1)) if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->round >= (ue->ulsch[eNB_id]->Mlimit - 1))
{ {
LOG_D(PHY,"PUSCH MAX Retransmission acheived ==> send last pusch (%d) \n"); LOG_D(PHY,"PUSCH MAX Retransmission achieved ==> send last pusch\n");
ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 0; ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 0;
ue->ulsch[eNB_id]->harq_processes[harq_pid]->round = 0; ue->ulsch[eNB_id]->harq_processes[harq_pid]->round = 0;
} }
...@@ -1813,7 +1815,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -1813,7 +1815,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
T_INT(tx_amp),T_INT(ue->dlsch[eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id))); T_INT(tx_amp),T_INT(ue->dlsch[eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id)));
#endif #endif
if (SR_payload>0) { if (SR_payload>0) {
LOG_D(PHY,"[UE %d][SR %x] Frame %d subframe %d Generating PUCCH %s payload %d,%d (with SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH, amp %d\n", LOG_D(PHY,"[UE %d][SR %x] Frame %d subframe %d Generating PUCCH %s payload %d,%d (with SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d, amp %d\n",
Mod_id, Mod_id,
ue->dlsch[eNB_id][0]->rnti, ue->dlsch[eNB_id][0]->rnti,
frame_tx % 1024, subframe_tx, frame_tx % 1024, subframe_tx,
...@@ -2056,7 +2058,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui ...@@ -2056,7 +2058,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
int32_t ulsch_start=0; //int32_t ulsch_start=0;
int subframe_tx = proc->subframe_tx; int subframe_tx = proc->subframe_tx;
int frame_tx = proc->frame_tx; int frame_tx = proc->frame_tx;
unsigned int aa; unsigned int aa;
...@@ -2571,7 +2573,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin ...@@ -2571,7 +2573,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
} else if (((frame_tx & 0x03FF) != (proc->frame_rx & 0x03FF))) { } else if (((frame_tx & 0x03FF) != (proc->frame_rx & 0x03FF))) {
//(pbch_tx_ant != ue->frame_parms.nb_antennas_tx)) { //(pbch_tx_ant != ue->frame_parms.nb_antennas_tx)) {
LOG_D(PHY,"[UE %d] frame %d, subframe %d: Re-adjusting frame counter (PBCH ant_tx=%d, frame_rx=%d, frame%1024=%d, phase %d).\n", LOG_D(PHY,"[UE %d] frame %d, subframe %d: Re-adjusting frame counter (PBCH ant_tx=%d, frame_rx=%d, frame%%1024=%d, phase %d).\n",
ue->Mod_id, ue->Mod_id,
proc->frame_rx, proc->frame_rx,
subframe_rx, subframe_rx,
...@@ -3123,7 +3125,8 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs ...@@ -3123,7 +3125,8 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
ue->dlsch_mtch_errors[sync_area][0]++; ue->dlsch_mtch_errors[sync_area][0]++;
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: PMCH in error (%d,%d), not passing to L2 (TBS %d, iter %d,G %d)\n", LOG_D(PHY,"[UE %d] Frame %d, subframe %d: PMCH in error (%d,%d), not passing to L2 (TBS %d, iter %d,G %d)\n",
frame_rx,subframe_rx, ue->Mod_id,
frame_rx,subframe_rx,
ue->dlsch_mcch_errors[sync_area][0], ue->dlsch_mcch_errors[sync_area][0],
ue->dlsch_mtch_errors[sync_area][0], ue->dlsch_mtch_errors[sync_area][0],
ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3, ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3,
...@@ -3185,7 +3188,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC ...@@ -3185,7 +3188,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
if (dlsch0 && (!dlsch1)) { if (dlsch0 && (!dlsch1)) {
harq_pid = dlsch0->current_harq_pid; harq_pid = dlsch0->current_harq_pid;
LOG_D(PHY,"[UE %d] PDSCH active in subframe %d (%d), harq_pid %d\n",ue->Mod_id,subframe_rx,harq_pid); LOG_D(PHY,"[UE %d] PDSCH active in subframe %d, harq_pid %d\n",ue->Mod_id,subframe_rx,harq_pid);
if ((pdsch==PDSCH) && if ((pdsch==PDSCH) &&
(ue->transmission_mode[eNB_id] == 5) && (ue->transmission_mode[eNB_id] == 5) &&
...@@ -3574,7 +3577,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3574,7 +3577,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[%s %d] Frame %d subframe %d: Doing phy_procedures_UE_RX (%d)\n", LOG_D(PHY,"[%s %d] Frame %d subframe %d: Doing phy_procedures_UE_RX\n",