Commit bc9c587b authored by Raymond Knopp's avatar Raymond Knopp

Merge remote-tracking branch 'origin/develop' into RU-RAU-split

Conflicts:
	openair1/PHY/INIT/lte_init.c
	openair1/PHY/LTE_ESTIMATION/defs.h
	openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
	openair1/PHY/LTE_TRANSPORT/dci.c
	openair1/PHY/LTE_TRANSPORT/dci_tools.c
	openair1/PHY/LTE_TRANSPORT/defs.h
	openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
	openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
	openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
	openair1/PHY/LTE_TRANSPORT/if5_tools.c
	openair1/PHY/LTE_TRANSPORT/phich.c
	openair1/PHY/LTE_TRANSPORT/proto.h
	openair1/PHY/defs.h
	openair1/SCHED/phy_procedures_lte_eNb.c
	openair1/SCHED/phy_procedures_lte_ue.c
	openair1/SCHED/pusch_pc.c
	openair2/ENB_APP/enb_config.c
	openair2/LAYER2/MAC/defs.h
	openair2/LAYER2/MAC/eNB_scheduler.c
	openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
	openair2/LAYER2/MAC/eNB_scheduler_primitives.c
	openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
	openair2/LAYER2/MAC/pre_processor.c
	openair2/LAYER2/MAC/ue_procedures.c
	targets/RT/USER/lte-enb.c
	targets/RT/USER/lte-softmodem.c
	targets/RT/USER/lte-softmodem.h
	targets/RT/USER/lte-ue.c
	targets/SIMU/USER/init_lte.c
	targets/SIMU/USER/oaisim_functions.c
