Commit 351ca5e7 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/basic-simulator' into develop_integration_2018_w19

Conflicts:
	openair1/PHY/LTE_TRANSPORT/prach.c
	targets/RT/USER/lte-ue.c
parents 7da4367c 727b368d
......@@ -243,6 +243,7 @@ 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(USRP_REC_PLAY False "Enable USRP record playback mode")
add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko")
add_boolean_option(BASIC_SIMULATOR False "Has to be True when building the basic simulator, False otherwise")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
......@@ -563,14 +564,26 @@ add_library(oai_mobipass MODULE ${TPLIB_MOBIPASS_SOURCE} )
get_target_property(mobipas_cflags oai_mobipass COMPILE_FLAGS)
set_target_properties(oai_mobipass PROPERTIES COMPILE_FLAGS "${mobipass_cflags} -fvisibility=hidden")
# TCP bridge libraries
######################################################################
# this one is for internal use at Eurecom and is not documented
set(HWLIB_TCP_BRIDGE_SOURCE
${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge.c
)
add_library(oai_tcp_bridge MODULE ${HWLIB_TCP_BRIDGE_SOURCE} )
add_library(tcp_bridge MODULE ${HWLIB_TCP_BRIDGE_SOURCE} )
#get_target_property(tcp_bridge_cflags oai_tcp_bridge COMPILE_FLAGS)
#set_target_properties(oai_tcp_bridge PROPERTIES COMPILE_FLAGS "${tcp_bridge_cflags} -fvisibility=hidden")
set_target_properties(oai_tcp_bridge PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
#get_target_property(tcp_bridge_cflags tcp_bridge COMPILE_FLAGS)
#set_target_properties(tcp_bridge PROPERTIES COMPILE_FLAGS "${tcp_bridge_cflags} -fvisibility=hidden")
set_target_properties(tcp_bridge PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
# this one is to connect OAI eNB and OAI UE in the basic simulator
# see targets/ARCH/tcp_bridge/README.tcp_bridge_oai for usage
set(HWLIB_TCP_BRIDGE_OAI_SOURCE
${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge_oai.c
)
add_library(tcp_bridge_oai MODULE ${HWLIB_TCP_BRIDGE_OAI_SOURCE} )
set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
##########################################################
......
......@@ -68,6 +68,7 @@ DISABLE_LOG_X="False"
USRP_REC_PLAY="False"
BUILD_ECLIPSE=0
UE_NAS_USE_TUN="False"
BASIC_SIMULATOR=0
trap handle_ctrl_c INT
function print_help() {
......@@ -159,6 +160,9 @@ Options
Build for I/Q record-playback modes
--ue-nas-use-tun
Use TUN devices for the UEs instead of ue_ip.ko
--basic-simulator
Generates a basic [1 UE + 1 eNB + no channel] simulator.
See targets/ARCH/tcp_bridge/README.tcp_bridge_oai for documentation.
Usage (first build):
oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
......@@ -354,6 +358,10 @@ function main() {
UE_NAS_USE_TUN="True"
echo_info "Enabling UE NAS TUN device usage instead of ue_ip.ko"
shift 1;;
--basic-simulator)
BASIC_SIMULATOR=1
echo_info "Compiling the basic simulator"
shift 1;;
-h | --help)
print_help
exit 1;;
......@@ -919,6 +927,96 @@ fi
else
echo_info "10. Bypassing the Tests ..."
fi
# basic simulator
#####################
if [ "$BASIC_SIMULATOR" = "1" ]; then
echo_info "Build basic simulator"
[ "$CLEAN" = "1" ] && rm -rf $OPENAIR_DIR/cmake_targets/basic_simulator
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/enb
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/ue
# enb
cmake_file=$OPENAIR_DIR/cmake_targets/basic_simulator/enb/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RF_BOARD \"OAI_USRP\")" >> $cmake_file
echo "set ( TRANSP_PRO \"None\")" >> $cmake_file
echo "set(PACKAGE_NAME \"simulator_enb\")" >> $cmake_file
echo "set (DEADLINE_SCHEDULER \"False\" )" >> $cmake_file
echo "set (CPU_AFFINITY \"False\" )" >> $cmake_file
echo "set ( T_TRACER \"True\" )" >> $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
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
echo_info "Build eNB"
echo_info "logs are in $dlog/basic_simulator_enb.txt"
{
cd $OPENAIR_DIR/cmake_targets/basic_simulator/enb
cmake .
make -j`nproc` coding params_libconfig tcp_bridge_oai lte-softmodem
ln -sf libtcp_bridge_oai.so liboai_device.so
cd ../..
} > $dlog/basic_simulator_enb.txt 2>&1
check_warnings "$dlog/basic_simulator_enb.txt"
# ue
echo_info "Compile conf2uedata"
compilations \
nas_sim_tools conf2uedata \
conf2uedata $dbin/conf2uedata
cmake_file=$OPENAIR_DIR/cmake_targets/basic_simulator/ue/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RF_BOARD \"OAI_USRP\")" >> $cmake_file
echo "set ( TRANSP_PRO \"None\")" >> $cmake_file
echo "set(PACKAGE_NAME \"simulator_ue\")" >> $cmake_file
echo "set (DEADLINE_SCHEDULER \"False\" )" >> $cmake_file
echo "set (CPU_AFFINITY \"False\" )" >> $cmake_file
echo "set ( T_TRACER \"False\" )" >> $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
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
echo "set (LINUX True )" >> $cmake_file
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
echo_info "Build UE"
echo_info "logs are in $dlog/basic_simulator_ue.txt"
{
cd $OPENAIR_DIR/cmake_targets/basic_simulator/ue
cmake .
make -j`nproc` coding params_libconfig tcp_bridge_oai lte-uesoftmodem
ln -sf libtcp_bridge_oai.so liboai_device.so
cd ../..
} > $dlog/basic_simulator_ue.txt 2>&1
check_warnings "$dlog/basic_simulator_ue.txt"
echo_info "Generate UE SIM data"
$OPENAIR_DIR/targets/bin/conf2uedata -c $OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o $OPENAIR_DIR/cmake_targets/basic_simulator/ue
fi
}
main "$@"
......@@ -110,6 +110,16 @@ typedef struct {
extern volatile int *T_freelist_head;
extern T_cache_t *T_cache;
/* When running the basic simulator, we may fill the T cache too fast.
* Let's not crash if it's full, just wait.
*/
#if BASIC_SIMULATOR
# define T_BASIC_SIMULATOR_WAIT \
while (T_cache[T_LOCAL_slot].busy) usleep(100)
#else
# define T_BASIC_SIMULATOR_WAIT /* */
#endif
/* used at header of Tn, allocates buffer */
#define T_LOCAL_DATA \
char *T_LOCAL_buf; \
......@@ -118,6 +128,7 @@ extern T_cache_t *T_cache;
T_LOCAL_slot = __sync_fetch_and_add(T_freelist_head, 1) \
& (T_CACHE_SIZE - 1); \
(void)__sync_fetch_and_and(T_freelist_head, T_CACHE_SIZE - 1); \
T_BASIC_SIMULATOR_WAIT; \
if (T_cache[T_LOCAL_slot].busy) { \
printf("%s:%d:%s: T cache is full - consider increasing its size\n", \
__FILE__, __LINE__, __FUNCTION__); \
......
......@@ -8,10 +8,20 @@
#define T_MAX_ARGS 16
/* maximum size of a message - increase if needed */
#define T_BUFFER_MAX (1024*64)
#if BASIC_SIMULATOR
/* let's have 100 RBs functional for the basic simulator */
# define T_BUFFER_MAX (1024*64*2)
#else
# define T_BUFFER_MAX (1024*64)
#endif
/* size of the local cache for messages (must be pow(2,something)) */
#define T_CACHE_SIZE (8192 * 2)
#if BASIC_SIMULATOR
/* we don't need much space for the basic simulator */
# define T_CACHE_SIZE 1024
#else
# define T_CACHE_SIZE (8192 * 2)
#endif
/* maximum number of bytes a message can contain */
#ifdef T_SEND_TIME
......
......@@ -300,6 +300,20 @@ static void forward(void *_forwarder, char *buf, int size)
if (f->tail != NULL) f->tail->next = new;
f->tail = new;
#if BASIC_SIMULATOR
/* When runnng the basic simulator, the tracer may be too slow.
* Let's not take too much memory in the tracee and
* wait if there is too much data to send. 200MB is
* arbitrary.
*/
while (f->memusage > 200 * 1024 * 1024) {
if (pthread_cond_signal(&f->cond)) abort();
if (pthread_mutex_unlock(&f->lock)) abort();
usleep(1000);
if (pthread_mutex_lock(&f->lock)) abort();
}
#endif /* BASIC_SIMULATOR */
f->memusage += size+4;
/* warn every 100MB */
if (f->memusage > f->last_warning_memusage &&
......
......@@ -12,7 +12,6 @@
#include "gui/gui.h"
#include "filter/filter.h"
#include "utils.h"
#include "../T_defs.h"
#include "event_selector.h"
#include "openair_logo.h"
#include "config.h"
......@@ -875,6 +874,8 @@ int main(int n, char **v)
if (pthread_mutex_init(&enb_data.lock, NULL)) abort();
setup_event_selector(g, database, is_on, is_on_changed, &enb_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
restart:
clear_remote_config();
enb_data.socket = connect_to(ip, port);
......@@ -884,9 +885,8 @@ restart:
/* read messages */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(enb_data.socket, v, database);
e = get_event(enb_data.socket, &ebuf, database);
if (e.type == -1) goto restart;
if (pthread_mutex_lock(&enb_data.lock)) abort();
handle_event(h, e);
......
......@@ -6,7 +6,7 @@
#include <stdlib.h>
#include <string.h>
event get_event(int socket, char *event_buffer, void *database)
event get_event(int socket, OBUF *event_buffer, void *database)
{
#ifdef T_SEND_TIME
struct timespec t;
......@@ -29,17 +29,23 @@ again:
#endif
if (fullread(socket, &type, sizeof(int)) == -1) goto read_error;
length -= sizeof(int);
if (fullread(socket, event_buffer, length) == -1) goto read_error;
if (event_buffer->omaxsize < length) {
event_buffer->omaxsize = (length + 65535) & ~65535;
event_buffer->obuf = realloc(event_buffer->obuf, event_buffer->omaxsize);
if (event_buffer->obuf == NULL) { printf("out of memory\n"); exit(1); }
}
if (fullread(socket, event_buffer->obuf, length) == -1) goto read_error;
event_buffer->osize = length;
if (type == -1) append_received_config_chunk(event_buffer, length);
if (type == -1) append_received_config_chunk(event_buffer->obuf, length);
if (type == -2) verify_config();
if (type == -1 || type == -2) goto again;
#ifdef T_SEND_TIME
return new_event(t, type, length, event_buffer, database);
return new_event(t, type, length, event_buffer->obuf, database);
#else
return new_event(type, length, event_buffer, database);
return new_event(type, length, event_buffer->obuf, database);
#endif
read_error:
......
#ifndef _EVENT_H_
#define _EVENT_H_
#include "utils.h"
#include "../T_defs.h"
#ifdef T_SEND_TIME
#include <time.h>
......@@ -37,7 +38,7 @@ typedef struct {
int ecount;
} event;
event get_event(int s, char *v, void *d);
event get_event(int s, OBUF *v, void *d);
#ifdef T_SEND_TIME
event new_event(struct timespec sending_time, int type,
......
......@@ -99,10 +99,11 @@ int main(int n, char **v)
found = 0;
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(fd, v, database);
e = get_event(fd, &ebuf, database);
if (e.type == -1) break;
if (e.type != input_event_id) continue;
for (i = 0; i < filter_count; i++)
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils.h"
#include "../T_defs.h"
void usage(void)
......@@ -35,14 +36,22 @@ int main(int n, char **v)
in = fopen(input_filename, "r");
if (in == NULL) { perror(input_filename); abort(); }
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) {
int type;
int32_t length;
char v[T_BUFFER_MAX];
char *v;
int vpos = 0;
/* read event from file */
if (fread(&length, 4, 1, in) != 1) break;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}
v = ebuf.obuf;
memcpy(v+vpos, &length, 4);
vpos += 4;
#ifdef T_SEND_TIME
......
......@@ -104,11 +104,12 @@ err:
fd = open(file, O_RDONLY);
if (fd == -1) { perror(file); exit(1); }
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* get wanted frame/subframe */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(fd, v, database);
e = get_event(fd, &ebuf, database);
if (e.type == -1) break;
if (e.type != input_event_id) continue;
if (verbose)
......
......@@ -100,10 +100,12 @@ err:
int last_frame = -1;
int last_subframe = -1;
int subframe_written = 0;
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(fd, v, database);
e = get_event(fd, &ebuf, database);
if (e.type == -1) break;
if (e.type != output_event_id) continue;
if (verbose)
......
......@@ -73,17 +73,22 @@ int main(int n, char **v)
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
char dump[10][T_BUFFER_MAX];
event dump_ev[10];
FILE *z = fopen("/tmp/dd", "w"); if (z == NULL) abort();
while (1) {
char v[T_BUFFER_MAX];
char *v;
event e;
e = get_event(socket, v, database);
e = get_event(socket, &ebuf, database);
v = ebuf.obuf;
if (e.type == -1) break;
if (e.type == ev_input) {
int sf = e.e[2].i;
memcpy(dump[sf], v, T_BUFFER_MAX);
if (ebuf.osize > T_BUFFER_MAX)
{ printf("event size too big\n"); exit(1); }
memcpy(dump[sf], ebuf.obuf, ebuf.osize);
dump_ev[sf] = e;
printf("input %d/%d\n", e.e[1].i, sf);
if (fwrite(dump_ev[sf].e[4].b, dump_ev[sf].e[4].bsize, 1, z) != 1) abort();
......
......@@ -84,11 +84,12 @@ int main(int n, char **v)
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) {
char v[T_BUFFER_MAX];
event e;
int on_off;
e = get_event(socket, v, database);
e = get_event(socket, &ebuf, database);
if (e.type == -1) break;
if (e.type != ev_fun)
{ printf("unhandled event %d\n", e.type); continue; }
......
......@@ -246,11 +246,12 @@ int main(int n, char **v)
new_thread(receiver, &d);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(in, v, database);
e = get_event(in, &ebuf, database);
if (e.type == -1) break;
if (!(e.type == ul_id || e.type == dl_id)) continue;
handle_event(h, e);
......
......@@ -123,14 +123,22 @@ int main(int n, char **v)
if (signal(SIGINT, force_stop) == SIG_ERR) abort();
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */
while (run) {
int type;
int32_t length;
char v[T_BUFFER_MAX];
char *v;
int vpos = 0;
if (fullread(socket, &length, 4) == -1) goto read_error;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}
v = ebuf.obuf;
memcpy(v+vpos, &length, 4);
vpos += 4;
#ifdef T_SEND_TIME
......
......@@ -136,14 +136,22 @@ int main(int n, char **v)
new_thread(get_message_thread, &socket);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) {
int type;
int32_t length;
char v[T_BUFFER_MAX];
char *v;
int vpos = 0;
/* read event from file */
if (fread(&length, 4, 1, in) != 1) break;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}
v = ebuf.obuf;
memcpy(v+vpos, &length, 4);
vpos += 4;
#ifdef T_SEND_TIME
......
......@@ -10,7 +10,6 @@
#include "view/view.h"
#include "gui/gui.h"
#include "utils.h"
#include "../T_defs.h"
#include "event_selector.h"
#include "config.h"
......@@ -182,11 +181,12 @@ int main(int n, char **v)
/* send the first message - activate selected traces */
is_on_changed(&textlog_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(textlog_data.socket, v, database);
e = get_event(textlog_data.socket, &ebuf, database);
if (e.type == -1) abort();
handle_event(h, e);
}
......
......@@ -287,11 +287,12 @@ int main(int n, char **v)
if (signal(SIGINT, force_stop) == SIG_ERR) abort();
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */
while (run) {
char v[T_BUFFER_MAX];
event e;
e = get_event(socket, v, database);
e = get_event(socket, &ebuf, database);
if (e.type == -1) { printf("disconnected? let's quit gently\n"); break; }
handle_event(h, e);
}
......
......@@ -12,7 +12,6 @@
#include "gui/gui.h"
#include "filter/filter.h"
#include "utils.h"
#include "../T_defs.h"
#include "event_selector.h"
#include "openair_logo.h"
#include "config.h"
......@@ -854,6 +853,8 @@ int main(int n, char **v)
if (pthread_mutex_init(&ue_data.lock, NULL)) abort();
setup_event_selector(g, database, is_on, is_on_changed, &ue_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
restart:
clear_remote_config();
ue_data.socket = connect_to(ip, port);
......@@ -863,9 +864,8 @@ restart:
/* read messages */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(ue_data.socket, v, database);
e = get_event(ue_data.socket, &ebuf, database);
if (e.type == -1) goto restart;
if (pthread_mutex_lock(&ue_data.lock)) abort();
handle_event(h, e);
......
......@@ -10,7 +10,6 @@
#include "view/view.h"
#include "gui/gui.h"
#include "utils.h"
#include "../T_defs.h"
#include "event_selector.h"
#include "config.h"
......@@ -188,11 +187,12 @@ int main(int n, char **v)
/* send the first message - activate selected traces */
is_on_changed(&vcd_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(vcd_data.socket, v, database);
e = get_event(vcd_data.socket, &ebuf, database);
if (e.type == -1) abort();
handle_event(h, e);
}
......
......@@ -858,6 +858,9 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
(*pdcch_vars_th)[th_id][eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
(*pdcch_vars_th)[th_id][eNB_id]->dciFormat = 0;
(*pdcch_vars_th)[th_id][eNB_id]->agregationLevel = 0xFF;