Commit cf1db866 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/develop_integration_2018_w44' into develop

parents 3fa0f5a9 9b8e4e4c
......@@ -290,36 +290,36 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
add_list2_option(RRC_ASN1_VERSION "Rel14" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
make_version(RRC_VERSION 8 6 0)
make_version(LTE_RRC_VERSION 8 6 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
make_version(RRC_VERSION 10 2 0)
make_version(LTE_RRC_VERSION 10 2 0)
add_definitions(-DCBA)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
make_version(RRC_VERSION 10 2 0)
make_version(LTE_RRC_VERSION 10 2 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel11")
make_version(RRC_VERSION 11 18 0)
make_version(LTE_RRC_VERSION 11 18 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-11.18.0.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel12")
make_version(RRC_VERSION 12 16 0)
make_version(LTE_RRC_VERSION 12 16 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-12.16.0.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel13")
make_version(RRC_VERSION 13 9 1)
make_version(LTE_RRC_VERSION 13 9 1)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-13.9.1.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel14")
make_version(RRC_VERSION 14 7 0)
make_version(LTE_RRC_VERSION 14 7 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1)
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel15")
make_version(RRC_VERSION 15 2 2)
make_version(LTE_RRC_VERSION 15 2 2)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.2.2.asn1)
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
add_definitions(-DRRC_VERSION=${RRC_VERSION})
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
message("calling asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
message("calling ASN1C_PREFIX=LTE_ asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
execute_process(COMMAND mkdir -p ${RRC_FULL_DIR}
COMMAND env asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
COMMAND env "ASN1C_PREFIX=LTE_" asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error")
......@@ -339,7 +339,7 @@ include_directories ("${RRC_FULL_DIR}")
add_custom_command (
OUTPUT ${RRC_FULL_DIR}/asn_constant.h
COMMAND mkdir -p ${RRC_FULL_DIR}
COMMAND env asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
COMMAND env "ASN1C_PREFIX=LTE_" asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
DEPENDS ${RRC_GRAMMAR}
)
......
......@@ -956,20 +956,20 @@
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec> $OPENAIR_DIR/targets/bin/dlsim.Rel14</main_exec>
<main_exec_args> -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O60
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O60
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O25
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O25
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O60
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O60
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O60
-m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O60
-m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O60
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O60
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O60</main_exec_args>
<main_exec_args> -m=5 -g=F -s=-1= -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60</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>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
......
......@@ -9,4 +9,5 @@ set(MU_RECIEVER False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
set(RRC_ASN1_VERSION "Rel14")
set (UE_TIMING_TRACE True)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
......@@ -252,7 +252,7 @@ install_usrp_uhd_driver_from_source(){
rm -rf /tmp/uhd
git clone https://github.com/EttusResearch/uhd.git
cd uhd
git checkout tags/release_003_010_001_001
git checkout tags/v3.13.0.2
mkdir -p host/build
cd host/build
$CMAKE ../
......@@ -683,7 +683,7 @@ install_asn1c_from_source(){
# better to use a given commit than a branch in case the branch
# is updated and requires modifications in the source of OAI
#git checkout velichkov_s1ap_plus_option_group
git checkout d3aed06bb2bec7df1b5c6d0333f8c7dfc5993372
git checkout 0a7524184f16e7093990a31d8d4db487a16e5782
autoreconf -iv
./configure
make -j`nproc`
......
......@@ -75,8 +75,12 @@ ID = ENB_PHY_MSG3_ALLOCATION
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti : int,first_transmission : int,Msg3_frame : int,Msg3_subframe
ID = ENB_PHY_INITIATE_RA_PROCEDURE
DESC = eNodeB initiates a random access procedure after detecting enough energy for one of the preambles
GROUP = ALL:PHY:ENB
GROUP = ALL:PHY:ENB:WIRESHARK
FORMAT = int,eNB_ID : int,frame : int,subframe : int,preamble : int,energy : int,delay
ID = ENB_PHY_MIB
DESC = MIB data
GROUP = ALL:PHY:ENB:WIRESHARK
FORMAT = int,eNB_ID : int,frame : int,subframe : buffer,data
#MAC logs
ID = ENB_MAC_UE_DL_SDU
......@@ -97,7 +101,7 @@ ID = ENB_MAC_UE_UL_PDU
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : int,sdu_length : int,num_ce : int,num_sdu
ID = ENB_MAC_UE_UL_PDU_WITH_DATA
DESC = MAC uplink UE received PDU
GROUP = ALL:MAC:ENB
GROUP = ALL:MAC:ENB:WIRESHARK
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : int,sdu_length : int,num_ce : int,num_sdu : buffer,data
ID = ENB_MAC_UE_UL_SDU
DESC = MAC uplink UE received SDU
......@@ -113,12 +117,16 @@ ID = ENB_MAC_UE_UL_CE
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,ce
ID = ENB_MAC_UE_DL_PDU_WITH_DATA
DESC = MAC downlink PDU for an UE
GROUP = ALL:MAC:ENB
GROUP = ALL:MAC:ENB:WIRESHARK
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
ID = ENB_MAC_UE_DL_RAR_PDU_WITH_DATA
DESC = MAC downlink PDU for an UE
GROUP = ALL:MAC:ENB:WIRESHARK
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
#RLC logs
ID = ENB_RLC_DL
......
......@@ -60,6 +60,11 @@ macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
multi: multi.o utils.o database.o config.o
$(CC) $(CFLAGS) -o multi $^ $(LIBS)
multi.o: ../T_IDs.h
../T_IDs.h:
cd .. && $(MAKE)
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
gui/gui.a:
......
......@@ -16,6 +16,8 @@ void usage(void)
" -f <name> <value> field 'name' of 'event' has to match 'value'\n"
" type of 'name' must be int\n"
" (you can use several -f options)\n"
" -after <raw time> <nsec> 'event' time has to be greater than this\n"
" -count <n> dump 'n' matching events (less if EOF reached)\n"
);
exit(1);
}
......@@ -51,6 +53,10 @@ int main(int n, char **v)
int filter_count = 0;
int buffer_arg;
int found;
int count = 1;
int check_time = 0;
time_t sec;
long nsec;
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
......@@ -63,6 +69,14 @@ int main(int n, char **v)
filter_value[filter_count++] = atoi(v[++i]);
continue;
}
if (!strcmp(v[i], "-after")) { if (i>n-3) usage();
check_time = 1;
sec = atoll(v[++i]);
nsec = atol(v[++i]);
continue;
}
if (!strcmp(v[i], "-count"))
{ if (i > n-2) usage(); count = atoi(v[++i]); continue; }
if (file == NULL) { file = v[i]; continue; }
if (event_name == NULL) { event_name = v[i]; continue; }
if (buffer_name == NULL) { buffer_name = v[i]; continue; }
......@@ -111,13 +125,20 @@ int main(int n, char **v)
break;
if (i != filter_count)
continue;
if (check_time &&
!(e.sending_time.tv_sec > sec ||
(e.sending_time.tv_sec == sec && e.sending_time.tv_nsec >= nsec)))
continue;
if (fwrite(e.e[buffer_arg].b, e.e[buffer_arg].bsize, 1, out) != 1)
{ perror(output_file); exit(1); }
found = 1;
break;
found++;
if (found == count)
break;
}
if (found == 0) printf("ERROR: event not found\n");
if (found != count)
printf("WARNING: dumped %d events (wanted %d)\n", found, count);
fclose(out);
......
......@@ -30,6 +30,7 @@ void framelog_set_skip(logger *_this, int skip_delay);
void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9);
void textlog_dump_buffer(logger *_this, int dump_buffer);
void textlog_raw_time(logger *_this, int raw_time);
#include "view/view.h"
......
......@@ -33,6 +33,7 @@ struct textlog {
/* local output buffer */
OBUF o;
int dump_buffer;
int raw_time;
};
static void _event(void *p, event e)
......@@ -51,9 +52,13 @@ static void _event(void *p, event e)
#ifdef T_SEND_TIME
t = localtime(&e.sending_time.tv_sec);
/* round tv_nsec to nearest millisecond */
sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld: ", t->tm_hour, t->tm_min, t->tm_sec,
e.sending_time.tv_nsec);
if (l->raw_time)
sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld [%ld]: ",
t->tm_hour, t->tm_min, t->tm_sec,
e.sending_time.tv_nsec, e.sending_time.tv_sec);
else
sprintf(tt, "%2.2d:%2.2d:%2.2d.%9.9ld: ", t->tm_hour, t->tm_min, t->tm_sec,
e.sending_time.tv_nsec);
PUTS(&l->o, tt);
#endif
......@@ -215,3 +220,9 @@ void textlog_dump_buffer(logger *_this, int dump_buffer)
struct textlog *l = _this;
l->dump_buffer = dump_buffer;
}
void textlog_raw_time(logger *_this, int raw_time)
{
struct textlog *l = _this;
l->raw_time = raw_time;
}
......@@ -14,6 +14,11 @@
#define DEFAULT_IP "127.0.0.1"
#define DEFAULT_PORT 9999
#define NO_PREAMBLE -1
int no_sib = 0;
int no_mib = 0;
typedef struct {
int socket;
struct sockaddr_in to;
......@@ -28,11 +33,24 @@ typedef struct {
int dl_frame;
int dl_subframe;
int dl_data;
/* mib */
int mib_frame;
int mib_subframe;
int mib_data;
/* RA preamble */
int preamble_frame;
int preamble_subframe;
int preamble_preamble;
/* RAR */
int rar_rnti;
int rar_frame;
int rar_subframe;
int rar_data;
} ev_data;
void ul(void *_d, event e)
void trace(ev_data *d, int direction, int rnti_type, int rnti,
int frame, int subframe, void *buf, int bufsize, int preamble)
{
ev_data *d = _d;
ssize_t ret;
int fsf;
int i;
......@@ -41,79 +59,118 @@ void ul(void *_d, event e)
PUTS(&d->buf, MAC_LTE_START_STRING);
PUTC(&d->buf, FDD_RADIO);
PUTC(&d->buf, DIRECTION_UPLINK);
PUTC(&d->buf, C_RNTI);
PUTC(&d->buf, direction);
PUTC(&d->buf, rnti_type);
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (e.e[d->ul_rnti].i>>8) & 255);
PUTC(&d->buf, e.e[d->ul_rnti].i & 255);
if (rnti_type == C_RNTI || rnti_type == RA_RNTI) {
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (rnti>>8) & 255);
PUTC(&d->buf, rnti & 255);
}
/* for newer version of wireshark? */
fsf = (e.e[d->ul_frame].i << 4) + e.e[d->ul_subframe].i;
fsf = (frame << 4) + subframe;
/* for older version? */
fsf = e.e[d->ul_subframe].i;
//fsf = subframe;
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
PUTC(&d->buf, (fsf>>8) & 255);
PUTC(&d->buf, fsf & 255);
if (preamble != NO_PREAMBLE) {
PUTC(&d->buf, MAC_LTE_SEND_PREAMBLE_TAG);
PUTC(&d->buf, preamble);
PUTC(&d->buf, 0); /* rach attempt - always 0 for us (not sure of this) */
}
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
for (i = 0; i < e.e[d->ul_data].bsize; i++)
PUTC(&d->buf, ((char*)e.e[d->ul_data].b)[i]);
for (i = 0; i < bufsize; i++)
PUTC(&d->buf, ((char*)buf)[i]);
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
if (ret != d->buf.osize) abort();
}
void ul(void *_d, event e)
{
ev_data *d = _d;
trace(d, DIRECTION_UPLINK, C_RNTI, e.e[d->ul_rnti].i,
e.e[d->ul_frame].i, e.e[d->ul_subframe].i,
e.e[d->ul_data].b, e.e[d->ul_data].bsize,
NO_PREAMBLE);
}
void dl(void *_d, event e)
{
ev_data *d = _d;
ssize_t ret;
int fsf;
int i;
d->buf.osize = 0;
if (e.e[d->dl_rnti].i == 0xffff && no_sib) return;
PUTS(&d->buf, MAC_LTE_START_STRING);
PUTC(&d->buf, FDD_RADIO);
PUTC(&d->buf, DIRECTION_DOWNLINK);
PUTC(&d->buf, C_RNTI);
trace(d, DIRECTION_DOWNLINK,
e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
e.e[d->dl_frame].i, e.e[d->dl_subframe].i,
e.e[d->dl_data].b, e.e[d->dl_data].bsize,
NO_PREAMBLE);
}
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (e.e[d->dl_rnti].i>>8) & 255);
PUTC(&d->buf, e.e[d->dl_rnti].i & 255);
void mib(void *_d, event e)
{
ev_data *d = _d;
/* for newer version of wireshark? */
fsf = (e.e[d->dl_frame].i << 4) + e.e[d->dl_subframe].i;
/* for older version? */
fsf = e.e[d->dl_subframe].i;
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
PUTC(&d->buf, (fsf>>8) & 255);
PUTC(&d->buf, fsf & 255);
if (no_mib) return;
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
for (i = 0; i < e.e[d->dl_data].bsize; i++)
PUTC(&d->buf, ((char*)e.e[d->dl_data].b)[i]);
trace(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
e.e[d->mib_data].b, e.e[d->mib_data].bsize,
NO_PREAMBLE);
}
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
if (ret != d->buf.osize) abort();
void preamble(void *_d, event e)
{
ev_data *d = _d;
trace(d, DIRECTION_UPLINK, NO_RNTI, 0,
e.e[d->preamble_frame].i, e.e[d->preamble_subframe].i,
NULL, 0,
e.e[d->preamble_preamble].i);
}
void rar(void *_d, event e)
{
ev_data *d = _d;
trace(d, DIRECTION_DOWNLINK, RA_RNTI, e.e[d->rar_rnti].i,
e.e[d->rar_frame].i, e.e[d->rar_subframe].i,
e.e[d->rar_data].b, e.e[d->rar_data].bsize,
NO_PREAMBLE);
}
void setup_data(ev_data *d, void *database, int ul_id, int dl_id)
void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
int preamble_id, int rar_id)
{
database_event_format f;
int i;
d->ul_rnti = -1;
d->ul_frame = -1;
d->ul_subframe = -1;
d->ul_data = -1;
d->ul_rnti = -1;
d->ul_frame = -1;
d->ul_subframe = -1;
d->ul_data = -1;
d->dl_rnti = -1;
d->dl_frame = -1;
d->dl_subframe = -1;
d->dl_data = -1;
d->dl_rnti = -1;
d->dl_frame = -1;
d->dl_subframe = -1;
d->dl_data = -1;
d->mib_frame = -1;
d->mib_subframe = -1;
d->mib_data = -1;
d->preamble_frame = -1;
d->preamble_subframe = -1;
d->preamble_preamble = -1;
d->rar_rnti = -1;
d->rar_frame = -1;
d->rar_subframe = -1;
d->rar_data = -1;
#define G(var_name, var_type, var) \
if (!strcmp(f.name[i], var_name)) { \
......@@ -144,6 +201,37 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id)
if (d->dl_rnti == -1 || d->dl_frame == -1 || d->dl_subframe == -1 ||
d->dl_data == -1) goto error;
/* MIB: frame, subframe, data */
f = get_format(database, mib_id);
for (i = 0; i < f.count; i++) {
G("frame", "int", d->mib_frame);
G("subframe", "int", d->mib_subframe);
G("data", "buffer", d->mib_data);
}
if (d->mib_frame == -1 || d->mib_subframe == -1 || d->mib_data == -1)
goto error;
/* preamble: frame, subframe, preamble */
f = get_format(database, preamble_id);
for (i = 0; i < f.count; i++) {
G("frame", "int", d->preamble_frame);
G("subframe", "int", d->preamble_subframe);
G("preamble", "int", d->preamble_preamble);
}
if (d->preamble_frame == -1 || d->preamble_subframe == -1 ||
d->preamble_preamble == -1) goto error;
/* rar: rnti, frame, subframe, data */
f = get_format(database, rar_id);
for (i = 0; i < f.count; i++) {
G("rnti", "int", d->rar_rnti);
G("frame", "int", d->rar_frame);
G("subframe", "int", d->rar_subframe);
G("data", "buffer", d->rar_data);
}
if (d->rar_rnti == -1 || d->rar_frame == -1 || d->rar_subframe == -1 ||
d->rar_data == -1) goto error;
#undef G
return;
......@@ -179,7 +267,9 @@ void usage(void)
" -d <database file> this option is mandatory\n"
" -i <dump file> read events from this dump file\n"
" -ip <IP address> send packets to this IP address (default %s)\n"
" -p <port> send packets to this port (default %d)\n",
" -p <port> send packets to this port (default %d)\n"
" -no-mib do not report MIB\n"
" -no-sib do not report SIBs\n",
DEFAULT_IP,
DEFAULT_PORT
);
......@@ -194,7 +284,7 @@ int main(int n, char **v)
event_handler *h;
int in;
int i;
int ul_id, dl_id;
int ul_id, dl_id, mib_id = -1, preamble_id, rar_id;
ev_data d;
char *ip = DEFAULT_IP;
int port = DEFAULT_PORT;
......@@ -209,6 +299,8 @@ int main(int n, char **v)
{ if (i > n-2) usage(); input_filename = v[++i]; continue; }
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
if (!strcmp(v[i], "-p")) {if(i>n-2)usage(); port=atoi(v[++i]); continue; }
if (!strcmp(v[i], "-no-mib")) { no_mib = 1; continue; }
if (!strcmp(v[i], "-no-sib")) { no_sib = 1; continue; }
usage();
}
......@@ -232,10 +324,16 @@ int main(int n, char **v)
ul_id = event_id_from_name(database, "ENB_MAC_UE_UL_PDU_WITH_DATA");
dl_id = event_id_from_name(database, "ENB_MAC_UE_DL_PDU_WITH_DATA");
setup_data(&d, database, ul_id, dl_id);
mib_id = event_id_from_name(database, "ENB_PHY_MIB");
preamble_id = event_id_from_name(database, "ENB_PHY_INITIATE_RA_PROCEDURE");
rar_id = event_id_from_name(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA");
setup_data(&d, database, ul_id, dl_id, mib_id, preamble_id, rar_id);
register_handler_function(h, ul_id, ul, &d);
register_handler_function(h, dl_id, dl, &d);
register_handler_function(h, mib_id, mib, &d);
register_handler_function(h, preamble_id, preamble, &d);
register_handler_function(h, rar_id, rar, &d);
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
if (d.socket == -1) { perror("socket"); exit(1); }
......@@ -253,7 +351,8 @@ int main(int n, char **v)
event e;
e = get_event(in, &ebuf, database);
if (e.type == -1) break;
if (!(e.type == ul_id || e.type == dl_id)) continue;
if (!(e.type == ul_id || e.type == dl_id || e.type == mib_id ||
e.type == preamble_id || e.type == rar_id)) continue;
handle_event(h, e);
}
......
......@@ -52,6 +52,7 @@ void usage(void)
" they will be processed in order\n"
" by default, all is off\n"
" -full also dump buffers' content\n"
" -raw-time also prints 'raw time'\n"
" -ip <host> connect to given IP address (default %s)\n"
" -p <port> connect to given port (default %d)\n"
" -x GUI output\n"
......@@ -91,6 +92,7 @@ int main(int n, char **v)
int gui_active = 1;
textlog_data textlog_data;
int full = 0;
int raw_time = 0;
/* write on a socket fails if the other end is closed and we get SIGPIPE */
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort();
......@@ -117,6 +119,7 @@ int main(int n, char **v)
if (!strcmp(v[i], "-debug-gui")) { gui_logd = 1; continue; }
if (!strcmp(v[i], "-no-gui")) { gui_active = 0; continue; }
if (!strcmp(v[i], "-full")) { full = 1; continue; }
if (!strcmp(v[i], "-raw-time")) { raw_time = 1; continue; }
usage();
}
......@@ -162,6 +165,7 @@ int main(int n, char **v)
// "ev: {} eNB_id [eNB_ID] frame [frame] subframe [subframe]");
logger_add_view(textlog, out);
if (full) textlog_dump_buffer(textlog, 1);
if (raw_time) textlog_raw_time(textlog, 1);
free(name);
free(desc);
}
......@@ -187,7 +191,7 @@ int main(int n, char **v)
while (1) {
event e;
e = get_event(textlog_data.socket, &ebuf, database);
if (e.type == -1) abort();
if (e.type == -1) break;
handle_event(h, e);
}
......
......@@ -33,7 +33,7 @@
//#include "TDD-Config.h"
//#include "MBSFN-SubframeConfigList.h"
//#include "MobilityControlInfo.h"
//#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
//#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
//#include "SCellToAddMod-r10.h"
//#endif
......
......@@ -27,10 +27,10 @@
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "LTE_RadioResourceConfigCommonSIB.h"
#include "LTE_RadioResourceConfigDedicated.h"
#include "LTE_TDD-Config.h"
#include "LTE_MBSFN-SubframeConfigList.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
......@@ -182,7 +182,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
fp->frame_type,
RC.eNB[Mod_id][CC_id]->X_u);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
fp->prach_emtc_config_common.prach_Config_enabled=1;
fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value;
......@@ -487,7 +487,7 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
{
uint16_t UE_id;
struct PhysicalConfigDedicated *physicalConfigDedicated;
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
......@@ -504,7 +504,7 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
}
if (physicalConfigDedicated->pucch_ConfigDedicated) {
if (physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.present==PUCCH_ConfigDedicated__ackNackRepetition_PR_release)
if (physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.present==LTE_PUCCH_ConfigDedicated__ackNackRepetition_PR_release)
eNB->pucch_config_dedicated[UE_id].ackNackRepetition=0;
else {
eNB->pucch_config_dedicated[UE_id].ackNackRepetition=1;
......@@ -563,7 +563,7 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
}
if (physicalConfigDedicated->schedulingRequestConfig) {
if (physicalConfigDedicated->schedulingRequestConfig->present == SchedulingRequestConfig_PR_setup) {
if (physicalConfigDedicated->schedulingRequestConfig->present == LTE_SchedulingRequestConfig_PR_setup) {
eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex = physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
eNB->scheduling_request_config[UE_id].sr_ConfigIndex=physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_ConfigIndex;
eNB->scheduling_request_config[UE_id].dsr_TransMax=physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax;
......@@ -578,7 +578,7 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
}
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated) {
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == LTE_SoundingRS_UL_ConfigDedicated_PR_setup) {
eNB->soundingrs_ul_config_dedicated[UE_id].srsConfigDedicatedSetup = 1;
eNB->soundingrs_ul_config_dedicated[UE_id].duration = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.duration;
......@@ -729,7 +729,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif
int i, UE_id;
......@@ -825,7 +825,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
prach_vars->rxsigF[0] = (int16_t**)malloc16_clear(64*sizeof(int16_t*));
// PRACH BR
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) );
// assume maximum of 64 RX antennas for PRACH receiver
......@@ -893,7 +893,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif
int i, UE_id;
......@@ -926,7 +926,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
free_and_zero(prach_vars->prach_ifft[0]);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (int ce_level = 0; ce_level < 4; ce_level++) {
for (i = 0; i < 64; i++) free_and_zero(prach_vars_br->prach_ifft[ce_level][i]);
free_and_zero(prach_vars_br->prach_ifft[ce_level]);
......
......@@ -23,10 +23,10 @@
#include "SCHED/sched_eNB.h"
#include "PHY/phy_extern.h"
#include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "LTE_RadioResourceConfigCommonSIB.h"
#include "LTE_RadioResourceConfigDedicated.h"
#include "LTE_TDD-Config.h"
#include "LTE_MBSFN-SubframeConfigList.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
......@@ -101,7 +101,7 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_rx; i++) {
ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (j=0;j<4;j++) {
ru->prach_rxsigF_br[j][i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
......@@ -179,7 +179,7 @@ void phy_free_RU(RU_t *ru)
for (i = 0; i < ru->nb_rx; i++) {
free_and_zero(ru->prach_rxsigF[i]);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]);
#endif
}
......
This diff is collapsed.
......@@ -25,15 +25,15 @@
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "SystemInformationBlockType2.h"
#include "LTE_SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "PHICH-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "MobilityControlInfo.h"
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "SCellToAddMod-r10.h"
#include "LTE_RadioResourceConfigDedicated.h"
#include "LTE_TDD-Config.h"
#include "LTE_PHICH-Config.h"
#include "LTE_MBSFN-SubframeConfigList.h"
#include "LTE_MobilityControlInfo.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "LTE_SCellToAddMod-r10.h"
#endif
/** @addtogroup _PHY_STRUCTURES_
* @{
......@@ -110,7 +110,7 @@ void phy_config_mib_eNB(int Mod_id,
int CC_id,
int eutra_band,
int N_RB_DL,
PHICH_Config_t *phich_config,
LTE_PHICH_Config_t *phich_config,
int Nid_cell,
int Ncp,
int p_eNB,
......@@ -128,7 +128,7 @@ void phy_config_mib_eNB(int Mod_id,
@param SIperiod Periodicity of System Information Messages (in multiples of a frame)*/
void phy_config_sib1_eNB(module_id_t Mod_id,
int CC_id,
TDD_Config_t *tdd_Config,
LTE_TDD_Config_t *tdd_Config,
uint8_t SIwindowsize,
uint16_t SIperiod);
......@@ -143,7 +143,7 @@ void phy_config_sib1_eNB(module_id_t Mod_id,
void phy_config_sib1_ue(module_id_t Mod_id,
int CC_id,
uint8_t CH_index,
TDD_Config_t *tdd_Config,
LTE_TDD_Config_t *tdd_Config,
uint8_t SIwindowsize,
uint16_t SIperiod);
......@@ -166,14 +166,14 @@ void phy_config_sib1_ue(module_id_t Mod_id,
@param additionalSpectrumEmission UL parameter (see 36.101)
@param mbsfn_SubframeConfigList MBSFN subframe configuration
*/
void phy_config_sib2_ue(module_id_t Mod_id,
int CC_id,
uint8_t CH_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
void phy_config_sib2_ue(module_id_t Mod_id,
int CC_id,
uint8_t CH_index,
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth,
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
/*!
......@@ -188,7 +188,7 @@ void phy_config_sib2_ue(module_id_t Mod_id,
void phy_config_afterHO_ue(module_id_t Mod_id,
uint8_t CC_id,
uint8_t eNB_index,
MobilityControlInfo_t *mobilityControlInfo,
LTE_MobilityControlInfo_t *mobilityControlInfo,
uint8_t ho_failed);
/*!
\fn void phy_config_sib2_eNB(module_id_t Mod_id,
......@@ -206,13 +206,13 @@ void phy_config_afterHO_ue(module_id_t Mod_id,
@param additionalSpectrumEmission UL parameter (see 36.101)
@param mbsfn_SubframeConfigList MBSFN subframe configuration
*/
void phy_config_sib2_eNB(module_id_t Mod_id,
int CC_id,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CArrierFreq,
void phy_config_sib2_eNB(module_id_t Mod_id,
int CC_id,
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreq,
long *ul_Bandwidth,
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList);
/*!
......@@ -229,7 +229,7 @@ void phy_config_sib2_eNB(module_id_t Mod_id,
void phy_config_dedicated_ue(module_id_t Mod_id,
int CC_id,
uint8_t CH_index,
struct PhysicalConfigDedicated *physicalConfigDedicated);
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated);
/*!
\fn void phy_config_harq_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index,
......@@ -308,7 +308,7 @@ void phy_config_meas_ue(module_id_t Mod_id,
void phy_config_dedicated_eNB(module_id_t Mod_id,
int CC_id,
rnti_t rnti,
struct PhysicalConfigDedicated *physicalConfigDedicated);
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated);
/*!
\fn void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *phy_vars_eNB)
......@@ -349,15 +349,15 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
uint32_t perfect_ce);
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id);
void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
uint16_t rnti,
SCellToAddMod_r10_t *sCellToAddMod_r10,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id);
#endif
......
......@@ -121,7 +121,7 @@ uint8_t *generate_dci0(uint8_t *dci,
(aggregation_level==2) ||
(aggregation_level==4) ||
(aggregation_level==8)
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // Added for EPDCCH/MPDCCH
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // Added for EPDCCH/MPDCCH
||
(aggregation_level==16) ||
(aggregation_level==24) ||
......
......@@ -60,7 +60,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// Rule for accumulation of subframes for BL/CE UEs
uint8_t Nacc=4;
uint16_t j0,j,idelta;
......@@ -97,7 +97,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
// reset = 1;
// x1 is set in lte_gold_generic
if (mbsfn_flag == 0) {
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
#else
......@@ -115,7 +115,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
}
#ifdef DEBUG_SCRAMBLING
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
#else
printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
......
......@@ -47,7 +47,7 @@
//#define DEBUG_DCI_DECODING 1
//#define DEBUG_PHY
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
}
......
......@@ -47,7 +47,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
int32_t **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
#endif
void *tx_buffer = ru->ifbuffer.tx[subframe&1];
......@@ -221,7 +221,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
int16_t *rxF;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
else
......@@ -262,7 +262,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
int32_t **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
#endif
void *rx_buffer = ru->ifbuffer.rx;
......@@ -359,7 +359,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
int16_t *rxF;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (*packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[*packet_type - IF4p5_PRACH - 1][0][0];
else
......
......@@ -38,7 +38,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "prach_extern.h"
#if (RRC_VERSION < MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
#define rx_prach0 rx_prach
#endif
......@@ -49,7 +49,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t *max_preamble_delay,
uint16_t Nf,
uint8_t tdd_mapindex
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint8_t br_flag,
uint8_t ce_level
#endif
......@@ -95,7 +95,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
int32_t *prach_ifft=(int32_t*)NULL;
int32_t **prach_ifftp=(int32_t **)NULL;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int prach_ifft_cnt=0;
#endif
......@@ -112,7 +112,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
frame_type = fp->frame_type;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
AssertFatal(fp->prach_emtc_config_common.prach_Config_enabled==1,
"emtc prach_Config is not enabled\n");
......@@ -147,7 +147,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t N_ZC = (prach_fmt <4)?839:139;
if (eNB) {
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
subframe = eNB->proc.subframe_prach_br;
......@@ -174,7 +174,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
}
}
else {
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
subframe = ru->proc.subframe_prach_br;
rxsigF = ru->prach_rxsigF_br[ce_level];
......@@ -425,7 +425,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if ((eNB==NULL) && (ru!=NULL) && ru->function == NGFI_RRU_IF4p5) {
/// **** send_IF4 of rxsigF to RAU **** ///
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
else
......@@ -570,7 +570,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (new_dft == 1) {
new_dft = 0;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag == 1) {
Xu=(int16_t*)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
prach_ifft = prach_ifftp[prach_ifft_cnt++];
......@@ -627,7 +627,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
} // new dft
// check energy in nth time shift, for
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if ((br_flag==0) ||
(eNB->prach_vars_br.repetition_number[ce_level]==
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
......@@ -694,7 +694,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
}
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void rx_prach(PHY_VARS_eNB *eNB,
RU_t *ru,
......@@ -736,4 +736,4 @@ void rx_prach(PHY_VARS_eNB *eNB,
}
}
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
......@@ -570,7 +570,7 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t su
uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
int prach_mask = is_prach_subframe0(frame_parms,prach_ConfigIndex,frame,subframe);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int i;
for (i=0;i<4;i++) {
......
......@@ -105,7 +105,7 @@ typedef enum {
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
typedef enum {
CEmodeA = 0,
CEmodeB = 1
......@@ -138,7 +138,7 @@ typedef enum {
HARQ_SR_CQI
} UCI_type_t;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
typedef enum {
NOCE,
CEMODEA,
......@@ -183,7 +183,7 @@ typedef struct {
PRACH_TDD_PREAMBLE_MAP_elem map[6];
} PRACH_TDD_PREAMBLE_MAP;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
typedef struct {
uint16_t slss_id;
......
......@@ -126,7 +126,7 @@ typedef struct {
/// codeword this transport block is mapped to
uint8_t codeword;
#ifdef PHY_TX_THREAD
#ifdef Rel14
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
uint8_t sib1_br_flag;
/// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
......@@ -183,7 +183,7 @@ typedef struct {
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t sqrt_rho_b;
#ifndef PHY_TX_THREAD
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
uint8_t sib1_br_flag;
/// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
......@@ -348,7 +348,7 @@ typedef struct {
uint8_t tdd_bundling;
/// Received Energy
uint32_t stat;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// non BL/CE, CEmodeA, CEmodeB
UE_type_t ue_type;
/// Indicates the symbols that are left empty due to eMTC retuning.
......
......@@ -578,7 +578,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru,
uint16_t *max_preamble_energy,
uint16_t *max_preamble_delay,
uint16_t Nf, uint8_t tdd_mapindex
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
uint8_t br_flag
#endif
......
......@@ -3593,7 +3593,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if (cqi_req == 1) {
if( (AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) )
if( (LTE_AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (LTE_AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) )
{
ulsch->O_RI = 1;
}
......
......@@ -425,7 +425,7 @@ typedef struct eNB_proc_NB_IoT_t_s {
int RU_mask;
/// mask for RUs serving nbiot (PRACH)
int RU_mask_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mask for RUs serving eNB (PRACH)
int RU_mask_prach_br;
#endif
......
......@@ -847,6 +847,7 @@ typedef struct {
time_stats_t pdsch_procedures_stat[RX_NB_TH];
time_stats_t pdsch_procedures_per_slot_stat[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
time_stats_t dlsch_procedures_stat[RX_NB_TH];
time_stats_t crnti_procedures_stats;
time_stats_t ofdm_demod_stats;
time_stats_t dlsch_rx_pdcch_stats;
......
......@@ -159,7 +159,7 @@ typedef struct {
PRACH_CONFIG_INFO prach_ConfigInfo;
} PRACH_CONFIG_COMMON;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// PRACH-eMTC-Config from 36.331 RRC spec
typedef struct {
......@@ -192,7 +192,7 @@ typedef struct {
/// prach_Config_enabled=1 means enabled. \vr{[0..1]}
uint8_t prach_Config_enabled;
/// PRACH Configuration Information
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
PRACH_eMTC_CONFIG_INFO prach_ConfigInfo;
#endif
} PRACH_eMTC_CONFIG_COMMON;
......@@ -644,7 +644,7 @@ typedef struct {
uint8_t nb_antenna_ports_eNB;
/// PRACH_CONFIG
PRACH_CONFIG_COMMON prach_config_common;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// PRACH_eMTC_CONFIG
PRACH_eMTC_CONFIG_COMMON prach_emtc_config_common;
#endif
......
......@@ -85,7 +85,7 @@ typedef struct RU_proc_t_s {
int subframe_tx;
/// subframe to act upon for reception of prach
int subframe_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// subframe to act upon for reception of prach BL/CE UEs
int subframe_prach_br;
#endif
......@@ -97,7 +97,7 @@ typedef struct RU_proc_t_s {
int frame_tx_unwrap;
/// frame to act upon for reception of prach
int frame_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// frame to act upon for reception of prach
int frame_prach_br;
#endif
......@@ -109,7 +109,7 @@ typedef struct RU_proc_t_s {
int instance_cnt_FH1;
/// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach_br;
#endif
......@@ -131,7 +131,7 @@ typedef struct RU_proc_t_s {
pthread_t pthread_FH1;
/// pthread structure for RU prach processing thread
pthread_t pthread_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread structure for RU prach processing thread BL/CE UEs
pthread_t pthread_prach_br;
#endif
......@@ -154,7 +154,7 @@ typedef struct RU_proc_t_s {
pthread_attr_t attr_FH1;
/// pthread attributes for RU prach
pthread_attr_t attr_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread attributes for RU prach BL/CE UEs
pthread_attr_t attr_prach_br;
#endif
......@@ -173,7 +173,7 @@ typedef struct RU_proc_t_s {
struct sched_param sched_param_FH1;
/// scheduling parameters for RU prach thread
struct sched_param sched_param_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// scheduling parameters for RU prach thread BL/CE UEs
struct sched_param sched_param_prach_br;
#endif
......@@ -186,7 +186,7 @@ typedef struct RU_proc_t_s {
pthread_cond_t cond_FH1;
/// condition variable for RU prach thread
pthread_cond_t cond_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// condition variable for RU prach thread BL/CE UEs
pthread_cond_t cond_prach_br;
#endif
......@@ -207,7 +207,7 @@ typedef struct RU_proc_t_s {
pthread_mutex_t mutex_FH1;
/// mutex for RU prach
pthread_mutex_t mutex_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mutex for RU prach BL/CE UEs
pthread_mutex_t mutex_prach_br;
#endif
......@@ -359,7 +359,7 @@ typedef struct RU_t_s{
int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru);
/// function pointer to wakeup routine in lte-enb.
void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// function pointer to wakeup routine in lte-enb.
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
#endif
......@@ -484,7 +484,7 @@ typedef struct RRU_config_s {
int prach_FreqOffset[MAX_BANDS_PER_RRU];
/// prach_ConfigIndex for IF4p5
int prach_ConfigIndex[MAX_BANDS_PER_RRU];
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int emtc_prach_CElevel_enable[MAX_BANDS_PER_RRU][4];
/// emtc_prach_FreqOffset for IF4p5 per CE Level
int emtc_prach_FreqOffset[MAX_BANDS_PER_RRU][4];
......@@ -619,7 +619,7 @@ typedef struct {
int32_t **prach_ifft[4];
/// repetition number
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// indicator of first frame in a group of PRACH repetitions
int first_frame[4];
/// current repetition for each CE level
......@@ -706,7 +706,7 @@ typedef struct eNB_proc_t_s {
int subframe_rx;
/// subframe to act upon for PRACH
int subframe_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// subframe to act upon for reception of prach BL/CE UEs
int subframe_prach_br;
#endif
......@@ -716,7 +716,7 @@ typedef struct eNB_proc_t_s {
int frame_tx;
/// frame to act upon for PRACH
int frame_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// frame to act upon for PRACH BL/CE UEs
int frame_prach_br;
#endif
......@@ -726,7 +726,7 @@ typedef struct eNB_proc_t_s {
int instance_cnt_te;
/// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// \internal This variable is protected by \ref mutex_prach for BL/CE UEs.
int instance_cnt_prach_br;
#endif
......@@ -748,7 +748,7 @@ typedef struct eNB_proc_t_s {
pthread_attr_t attr_single;
/// pthread attributes for prach processing thread
pthread_attr_t attr_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread attributes for prach processing thread BL/CE UEs
pthread_attr_t attr_prach_br;
#endif
......@@ -762,7 +762,7 @@ typedef struct eNB_proc_t_s {
struct sched_param sched_param_single;
/// scheduling parameters for prach thread
struct sched_param sched_param_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// scheduling parameters for prach thread
struct sched_param sched_param_prach_br;
#endif
......@@ -774,7 +774,7 @@ typedef struct eNB_proc_t_s {
pthread_t pthread_te;
/// pthread structure for PRACH thread
pthread_t pthread_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread structure for PRACH thread BL/CE UEs
pthread_t pthread_prach_br;
#endif
......@@ -784,7 +784,7 @@ typedef struct eNB_proc_t_s {
pthread_cond_t cond_te;
/// condition variable for PRACH processing thread;
pthread_cond_t cond_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// condition variable for PRACH processing thread BL/CE UEs;
pthread_cond_t cond_prach_br;
#endif
......@@ -796,7 +796,7 @@ typedef struct eNB_proc_t_s {
pthread_mutex_t mutex_te;
/// mutex for PRACH thread
pthread_mutex_t mutex_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mutex for PRACH thread for BL/CE UEs
pthread_mutex_t mutex_prach_br;
#endif
......@@ -812,7 +812,7 @@ typedef struct eNB_proc_t_s {
int RU_mask;
/// mask for RUs serving eNB (PRACH)
int RU_mask_prach;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mask for RUs serving eNB (PRACH)
int RU_mask_prach_br;
#endif
......@@ -927,14 +927,14 @@ typedef struct PHY_VARS_eNB_s {
nfapi_cqi_indication_raw_pdu_t cqi_raw_pdu_list[NFAPI_CQI_IND_MAX_PDU];
/// NFAPI PRACH information
nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES];
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// NFAPI PRACH information BL/CE UEs
nfapi_preamble_pdu_t preamble_list_br[MAX_NUM_RX_PRACH_PREAMBLES];
#endif
Sched_Rsp_t Sched_INFO;
LTE_eNB_PDCCH pdcch_vars[2];
LTE_eNB_PHICH phich_vars[2];
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_EPDCCH epdcch_vars[2];
LTE_eNB_MPDCCH mpdcch_vars[2];
LTE_eNB_PRACH prach_vars_br;
......@@ -966,7 +966,7 @@ typedef struct PHY_VARS_eNB_s {
uint32_t lte_gold_mbsfn_table[10][3][42];
uint32_t X_u[64][839];
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint32_t X_u_br[4][64][839];
#endif
uint8_t pbch_configured;
......@@ -1037,7 +1037,7 @@ typedef struct PHY_VARS_eNB_s {
uint8_t cba_last_reception[4];
// Pointers for active physicalConfigDedicated to be applied in current subframe
struct PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX];
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX];
uint32_t rb_mask_ul[4];
......@@ -1074,12 +1074,12 @@ typedef struct PHY_VARS_eNB_s {
int hw_timing_advance;
time_stats_t phy_proc;
time_stats_t phy_proc_tx;
time_stats_t phy_proc_rx;
time_stats_t rx_prach;
time_stats_t ofdm_mod_stats;
time_stats_t dlsch_common_and_dci;
time_stats_t dlsch_encoding_stats;
time_stats_t dlsch_modulation_stats;
time_stats_t dlsch_scrambling_stats;
......
......@@ -63,7 +63,7 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",proc->frame_tx,proc->subframe_tx, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci);
}
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
......@@ -128,7 +128,7 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// adjust transmit amplitude here based on NFAPI info
}
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
extern uint32_t localRIV2alloc_LUT6[32];
extern uint32_t localRIV2alloc_LUT25[512];
extern uint32_t localRIV2alloc_LUT50_0[1600];
......@@ -145,10 +145,10 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
uint8_t *sdu)
{
nfapi_dl_config_dlsch_pdu_rel8_t *rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8;
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
nfapi_dl_config_dlsch_pdu_rel10_t *rel10 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10;
#endif
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
nfapi_dl_config_dlsch_pdu_rel13_t *rel13 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13;
#endif
LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
......@@ -167,7 +167,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
dlsch0 = eNB->dlsch[UE_id][0];
dlsch1 = eNB->dlsch[UE_id][1];
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[frame%2][subframe] = 0;
#endif
......@@ -236,7 +236,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
rel8->rnti,UE_id,harq_pid);
}
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#ifdef PHY_TX_THREAD
dlsch0_harq->sib1_br_flag=0;
#else
......@@ -307,7 +307,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
#endif
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
#ifdef PHY_TX_THREAD
dlsch0_harq->i0,
......@@ -823,7 +823,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
case NFAPI_DL_CONFIG_EPDCCH_DL_PDU_TYPE:
// handle_nfapi_epdcch_pdu(eNB,dl_config_pdu);
break;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
eNB->mpdcch_vars[subframe&1].num_dci++;
......
......@@ -136,7 +136,7 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
MCH_PDU *mch_pduP=NULL;
// uint8_t sync_area=255;
#endif
......@@ -152,7 +152,7 @@ void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
subframe<<1,1);
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
// if mcch is active, send regardless of the node type: eNB or RN
// when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing
/*
......@@ -254,6 +254,8 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
if (eNB->pbch_configured!=1) return;
eNB->pbch_configured=0;
}
T(T_ENB_PHY_MIB, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe),
T_BUFFER(pbch_pdu, 3));
generate_pbch(&eNB->pbch,
txdataF,
AMP,
......@@ -484,6 +486,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),1);
if (do_meas==1) start_meas(&eNB->phy_proc_tx);
if (do_meas==1) start_meas(&eNB->dlsch_common_and_dci);
// clear the transmit data array for the current subframe
for (aa=0; aa<fp->nb_antenna_ports_eNB; aa++) {
......@@ -578,6 +581,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
subframe);
}
if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
......
......@@ -54,7 +54,7 @@ extern uint32_t nfapi_mode;
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
void prach_procedures(PHY_VARS_eNB *eNB
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
int br_flag
#endif
......@@ -63,7 +63,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
uint16_t i;
int frame,subframe;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag==1) {
subframe = eNB->proc.subframe_prach_br;
frame = eNB->proc.frame_prach_br;
......@@ -93,7 +93,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
ru=eNB->RU_list[i];
for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) {
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa];
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int ce_level;
if (br_flag==1)
......@@ -109,7 +109,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
&max_preamble_delay[0],
frame,
0
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,br_flag
#endif
);
......@@ -121,7 +121,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
max_preamble_delay[0],
eNB->prach_energy_counter);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag==1) {
eNB->UL_INFO.rach_ind_br.rach_indication_body.preamble_list = eNB->preamble_list_br;
......
......@@ -30,7 +30,7 @@
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "TDD-Config.h"
#include "LTE_TDD-Config.h"
/*! \brief Function to compute subframe Number(DL and S) as a function of Frame type and TDD Configuration
@param frame_parms Pointer to DL frame parameter descriptor
@returns Subframe Number (DL,S)
......@@ -346,7 +346,7 @@ void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeri
int ul_ACK_subframe2_dl_frame(LTE_DL_FRAME_PARMS *frame_parms,int frame, unsigned char subframe,unsigned char subframe_tx);
void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP, sub_frame_t *subframeP);
void get_retransmission_timing(LTE_TDD_Config_t *tdd_Config, frame_t *frameP, sub_frame_t *subframeP);
/*@}*/
......
......@@ -127,7 +127,7 @@ void phy_procedures_eNB_S_RX(PHY_VARS_eNB *phy_vars_eNB,eNB_rxtx_proc_t *proc);
@param phy_vars_eNB Pointer to eNB variables on which to act
@param br_flag indicator for eMTC PRACH
*/
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void prach_procedures(PHY_VARS_eNB *eNB,
int br_flag);
#else
......
This diff is collapsed.
static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2;
}
double median(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
}
double q1(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/4)*input->atomSize);
}
double q3(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(3*input->size/4)*input->atomSize);
}
void dumpVarArray(varArray_t *input) {
double *ptr=dataArray(input);
printf("dumping size=%ld\n", input->size);
for (int i=0; i < input->size; i++)
printf("%.1f:", *ptr++);
printf("\n");
}
void sumUpStats(time_stats_t * res, time_stats_t * src, int lastActive) {
reset_meas(res);
for (int i=0; i<RX_NB_TH; i++) {
res->diff+=src[i].diff;
res->diff_square+=src[i].diff_square;
res->trials+=src[i].trials;
if (src[i].max > res->max)
res->max=src[i].max;
}
res->p_time=src[lastActive].p_time;
}
void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastActive) {
reset_meas(res);
for (int i=0; i<RX_NB_TH; i++) {
res->diff+=src[i][0].diff+src[i][1].diff;
res->diff_square+=src[i][0].diff_square+src[i][1].diff_square;
res->trials+=src[i][0].trials+src[i][1].trials;
if (src[i][0].max > res->max)
res->max=src[i][0].max;
if (src[i][1].max > res->max)
res->max=src[i][1].max;}
int last=src[lastActive][0].in < src[lastActive][1].in? 1 : 0 ;
res->p_time=src[lastActive][last].p_time;
}
void printStatIndent(time_stats_t *ptr, char *txt) {
printf("|__ %-50s %.2f us (%d trials)\n",
txt,
ptr->trials?inMicroS(ptr->diff/ptr->trials):0,
ptr->trials);
}
void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) {
double timeBase=1/(1000*cpu_freq_GHz);
printf(" |__ %-45s %.2f us (cycles/block %ld, %5d trials)\n",
txt,
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
turbo_iter?(uint64_t)round(((double)ptr->diff)/turbo_iter):0,
ptr->trials);
}
double squareRoot(time_stats_t *ptr) {
double timeBase=1/(1000*cpu_freq_GHz);
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
pow((double)ptr->diff/ptr->trials*timeBase,2));
}
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz);
printf("%-50s :%.2f us (%d trials)\n",
txt,
(double)ptr->diff/ptr->trials*timeBase,
ptr->trials);
printf("|__ Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
}
void logDistribution(FILE* fd, time_stats_t *ptr, varArray_t *sortedList, int dropped) {
fprintf(fd,"%f;%f;%f;%f;%f;%f;%d;",
squareRoot(ptr),
(double)ptr->max, *(double*)dataArray(sortedList),
median(sortedList),q1(sortedList),q3(sortedList),
dropped);
}
struct option * parse_oai_options(paramdef_t *options) {
int l;
for(l=0; options[l].optname[0]!=0; l++) {};
struct option *long_options=calloc(sizeof(struct option),l);
for(int i=0; options[i].optname[0]!=0; i++) {
long_options[i].name=options[i].optname;
long_options[i].has_arg=options[i].paramflags==PARAMFLAG_BOOL?no_argument:required_argument;
if ( options[i].voidptr)
switch (options[i].type) {
case TYPE_INT:
*options[i].iptr=options[i].defintval;
break;
case TYPE_DOUBLE:
*options[i].dblptr=options[i].defdblval;
break;
case TYPE_UINT8:
*options[i].u8ptr=options[i].defintval;
break;
case TYPE_UINT16:
*options[i].u16ptr=options[i].defintval;
break;
default:
printf("not parsed type for default value %s\n", options[i].optname );
exit(1);
}
continue;
};
return long_options;
}
void display_options_values(paramdef_t *options, int verbose) {
for(paramdef_t * ptr=options; ptr->optname[0]!=0; ptr++) {
char varText[256]="need specific display";
if (ptr->voidptr != NULL) {
if ( (ptr->paramflags & PARAMFLAG_BOOL) )
strcpy(varText, *(bool *)ptr->iptr ? "True": "False" );
else switch (ptr->type) {
case TYPE_INT:
sprintf(varText,"%d",*ptr->iptr);
break;
case TYPE_DOUBLE:
sprintf(varText,"%.2f",*ptr->dblptr);
break;
case TYPE_UINT8:
sprintf(varText,"%d",(int)*ptr->u8ptr);
break;
case TYPE_UINT16:
sprintf(varText,"%d",(int)*ptr->u16ptr);
break;
default:
printf("not decoded type\n");
exit(1);
}
}
printf("--%-20s set to %s\n",ptr->optname, varText);
if (verbose) printf("%s\n",ptr->helpstr);
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -22,10 +22,10 @@
#ifndef GTPV1_U_MESSAGES_TYPES_H_
#define GTPV1_U_MESSAGES_TYPES_H_
#include "asn_constant.h"
#include "LTE_asn_constant.h"
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
#define GTPV1U_MAX_BEARERS_PER_UE max_val_LTE_DRB_Identity
#define GTPV1U_ENB_UPDATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelReq
#define GTPV1U_ENB_UPDATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelResp
......
......@@ -30,13 +30,13 @@
#include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h"
#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "MeasGapConfig.h"
#include "TDD-Config.h"
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "MBSFN-AreaInfoList-r9.h"
#include "MBSFN-SubframeConfigList.h"
#include "LTE_RadioResourceConfigCommonSIB.h"
#include "LTE_RadioResourceConfigDedicated.h"
#include "LTE_MeasGapConfig.h"
#include "LTE_TDD-Config.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#include "LTE_MBSFN-AreaInfoList-r9.h"
#include "LTE_MBSFN-SubframeConfigList.h"
#endif
//#include "rrm_config_structs.h"
//#include "platform_types.h"
......@@ -347,25 +347,25 @@ typedef struct {
void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char*);
signed int (*rrc_rlc_config_req)(unsigned int, unsigned int, unsigned int, unsigned int, rlc_info_t );
int (*rrc_mac_config_req)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t UE_id,uint8_t eNB_index,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
struct PhysicalConfigDedicated *physicalConfigDedicated,
MAC_MainConfig_t *mac_MainConfig,
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
LTE_MAC_MainConfig_t *mac_MainConfig,
long logicalChannelIdentity,
LogicalChannelConfig_t *logicalChannelConfig,
MeasGapConfig_t *measGapConfig,
TDD_Config_t *tdd_Config,
LTE_LogicalChannelConfig_t *logicalChannelConfig,
LTE_MeasGapConfig_t *measGapConfig,
LTE_TDD_Config_t *tdd_Config,
uint8_t *SIwindowsize,
uint16_t *SIperiod
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
,
MBMS_flag_t MBMS_Flag,
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
struct PMCH_InfoList_r9 *pmch_InfoList
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
struct LTE_PMCH_InfoList_r9 *pmch_InfoList
#endif
);
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint32_t
,uint32_t
#endif
......@@ -373,7 +373,7 @@ typedef struct {
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint32_t sourceL2Id
,uint32_t destinationL2Id
#endif
......
......@@ -29,7 +29,7 @@
***************************************************************************/
#ifdef CMAKER
#include "asn_constant.h"
#include "LTE_asn_constant.h"
#else
#include "RRC/LTE/MESSAGES/asn1_constants.h"
#endif
......@@ -87,19 +87,19 @@
#define MAX_MANAGED_ENB_PER_MOBILE 2
///NB-IOT
#define NB_RB_MAX_NB_IOT (maxDRB_NB_r13 + 3) //MP: NB_IoT --> 2(DRB)+3(SRBs - 2 is not used) = 5
#define NB_RB_MAX_NB_IOT (LTE_maxDRB_NB_r13 + 3) //MP: NB_IoT --> 2(DRB)+3(SRBs - 2 is not used) = 5
#define DEFAULT_RAB_ID 1
#define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount)
#define NB_RB_MAX (LTE_maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#define NB_RB_MBMS_MAX (LTE_maxSessionPerPMCH*LTE_maxServiceCount)
#else
// Do not allocate unused memory
#define NB_RB_MBMS_MAX 1
#endif
#define NB_RAB_MAX maxDRB /* was 8, now 11 */
#define NB_RAB_MAX LTE_maxDRB /* was 8, now 11 */
#define RAB_SHIFT1 9
#define RAB_SHIFT2 3
#define RAB_OFFSET 0x0007
......
......@@ -33,26 +33,26 @@
#include "rrc_types.h"
#include "s1ap_messages_types.h"
#ifdef CMAKER
#include "SystemInformationBlockType2.h"
#include "LTE_SystemInformationBlockType2.h"
#else
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
#include "RRC/LTE/MESSAGES/LTE_SystemInformationBlockType2.h"
#endif
#include "SL-OffsetIndicator-r12.h"
#include "SubframeBitmapSL-r12.h"
#include "SL-CP-Len-r12.h"
#include "SL-PeriodComm-r12.h"
#include "SL-DiscResourcePool-r12.h"
#include "LTE_SL-OffsetIndicator-r12.h"
#include "LTE_SubframeBitmapSL-r12.h"
#include "LTE_SL-CP-Len-r12.h"
#include "LTE_SL-PeriodComm-r12.h"
#include "LTE_SL-DiscResourcePool-r12.h"
//-------------------------------------------------------------------------------------------//
// Messages for RRC logging
#if defined(DISABLE_ITTI_XER_PRINT)
#include "BCCH-DL-SCH-Message.h"
#include "DL-CCCH-Message.h"
#include "DL-DCCH-Message.h"
#include "UE-EUTRA-Capability.h"
#include "UL-CCCH-Message.h"
#include "UL-DCCH-Message.h"
#include "LTE_BCCH-DL-SCH-Message.h"
#include "LTE_DL-CCCH-Message.h"
#include "LTE_DL-DCCH-Message.h"
#include "LTE_UE-EUTRA-Capability.h"
#include "LTE_UL-CCCH-Message.h"
#include "LTE_UL-DCCH-Message.h"
typedef BCCH_DL_SCH_Message_t RrcDlBcchMessage;
typedef DL_CCCH_Message_t RrcDlCcchMessage;
......@@ -124,7 +124,7 @@ typedef struct RrcConfigurationReq_s {
long pucch_delta_shift[MAX_NUM_CCs];
long pucch_nRB_CQI[MAX_NUM_CCs];
long pucch_nCS_AN[MAX_NUM_CCs];
//#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
//#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
long pucch_n1_AN[MAX_NUM_CCs];
//#endif
long pdsch_referenceSignalPower[MAX_NUM_CCs];
......@@ -149,16 +149,16 @@ typedef struct RrcConfigurationReq_s {
long pucch_p0_Nominal[MAX_NUM_CCs];
long msg3_delta_Preamble[MAX_NUM_CCs];
long ul_CyclicPrefixLength[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs];
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs];
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs];
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
long rach_numberOfRA_Preambles[MAX_NUM_CCs];
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs];
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];
long rach_messageSizeGroupA[MAX_NUM_CCs];
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
e_LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
long rach_powerRampingStep[MAX_NUM_CCs];
long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs];
long rach_preambleTransMax[MAX_NUM_CCs];
......@@ -179,45 +179,45 @@ typedef struct RrcConfigurationReq_s {
//TTN - for D2D
//SIB18
e_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
e_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
e_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
e_LTE_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
e_LTE_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
e_LTE_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
LTE_SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
LTE_SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//SIB19
//for discRxPool
SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
LTE_SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
e_LTE_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
long discRxPool_numRetx[MAX_NUM_CCs];
long discRxPool_numRepetition[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
LTE_SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
LTE_SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//for discRxPoolPS
SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
LTE_SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
e_LTE_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
long discRxPoolPS_numRetx[MAX_NUM_CCs];
long discRxPoolPS_numRepetition[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
LTE_SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
LTE_SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
......
......@@ -22,7 +22,7 @@
#ifndef X2AP_MESSAGES_TYPES_H_
#define X2AP_MESSAGES_TYPES_H_
#include "PhysCellId.h"
#include "LTE_PhysCellId.h"
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
......@@ -122,7 +122,7 @@ typedef struct x2ap_lastvisitedcell_info_s {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_len;
PhysCellId_t target_physCellId;
LTE_PhysCellId_t target_physCellId;
cell_type_t cell_type;
uint64_t time_UE_StayedInCell;
}x2ap_lastvisitedcell_info_t;
......@@ -134,7 +134,7 @@ typedef struct x2ap_handover_req_s {
unsigned old_eNB_ue_s1ap_id:24;
PhysCellId_t target_physCellId;
LTE_PhysCellId_t target_physCellId;
x2ap_gummei_t ue_gummei;
......
......@@ -262,7 +262,7 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg) {
}
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t* measResults) {
void flexran_trigger_rrc_measurements (mid_t mod_id, LTE_MeasResults_t* measResults) {
//int i;
// int priority = 0; // Warning Preventing
......
......@@ -55,7 +55,7 @@ int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg);
// void flexran_agent_send_update_rrc_stats(mid_t mod_id);
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
void flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t *);
void flexran_trigger_rrc_measurements (mid_t mod_id, LTE_MeasResults_t *);
/* Statistics reply protocol message constructor and destructor */
int flexran_agent_rrc_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
......
......@@ -34,7 +34,7 @@
#include "flexran_agent_defs.h"
#include "flexran.pb-c.h"
#include "header.pb-c.h"
#include "MeasResults.h"
#include "LTE_MeasResults.h"
#define RINGBUFFER_SIZE 100
......@@ -62,7 +62,7 @@ typedef struct {
void (*flexran_agent_notify_ue_state_change)(mid_t mod_id, uint32_t rnti,
uint8_t state_change);
void (*flexran_trigger_rrc_measurements)(mid_t mod_id, MeasResults_t* measResults);
void (*flexran_trigger_rrc_measurements)(mid_t mod_id, LTE_MeasResults_t* measResults);
} AGENT_RRC_xface;
......
......@@ -40,11 +40,11 @@
# include "sctp_eNB_task.h"
# endif
#endif
#include "SystemInformationBlockType2.h"
#include "LTE_SystemInformationBlockType2.h"
#include "common/config/config_userapi.h"
#include "RRC_config_tools.h"
#include "DL-GapConfig-NB-r13.h"
#include "NPRACH-Parameters-NB-r13.h"
#include "LTE_DL-GapConfig-NB-r13.h"
#include "LTE_NPRACH-Parameters-NB-r13.h"
static const eutra_band_t eutra_bands[] = {
{ 1, 1920 * MHz, 1980 * MHz, 2110 * MHz, 2170 * MHz, FDD},
......
......@@ -68,27 +68,27 @@
#define NRBDL_OKVALUES {6,15,25,50,75,100}
#define UETIMER_T300_OKVALUES {100,200,300,400,600,1000,1500,2000}
#define UETT300(A) UE_TimersAndConstants__t300_ ## A
#define UETT300(A) LTE_UE_TimersAndConstants__t300_ ## A
#define UETIMER_T300_MODVALUES { UETT300(ms100), UETT300(ms200),UETT300(ms300),UETT300(ms400),UETT300(ms600),UETT300(ms1000),UETT300(ms1500),UETT300(ms2000)}
#define UETIMER_T301_OKVALUES {100,200,300,400,600,1000,1500,2000}
#define UETT301(A) UE_TimersAndConstants__t301_ ## A
#define UETT301(A) LTE_UE_TimersAndConstants__t301_ ## A
#define UETIMER_T301_MODVALUES { UETT301(ms100), UETT301(ms200),UETT301(ms300),UETT301(ms400),UETT301(ms600),UETT301(ms1000),UETT301(ms1500),UETT301(ms2000)}
#define UETIMER_T310_OKVALUES {0,50,100,200,500,1000,2000}
#define UETT310(A) UE_TimersAndConstants__t310_ ## A
#define UETT310(A) LTE_UE_TimersAndConstants__t310_ ## A
#define UETIMER_T310_MODVALUES { UETT310(ms0), UETT310(ms50),UETT310(ms100),UETT310(ms200),UETT310(ms500),UETT310(ms1000),UETT310(ms2000)}
#define UETIMER_T311_OKVALUES {1000,3110,5000,10000,15000,20000,31100}
#define UETT311(A) UE_TimersAndConstants__t311_ ## A
#define UETT311(A) LTE_UE_TimersAndConstants__t311_ ## A
#define UETIMER_T311_MODVALUES { UETT311(ms1000), UETT311(ms3000),UETT311(ms5000),UETT311(ms10000),UETT311(ms15000),UETT311(ms20000),UETT311(ms30000)}
#define UETIMER_N310_OKVALUES {1,2,3,4,6,8,10,20}
#define UETN310(A) UE_TimersAndConstants__n310_ ## A
#define UETN310(A) LTE_UE_TimersAndConstants__n310_ ## A
#define UETIMER_N310_MODVALUES { UETN310(n1), UETN310(n2),UETN310(n3),UETN310(n4),UETN310(n6),UETN310(n8),UETN310(n10),UETN310(n20)}
#define UETIMER_N311_OKVALUES {1,2,3,4,5,6,8,10}
#define UETN311(A) UE_TimersAndConstants__n311_ ## A
#define UETN311(A) LTE_UE_TimersAndConstants__n311_ ## A
#define UETIMER_N311_MODVALUES { UETN311(n1), UETN311(n2),UETN311(n3),UETN311(n4),UETN311(n5),UETN311(n6),UETN311(n8),UETN311(n10)}
#endif
This diff is collapsed.
......@@ -41,10 +41,10 @@
#include "PHY/defs_eNB.h"
#include "s1ap_messages_types.h"
#ifdef CMAKER
#include "SystemInformationBlockType2.h"
#include "LTE_SystemInformationBlockType2.h"
#include "rrc_messages_types.h"
#else
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
#include "RRC/LTE/MESSAGES/LTE_SystemInformationBlockType2.h"
#endif
#include "RRC/LTE/rrc_defs.h"
#include <intertask_interface.h>
......
......@@ -296,7 +296,7 @@ typedef enum {
#define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift"
#define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI"
#define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN"
//#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN"
//#endif
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
......
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.
......@@ -169,7 +169,7 @@ schedule_ue_spec_phy_test(
1, // number of subbands
// uint8_t codebook_index,
4, // UE category capacity
PDSCH_ConfigDedicated__p_a_dB0,
LTE_PDSCH_ConfigDedicated__p_a_dB0,
0, // delta_power_offset for TM5
0, // ngap
0, // nprb
......@@ -347,7 +347,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
0, // n_srs
get_TBS_UL(mcs,nb_rb)
);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
UE_template->rach_resource_type>2 ? 2 : 1,
......
This diff is collapsed.
......@@ -36,7 +36,7 @@
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id)
{
RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
LTE_RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
AssertFatal(CC_id == 0,
"Transmission on secondary CCs is not supported yet\n");
......
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