parents 7e9bff37 1fb76157
...@@ -2,8 +2,6 @@ job1: ...@@ -2,8 +2,6 @@ job1:
script: script:
- date - date
- pwd - pwd
- echo $OAI_USER
- echo $OAI_PASS
- echo $OAI_TEST_CASE_GROUP - echo $OAI_TEST_CASE_GROUP
- echo $MACHINELIST - echo $MACHINELIST
- echo $MACHINELISTGENERIC - echo $MACHINELISTGENERIC
......
...@@ -237,6 +237,9 @@ add_boolean_option(XFORMS False "This adds the possibility to see t ...@@ -237,6 +237,9 @@ add_boolean_option(XFORMS False "This adds the possibility to see t
add_boolean_option(PRINT_STATS False "This adds the possibility to see the status") add_boolean_option(PRINT_STATS False "This adds the possibility to see the status")
add_boolean_option(T_TRACER False "Activate the T tracer, a debugging/monitoring framework" ) add_boolean_option(T_TRACER False "Activate the T tracer, a debugging/monitoring framework" )
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs") add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs")
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
...@@ -542,6 +545,19 @@ set(TPLIB_ETHERNET_SOURCE ...@@ -542,6 +545,19 @@ set(TPLIB_ETHERNET_SOURCE
) )
add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} ) add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} )
include_directories("${OPENAIR_TARGETS}/ARCH/mobipass/")
set(TPLIB_MOBIPASS_SOURCE
${OPENAIR_TARGETS}/ARCH/mobipass/interface.c
${OPENAIR_TARGETS}/ARCH/mobipass/mobipass.c
${OPENAIR_TARGETS}/ARCH/mobipass/queues.c
)
add_library(oai_mobipass MODULE ${TPLIB_MOBIPASS_SOURCE} )
# Hide all functions/variables in the mobipass library.
# Use __attribute__((__visibility__("default")))
# in the source code to unhide a function/variable.
get_target_property(mobipas_cflags oai_mobipass COMPILE_FLAGS)
set_target_properties(oai_mobipass PROPERTIES COMPILE_FLAGS "${mobipass_cflags} -fvisibility=hidden")
########################################################## ##########################################################
...@@ -1651,9 +1667,25 @@ else() ...@@ -1651,9 +1667,25 @@ else()
endif() endif()
# Atlas is required by some packages, but not found in pkg-config # Atlas is required by some packages, but not found in pkg-config
if(EXISTS "/usr/include/atlas/cblas.h") # So, here are some hacks here. Hope this gets fixed in future!
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
include_directories("/usr/include/atlas") include_directories("/usr/include/atlas")
list(APPEND ATLAS_LIBRARIES cblas atlas lapack) LINK_DIRECTORIES("/usr/lib64")
LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!
if(EXISTS "/usr/lib64/libblas.so" OR EXISTS "/usr/lib/libblas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES blas)
else() # Case for Ubuntu
list(APPEND ATLAS_LIBRARIES cblas)
endif()
if(EXISTS "/usr/lib/atlas/libtatlas.so" OR EXISTS "/usr/lib64/atlas/libtatlas.so") #Case for CentOS7
list(APPEND ATLAS_LIBRARIES tatlas)
else()
list(APPEND ATLAS_LIBRARIES atlas) #Case for Ubuntu
endif()
list(APPEND ATLAS_LIBRARIES lapack)
else() else()
message("No Blas/Atlas libs found, some targets will fail") message("No Blas/Atlas libs found, some targets will fail")
endif() endif()
......
...@@ -941,9 +941,14 @@ ...@@ -941,9 +941,14 @@
(Test 7b, 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)), (Test 7b, 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)),
(Test 10, 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)), (Test 10, 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)),
(Test 10b, 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)), (Test 10b, 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)),
(Test 11, 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)) (Test 11, 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)),
(Test 11b, 10 MHz, R7-1.FDD (MCS 25), EVA5, 16.7dB (70%)),
(Test 15, 20 MHz, R.9 FDD (MCS 26), EVA5, 17.6dB (70%)),
(Test 15b, 20 MHz, R.9-2 FDD (MCS 26, 17PRB), EVA5, 17.3dB (70%)),
(Test 15c, 20 MHz, R.9-1 FDD (MCS 26, 83 PRB), EVA5, 16.6dB (70%)),
(TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)), (TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)),
(TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)), (TM2 Test 1b 5 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)),
</desc> </desc>
<pre_compile_prog></pre_compile_prog> <pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog> <compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
...@@ -960,6 +965,9 @@ ...@@ -960,6 +965,9 @@
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70 -m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70 -m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70
-m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O70
-m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O70
-m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O70
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O70 -m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O70
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O70</main_exec_args> -m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O70</main_exec_args>
<tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b</tags> <tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b</tags>
......
sudo rmmod nasmesh || true sudo rmmod nasmesh || true
sudo rmmod ue_ip || true sudo rmmod ue_ip || true
sudo /opt/ltebox/tools/stop_ltebox || true sudo /opt/ltebox/tools/stop_ltebox || true
sudo killall -9 hss_sim || true
sudo /opt/hss_sim0609/starthss_real sudo /opt/hss_sim0609/starthss_real
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -24; pdsch_referenceSignalPower = -24;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -24; pdsch_referenceSignalPower = -24;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -24; pdsch_referenceSignalPower = -24;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -24; pdsch_referenceSignalPower = -24;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -24; pdsch_referenceSignalPower = -24;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -24; pdsch_referenceSignalPower = -24;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower = -29;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower = -29;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower = -29;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower = -29;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower = -29;
......
...@@ -47,7 +47,7 @@ eNBs = ...@@ -47,7 +47,7 @@ eNBs =
prach_zero_correlation = 1; prach_zero_correlation = 1;
prach_freq_offset = 2; prach_freq_offset = 2;
pucch_delta_shift = 1; pucch_delta_shift = 1;
pucch_nRB_CQI = 1; pucch_nRB_CQI = 0;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower = -29;
......
...@@ -61,9 +61,12 @@ BUILD_DOXYGEN=0 ...@@ -61,9 +61,12 @@ BUILD_DOXYGEN=0
T_TRACER="False" T_TRACER="False"
DISABLE_HARDWARE_DEPENDENCY="False" DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE="" CMAKE_BUILD_TYPE=""
CMAKE_CMD="$CMAKE"
UE_AUTOTEST_TRACE="False" UE_AUTOTEST_TRACE="False"
UE_DEBUG_TRACE="False"
UE_TIMING_TRACE="False"
DISABLE_LOG_X="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
CMAKE_CMD='cmake'
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
...@@ -147,6 +150,12 @@ Options ...@@ -147,6 +150,12 @@ Options
Disable HW dependency during installation Disable HW dependency during installation
--ue-autotest-trace --ue-autotest-trace
Enable specific traces for UE autotest framework Enable specific traces for UE autotest framework
--ue-trace
Enable traces for UE debugging
--ue-timing
Enable traces for timing
--disable-log
Disable all LOG_* macros
--build-eclipse --build-eclipse
Build eclipse project files. Paths are auto corrected by fixprj.sh Build eclipse project files. Paths are auto corrected by fixprj.sh
Usage (first build): Usage (first build):
...@@ -316,6 +325,18 @@ function main() { ...@@ -316,6 +325,18 @@ function main() {
UE_AUTOTEST_TRACE="True" UE_AUTOTEST_TRACE="True"
echo_info "Enabling autotest specific trace for UE" echo_info "Enabling autotest specific trace for UE"
shift 1;; shift 1;;
--ue-trace)
UE_DEBUG_TRACE="True"
echo_info "Enabling UE trace for debug"
shift 1;;
--ue-timing)
UE_TIMING_TRACE="True"
echo_info "Enabling UE timing trace"
shift 1;;
--disable-log)
DISABLE_LOG_X="True"
echo_info "Disabling all LOG_* traces"
shift 1;;
--uhd-images-dir) --uhd-images-dir)
UHD_IMAGES_DIR=$2 UHD_IMAGES_DIR=$2
echo_info "Downloading UHD images in the indicated location" echo_info "Downloading UHD images in the indicated location"
...@@ -448,6 +469,11 @@ function main() { ...@@ -448,6 +469,11 @@ function main() {
flash_firmware_bladerf flash_firmware_bladerf
fi fi
fi fi
if [ "$FLEXRAN_AGENT" == "1" ] ; then
echo_info "installing protobuf/protobuf-c for flexran agent support"
install_protobuf_from_source
install_protobuf_c_from_source
fi
fi fi
if [ "$INSTALL_OPTIONAL" = "1" ] ; then if [ "$INSTALL_OPTIONAL" = "1" ] ; then
...@@ -507,6 +533,9 @@ function main() { ...@@ -507,6 +533,9 @@ function main() {
echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
echo_info "Compiling UE S1 build : enabling Linux and NETLINK" echo_info "Compiling UE S1 build : enabling Linux and NETLINK"
echo "set (LINUX True )" >> $cmake_file echo "set (LINUX True )" >> $cmake_file
......
...@@ -3,7 +3,7 @@ set(PACKAGE_NAME "unitary_tests_simulators") ...@@ -3,7 +3,7 @@ set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True) set(PHYSIM True)
set(RF_BOARD None) set(RF_BOARD None)
set(XFORMS True) set(XFORMS True)
set(ENABLE_ITTI False)
set(DEBUG_PHY False) set(DEBUG_PHY False)
set(MU_RECIEVER False) set(MU_RECIEVER False)
set(RANDOM_BF False) set(RANDOM_BF False)
......
This diff is collapsed.
...@@ -52,6 +52,7 @@ extern int config_isparamset(paramdef_t *params,int paramidx); ...@@ -52,6 +52,7 @@ extern int config_isparamset(paramdef_t *params,int paramidx);
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val); extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix); extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix);
#define config_getlist config_get_if()->getlist #define config_getlist config_get_if()->getlist
#define CONFIG_GETCONFFILE (config_get_if()->cfgP[0])
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -29,10 +29,10 @@ typedef struct { ...@@ -29,10 +29,10 @@ typedef struct {
#define T_SHM_FILENAME "/T_shm_segment" #define T_SHM_FILENAME "/T_shm_segment"
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */ /* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS 142 #define VCD_NUM_FUNCTIONS 172
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */ /* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES 107 #define VCD_NUM_VARIABLES 118
/* first VCD function (to be kept up to date! see in T_messages.txt) */ /* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP) #define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
......
...@@ -45,6 +45,10 @@ ID = ENB_PHY_INPUT_SIGNAL ...@@ -45,6 +45,10 @@ ID = ENB_PHY_INPUT_SIGNAL
DESC = eNodeB received signal in the time domain for a duration of 1ms DESC = eNodeB received signal in the time domain for a duration of 1ms
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe : int,antenna : buffer,rxdata FORMAT = int,eNB_ID : int,frame : int,subframe : int,antenna : buffer,rxdata
ID = ENB_PHY_OUTPUT_SIGNAL
DESC = eNodeB sent signal in the time domain for a duration of 1ms
GROUP = ALL:PHY:HEAVY:ENB
FORMAT = int,eNB_ID : int,CC_id : int,frame : int,subframe : int,antenna : buffer,txdata
ID = ENB_PHY_UL_CHANNEL_ESTIMATE ID = ENB_PHY_UL_CHANNEL_ESTIMATE
DESC = eNodeB channel estimation in the time domain DESC = eNodeB channel estimation in the time domain
GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB GROUP = ALL:PHY:GRAPHIC:HEAVY:ENB
...@@ -111,6 +115,10 @@ ID = ENB_MAC_UE_DL_PDU_WITH_DATA ...@@ -111,6 +115,10 @@ ID = ENB_MAC_UE_DL_PDU_WITH_DATA
DESC = MAC downlink PDU for an UE DESC = MAC downlink PDU for an UE
GROUP = ALL:MAC:ENB GROUP = ALL:MAC:ENB
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
ID = ENB_MAC_SCHEDULING_REQUEST
DESC = MAC scheduling request detected for an UE
GROUP = ALL:MAC:ENB
FORMAT = int,eNB_ID : int,CC_id : int,frame : int,subframe : int,rnti
#RLC logs #RLC logs
ID = ENB_RLC_DL ID = ENB_RLC_DL
...@@ -1350,6 +1358,22 @@ ID = VCD_VARIABLE_UE0_SFN7 ...@@ -1350,6 +1358,22 @@ ID = VCD_VARIABLE_UE0_SFN7
DESC = VCD variable UE0_SFN7 DESC = VCD variable UE0_SFN7
GROUP = ALL:VCD:ENB:VCD_VARIABLE GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value FORMAT = ulong,value
ID = VCD_VARIABLE_SEND_IF4_SYMBOL
DESC = VCD variable SEND_IF4_SYMBOL
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
ID = VCD_VARIABLE_RECV_IF4_SYMBOL
DESC = VCD variable RECV_IF4_SYMBOL
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
ID = VCD_VARIABLE_SEND_IF5_PKT_ID
DESC = VCD variable SEND_IF5_PKT_ID
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
ID = VCD_VARIABLE_RECV_IF5_PKT_ID
DESC = VCD variable RECV_IF5_PKT_ID
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
ID = VCD_VARIABLE_UE_PDCP_FLUSH_SIZE ID = VCD_VARIABLE_UE_PDCP_FLUSH_SIZE
DESC = VCD variable UE_PDCP_FLUSH_SIZE DESC = VCD variable UE_PDCP_FLUSH_SIZE
GROUP = ALL:VCD:ENB:UE:VCD_VARIABLE GROUP = ALL:VCD:ENB:UE:VCD_VARIABLE
...@@ -2061,3 +2085,11 @@ ID = VCD_FUNCTION_RECV_IF5 ...@@ -2061,3 +2085,11 @@ ID = VCD_FUNCTION_RECV_IF5
DESC = VCD function RECV_IF5 DESC = VCD function RECV_IF5
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
ID = VCD_FUNCTION_TRX_COMPR_IF
DESC = VCD function TRX_COMPR_IF
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
ID = VCD_FUNCTION_TRX_DECOMPR_IF
DESC = VCD function TRX_DECOMPR_IF
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
...@@ -5,7 +5,8 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I. ...@@ -5,7 +5,8 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I.
LIBS=-lX11 -lm -lpng -lXft LIBS=-lX11 -lm -lpng -lXft
all: record replay extract_config textlog enb ue vcd macpdu2wireshark all: record replay extract_config textlog enb ue vcd macpdu2wireshark \
extract_input_subframe
record: utils.o record.o database.o config.o record: utils.o record.o database.o config.o
$(CC) $(CFLAGS) -o record $^ $(LIBS) $(CC) $(CFLAGS) -o record $^ $(LIBS)
...@@ -16,6 +17,10 @@ replay: utils.o replay.o ...@@ -16,6 +17,10 @@ replay: utils.o replay.o
extract_config: extract_config.o extract_config: extract_config.o
$(CC) $(CFLAGS) -o extract_config $^ $(LIBS) $(CC) $(CFLAGS) -o extract_config $^ $(LIBS)
extract_input_subframe: extract_input_subframe.o database.o event.o utils.o \
config.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
textlog: utils.o textlog.o database.o event.o handler.o config.o \ textlog: utils.o textlog.o database.o event.o handler.o config.o \
event_selector.o view/view.a gui/gui.a logger/logger.a \ event_selector.o view/view.a gui/gui.a logger/logger.a \
filter/filter.a filter/filter.a
...@@ -58,8 +63,8 @@ filter/filter.a: ...@@ -58,8 +63,8 @@ filter/filter.a:
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
clean: clean:
rm -f *.o core tracer_remote textlog enb vcd record replay rm -f *.o core tracer_remote textlog enb ue vcd record replay
rm -f extract_config macpdu2wireshark rm -f extract_config macpdu2wireshark extract_input_subframe
cd gui && make clean cd gui && make clean
cd view && make clean cd view && make clean
cd logger && make clean cd logger && make clean
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include "database.h"
#include "event.h"
#include "config.h"
void usage(void)
{
printf(
"usage: [options] <file> <frame> <subframe>\n"
"options:\n"
" -d <database file> this option is mandatory\n"
" -v verbose\n"
);
exit(1);
}
int main(int n, char **v)
{
char *database_filename = NULL;
void *database;
int i;
int input_event_id;
database_event_format f;
char *file = NULL;
int fd;
int frame = -1, subframe = -1;
int frame_arg, subframe_arg, buffer_arg;
int verbose = 0;
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
if (!strcmp(v[i], "-d"))
{ if (i > n-2) usage(); database_filename = v[++i]; continue; }
if (!strcmp(v[i], "-v")) { verbose = 1; continue; }
if (file == NULL) { file = v[i]; continue; }
if (frame == -1) { frame = atoi(v[i]); continue; }
if (subframe == -1) { subframe = atoi(v[i]); continue; }
usage();
}
if (file == NULL || frame == -1 || subframe == -1) usage();
if (database_filename == NULL) {
printf("ERROR: provide a database file (-d)\n");
exit(1);
}
database = parse_database(database_filename);
load_config_file(database_filename);
input_event_id = event_id_from_name(database, "ENB_PHY_INPUT_SIGNAL");
f = get_format(database, input_event_id);
frame_arg = subframe_arg = buffer_arg = -1;
for (i = 0; i < f.count; i++) {
if (!strcmp(f.name[i], "frame")) {
if (frame_arg != -1) goto err;
if (strcmp(f.type[i], "int")) goto err;
frame_arg = i;
}
if (!strcmp(f.name[i], "subframe")) {
if (subframe_arg != -1) goto err;
if (strcmp(f.type[i], "int")) goto err;
subframe_arg = i;
}
if (!strcmp(f.name[i], "rxdata")) {
if (buffer_arg != -1) goto err;
if (strcmp(f.type[i], "buffer")) goto err;
buffer_arg = i;
}
continue;
err:
printf("cannot deal with ENB_PHY_INPUT_SIGNAL from database file\n");
exit(1);
}
if (frame_arg == -1 || subframe_arg == -1 || buffer_arg == -1) goto err;
fd = open(file, O_RDONLY);
if (fd == -1) { perror(file); exit(1); }
/* get wanted frame/subframe */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(fd, v, database);
if (e.type == -1) break;
if (e.type != input_event_id) continue;
if (verbose)
printf("input frame %d subframe %d size %d\n",
e.e[frame_arg].i, e.e[subframe_arg].i, e.e[buffer_arg].bsize);
if (!(frame == e.e[frame_arg].i && subframe == e.e[subframe_arg].i))
continue;
#if 0
for (i = 0; i < e.e[buffer_arg].bsize/2; i++) {
short *x = e.e[buffer_arg].b;
x[i] *= 14;
}
#endif
fwrite(e.e[buffer_arg].b, e.e[buffer_arg].bsize, 1, stdout);
fflush(stdout);
return 0;
}
printf("frame %d subframe %d not found\n", frame, subframe);
return 0;
}
This diff is collapsed.
...@@ -127,6 +127,9 @@ void lte_param_init(unsigned char N_tx_port_eNB, ...@@ -127,6 +127,9 @@ void lte_param_init(unsigned char N_tx_port_eNB,
UE->perfect_ce = perfect_ce; UE->perfect_ce = perfect_ce;
/* the UE code is multi-thread "aware", we need to setup this array */
for (i = 0; i < 10; i++) UE->current_thread_id[i] = i % 2;
printf("Done lte_param_init\n"); printf("Done lte_param_init\n");
......
...@@ -44,7 +44,11 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -44,7 +44,11 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
uint8_t log2_osf; uint8_t log2_osf;
#if DISABLE_LOG_X
printf("Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
#else
LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf); LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
#endif
if (frame_parms->Ncp==EXTENDED) { if (frame_parms->Ncp==EXTENDED) {
frame_parms->nb_prefix_samples0=512; frame_parms->nb_prefix_samples0=512;
......
...@@ -189,6 +189,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue, ...@@ -189,6 +189,7 @@ void lte_ue_measurements(PHY_VARS_UE *phy_vars_ue,
unsigned int subframe_offset, unsigned int subframe_offset,
unsigned char N0_symbol, unsigned char N0_symbol,
unsigned char abstraction_flag, unsigned char abstraction_flag,
unsigned char rank_adaptation,
uint8_t subframe); uint8_t subframe);
//! \brief This function performance RSRP/RSCP measurements //! \brief This function performance RSRP/RSCP measurements
......
...@@ -40,6 +40,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -40,6 +40,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
{ {
static int max_pos_fil = 0; static int max_pos_fil = 0;
static int count_max_pos_ok = 0;
static int first_time = 1;
int temp = 0, i, aa, max_val = 0, max_pos = 0; int temp = 0, i, aa, max_val = 0, max_pos = 0;
int diff; int diff;
short Re,Im,ncoef; short Re,Im,ncoef;
...@@ -58,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -58,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0; temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_id][aa])[(i<<2)]; Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)]; Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2); temp += (Re*Re/2) + (Im*Im/2);
} }
...@@ -78,6 +80,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -78,6 +80,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
// do not filter to have proactive timing adjustment // do not filter to have proactive timing adjustment
max_pos_fil = max_pos; max_pos_fil = max_pos;
if(subframe == 6)
{
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3); diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
if ( abs(diff) < SYNCH_HYST ) if ( abs(diff) < SYNCH_HYST )
...@@ -85,6 +89,26 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -85,6 +89,26 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
else else
ue->rx_offset = diff; ue->rx_offset = diff;
if(abs(diff)<5)
count_max_pos_ok ++;
else
count_max_pos_ok = 0;
if(count_max_pos_ok > 10 && first_time == 1)
{
first_time = 0;
ue->time_sync_cell = 1;
if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
//mac_resynch();
dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
ue->UE_mode[0] = PRACH;
}
else {
ue->UE_mode[0] = PUSCH;
}
}
if ( ue->rx_offset < 0 ) if ( ue->rx_offset < 0 )
ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES; ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
...@@ -93,13 +117,22 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -93,13 +117,22 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (after) = %d : max_pos = %d,max_pos_fil = %d (peak %d) target_pos %d \n", LOG_D(PHY,"AbsSubframe %d.%d: ThreadId %d diff =%i rx_offset (final) = %i : clear %d,max_pos = %d,max_pos_fil = %d (peak %d) max_val %d target_pos %d \n",
ue->proc.proc_rxtx[0].frame_rx,subframe,ue->rx_offset,max_pos,max_pos_fil,temp,(frame_parms->nb_prefix_samples>>3)); ue->proc.proc_rxtx[ue->current_thread_id[subframe]].frame_rx,
#endif //DEBUG_PHY subframe,
ue->current_thread_id[subframe],
diff,
ue->rx_offset,
clear,
max_pos,
max_pos_fil,
temp,max_val,
(frame_parms->nb_prefix_samples>>3));
#endif //DEBUG_PHY
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
}
} }
...@@ -188,10 +221,6 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -188,10 +221,6 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
else else
max_pos_fil2 = ((max_pos_fil2 * coef) + (max_pos * ncoef)) >> 15; max_pos_fil2 = ((max_pos_fil2 * coef) + (max_pos * ncoef)) >> 15;
#ifdef DEBUG_PHY
//LOG_D(PHY,"frame %d: max_pos = %d, max_pos_fil = %d\n",mac_xface->frame,max_pos,max_pos_fil2);
#endif //DEBUG_PHY
return(max_pos_fil2); return(max_pos_fil2);
} }
......
...@@ -51,7 +51,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -51,7 +51,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
int uespec_pilot[300]; int uespec_pilot[300];
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)&0x1][eNB_id]; LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[Ns>>1]][eNB_id];
LTE_DL_UE_HARQ_t *dlsch0_harq; LTE_DL_UE_HARQ_t *dlsch0_harq;
harq_pid = dlsch_ue[0]->current_harq_pid; harq_pid = dlsch_ue[0]->current_harq_pid;
...@@ -63,9 +63,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -63,9 +63,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
else else
rballoc = dlsch0_harq->rb_alloc_even; rballoc = dlsch0_harq->rb_alloc_even;
rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF; rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[Ns>>1]].rxdataF;
dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[(Ns>>1)&0x1][eNB_id]->dl_bf_ch_estimates; dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[Ns>>1]][eNB_id]->dl_bf_ch_estimates;
beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
......
...@@ -49,11 +49,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -49,11 +49,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1]; uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t nushift,pilot1,pilot2,pilot3; uint8_t nushift,pilot0,pilot1,pilot2,pilot3;
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset]; uint8_t previous_thread_id = ue->current_thread_id[Ns>>1]==0 ? (RX_NB_TH-1):(ue->current_thread_id[Ns>>1]-1);
int **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[((Ns>>1)+1)&0x1].dl_ch_estimates[eNB_offset]; int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF; int **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF;
pilot0 = 0;
if (ue->frame_parms.Ncp == 0) { // normal prefix if (ue->frame_parms.Ncp == 0) { // normal prefix
pilot1 = 4; pilot1 = 4;
pilot2 = 7; pilot2 = 7;
...@@ -92,7 +94,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -92,7 +94,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
k = (nu + nushift)%6; k = (nu + nushift)%6;
#ifdef DEBUG_CH #ifdef DEBUG_CH
printf("Channel Estimation : eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d\n",eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size, printf("Channel Estimation : ThreadId %d, eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d\n",ue->current_thread_id[Ns>>1], eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size,
ue->frame_parms.Ncp,l,Ns,k); ue->frame_parms.Ncp,l,Ns,k);
#endif #endif
...@@ -796,18 +798,23 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -796,18 +798,23 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
break; break;
} }
if( ((Ns%2) == 0) && (l == pilot0))
{
// do ifft of channel estimate // do ifft of channel estimate
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) { for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
if (ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset][(p<<1)+aarx]) if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8], {
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1); //LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
}
}
} }
#if T_TRACER #if T_TRACER
T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(ue->Mod_id), T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(ue->Mod_id),
T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx%1024), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].subframe_rx), T_INT(ue->proc.proc_rxtx[ue->current_thread_id[Ns>>1]].frame_rx%1024), T_INT(ue->proc.proc_rxtx[ue->current_thread_id[Ns>>1]].subframe_rx),
T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4)); T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4));
#endif #endif
return(0); return(0);
......
...@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// unsigned int n; // unsigned int n;
// int i; // int i;
int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0]; int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
ch_offset = (l*(ue->frame_parms.ofdm_symbol_size)); ch_offset = (l*(ue->frame_parms.ofdm_symbol_size));
symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l; symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
...@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate // do ifft of channel estimate
for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) { for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) {
if (ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa]) { if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) {
switch (ue->frame_parms.N_RB_DL) { switch (ue->frame_parms.N_RB_DL) {
case 6: case 6:
idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 25: case 25:
idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 50: case 50:
idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 75: case 75:
idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 100: case 100:
idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
default: default:
......
This diff is collapsed.
This diff is collapsed.
...@@ -860,7 +860,10 @@ typedef enum { ...@@ -860,7 +860,10 @@ typedef enum {
} RX_type_t; } RX_type_t;
typedef enum {
DCI_COMMON_SPACE,
DCI_UE_SPACE
} dci_space_t;
/**@}*/ /**@}*/
......
...@@ -602,7 +602,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB, ...@@ -602,7 +602,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet // if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
#ifdef DEBUG_DLSCH_CODING
printf("encoding thinks this is a new packet \n");
#endif
/* /*
int i; int i;
printf("dlsch (tx): \n"); printf("dlsch (tx): \n");
...@@ -709,6 +711,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB, ...@@ -709,6 +711,9 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
#endif #endif
start_meas(rm_stats); start_meas(rm_stats);
#ifdef DEBUG_DLSCH_CODING
printf("rvidx in encoding = %d\n", dlsch->harq_processes[harq_pid]->rvidx);
#endif
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r], r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
G, //G G, //G
dlsch->harq_processes[harq_pid]->w[r], dlsch->harq_processes[harq_pid]->w[r],
...@@ -779,7 +784,9 @@ int dlsch_encoding_SIC(PHY_VARS_UE *ue, ...@@ -779,7 +784,9 @@ int dlsch_encoding_SIC(PHY_VARS_UE *ue,
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet // if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
#ifdef DEBUG_DLSCH_CODING
printf("SIC encoding thinks this is a new packet \n");
#endif
/* /*
int i; int i;
printf("dlsch (tx): \n"); printf("dlsch (tx): \n");
...@@ -886,6 +893,9 @@ int dlsch_encoding_SIC(PHY_VARS_UE *ue, ...@@ -886,6 +893,9 @@ int dlsch_encoding_SIC(PHY_VARS_UE *ue,
#endif #endif
start_meas(rm_stats); start_meas(rm_stats);
#ifdef DEBUG_DLSCH_CODING
printf("rvidx in SIC encoding = %d\n", dlsch->harq_processes[harq_pid]->rvidx);
#endif
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r], r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
G, //G G, //G
dlsch->harq_processes[harq_pid]->w[r], dlsch->harq_processes[harq_pid]->w[r],
......
...@@ -167,10 +167,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -167,10 +167,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
uint8_t llr8_flag) uint8_t llr8_flag)
{ {
#if UE_TIMING_TRACE
time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats; time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats;
time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats; time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats;
time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats; time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats;
#endif
uint32_t A,E; uint32_t A,E;
uint32_t G; uint32_t G;
uint32_t ret,offset; uint32_t ret,offset;
...@@ -271,7 +272,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -271,7 +272,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return(max_turbo_iterations); return(max_turbo_iterations);
}*/ }*/
/*harq_pid = dlsch->current_harq_pid[subframe&0x1]; /*harq_pid = dlsch->current_harq_pid[phy_vars_ue->current_thread_id[subframe]];
if (harq_pid >= 8) { if (harq_pid >= 8) {
printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid); printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid);
return(max_turbo_iterations); return(max_turbo_iterations);
...@@ -372,7 +373,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -372,7 +373,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
printf("f1 %d, f2 %d, F %d\n",f1f2mat_old[2*iind],f1f2mat_old[1+(2*iind)],(r==0) ? harq_process->F : 0); printf("f1 %d, f2 %d, F %d\n",f1f2mat_old[2*iind],f1f2mat_old[1+(2*iind)],(r==0) ? harq_process->F : 0);
#endif #endif
#if UE_TIMING_TRACE
start_meas(dlsch_rate_unmatching_stats); start_meas(dlsch_rate_unmatching_stats);
#endif
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short)); memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
harq_process->RTC[r] = generate_dummy_w(4+(Kr_bytes*8), harq_process->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t*) &dummy_w[r][0], (uint8_t*) &dummy_w[r][0],
...@@ -390,7 +393,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -390,7 +393,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->round); harq_process->round);
#endif #endif
//printf("dlsch->harq_processes[harq_pid]->rvidx = %d\n", dlsch->harq_processes[harq_pid]->rvidx); #ifdef DEBUG_DLSCH_DECODING
printf(" in decoding dlsch->harq_processes[harq_pid]->rvidx = %d\n", dlsch->harq_processes[harq_pid]->rvidx);
#endif
if (lte_rate_matching_turbo_rx(harq_process->RTC[r], if (lte_rate_matching_turbo_rx(harq_process->RTC[r],
G, G,
harq_process->w[r], harq_process->w[r],
...@@ -406,12 +411,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -406,12 +411,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->Nl, harq_process->Nl,
r, r,
&E)==-1) { &E)==-1) {
#if UE_TIMING_TRACE
stop_meas(dlsch_rate_unmatching_stats); stop_meas(dlsch_rate_unmatching_stats);
#endif
LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n"); LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n");
return(dlsch->max_turbo_iterations); return(dlsch->max_turbo_iterations);
} else } else
{
#if UE_TIMING_TRACE
stop_meas(dlsch_rate_unmatching_stats); stop_meas(dlsch_rate_unmatching_stats);
#endif
}
r_offset += E; r_offset += E;
/* /*
...@@ -419,13 +429,16 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -419,13 +429,16 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->d[r], harq_process->d[r],
harq_process->w); harq_process->w);
*/ */
#if UE_TIMING_TRACE
start_meas(dlsch_deinterleaving_stats); start_meas(dlsch_deinterleaving_stats);
#endif
sub_block_deinterleaving_turbo(4+Kr, sub_block_deinterleaving_turbo(4+Kr,
&harq_process->d[r][96], &harq_process->d[r][96],
harq_process->w[r]); harq_process->w[r]);
#if UE_TIMING_TRACE
stop_meas(dlsch_deinterleaving_stats); stop_meas(dlsch_deinterleaving_stats);
#endif
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
/* /*
if (r==0) { if (r==0) {
...@@ -470,8 +483,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -470,8 +483,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n", AssertFatal (Kr >= 256, "turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d\n",
Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round); Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round);
} }
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1); LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1);
ret = tc ret = tc
(&harq_process->d[r][96], (&harq_process->d[r][96],
...@@ -490,14 +504,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -490,14 +504,17 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
#endif
} }
#else #else
if ((harq_process->C == 1) || if ((harq_process->C == 1) ||
((r==harq_process->C-1) && (skipped_last==0))) { // last segment with odd number of segments ((r==harq_process->C-1) && (skipped_last==0))) { // last segment with odd number of segments
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
ret = tc ret = tc
(&harq_process->d[r][96], (&harq_process->d[r][96],
harq_process->c[r], harq_process->c[r],
...@@ -514,7 +531,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -514,7 +531,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_ext_stats, &phy_vars_ue->dlsch_tc_ext_stats,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
#endif
// printf("single decode, exit\n"); // printf("single decode, exit\n");
// exit(-1); // exit(-1);
} }
...@@ -531,7 +550,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -531,7 +550,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
printf("single decoding segment %d (%p)\n",r-1,&harq_process->d[r-1][96]); printf("single decoding segment %d (%p)\n",r-1,&harq_process->d[r-1][96]);
#endif #endif
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
#ifdef DEBUG_DLSCH_DECODING #ifdef DEBUG_DLSCH_DECODING
printf("double decoding segments %d,%d (%p,%p)\n",r-1,r,&harq_process->d[r-1][96],&harq_process->d[r][96]); printf("double decoding segments %d,%d (%p,%p)\n",r-1,r,&harq_process->d[r-1][96],&harq_process->d[r][96]);
#endif #endif
...@@ -572,10 +593,14 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -572,10 +593,14 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
exit(-1);*/ exit(-1);*/
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
#endif
} }
else { // Kr_last != Kr else { // Kr_last != Kr
#if UE_TIMING_TRACE
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
ret = tc ret = tc
(&harq_process->d[r-1][96], (&harq_process->d[r-1][96],
harq_process->c[r-1], harq_process->c[r-1],
...@@ -592,9 +617,12 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -592,9 +617,12 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_ext_stats, &phy_vars_ue->dlsch_tc_ext_stats,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
start_meas(dlsch_turbo_decoding_stats); start_meas(dlsch_turbo_decoding_stats);
#endif
ret = tc ret = tc
(&harq_process->d[r][96], (&harq_process->d[r][96],
harq_process->c[r], harq_process->c[r],
...@@ -611,6 +639,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -611,6 +639,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&phy_vars_ue->dlsch_tc_ext_stats, &phy_vars_ue->dlsch_tc_ext_stats,
&phy_vars_ue->dlsch_tc_intl1_stats, &phy_vars_ue->dlsch_tc_intl1_stats,
&phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1); &phy_vars_ue->dlsch_tc_intl2_stats); //(is_crnti==0)?harq_pid:harq_pid+1);
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats); stop_meas(dlsch_turbo_decoding_stats);
/*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n", /*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n",
...@@ -619,7 +650,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -619,7 +650,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0), dlsch_rate_unmatching_stats->p_time/(cpuf*1000.0),
dlsch_deinterleaving_stats->p_time/(cpuf*1000.0), dlsch_deinterleaving_stats->p_time/(cpuf*1000.0),
dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0));*/ dlsch_turbo_decoding_stats->p_time/(cpuf*1000.0));*/
#endif
} }
} }
} }
...@@ -641,9 +672,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -641,9 +672,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
frame_rx_prev = frame_rx_prev%1024; frame_rx_prev = frame_rx_prev%1024;
if (err_flag == 1) { if (err_flag == 1) {
//LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n", #if UE_DEBUG_TRACE
// phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round); LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
#endif
dlsch->harq_ack[subframe].ack = 0; dlsch->harq_ack[subframe].ack = 0;
dlsch->harq_ack[subframe].harq_id = harq_pid; dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1; dlsch->harq_ack[subframe].send_harq_status = 1;
...@@ -664,9 +696,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -664,9 +696,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return((1+dlsch->max_turbo_iterations)); return((1+dlsch->max_turbo_iterations));
} else { } else {
#if UE_DEBUG_TRACE
//LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d harq_process->mcs %d harq_process->nb_rb %d\n", LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d mcs %d nb_rb %d\n",
//phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb); phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb);
#endif
harq_process->status = SCH_IDLE; harq_process->status = SCH_IDLE;
harq_process->round = 0; harq_process->round = 0;
...@@ -928,10 +961,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -928,10 +961,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH: // TB0 case PDSCH: // TB0
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][(uint32_t)eNB_id]->crnti,RC.eNB[eNB_id2][CC_id]);
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[0][(uint32_t)eNB_id]->crnti,RC.eNB[eNB_id2][CC_id]);
DevAssert( ue_id != (uint32_t)-1 ); DevAssert( ue_id != (uint32_t)-1 );
dlsch_eNB = RC.eNB[eNB_id2][CC_id]->dlsch[ue_id][0]; dlsch_eNB = RC.eNB[eNB_id2][CC_id]->dlsch[ue_id][0];
...@@ -975,9 +1007,10 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -975,9 +1007,10 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH1: { // TB1 case PDSCH1: { // TB1
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][1]; dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[0][eNB_id]->crnti, RC.eNB[eNB_id2][CC_id] ); int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->crnti, RC.eNB[eNB_id2][CC_id] );
DevAssert( UE_id != -1 ); DevAssert( UE_id != -1 );
dlsch_eNB = RC.eNB[eNB_id2][CC_id]->dlsch[UE_id][1]; dlsch_eNB = RC.eNB[eNB_id2][CC_id]->dlsch[UE_id][1];
// reset HARQ // reset HARQ
...@@ -1029,7 +1062,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -1029,7 +1062,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
default: default:
dlsch_ue = phy_vars_ue->dlsch[subframe&0x1][eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0];
LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id); LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id);
dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations; dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations;
return(1+dlsch_ue->max_turbo_iterations); return(1+dlsch_ue->max_turbo_iterations);
......
...@@ -87,7 +87,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue, ...@@ -87,7 +87,7 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
if (Msc_idx_ptr) if (Msc_idx_ptr)
Msc_RS_idx = Msc_idx_ptr - dftsizes; Msc_RS_idx = Msc_idx_ptr - dftsizes;
else { else {
printf("generate_drs_pusch: index for Msc_RS=%d not found\n",Msc_RS); LOG_I(PHY,"generate_drs_pusch: index for Msc_RS=%d not found\n",Msc_RS);
return(-1); return(-1);
} }
......
...@@ -23,6 +23,8 @@ extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32]; ...@@ -23,6 +23,8 @@ extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32];
extern unsigned short lte_cqi_eff1024[16]; extern unsigned short lte_cqi_eff1024[16];
extern char lte_cqi_snr_dB[15]; extern char lte_cqi_snr_dB[15];
extern short conjugate[8],conjugate2[8]; extern short conjugate[8],conjugate2[8];
extern short minus_one[8];
extern short minus_one[8];
extern short *ul_ref_sigs[30][2][33]; extern short *ul_ref_sigs[30][2][33];
extern short *ul_ref_sigs_rx[30][2][33]; extern short *ul_ref_sigs_rx[30][2][33];
extern unsigned short dftsizes[33]; extern unsigned short dftsizes[33];
......
This diff is collapsed.
This diff is collapsed.
...@@ -1078,7 +1078,7 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1078,7 +1078,7 @@ void rx_phich(PHY_VARS_UE *ue,
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
LTE_UE_PDCCH **pdcch_vars = &ue->pdcch_vars[subframe & 0x1][eNB_id]; LTE_UE_PDCCH **pdcch_vars = &ue->pdcch_vars[ue->current_thread_id[subframe]][eNB_id];
// uint8_t HI; // uint8_t HI;
uint8_t harq_pid = phich_subframe_to_harq_pid(frame_parms,proc->frame_rx,subframe); uint8_t harq_pid = phich_subframe_to_harq_pid(frame_parms,proc->frame_rx,subframe);
...@@ -1098,6 +1098,8 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1098,6 +1098,8 @@ void rx_phich(PHY_VARS_UE *ue,
uint8_t NSF_PHICH = 4; uint8_t NSF_PHICH = 4;
uint8_t pusch_subframe; uint8_t pusch_subframe;
int8_t delta_PUSCH_acc[4] = {-1,0,1,3};
// check if we're expecting a PHICH in this subframe // check if we're expecting a PHICH in this subframe
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH RX\n",ue->Mod_id,harq_pid,proc->frame_rx,subframe); LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH RX\n",ue->Mod_id,harq_pid,proc->frame_rx,subframe);
...@@ -1387,6 +1389,14 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1387,6 +1389,14 @@ void rx_phich(PHY_VARS_UE *ue,
nseq_PHICH, nseq_PHICH,
ngroup_PHICH); ngroup_PHICH);
ulsch->f_pusch += delta_PUSCH_acc[ulsch->harq_processes[harq_pid]->TPC];
LOG_I(PHY,"[PUSCH %d] AbsSubframe %d.%d: f_pusch (ACC) %d, adjusting by %d (TPC %d)\n",
harq_pid,proc->frame_rx,subframe,ulsch->f_pusch,
delta_PUSCH_acc[ulsch->harq_processes[harq_pid]->TPC],
ulsch->harq_processes[harq_pid]->TPC);
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1; ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
// ulsch->harq_processes[harq_pid]->Ndi = 0; // ulsch->harq_processes[harq_pid]->Ndi = 0;
ulsch->harq_processes[harq_pid]->round++; ulsch->harq_processes[harq_pid]->round++;
...@@ -1399,7 +1409,7 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1399,7 +1409,7 @@ void rx_phich(PHY_VARS_UE *ue,
ue->ulsch_Msg3_active[eNB_id] = 0; ue->ulsch_Msg3_active[eNB_id] = 0;
} }
} else { } else {
//#ifdef DEBUG_PHICH #ifdef UE_DEBUG_TRACE
LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d round %d (Mlimit %d)\n", LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received NAK (%d) nseq %d, ngroup %d round %d (Mlimit %d)\n",
ue->Mod_id,harq_pid, ue->Mod_id,harq_pid,
proc->frame_rx%1024, proc->frame_rx%1024,
...@@ -1409,7 +1419,7 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1409,7 +1419,7 @@ void rx_phich(PHY_VARS_UE *ue,
ngroup_PHICH, ngroup_PHICH,
ulsch->harq_processes[harq_pid]->round, ulsch->harq_processes[harq_pid]->round,
ulsch->Mlimit); ulsch->Mlimit);
//#endif #endif
// ulsch->harq_processes[harq_pid]->Ndi = 0; // ulsch->harq_processes[harq_pid]->Ndi = 0;
ulsch->harq_processes[harq_pid]->round++; ulsch->harq_processes[harq_pid]->round++;
...@@ -1455,13 +1465,13 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1455,13 +1465,13 @@ void rx_phich(PHY_VARS_UE *ue,
HI16, HI16,
nseq_PHICH,ngroup_PHICH); nseq_PHICH,ngroup_PHICH);
} else { } else {
//#ifdef PHICH_DEBUG #ifdef UE_DEBUG_TRACE
LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received ACK (%d) nseq %d, ngroup %d\n\n", LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH, received ACK (%d) nseq %d, ngroup %d\n\n",
ue->Mod_id,harq_pid, ue->Mod_id,harq_pid,
proc->frame_rx%1024, proc->frame_rx%1024,
subframe, HI16, subframe, HI16,
nseq_PHICH,ngroup_PHICH); nseq_PHICH,ngroup_PHICH);
//#endif #endif
} }
// LOG_I(PHY,"[HARQ-UL harqId: %d] subframe_scheduling_flag = %d \n",harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag); // LOG_I(PHY,"[HARQ-UL harqId: %d] subframe_scheduling_flag = %d \n",harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1996,7 +1996,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc, ...@@ -1996,7 +1996,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc,
#endif #endif
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) { for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[subframe & 0x1][0]->crnti) if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[PHY_vars_UE_g[UE_id][CC_id]->current_thread_id[subframe]][0]->crnti)
break; break;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -76,6 +76,7 @@ unsigned int ULSCH_max_consecutive_errors = 20; ...@@ -76,6 +76,7 @@ unsigned int ULSCH_max_consecutive_errors = 20;
int number_of_cards; int number_of_cards;
int flag_LA=0; int flag_LA=0;
int flagMag; int flagMag;
//extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; //extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment