Merge remote-tracking branch 'origin/develop_integration_2018_w44' into develop
This commit is contained in:
@@ -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);
|
||||
|
||||
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);
|
||||
|
||||
/* 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);
|
||||
|
||||
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]);
|
||||
|
||||
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();
|
||||
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);
|
||||
}
|
||||
|
||||
void setup_data(ev_data *d, void *database, int ul_id, int dl_id)
|
||||
void mib(void *_d, event e)
|
||||
{
|
||||
ev_data *d = _d;
|
||||
|
||||
if (no_mib) return;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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, 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
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "PHY/phy_extern_ue.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>
|
||||
@@ -41,7 +41,7 @@ extern uint8_t nfapi_mode;
|
||||
|
||||
void phy_config_sib1_ue(module_id_t Mod_id,int CC_id,
|
||||
uint8_t eNB_id,
|
||||
TDD_Config_t *tdd_Config,
|
||||
LTE_TDD_Config_t *tdd_Config,
|
||||
uint8_t SIwindowsize,
|
||||
uint16_t SIperiod)
|
||||
{
|
||||
@@ -59,11 +59,11 @@ void phy_config_sib1_ue(module_id_t Mod_id,int CC_id,
|
||||
|
||||
void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
uint8_t eNB_id,
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
ARFCN_ValueEUTRA_t *ul_CarrierFreq,
|
||||
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)
|
||||
{
|
||||
|
||||
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
|
||||
@@ -114,7 +114,7 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
init_ul_hopping(fp);
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 0;
|
||||
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon.present==SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon.present == LTE_SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 1;
|
||||
fp->soundingrs_ul_config_common.srs_BandwidthConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon.choice.setup.srs_BandwidthConfig;
|
||||
fp->soundingrs_ul_config_common.srs_SubframeConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig;
|
||||
@@ -159,19 +159,19 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
fp->MBSFN_config[i].radioframeAllocationPeriod = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod;
|
||||
fp->MBSFN_config[i].radioframeAllocationOffset = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset;
|
||||
|
||||
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
|
||||
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
|
||||
fp->MBSFN_config[i].fourFrames_flag = 0;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
fp->MBSFN_config[i].fourFrames_flag = 1;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig =
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16);
|
||||
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
}
|
||||
}
|
||||
@@ -203,11 +203,11 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A
|
||||
/*
|
||||
* Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover
|
||||
*/
|
||||
void phy_config_afterHO_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_id, MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed)
|
||||
void phy_config_afterHO_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_id, LTE_MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed)
|
||||
{
|
||||
|
||||
if(mobilityControlInfo!=NULL) {
|
||||
RadioResourceConfigCommon_t *radioResourceConfigCommon = &mobilityControlInfo->radioResourceConfigCommon;
|
||||
LTE_RadioResourceConfigCommon_t *radioResourceConfigCommon = &mobilityControlInfo->radioResourceConfigCommon;
|
||||
LOG_I(PHY,"radioResourceConfigCommon %p\n", radioResourceConfigCommon);
|
||||
memcpy((void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms_before_ho,
|
||||
(void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms,
|
||||
@@ -264,7 +264,7 @@ void phy_config_afterHO_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_id, Mobi
|
||||
init_ul_hopping(fp);
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 0;
|
||||
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon->present==SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon->present == LTE_SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 1;
|
||||
fp->soundingrs_ul_config_common.srs_BandwidthConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon->choice.setup.srs_BandwidthConfig;
|
||||
fp->soundingrs_ul_config_common.srs_SubframeConfig = radioResourceConfigCommon->soundingRS_UL_ConfigCommon->choice.setup.srs_SubframeConfig;
|
||||
@@ -344,10 +344,10 @@ void phy_config_meas_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8
|
||||
|
||||
}
|
||||
|
||||
#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)
|
||||
{
|
||||
|
||||
@@ -366,7 +366,7 @@ void phy_config_harq_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
extern uint16_t beta_cqi[16];
|
||||
|
||||
void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated )
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated )
|
||||
{
|
||||
|
||||
static uint8_t first_dedicated_configuration = 0;
|
||||
@@ -396,7 +396,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
}
|
||||
|
||||
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)
|
||||
phy_vars_ue->pucch_config_dedicated[eNB_id].ackNackRepetition=0;
|
||||
else {
|
||||
phy_vars_ue->pucch_config_dedicated[eNB_id].ackNackRepetition=1;
|
||||
@@ -448,25 +448,25 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 1+(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode);
|
||||
LOG_I(PHY,"Transmission Mode %d\n",phy_vars_ue->transmission_mode[eNB_id]);
|
||||
switch(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode) {
|
||||
case AntennaInfoDedicated__transmissionMode_tm1:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm1:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 1;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm2:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm2:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 2;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm3:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm3:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 3;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm4:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm4:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 4;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm5:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm5:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 5;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm6:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm6:
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 6;
|
||||
break;
|
||||
case AntennaInfoDedicated__transmissionMode_tm7:
|
||||
case LTE_AntennaInfoDedicated__transmissionMode_tm7:
|
||||
lte_gold_ue_spec_port5(phy_vars_ue->lte_gold_uespec_port5_table, phy_vars_ue->frame_parms.Nid_cell, phy_vars_ue->pdcch_vars[0][eNB_id]->crnti);
|
||||
phy_vars_ue->transmission_mode[eNB_id] = 7;
|
||||
break;
|
||||
@@ -479,7 +479,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->schedulingRequestConfig) {
|
||||
if (physicalConfigDedicated->schedulingRequestConfig->present == SchedulingRequestConfig_PR_setup) {
|
||||
if (physicalConfigDedicated->schedulingRequestConfig->present == LTE_SchedulingRequestConfig_PR_setup) {
|
||||
phy_vars_ue->scheduling_request_config[eNB_id].sr_PUCCH_ResourceIndex = physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
|
||||
phy_vars_ue->scheduling_request_config[eNB_id].sr_ConfigIndex=physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_ConfigIndex;
|
||||
phy_vars_ue->scheduling_request_config[eNB_id].dsr_TransMax=physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax;
|
||||
@@ -496,7 +496,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated) {
|
||||
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].srsConfigDedicatedSetup = 0;
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == LTE_SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].srsConfigDedicatedSetup = 1;
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].duration = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.duration;
|
||||
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].cyclicShift = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
|
||||
@@ -525,14 +525,14 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
LOG_E(PHY,"Unsupported Aperiodic CQI Feedback Mode : %d\n",phy_vars_ue->cqi_report_config[eNB_id].cqi_ReportModeAperiodic);
|
||||
}
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic) {
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == CQI_ReportPeriodic_PR_setup) {
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == LTE_CQI_ReportPeriodic_PR_setup) {
|
||||
// configure PUCCH CQI reporting
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PUCCH_ResourceIndex = physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PMI_ConfigIndex = physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_pmi_ConfigIndex;
|
||||
if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex)
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex = *physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex;
|
||||
}
|
||||
else if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == CQI_ReportPeriodic_PR_release) {
|
||||
else if (physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic->present == LTE_CQI_ReportPeriodic_PR_release) {
|
||||
// handle release
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex = -1;
|
||||
phy_vars_ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.cqi_PMI_ConfigIndex = -1;
|
||||
|
||||
@@ -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
|
||||
|
||||
+25
-25
@@ -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
|
||||
|
||||
@@ -1715,7 +1715,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->phy_proc_tx);
|
||||
LOG_UI(PHY,"------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY,"------FULL TX PROC : %5.2f ------\n",ue->phy_proc_tx.p_time/(cpuf*1000.0));
|
||||
stop_meas(&ue->ulsch_encoding_stats);
|
||||
}
|
||||
|
||||
@@ -3110,7 +3110,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
int subframe_rx = proc->subframe_rx;
|
||||
int frame_rx = proc->frame_rx;
|
||||
int pmch_mcs=-1;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
int CC_id = ue->CC_id;
|
||||
#endif
|
||||
uint8_t sync_area=255;
|
||||
@@ -3123,7 +3123,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
|
||||
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation\n",
|
||||
ue->Mod_id,frame_rx,subframe_rx);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
pmch_mcs = ue_query_mch(ue->Mod_id,
|
||||
CC_id,
|
||||
@@ -3222,7 +3222,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
// if (subframe_rx==9)
|
||||
// mac_xface->macphy_exit("Why are we exiting here?");
|
||||
} else { // decoding successful
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
ue_send_mch_sdu(ue->Mod_id,
|
||||
CC_id,
|
||||
@@ -3244,7 +3244,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
|
||||
ue->dlsch_mch_received_sf[subframe_rx][0]=1;
|
||||
}
|
||||
|
||||
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
} // decoding sucessful
|
||||
} // pmch_mcs>=0
|
||||
} // is_pmch_subframe=true
|
||||
@@ -3369,7 +3369,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
|
||||
if(m >= ue->frame_parms.symbols_per_tti>>1)
|
||||
slot = 1;
|
||||
stop_meas(&ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats_parallelization[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -3604,9 +3604,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, " --> Unscrambling for CW0 %5.3f\n",
|
||||
LOG_I(PHY, " --> Unscrambling for CW0 %5.3f\n",
|
||||
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
|
||||
LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
|
||||
LOG_I(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW0 %5.3f\n",
|
||||
frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
|
||||
|
||||
}
|
||||
@@ -3661,9 +3661,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, " --> Unscrambling for CW1 %5.3f\n",
|
||||
LOG_I(PHY, " --> Unscrambling for CW1 %5.3f\n",
|
||||
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
|
||||
LOG_UI(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n",
|
||||
LOG_I(PHY, "AbsSubframe %d.%d --> Turbo Decoding for CW1 %5.3f\n",
|
||||
frame_rx%1024, subframe_rx,(ue->dlsch_decoding_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
@@ -4005,7 +4005,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4099,7 +4099,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4319,7 +4319,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
|
||||
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
//proc->dci_slot0_available = 1;
|
||||
@@ -4328,7 +4328,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
//proc->dci_slot0_available=1;
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4337,7 +4337,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
//wait until slot1 FE is done
|
||||
@@ -4350,7 +4350,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
}
|
||||
/**** End Subframe FE Processing ****/
|
||||
|
||||
@@ -4439,7 +4439,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)){
|
||||
stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4455,7 +4455,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)){
|
||||
stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
@@ -4526,7 +4526,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)
|
||||
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
// duplicate harq structure
|
||||
@@ -4589,7 +4589,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)){
|
||||
stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx);
|
||||
@@ -4632,7 +4632,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
|
||||
if(LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
|
||||
start_meas(&ue->generic_stat);
|
||||
start_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
|
||||
}
|
||||
|
||||
pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0;
|
||||
@@ -4757,15 +4757,17 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
|
||||
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->generic_stat);
|
||||
LOG_UI(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_I(PHY, "[SFN %d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",subframe_rx,ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
|
||||
LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
start_meas(&ue->generic_stat);
|
||||
start_meas(&ue->crnti_procedures_stats);
|
||||
}
|
||||
|
||||
// do procedures for C-RNTI
|
||||
if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
|
||||
@@ -4782,12 +4784,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->crnti_procedures_stats);
|
||||
}
|
||||
LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
|
||||
// do procedures for SI-RNTI
|
||||
if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
|
||||
ue_pdsch_procedures(ue,
|
||||
|
||||
proc,
|
||||
eNB_id,
|
||||
SI_PDSCH,
|
||||
@@ -4870,7 +4874,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
} // not an S-subframe
|
||||
if(LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->generic_stat);
|
||||
LOG_UI(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[SFN %d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",subframe_rx,ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
LOG_D(PHY," ------ end FFT/ChannelEst/PDCCH slot 1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
|
||||
@@ -4915,8 +4919,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
abstraction_flag);
|
||||
if (LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_UI(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
|
||||
@@ -5059,14 +5063,14 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING)) {
|
||||
stop_meas(&ue->generic_stat);
|
||||
LOG_UI(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY,"after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
|
||||
|
||||
if ( LOG_DEBUGFLAG(UE_TIMING) ) {
|
||||
stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
|
||||
LOG_UI(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
LOG_I(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
|
||||
}
|
||||
|
||||
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx);
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
+284
-495
@@ -72,6 +72,9 @@ void feptx_ofdm(RU_t *ru);
|
||||
void feptx_prec(RU_t *ru);
|
||||
|
||||
double cpuf;
|
||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
||||
//#define MCS_COUNT 23//added for PHY abstraction
|
||||
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
||||
|
||||
int otg_enabled=0;
|
||||
/*the following parameters are used to control the processing times calculations*/
|
||||
@@ -535,23 +538,42 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
int n_users = 1;
|
||||
sub_frame_t subframe=7;
|
||||
int subframe=7;
|
||||
int num_common_dci=0,num_ue_spec_dci=0,num_dci=0,num_pdcch_symbols=1;
|
||||
uint16_t n_rnti=0x1234;
|
||||
int nfapi_mode=0;
|
||||
int nfapi_mode=0;
|
||||
int abstx=0;
|
||||
int Nid_cell=0;
|
||||
int N_RB_DL=25;
|
||||
int tdd_config=3;
|
||||
int dci_flag=0;
|
||||
int threequarter_fs=0;
|
||||
double snr_step=1,input_snr_step=1, snr_int=30;
|
||||
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
|
||||
int test_perf=0;
|
||||
int n_frames;
|
||||
int n_ch_rlz = 1;
|
||||
int rx_sample_offset = 0;
|
||||
int xforms=0;
|
||||
int dump_table=0;
|
||||
int loglvl=OAILOG_WARNING;
|
||||
int mcs1=0,mcs2=0,mcs_i=0,dual_stream_UE = 0,awgn_flag=0;
|
||||
int two_thread_flag=0;
|
||||
int num_rounds = 4;//,fix_rounds=0;
|
||||
int perfect_ce = 0;
|
||||
int extended_prefix_flag=0;
|
||||
int verbose=0, help=0;
|
||||
double SNR,snr0=-2.0,snr1,rate = 0;
|
||||
int print_perf=0;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int c;
|
||||
int k,i,j,aa;
|
||||
int re;
|
||||
int loglvl=OAILOG_DEBUG;
|
||||
|
||||
int s,Kr,Kr_bytes;
|
||||
|
||||
double SNR,snr0=-2.0,snr1,rate = 0;
|
||||
double snr_step=1,input_snr_step=1, snr_int=30;
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms;
|
||||
double s_re0[30720*2],s_im0[30720*2],r_re0[30720*2],r_im0[30720*2];
|
||||
@@ -560,17 +582,14 @@ int main(int argc, char **argv)
|
||||
double *s_im[2]={s_im0,s_im1};
|
||||
double *r_re[2]={r_re0,r_re1};
|
||||
double *r_im[2]={r_im0,r_im1};
|
||||
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
|
||||
|
||||
|
||||
uint8_t extended_prefix_flag=0,transmission_mode=1,n_tx_port=1,n_tx_phy=1,n_rx=2;
|
||||
uint16_t Nid_cell=0;
|
||||
uint8_t transmission_mode=1,n_tx_port=1,n_tx_phy=1,n_rx=2;
|
||||
|
||||
int eNB_id = 0;
|
||||
unsigned char mcs1=0,mcs2=0,mcs_i=0,dual_stream_UE = 0,awgn_flag=0,round;
|
||||
unsigned char round;
|
||||
unsigned char i_mod = 2;
|
||||
unsigned short NB_RB;
|
||||
uint16_t tdd_config=3;
|
||||
|
||||
|
||||
SCM_t channel_model=Rayleigh1;
|
||||
@@ -602,18 +621,13 @@ int main(int argc, char **argv)
|
||||
FILE *input_fd=NULL;
|
||||
unsigned char input_file=0;
|
||||
|
||||
int n_frames;
|
||||
int n_ch_rlz = 1;
|
||||
channel_desc_t *eNB2UE[4];
|
||||
//uint8_t num_pdcch_symbols_2=0;
|
||||
uint8_t rx_sample_offset = 0;
|
||||
//char stats_buffer[4096];
|
||||
//int len;
|
||||
uint8_t num_rounds = 4;//,fix_rounds=0;
|
||||
|
||||
//int u;
|
||||
int n=0;
|
||||
int abstx=0;
|
||||
//int iii;
|
||||
|
||||
int ch_realization;
|
||||
@@ -625,9 +639,8 @@ int main(int argc, char **argv)
|
||||
// int bler;
|
||||
double blerr[4];
|
||||
short *uncoded_ber_bit=NULL;
|
||||
uint8_t N_RB_DL=25,osf=1;
|
||||
int osf=1;
|
||||
frame_t frame_type = FDD;
|
||||
int xforms=0;
|
||||
FD_lte_phy_scope_ue *form_ue = NULL;
|
||||
char title[255];
|
||||
|
||||
@@ -640,16 +653,12 @@ int main(int argc, char **argv)
|
||||
// time_stats_t ts;//,sts,usts;
|
||||
int avg_iter,iter_trials;
|
||||
int rballocset=0;
|
||||
int print_perf=0;
|
||||
int test_perf=0;
|
||||
int test_passed=0;
|
||||
int dump_table=0;
|
||||
|
||||
double effective_rate=0.0;
|
||||
char channel_model_input[10]="I";
|
||||
|
||||
int TB0_active = 1;
|
||||
uint32_t perfect_ce = 0;
|
||||
|
||||
// LTE_DL_UE_HARQ_t *dlsch0_ue_harq;
|
||||
// LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq;
|
||||
@@ -657,20 +666,11 @@ int main(int argc, char **argv)
|
||||
uint8_t ue_category=4;
|
||||
uint32_t Nsoft;
|
||||
int sf;
|
||||
|
||||
|
||||
|
||||
int CCE_table[800];
|
||||
|
||||
int threequarter_fs=0;
|
||||
|
||||
|
||||
opp_enabled=1; // to enable the time meas
|
||||
|
||||
FILE *csv_fd=NULL;
|
||||
char csv_fname[32];
|
||||
int dci_flag=0;
|
||||
int two_thread_flag=0;
|
||||
char csv_fname[FILENAME_MAX];
|
||||
int DLSCH_RB_ALLOC = 0;
|
||||
|
||||
int dci_received;
|
||||
@@ -726,38 +726,97 @@ int main(int argc, char **argv)
|
||||
snr0 = 0;
|
||||
// num_layers = 1;
|
||||
perfect_ce = 0;
|
||||
static paramdef_t options[] = {
|
||||
{ "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 },
|
||||
{ "bTDD", "Set the tdd configuration mode",0, iptr:&tdd_config, defintval:3, TYPE_INT, 0 },
|
||||
{ "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 },
|
||||
{ "cPdcch", "Number of PDCCH symbols",0, iptr:&num_pdcch_symbols, defintval:1, TYPE_INT, 0 },
|
||||
{ "CnidCell", "The cell id ",0, iptr:&Nid_cell, defintval:0, TYPE_INT, 0 },
|
||||
{ "dciFlag", "Transmit the DCI and compute its error statistics", PARAMFLAG_BOOL, iptr:&dci_flag, defintval:0, TYPE_INT, 0 },
|
||||
{ "Dtdd", "Enable tdd", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "eRounds", "Number of rounds",0, iptr:NULL, defintval:25, TYPE_INT, 0 },
|
||||
{ "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0 },
|
||||
{ "f_snr_step", "step size of SNR, default value is 1.",0, dblptr:&input_snr_step, defdblval:1, TYPE_DOUBLE, 0 },
|
||||
{ "Forgetting", "forgetting factor (0 new channel every trial, 1 channel constant)",0, dblptr:&forgetting_factor, defdblval:0.0, TYPE_DOUBLE, 0 },
|
||||
{ "input_file", "input IQ data file",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "Input_file_trch", " Input filename for TrCH data (binary)",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "WtwoThreads", "two_thread_flag", PARAMFLAG_BOOL, iptr:&two_thread_flag, defintval:0, TYPE_INT, 0 },
|
||||
{ "lMuMimo", "offset_mumimo_llr_drange_fix",0, u8ptr:&offset_mumimo_llr_drange_fix, defintval:0, TYPE_UINT8, 0 },
|
||||
{ "mcs1", "The MCS for TB 1", 0, iptr:&mcs1, defintval:0, TYPE_INT, 0 },
|
||||
{ "Mcs2", "The MCS for TB 2", 0, iptr:&mcs2, defintval:0, TYPE_INT, 0 },
|
||||
{ "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "tmcs_i", "MCS of interfering UE",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 },
|
||||
{ "offsetRxSample", "Sample offset for receiver", 0, iptr:&rx_sample_offset, defintval:0, TYPE_INT, 0 },
|
||||
{ "rballocset", "ressource block allocation (see section 7.1.6.3 in 36.213)",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "snr", "Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated", dblptr:&snr0, defdblval:-2.0, TYPE_DOUBLE, 0 },
|
||||
{ "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 },
|
||||
{ "N_ch_rlzN0", "Determines the number of Channel Realizations in Abstraction mode. Default value is 1",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 },
|
||||
{ "prefix_extended","Enable extended prefix", PARAMFLAG_BOOL, iptr:&extended_prefix_flag, defintval:0, TYPE_INT, 0 },
|
||||
{ "RNumRound", "Number of HARQ rounds (fixed)",0, iptr:&num_rounds, defintval:4, TYPE_INT, 0 },
|
||||
{ "Subframe", "subframe ",0, iptr:&subframe, defintval:7, TYPE_INT, 0 },
|
||||
{ "Trnti", "rnti",0, u16ptr:&n_rnti, defuintval:0x1234, TYPE_UINT16, 0 },
|
||||
{ "vi_mod", "i_mod",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, iptr:&print_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "q_tx_port", "Number of TX antennas ports used in eNB",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "uEdual", "Enables the Interference Aware Receiver for TM5 (default is normal receiver)",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "xTransmission","Transmission mode (1,2,6,7 for the moment)",0, iptr:NULL, defintval:25, TYPE_INT, 0 },
|
||||
{ "yn_tx_phy","Number of TX antennas used in eNB",0, iptr:NULL, defintval:25, TYPE_INT, 0 },
|
||||
{ "XForms", "Display the soft scope", PARAMFLAG_BOOL, iptr:&xforms, defintval:0, TYPE_INT, 0 },
|
||||
{ "Yperfect_ce","Perfect CE", PARAMFLAG_BOOL, iptr:&perfect_ce, defintval:0, TYPE_INT, 0 },
|
||||
{ "Zdump", "dump table",PARAMFLAG_BOOL, iptr:&dump_table, defintval:0, TYPE_INT, 0 },
|
||||
{ "Loglvl", "log level",0, iptr:&loglvl, defintval:OAILOG_DEBUG, TYPE_INT, 0 },
|
||||
{ "zn_rx", "Number of RX antennas used in UE",0, iptr:NULL, defintval:2, TYPE_INT, 0 },
|
||||
{ "gchannel", "[A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 },
|
||||
{ "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 },
|
||||
{ "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 },
|
||||
{ "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
};
|
||||
|
||||
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:q:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:Pl:WXYL:")) != -1) {
|
||||
switch (c) {
|
||||
|
||||
struct option * long_options = parse_oai_options(options);
|
||||
|
||||
|
||||
int option_index;
|
||||
|
||||
int res;
|
||||
|
||||
while ((res=getopt_long_only(argc, argv, "", long_options, &option_index)) == 0) {
|
||||
if (options[option_index].voidptr != NULL ) {
|
||||
if (long_options[option_index].has_arg==no_argument)
|
||||
*(bool *)options[option_index].iptr=1;
|
||||
else switch (options[option_index].type) {
|
||||
case TYPE_INT:
|
||||
*(int *)options[option_index].iptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
*(double *)options[option_index].dblptr=atof(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_UINT8:
|
||||
*(uint8_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*(uint16_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (long_options[option_index].name[0]) {
|
||||
case 'a':
|
||||
awgn_flag = 1;
|
||||
channel_model = AWGN;
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
abstx = 1;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
tdd_config=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
N_RB_DL=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
num_pdcch_symbols=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
Nid_cell = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
dci_flag = 1;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
frame_type=TDD;
|
||||
break;
|
||||
@@ -768,18 +827,6 @@ int main(int argc, char **argv)
|
||||
TPC = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
threequarter_fs=1;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
input_snr_step= atof(optarg);
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
forgetting_factor = atof(optarg);
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
input_fd = fopen(optarg,"r");
|
||||
input_file=1;
|
||||
@@ -791,139 +838,51 @@ int main(int argc, char **argv)
|
||||
input_trch_file=1;
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
two_thread_flag = 1;
|
||||
break;
|
||||
case 'l':
|
||||
offset_mumimo_llr_drange_fix=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
mcs1 = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
mcs2 = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'O':
|
||||
test_perf=atoi(optarg);
|
||||
//print_perf =1;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
mcs_i = atoi(optarg);
|
||||
i_mod = get_Qm(mcs_i);
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
n_frames = atoi(optarg);
|
||||
break;
|
||||
|
||||
|
||||
case 'o':
|
||||
rx_sample_offset = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
DLSCH_RB_ALLOC = atoi(optarg);
|
||||
rballocset = 1;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
snr0 = atof(optarg);
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
snr_int = atof(optarg);
|
||||
break;
|
||||
|
||||
|
||||
case 'N':
|
||||
n_ch_rlz= atof(optarg);
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
extended_prefix_flag=1;
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
memcpy(channel_model_input,optarg,10);
|
||||
strncpy(channel_model_input,optarg,9);
|
||||
struct tmp {
|
||||
char opt;
|
||||
int m;
|
||||
int M;
|
||||
}
|
||||
tmp[]= {
|
||||
{'A',SCM_A,2},
|
||||
{'B',SCM_B,3},
|
||||
{'C',SCM_C,4},
|
||||
{'D',SCM_D,5},
|
||||
{'E',EPA,6},
|
||||
{'F',EVA,6},
|
||||
{'G',ETU,8},
|
||||
{'H',Rayleigh8,9},
|
||||
{'I',Rayleigh1,10},
|
||||
{'J',Rayleigh1_corr,11},
|
||||
{'K',Rayleigh1_anticorr,12},
|
||||
{'L',Rice8,13},
|
||||
{'M',Rice1,14},
|
||||
{'N',AWGN,1},
|
||||
{0,0,0}
|
||||
};
|
||||
struct tmp *ptr;
|
||||
|
||||
switch((char)*optarg) {
|
||||
case 'A':
|
||||
channel_model=SCM_A;
|
||||
for (ptr=tmp; ptr->opt!=0; ptr++)
|
||||
if ( ptr->opt == optarg[0] ) {
|
||||
channel_model=ptr->m;
|
||||
break;
|
||||
}
|
||||
|
||||
AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg );
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
channel_model=SCM_B;
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
channel_model=SCM_C;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
channel_model=SCM_D;
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
channel_model=EPA;
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
channel_model=EVA;
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
channel_model=ETU;
|
||||
break;
|
||||
|
||||
case 'H':
|
||||
channel_model=Rayleigh8;
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
channel_model=Rayleigh1;
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
channel_model=Rayleigh1_corr;
|
||||
break;
|
||||
|
||||
case 'K':
|
||||
channel_model=Rayleigh1_anticorr;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
channel_model=Rice8;
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
channel_model=Rice1;
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
channel_model=AWGN;
|
||||
break;
|
||||
default:
|
||||
printf("Unsupported channel model!\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
break;
|
||||
case 'R':
|
||||
num_rounds=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
subframe=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
n_rnti=atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
dual_stream_UE=1;
|
||||
UE->use_ia_receiver = 1;
|
||||
@@ -945,10 +904,6 @@ int main(int argc, char **argv)
|
||||
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
print_perf=1;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
n_tx_port=atoi(optarg);
|
||||
|
||||
@@ -999,15 +954,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
xforms=1;
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
perfect_ce=1;
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
n_rx=atoi(optarg);
|
||||
@@ -1019,51 +965,23 @@ int main(int argc, char **argv)
|
||||
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
dump_table=1;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
loglvl = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
default:
|
||||
printf("%s -h(elp) -a(wgn on) -d(ci decoding on) -p(extended prefix on) -m mcs1 -M mcs2 -n n_frames -s snr0 -x transmission mode (1,2,5,6,7) -y TXant -z RXant -I trch_file\n",argv[0]);
|
||||
printf("-h This message\n");
|
||||
printf("-a Use AWGN channel and not multipath\n");
|
||||
printf("-c Number of PDCCH symbols\n");
|
||||
printf("-m MCS1 for TB 1\n");
|
||||
printf("-M MCS2 for TB 2\n");
|
||||
printf("-d Transmit the DCI and compute its error statistics\n");
|
||||
printf("-p Use extended prefix mode\n");
|
||||
printf("-n Number of frames to simulate\n");
|
||||
printf("-o Sample offset for receiver\n");
|
||||
printf("-s Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated\n", snr_int, snr_step);
|
||||
printf("-f step size of SNR, default value is 1.\n");
|
||||
printf("-C cell id\n");
|
||||
printf("-S subframe\n");
|
||||
printf("-D use TDD mode\n");
|
||||
printf("-b TDD config\n");
|
||||
printf("-B bandwidth configuration (in number of ressource blocks): 6, 25, 50, 100\n");
|
||||
printf("-r ressource block allocation (see section 7.1.6.3 in 36.213\n");
|
||||
printf("-g [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')\n");
|
||||
printf("-F forgetting factor (0 new channel every trial, 1 channel constant\n");
|
||||
printf("-x Transmission mode (1,2,6,7 for the moment)\n");
|
||||
printf("-q Number of TX antennas ports used in eNB\n");
|
||||
printf("-y Number of TX antennas used in eNB\n");
|
||||
printf("-z Number of RX antennas used in UE\n");
|
||||
printf("-t MCS of interfering UE\n");
|
||||
printf("-R Number of HARQ rounds (fixed)\n");
|
||||
printf("-A Turns on calibration mode for abstraction.\n");
|
||||
printf("-N Determines the number of Channel Realizations in Abstraction mode. Default value is 1. \n");
|
||||
printf("-O Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100) \n");
|
||||
printf("-I Input filename for TrCH data (binary)\n");
|
||||
printf("-u Enables the Interference Aware Receiver for TM5 (default is normal receiver)\n");
|
||||
printf("Wrong option: %s\n",long_options[option_index].name);
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( res != -1 ) {
|
||||
printf("A wrong option has been found\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (help || verbose )
|
||||
display_options_values(options, true);
|
||||
if (help)
|
||||
exit(0);
|
||||
|
||||
set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
|
||||
set_worker_conf("WORKER_ENABLE");
|
||||
|
||||
@@ -1073,8 +991,10 @@ int main(int argc, char **argv)
|
||||
AssertFatal(load_configmodule(argc,argv) != NULL,
|
||||
"cannot load configuration module, exiting\n");
|
||||
logInit();
|
||||
set_glog_onlinelog(true);
|
||||
// enable these lines if you need debug info
|
||||
set_glog(loglvl);
|
||||
SET_LOG_DEBUG(UE_TIMING);
|
||||
// moreover you need to init itti with the following line
|
||||
// however itti will catch all signals, so ctrl-c won't work anymore
|
||||
// alternatively you can disable ITTI completely in CMakeLists.txt
|
||||
@@ -1522,9 +1442,17 @@ int main(int argc, char **argv)
|
||||
reset_meas(&eNB->dlsch_interleaving_stats);
|
||||
reset_meas(&eNB->dlsch_rate_matching_stats);
|
||||
reset_meas(&eNB->dlsch_turbo_encoding_stats);
|
||||
|
||||
reset_meas(&UE->phy_proc_rx[UE->current_thread_id[subframe]]); // total UE rx
|
||||
for (int i=0; i<RX_NB_TH; i++) {
|
||||
reset_meas(&UE->phy_proc_rx[i]); // total UE rx
|
||||
reset_meas(&UE->ue_front_end_stat[i]);
|
||||
reset_meas(&UE->pdsch_procedures_stat[i]);
|
||||
reset_meas(&UE->dlsch_procedures_stat[i]);
|
||||
reset_meas(&UE->dlsch_decoding_stats[i]);
|
||||
reset_meas(&UE->dlsch_llr_stats_parallelization[i][0]);
|
||||
reset_meas(&UE->dlsch_llr_stats_parallelization[i][1]);
|
||||
}
|
||||
reset_meas(&UE->ofdm_demod_stats);
|
||||
reset_meas(&UE->crnti_procedures_stats);
|
||||
reset_meas(&UE->dlsch_channel_estimation_stats);
|
||||
reset_meas(&UE->dlsch_freq_offset_estimation_stats);
|
||||
reset_meas(&UE->rx_dft_stats);
|
||||
@@ -1541,25 +1469,21 @@ int main(int argc, char **argv)
|
||||
reset_meas(&UE->dlsch_tc_intl1_stats);
|
||||
reset_meas(&UE->dlsch_tc_intl2_stats);
|
||||
// initialization
|
||||
struct list time_vector_tx;
|
||||
initialize(&time_vector_tx);
|
||||
struct list time_vector_tx_ifft;
|
||||
initialize(&time_vector_tx_ifft);
|
||||
struct list time_vector_tx_mod;
|
||||
initialize(&time_vector_tx_mod);
|
||||
struct list time_vector_tx_enc;
|
||||
initialize(&time_vector_tx_enc);
|
||||
|
||||
struct list time_vector_rx;
|
||||
initialize(&time_vector_rx);
|
||||
struct list time_vector_rx_fft;
|
||||
initialize(&time_vector_rx_fft);
|
||||
struct list time_vector_rx_demod;
|
||||
initialize(&time_vector_rx_demod);
|
||||
struct list time_vector_rx_dec;
|
||||
initialize(&time_vector_rx_dec);
|
||||
|
||||
|
||||
// initialization
|
||||
varArray_t *table_tx=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_tx_ifft=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_tx_mod=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_tx_enc=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_rx=initVarArray(1000,sizeof(double));
|
||||
time_stats_t phy_proc_rx_tot;
|
||||
time_stats_t pdsch_procedures_tot;
|
||||
time_stats_t dlsch_procedures_tot;
|
||||
time_stats_t dlsch_decoding_tot;
|
||||
time_stats_t dlsch_llr_tot;
|
||||
time_stats_t ue_front_end_tot;
|
||||
varArray_t *table_rx_fft=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_rx_demod=initVarArray(1000,sizeof(double));
|
||||
varArray_t *table_rx_dec=initVarArray(1000,sizeof(double));
|
||||
|
||||
for (trials = 0; trials<n_frames; trials++) {
|
||||
//printf("Trial %d\n",trials);
|
||||
@@ -2004,120 +1928,53 @@ int main(int argc, char **argv)
|
||||
/* calculate the total processing time for each packet,
|
||||
* get the max, min, and number of packets that exceed t>2000us
|
||||
*/
|
||||
double t_tx = (double)eNB->phy_proc_tx.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx_ifft = (double)eNB->ofdm_mod_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx_mod = (double)eNB->dlsch_modulation_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx_enc = (double)eNB->dlsch_encoding_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_tx = inMicroS(eNB->phy_proc_tx.p_time);
|
||||
double t_tx_ifft = inMicroS(eNB->ofdm_mod_stats.p_time);
|
||||
double t_rx = inMicroS(UE->phy_proc_rx[UE->current_thread_id[subframe]].p_time);
|
||||
sumUpStats(&phy_proc_rx_tot, UE->phy_proc_rx, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&ue_front_end_tot, UE->ue_front_end_stat, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&pdsch_procedures_tot, UE->pdsch_procedures_stat, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&dlsch_procedures_tot, UE->dlsch_procedures_stat, UE->current_thread_id[subframe]);
|
||||
sumUpStats(&dlsch_decoding_tot, UE->dlsch_decoding_stats, UE->current_thread_id[subframe]);
|
||||
sumUpStatsSlot(&dlsch_llr_tot, UE->dlsch_llr_stats_parallelization, UE->current_thread_id[subframe]);
|
||||
|
||||
|
||||
double t_rx = (double)UE->phy_proc_rx[UE->current_thread_id[subframe]].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_fft = (double)UE->ofdm_demod_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_demod = (double)UE->dlsch_rx_pdcch_stats.p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_dec = (double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].p_time/cpu_freq_GHz/1000.0;
|
||||
double t_rx_fft = inMicroS(UE->ofdm_demod_stats.p_time);
|
||||
double t_rx_demod = inMicroS(UE->dlsch_rx_pdcch_stats.p_time);
|
||||
double t_rx_dec = inMicroS(UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].p_time);
|
||||
|
||||
if (t_tx > t_tx_max)
|
||||
t_tx_max = t_tx;
|
||||
|
||||
if (t_tx < t_tx_min)
|
||||
t_tx_min = t_tx;
|
||||
|
||||
if (t_rx > t_rx_max)
|
||||
t_rx_max = t_rx;
|
||||
|
||||
if (t_rx < t_rx_min)
|
||||
t_rx_min = t_rx;
|
||||
|
||||
if (t_tx > 2000)
|
||||
if (t_tx > 2000 )// 2ms is too much time for a subframe
|
||||
n_tx_dropped++;
|
||||
|
||||
if (t_rx > 2000)
|
||||
|
||||
if (t_rx > 2000 )
|
||||
n_rx_dropped++;
|
||||
|
||||
push_front(&time_vector_tx, t_tx);
|
||||
push_front(&time_vector_tx_ifft, t_tx_ifft);
|
||||
push_front(&time_vector_tx_mod, t_tx_mod);
|
||||
push_front(&time_vector_tx_enc, t_tx_enc);
|
||||
|
||||
push_front(&time_vector_rx, t_rx);
|
||||
push_front(&time_vector_rx_fft, t_rx_fft);
|
||||
push_front(&time_vector_rx_demod, t_rx_demod);
|
||||
push_front(&time_vector_rx_dec, t_rx_dec);
|
||||
|
||||
|
||||
appendVarArray(table_tx, &t_tx);
|
||||
appendVarArray(table_tx_ifft, &t_tx_ifft);
|
||||
appendVarArray(table_rx, &t_rx );
|
||||
appendVarArray(table_rx_fft, &t_rx_fft );
|
||||
appendVarArray(table_rx_demod, &t_rx_demod );
|
||||
appendVarArray(table_rx_dec, &t_rx_dec );
|
||||
|
||||
} //trials
|
||||
|
||||
// round_trials[0]: number of code word : goodput the protocol
|
||||
double table_tx[time_vector_tx.size];
|
||||
totable(table_tx, &time_vector_tx);
|
||||
double table_tx_ifft[time_vector_tx_ifft.size];
|
||||
totable(table_tx_ifft, &time_vector_tx_ifft);
|
||||
double table_tx_mod[time_vector_tx_mod.size];
|
||||
totable(table_tx_mod, &time_vector_tx_mod);
|
||||
double table_tx_enc[time_vector_tx_enc.size];
|
||||
totable(table_tx_enc, &time_vector_tx_enc);
|
||||
|
||||
double table_rx[time_vector_rx.size];
|
||||
totable(table_rx, &time_vector_rx);
|
||||
double table_rx_fft[time_vector_rx_fft.size];
|
||||
totable(table_rx_fft, &time_vector_rx_fft);
|
||||
double table_rx_demod[time_vector_rx_demod.size];
|
||||
totable(table_rx_demod, &time_vector_rx_demod);
|
||||
double table_rx_dec[time_vector_rx_dec.size];
|
||||
totable(table_rx_dec, &time_vector_rx_dec);
|
||||
|
||||
|
||||
// sort table
|
||||
qsort (table_tx, time_vector_tx.size, sizeof(double), &compare);
|
||||
qsort (table_rx, time_vector_rx.size, sizeof(double), &compare);
|
||||
qsort (dataArray(table_tx), table_tx->size, table_tx->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_tx_ifft), table_tx_ifft->size, table_tx_ifft->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_tx_mod), table_tx_mod->size, table_tx_mod->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_tx_enc), table_tx_enc->size, table_tx_enc->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx), table_rx->size, table_rx->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx_fft), table_rx_fft->size, table_rx_fft->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx_demod), table_rx_demod->size, table_rx_demod->atomSize, &cmpdouble);
|
||||
qsort (dataArray(table_rx_dec), table_rx_dec->size, table_rx_dec->atomSize, &cmpdouble);
|
||||
|
||||
if (dump_table == 1 ) {
|
||||
set_component_filelog(SIM); // file located in /tmp/usim.txt
|
||||
LOG_UDUMPMSG(SIM,table_tx,time_vector_tx.size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_rx,time_vector_rx.size,LOG_DUMP_DOUBLE,"Thereceiver raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_tx,table_tx->size,LOG_DUMP_DOUBLE,"The transmitter raw data: \n");
|
||||
LOG_UDUMPMSG(SIM,table_rx,table_rx->size,LOG_DUMP_DOUBLE,"Thereceiver raw data: \n");
|
||||
}
|
||||
|
||||
double tx_median = table_tx[time_vector_tx.size/2];
|
||||
double tx_q1 = table_tx[time_vector_tx.size/4];
|
||||
double tx_q3 = table_tx[3*time_vector_tx.size/4];
|
||||
|
||||
double tx_ifft_median = table_tx_ifft[time_vector_tx_ifft.size/2];
|
||||
double tx_ifft_q1 = table_tx_ifft[time_vector_tx_ifft.size/4];
|
||||
double tx_ifft_q3 = table_tx_ifft[3*time_vector_tx_ifft.size/4];
|
||||
|
||||
double tx_mod_median = table_tx_mod[time_vector_tx_mod.size/2];
|
||||
double tx_mod_q1 = table_tx_mod[time_vector_tx_mod.size/4];
|
||||
double tx_mod_q3 = table_tx_mod[3*time_vector_tx_mod.size/4];
|
||||
|
||||
double tx_enc_median = table_tx_enc[time_vector_tx_enc.size/2];
|
||||
double tx_enc_q1 = table_tx_enc[time_vector_tx_enc.size/4];
|
||||
double tx_enc_q3 = table_tx_enc[3*time_vector_tx_enc.size/4];
|
||||
|
||||
double rx_median = table_rx[time_vector_rx.size/2];
|
||||
double rx_q1 = table_rx[time_vector_rx.size/4];
|
||||
double rx_q3 = table_rx[3*time_vector_rx.size/4];
|
||||
|
||||
double rx_fft_median = table_rx_fft[time_vector_rx_fft.size/2];
|
||||
double rx_fft_q1 = table_rx_fft[time_vector_rx_fft.size/4];
|
||||
double rx_fft_q3 = table_rx_fft[3*time_vector_rx_fft.size/4];
|
||||
|
||||
double rx_demod_median = table_rx_demod[time_vector_rx_demod.size/2];
|
||||
double rx_demod_q1 = table_rx_demod[time_vector_rx_demod.size/4];
|
||||
double rx_demod_q3 = table_rx_demod[3*time_vector_rx_demod.size/4];
|
||||
|
||||
double rx_dec_median = table_rx_dec[time_vector_rx_dec.size/2];
|
||||
double rx_dec_q1 = table_rx_dec[time_vector_rx_dec.size/4];
|
||||
double rx_dec_q3 = table_rx_dec[3*time_vector_rx_dec.size/4];
|
||||
|
||||
double std_phy_proc_tx=0;
|
||||
double std_phy_proc_tx_ifft=0;
|
||||
double std_phy_proc_tx_mod=0;
|
||||
double std_phy_proc_tx_enc=0;
|
||||
|
||||
double std_phy_proc_rx=0;
|
||||
double std_phy_proc_rx_fft=0;
|
||||
double std_phy_proc_rx_demod=0;
|
||||
double std_phy_proc_rx_dec=0;
|
||||
|
||||
effective_rate = 1.0-((double)(errs[0]+errs[1]+errs[2]+errs[3])/((double)round_trials[0] + round_trials[1] + round_trials[2] + round_trials[3]));
|
||||
|
||||
printf("\n**********************SNR = %f dB (tx_lev %f)**************************\n",
|
||||
@@ -2149,108 +2006,49 @@ int main(int argc, char **argv)
|
||||
(double)eNB->dlsch[0][0]->harq_processes[0]->TBS,
|
||||
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
|
||||
|
||||
double timeBase=1/(1000*cpu_freq_GHz);
|
||||
if (print_perf==1) {
|
||||
printf("eNB TX function statistics (per 1ms subframe)\n\n");
|
||||
std_phy_proc_tx = sqrt((double)eNB->phy_proc_tx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->phy_proc_tx.trials - pow((double)eNB->phy_proc_tx.diff/eNB->phy_proc_tx.trials/cpu_freq_GHz/1000,2));
|
||||
std_phy_proc_tx_ifft = sqrt((double)eNB->ofdm_mod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->ofdm_mod_stats.trials - pow((double)eNB->ofdm_mod_stats.diff/eNB->ofdm_mod_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("OFDM_mod time :%f us (%d trials)\n",(double)eNB->ofdm_mod_stats.diff/eNB->ofdm_mod_stats.trials/cpu_freq_GHz/1000.0,eNB->ofdm_mod_stats.trials);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3);
|
||||
printf("Total PHY proc tx :%f us (%d trials)\n",(double)eNB->phy_proc_tx.diff/eNB->phy_proc_tx.trials/cpu_freq_GHz/1000.0,eNB->phy_proc_tx.trials);
|
||||
printf("|__ Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n",std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3,
|
||||
n_tx_dropped);
|
||||
printf("\neNB TX function statistics (per 1ms subframe)\n");
|
||||
printDistribution(&eNB->phy_proc_tx,table_tx,"PHY proc tx");
|
||||
printStatIndent(&eNB->dlsch_common_and_dci,"DL common channels and dci time");
|
||||
printStatIndent(&eNB->dlsch_encoding_stats,"DLSCH encoding time");
|
||||
printStatIndent2(&eNB->dlsch_rate_matching_stats,"DLSCH rate matching time",eNB->dlsch_rate_matching_stats.trials);
|
||||
printStatIndent2(&eNB->dlsch_turbo_encoding_stats,"DLSCH turbo encoding time", eNB->dlsch_turbo_encoding_stats.trials);
|
||||
printStatIndent2(&eNB->dlsch_interleaving_stats,"DLSCH interleaving time", eNB->dlsch_interleaving_stats.trials);
|
||||
printStatIndent(&eNB->dlsch_scrambling_stats, "DLSCH scrambling time");
|
||||
printStatIndent(&eNB->dlsch_modulation_stats, "DLSCH modulation time");
|
||||
printDistribution(&eNB->ofdm_mod_stats,table_tx_ifft,"OFDM_mod (idft) time");
|
||||
|
||||
std_phy_proc_tx_mod = sqrt((double)eNB->dlsch_modulation_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->dlsch_modulation_stats.trials - pow((double)eNB->dlsch_modulation_stats.diff/eNB->dlsch_modulation_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH modulation time :%f us (%d trials)\n",(double)eNB->dlsch_modulation_stats.diff/eNB->dlsch_modulation_stats.trials/cpu_freq_GHz/1000.0,
|
||||
eNB->dlsch_modulation_stats.trials);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3);
|
||||
printf("DLSCH scrambling time :%f us (%d trials)\n",(double)eNB->dlsch_scrambling_stats.diff/eNB->dlsch_scrambling_stats.trials/cpu_freq_GHz/1000.0,
|
||||
eNB->dlsch_scrambling_stats.trials);
|
||||
std_phy_proc_tx_enc = sqrt((double)eNB->dlsch_encoding_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/eNB->dlsch_encoding_stats.trials - pow((double)eNB->dlsch_encoding_stats.diff/eNB->dlsch_encoding_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH encoding time :%f us (%d trials)\n",(double)eNB->dlsch_encoding_stats.diff/eNB->dlsch_encoding_stats.trials/cpu_freq_GHz/1000.0,
|
||||
eNB->dlsch_modulation_stats.trials);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3);
|
||||
printf("|__ DLSCH turbo encoding time :%f us (%d trials)\n",
|
||||
((double)eNB->dlsch_turbo_encoding_stats.trials/eNB->dlsch_encoding_stats.trials)*(double)
|
||||
eNB->dlsch_turbo_encoding_stats.diff/eNB->dlsch_turbo_encoding_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_turbo_encoding_stats.trials);
|
||||
printf("|__ DLSCH rate-matching time :%f us (%d trials)\n",
|
||||
((double)eNB->dlsch_rate_matching_stats.trials/eNB->dlsch_encoding_stats.trials)*(double)
|
||||
eNB->dlsch_rate_matching_stats.diff/eNB->dlsch_rate_matching_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_rate_matching_stats.trials);
|
||||
printf("|__ DLSCH sub-block interleaving time :%f us (%d trials)\n",
|
||||
((double)eNB->dlsch_interleaving_stats.trials/eNB->dlsch_encoding_stats.trials)*(double)
|
||||
eNB->dlsch_interleaving_stats.diff/eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,eNB->dlsch_interleaving_stats.trials);
|
||||
printf("\nUE RX function statistics (per 1ms subframe)\n");
|
||||
printDistribution(&phy_proc_rx_tot, table_rx,"Total PHY proc rx");
|
||||
printStatIndent(&ue_front_end_tot,"Front end processing");
|
||||
printStatIndent(&dlsch_llr_tot,"rx_pdsch processing");
|
||||
printStatIndent2(&pdsch_procedures_tot,"pdsch processing", pdsch_procedures_tot.trials);
|
||||
printStatIndent2(&dlsch_procedures_tot,"dlsch processing", dlsch_procedures_tot.trials);
|
||||
printStatIndent2(&UE->crnti_procedures_stats,"C-RNTI processing", UE->crnti_procedures_stats.trials);
|
||||
printStatIndent(&UE->ofdm_demod_stats,"ofdm demodulation");
|
||||
printStatIndent(&UE->dlsch_channel_estimation_stats,"DLSCH channel estimation time");
|
||||
printStatIndent(&UE->dlsch_freq_offset_estimation_stats,"DLSCH frequency offset estimation time");
|
||||
printStatIndent(&dlsch_decoding_tot, "DLSCH Decoding time ");
|
||||
printStatIndent(&UE->dlsch_unscrambling_stats,"DLSCH unscrambling time");
|
||||
printStatIndent(&UE->dlsch_rate_unmatching_stats,"DLSCH Rate Unmatching");
|
||||
printf("|__ DLSCH Turbo Decoding(%d bits), avg iterations: %.1f %.2f us (%d cycles, %d trials)\n",
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus ?
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus :
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus,
|
||||
|
||||
printf("\n\nUE RX function statistics (per 1ms subframe)\n\n");
|
||||
std_phy_proc_rx = sqrt((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials - pow((double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000,2));
|
||||
printf("Total PHY proc rx :%f us (%d trials)\n",(double)UE->phy_proc_rx[UE->current_thread_id[subframe]].diff/UE->phy_proc_rx[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000.0,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials*2/3);
|
||||
printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median,
|
||||
rx_q1, rx_q3, n_rx_dropped);
|
||||
std_phy_proc_rx_fft = sqrt((double)UE->ofdm_demod_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->ofdm_demod_stats.trials - pow((double)UE->ofdm_demod_stats.diff/UE->ofdm_demod_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH OFDM demodulation and channel_estimation time :%f us (%d trials)\n",(nsymb)*(double)UE->ofdm_demod_stats.diff/UE->ofdm_demod_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->ofdm_demod_stats.trials*2/3);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3);
|
||||
printf("|__ DLSCH rx dft :%f us (%d trials)\n",
|
||||
(nsymb*UE->frame_parms.nb_antennas_rx)*(double)UE->rx_dft_stats.diff/UE->rx_dft_stats.trials/cpu_freq_GHz/1000.0,UE->rx_dft_stats.trials*2/3);
|
||||
printf("|__ DLSCH channel estimation time :%f us (%d trials)\n",
|
||||
(4.0)*(double)UE->dlsch_channel_estimation_stats.diff/UE->dlsch_channel_estimation_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_channel_estimation_stats.trials*2/3);
|
||||
printf("|__ DLSCH frequency offset estimation time :%f us (%d trials)\n",
|
||||
(4.0)*(double)UE->dlsch_freq_offset_estimation_stats.diff/UE->dlsch_freq_offset_estimation_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_freq_offset_estimation_stats.trials*2/3);
|
||||
printf("DLSCH rx pdcch :%f us (%d trials)\n",(double)UE->dlsch_rx_pdcch_stats.diff/UE->dlsch_rx_pdcch_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_rx_pdcch_stats.trials);
|
||||
std_phy_proc_rx_demod = sqrt((double)UE->dlsch_llr_stats.diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->dlsch_llr_stats.trials - pow((double)UE->dlsch_llr_stats.diff/UE->dlsch_llr_stats.trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH Channel Compensation and LLR generation time :%f us (%d trials)\n",(14-num_pdcch_symbols)*(double)UE->dlsch_llr_stats.diff/UE->dlsch_llr_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_llr_stats.trials/3);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_demod, rx_demod_median, rx_demod_q1, rx_demod_q3);
|
||||
printf("DLSCH unscrambling time :%f us (%d trials)\n",(double)UE->dlsch_unscrambling_stats.diff/UE->dlsch_unscrambling_stats.trials/cpu_freq_GHz/1000.0,
|
||||
UE->dlsch_unscrambling_stats.trials);
|
||||
std_phy_proc_rx_dec = sqrt((double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff_square/pow(cpu_freq_GHz,2)/pow(1000,
|
||||
2)/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials - pow((double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000,2));
|
||||
printf("DLSCH Decoding time (%02.2f Mbit/s, avg iter %1.2f) :%f us (%d trials, max %f)\n",
|
||||
eNB->dlsch[0][0]->harq_processes[0]->TBS/1000.0,(double)avg_iter/iter_trials,
|
||||
(double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].diff/UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials/cpu_freq_GHz/1000.0,UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials,
|
||||
(double)UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].max/cpu_freq_GHz/1000.0);
|
||||
printf("|__ Statistcs std: %fus median %fus q1 %fus q3 %fus \n",std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3);
|
||||
printf("|__ DLSCH Rate Unmatching :%f us (%d trials)\n",
|
||||
(double)UE->dlsch_rate_unmatching_stats.diff/UE->dlsch_rate_unmatching_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_rate_unmatching_stats.trials);
|
||||
printf("|__ DLSCH Turbo Decoding(%d bits) :%f us (%d trials)\n",
|
||||
UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Cminus ? UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kminus : UE->dlsch[UE->current_thread_id[subframe]][0][0]->harq_processes[0]->Kplus,
|
||||
(double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials/cpu_freq_GHz/1000.0,UE->dlsch_turbo_decoding_stats.trials);
|
||||
printf(" |__ init %f us (cycles/iter %f, %d trials)\n",
|
||||
(double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_init_stats.diff/UE->dlsch_tc_init_stats.trials/((double)avg_iter/iter_trials),
|
||||
UE->dlsch_tc_init_stats.trials);
|
||||
printf(" |__ alpha %f us (cycles/iter %f, %d trials)\n",
|
||||
(double)UE->dlsch_tc_alpha_stats.diff/UE->dlsch_tc_alpha_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_alpha_stats.diff/UE->dlsch_tc_alpha_stats.trials*2,
|
||||
UE->dlsch_tc_alpha_stats.trials);
|
||||
printf(" |__ beta %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_beta_stats.diff/UE->dlsch_tc_beta_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_beta_stats.diff/UE->dlsch_tc_beta_stats.trials*2,
|
||||
UE->dlsch_tc_beta_stats.trials);
|
||||
printf(" |__ gamma %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_gamma_stats.diff/UE->dlsch_tc_gamma_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_gamma_stats.diff/UE->dlsch_tc_gamma_stats.trials*2,
|
||||
UE->dlsch_tc_gamma_stats.trials);
|
||||
printf(" |__ ext %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_ext_stats.diff/UE->dlsch_tc_ext_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_ext_stats.diff/UE->dlsch_tc_ext_stats.trials*2,
|
||||
UE->dlsch_tc_ext_stats.trials);
|
||||
printf(" |__ intl1 %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_intl1_stats.diff/UE->dlsch_tc_intl1_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_intl1_stats.diff/UE->dlsch_tc_intl1_stats.trials,
|
||||
UE->dlsch_tc_intl1_stats.trials);
|
||||
printf(" |__ intl2+HD+CRC %f us (cycles/iter %f,%d trials)\n",
|
||||
(double)UE->dlsch_tc_intl2_stats.diff/UE->dlsch_tc_intl2_stats.trials/cpu_freq_GHz/1000.0,
|
||||
(double)UE->dlsch_tc_intl2_stats.diff/UE->dlsch_tc_intl2_stats.trials,
|
||||
UE->dlsch_tc_intl2_stats.trials);
|
||||
UE->dlsch_tc_intl1_stats.trials/(double)UE->dlsch_tc_init_stats.trials,
|
||||
(double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials*timeBase,
|
||||
(int)((double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials),
|
||||
UE->dlsch_turbo_decoding_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_init_stats,"init", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_alpha_stats,"alpha", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_beta_stats,"beta", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_gamma_stats,"gamma", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_ext_stats,"ext", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_intl1_stats,"turbo internal interleaver", UE->dlsch_tc_init_stats.trials);
|
||||
printStatIndent2(&UE->dlsch_tc_intl2_stats,"intl2+HardDecode+CRC", UE->dlsch_tc_init_stats.trials);
|
||||
|
||||
}
|
||||
|
||||
if ((transmission_mode != 3) && (transmission_mode != 4)) {
|
||||
@@ -2399,7 +2197,7 @@ int main(int argc, char **argv)
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
phy_proc_rx_tot.trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
@@ -2412,7 +2210,7 @@ int main(int argc, char **argv)
|
||||
get_time_meas_us(&eNB->dlsch_modulation_stats),
|
||||
get_time_meas_us(&eNB->dlsch_scrambling_stats),
|
||||
get_time_meas_us(&eNB->dlsch_encoding_stats),
|
||||
get_time_meas_us(&UE->phy_proc_rx[UE->current_thread_id[subframe]]),
|
||||
get_time_meas_us(&phy_proc_rx_tot),
|
||||
nsymb*get_time_meas_us(&UE->ofdm_demod_stats),
|
||||
get_time_meas_us(&UE->dlsch_rx_pdcch_stats),
|
||||
3*get_time_meas_us(&UE->dlsch_llr_stats),
|
||||
@@ -2420,45 +2218,36 @@ int main(int argc, char **argv)
|
||||
get_time_meas_us(&UE->dlsch_decoding_stats[UE->current_thread_id[subframe]])
|
||||
);
|
||||
//fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MIN;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;",squareRoot(&UE->phy_proc_tx), t_tx_max, t_tx_min, median(table_tx), q1(table_tx), q3(table_tx), n_tx_dropped);
|
||||
//fprintf(time_meas_fd,"IFFT;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&eNB->ofdm_mod_stats),
|
||||
median(table_tx_ifft),q1(table_tx_ifft),q3(table_tx_ifft));
|
||||
//fprintf(time_meas_fd,"MOD;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&eNB->dlsch_modulation_stats),
|
||||
median(table_tx_mod), q1(table_tx_mod), q3(table_tx_mod));
|
||||
//fprintf(time_meas_fd,"ENC;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3);
|
||||
|
||||
|
||||
//fprintf(time_meas_fd,"UE_PROC_RX_STD;UE_PROC_RX_MAX;UE_PROC_RX_MIN;UE_PROC_RX_MED;UE_PROC_RX_Q1;UE_PROC_RX_Q3;UE_PROC_RX_DROPPED;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&eNB->dlsch_encoding_stats),
|
||||
median(table_tx_enc),q1(table_tx_enc),q3(table_tx_enc));
|
||||
//fprintf(time_meas_fd,"eNB_PROC_RX_STD;eNB_PROC_RX_MAX;eNB_PROC_RX_MIN;eNB_PROC_RX_MED;eNB_PROC_RX_Q1;eNB_PROC_RX_Q3;eNB_PROC_RX_DROPPED;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;",
|
||||
squareRoot(&phy_proc_rx_tot), t_rx_max, t_rx_min,
|
||||
median(table_rx), q1(table_rx), q3(table_rx), n_rx_dropped);
|
||||
//fprintf(time_meas_fd,"FFT;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&UE->ofdm_demod_stats),
|
||||
median(table_rx_fft), q1(table_rx_fft), q3(table_rx_fft));
|
||||
//fprintf(time_meas_fd,"DEMOD;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_demod,rx_demod_median, rx_demod_q1, rx_demod_q3);
|
||||
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f;",
|
||||
squareRoot(&UE->dlsch_demodulation_stats),
|
||||
median(table_rx_demod), q1(table_rx_demod), q3(table_rx_demod));
|
||||
//fprintf(time_meas_fd,"DEC;\n");
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3);
|
||||
fprintf(time_meas_fd,"%f;%f;%f;%f\n",
|
||||
squareRoot(&UE->dlsch_decoding_stats[subframe]),
|
||||
median(table_rx_dec), q1(table_rx_dec), q3(table_rx_dec));
|
||||
|
||||
|
||||
/*
|
||||
fprintf(time_meas_fd,"%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;",
|
||||
eNB->phy_proc_tx.trials,
|
||||
eNB->ofdm_mod_stats.trials,
|
||||
eNB->dlsch_modulation_stats.trials,
|
||||
eNB->dlsch_scrambling_stats.trials,
|
||||
eNB->dlsch_encoding_stats.trials,
|
||||
UE->phy_proc_rx[UE->current_thread_id[subframe]].trials,
|
||||
UE->ofdm_demod_stats.trials,
|
||||
UE->dlsch_rx_pdcch_stats.trials,
|
||||
UE->dlsch_llr_stats.trials,
|
||||
UE->dlsch_unscrambling_stats.trials,
|
||||
UE->dlsch_decoding_stats[UE->current_thread_id[subframe]].trials);
|
||||
*/
|
||||
printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate*effective_rate, 100*effective_rate, rate );
|
||||
test_passed = 1;
|
||||
break;
|
||||
|
||||
+122
-226
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-------------------------------------------------------------------------------
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
*/
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file ulsim.c
|
||||
\brief Top-level UL simulator
|
||||
@@ -60,32 +60,7 @@
|
||||
double cpuf;
|
||||
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
|
||||
//#define MCS_COUNT 23//added for PHY abstraction
|
||||
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");
|
||||
}
|
||||
|
||||
#include <openair1/SIMULATION/LTE_PHY/common_sim.h>
|
||||
channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
|
||||
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
|
||||
//Added for PHY abstractionopenair1/PHY/TOOLS/lte_phy_scope.h
|
||||
@@ -348,48 +323,8 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
|
||||
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
}
|
||||
|
||||
void printStatIndent(time_stats_t *ptr, char *txt) {
|
||||
printf("|__ %-50s %.2f us (%d trials)\n",
|
||||
txt,
|
||||
inMicroS(ptr->diff/ptr->trials),
|
||||
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 %7g, %5d trials)\n",
|
||||
txt,
|
||||
((double)ptr->diff)/ptr->trials*timeBase,
|
||||
round(((double)ptr->diff)/turbo_iter),
|
||||
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);
|
||||
}
|
||||
|
||||
enum eTypes { eBool, eInt, eFloat, eText };
|
||||
static int verbose,disable_bundling=0,cqi_flag=0, extended_prefix_flag=0, test_perf=0, subframe=3, transmission_m=1,n_rx=1;
|
||||
static int verbose,help,disable_bundling=0,cqi_flag=0, extended_prefix_flag=0, test_perf=0, subframe=3, transmission_m=1,n_rx=1;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i,j,aa,u;
|
||||
@@ -505,13 +440,13 @@ int main(int argc, char **argv) {
|
||||
//set_glog(LOG_DEBUG,LOG_MED);
|
||||
//hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF
|
||||
static paramdef_t options[] = {
|
||||
{ "awgn", "Additive white gaussian noise", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
{ "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 },
|
||||
{ "mcs", "The MCS to use", 0, iptr:&mcs, defintval:10, TYPE_INT, 0 },
|
||||
{ "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 },
|
||||
{ "snr", "starting snr", 0, dblptr:&snr0, defdblval:-2.9, TYPE_DOUBLE, 0 },
|
||||
{ "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 },
|
||||
{ "e_snr_step", "step increasint snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 },
|
||||
{ "e_snr_step", "step increasing snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 },
|
||||
{ "rb_dynamic", "number of rb in dynamic allocation",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
{ "first_rb", "first rb used in dynamic allocation",0, iptr:&first_rb, defintval:0, TYPE_INT, 0 },
|
||||
{ "osrs", "enable srs generation",PARAMFLAG_BOOL, iptr:&srs_flag, defintval:0, TYPE_INT, 0 },
|
||||
@@ -538,37 +473,12 @@ int main(int argc, char **argv) {
|
||||
{ "bundling_disable", "bundling disable",PARAMFLAG_BOOL, iptr:&disable_bundling, defintval:0, TYPE_INT, 0 },
|
||||
{ "Y", "n_ch_rlz",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 },
|
||||
{ "X", "abstx", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 },
|
||||
{ "Operf", "test perf mode ?",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "Operf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 },
|
||||
{ "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 },
|
||||
{ "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 },
|
||||
{ "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 },
|
||||
};
|
||||
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;
|
||||
|
||||
default:
|
||||
printf("not parsed type for default value %s\n", options[i].optname );
|
||||
exit(1);
|
||||
}
|
||||
|
||||
continue;
|
||||
};
|
||||
struct option * long_options = parse_oai_options(options);
|
||||
|
||||
int option_index;
|
||||
|
||||
@@ -579,113 +489,121 @@ int main(int argc, char **argv) {
|
||||
if (long_options[option_index].has_arg==no_argument)
|
||||
*(bool *)options[option_index].iptr=1;
|
||||
else switch (options[option_index].type) {
|
||||
case TYPE_INT:
|
||||
*(int *)options[option_index].iptr=atoi(optarg);
|
||||
break;
|
||||
case TYPE_INT:
|
||||
*(int *)options[option_index].iptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
*(double *)options[option_index].dblptr=atof(optarg);
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
*(double *)options[option_index].dblptr=atof(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type.\n");
|
||||
exit(1);
|
||||
case TYPE_UINT8:
|
||||
*(uint8_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*(uint16_t *)options[option_index].dblptr=atoi(optarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("not decoded type.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (long_options[option_index].name[0]) {
|
||||
case 'T':
|
||||
tdd_config=atoi(optarg);
|
||||
frame_type=TDD;
|
||||
break;
|
||||
case 'T':
|
||||
tdd_config=atoi(optarg);
|
||||
frame_type=TDD;
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
channel_model = AWGN;
|
||||
chMod = 1;
|
||||
break;
|
||||
case 'a':
|
||||
channel_model = AWGN;
|
||||
chMod = 1;
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
strncpy(channel_model_input,optarg,9);
|
||||
struct tmp {
|
||||
char opt;
|
||||
int m;
|
||||
int M;
|
||||
}
|
||||
tmp[]= {
|
||||
{'A',SCM_A,2},
|
||||
{'B',SCM_B,3},
|
||||
{'C',SCM_C,4},
|
||||
{'D',SCM_D,5},
|
||||
{'E',EPA,6},
|
||||
{'G',ETU,8},
|
||||
{'H',Rayleigh8,9},
|
||||
{'I',Rayleigh1,10},
|
||||
{'J',Rayleigh1_corr,11},
|
||||
{'K',Rayleigh1_anticorr,12},
|
||||
{'L',Rice8,13},
|
||||
{'M',Rice1,14},
|
||||
{'N',AWGN,1},
|
||||
{0,0,0}
|
||||
};
|
||||
struct tmp *ptr;
|
||||
case 'g':
|
||||
strncpy(channel_model_input,optarg,9);
|
||||
struct tmp {
|
||||
char opt;
|
||||
int m;
|
||||
int M;
|
||||
}
|
||||
tmp[]= {
|
||||
{'A',SCM_A,2},
|
||||
{'B',SCM_B,3},
|
||||
{'C',SCM_C,4},
|
||||
{'D',SCM_D,5},
|
||||
{'E',EPA,6},
|
||||
{'G',ETU,8},
|
||||
{'H',Rayleigh8,9},
|
||||
{'I',Rayleigh1,10},
|
||||
{'J',Rayleigh1_corr,11},
|
||||
{'K',Rayleigh1_anticorr,12},
|
||||
{'L',Rice8,13},
|
||||
{'M',Rice1,14},
|
||||
{'N',AWGN,1},
|
||||
{0,0,0}
|
||||
};
|
||||
struct tmp *ptr;
|
||||
|
||||
for (ptr=tmp; ptr->opt!=0; ptr++)
|
||||
if ( ptr->opt == optarg[0] ) {
|
||||
channel_model=ptr->m;
|
||||
chMod=ptr->M;
|
||||
break;
|
||||
}
|
||||
for (ptr=tmp; ptr->opt!=0; ptr++)
|
||||
if ( ptr->opt == optarg[0] ) {
|
||||
channel_model=ptr->m;
|
||||
chMod=ptr->M;
|
||||
break;
|
||||
}
|
||||
|
||||
AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg );
|
||||
break;
|
||||
AssertFatal(ptr->opt != 0, "Unsupported channel model: %s !\n", optarg );
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
transmission_m=atoi(optarg);
|
||||
AssertFatal(transmission_m==1 || transmission_m==2,
|
||||
"Unsupported transmission mode %d\n",transmission_m);
|
||||
break;
|
||||
case 'x':
|
||||
transmission_m=atoi(optarg);
|
||||
AssertFatal(transmission_m==1 || transmission_m==2,
|
||||
"Unsupported transmission mode %d\n",transmission_m);
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
nb_rb = atoi(optarg);
|
||||
nb_rb_set = 1;
|
||||
break;
|
||||
case 'r':
|
||||
nb_rb = atoi(optarg);
|
||||
nb_rb_set = 1;
|
||||
break;
|
||||
|
||||
//case 'c':
|
||||
// cyclic_shift = atoi(optarg);
|
||||
// break;
|
||||
|
||||
case 'i':
|
||||
input_fdUL = fopen(optarg,"r");
|
||||
printf("Reading in %s (%p)\n",optarg,input_fdUL);
|
||||
AssertFatal(input_fdUL != (FILE *)NULL,"Unknown file %s\n",optarg);
|
||||
break;
|
||||
case 'i':
|
||||
input_fdUL = fopen(optarg,"r");
|
||||
printf("Reading in %s (%p)\n",optarg,input_fdUL);
|
||||
AssertFatal(input_fdUL != (FILE *)NULL,"Unknown file %s\n",optarg);
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
beta_ACK = atoi(optarg);
|
||||
AssertFatal(beta_ACK>15,"beta_ack must be in (0..15)\n");
|
||||
break;
|
||||
case 'A':
|
||||
beta_ACK = atoi(optarg);
|
||||
AssertFatal(beta_ACK>15,"beta_ack must be in (0..15)\n");
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
beta_CQI = atoi(optarg);
|
||||
AssertFatal((beta_CQI>15)||(beta_CQI<2),"beta_cqi must be in (2..15)\n");
|
||||
break;
|
||||
case 'C':
|
||||
beta_CQI = atoi(optarg);
|
||||
AssertFatal((beta_CQI>15)||(beta_CQI<2),"beta_cqi must be in (2..15)\n");
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
beta_RI = atoi(optarg);
|
||||
AssertFatal((beta_RI>15)||(beta_RI<2),"beta_ri must be in (0..13)\n");
|
||||
break;
|
||||
case 'R':
|
||||
beta_RI = atoi(optarg);
|
||||
AssertFatal((beta_RI>15)||(beta_RI<2),"beta_ri must be in (0..13)\n");
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
dump_perf=1;
|
||||
opp_enabled=1;
|
||||
break;
|
||||
case 'P':
|
||||
dump_perf=1;
|
||||
opp_enabled=1;
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Wrong option\n");
|
||||
exit(1);
|
||||
break;
|
||||
default:
|
||||
printf("Wrong option: %s\n",long_options[option_index].name);
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,34 +612,12 @@ int main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
paramdef_t *ptr=options ;
|
||||
|
||||
for( 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;
|
||||
|
||||
default:
|
||||
printf("not decoded type\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Option: %20s set to %s\n",ptr->optname, varText);
|
||||
|
||||
if (verbose)
|
||||
printf("%s\n",ptr->helpstr);
|
||||
}
|
||||
if (help || verbose )
|
||||
display_options_values(options, true);
|
||||
if (help)
|
||||
exit(0);
|
||||
|
||||
set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
|
||||
set_worker_conf("WORKER_ENABLE");
|
||||
RC.nb_L1_inst = 1;
|
||||
|
||||
@@ -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
|
||||
|
||||
+254
-254
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
|
||||
@@ -157,7 +157,7 @@ rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logi
|
||||
frame_t frame = flexran_get_current_frame(mod_id);
|
||||
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -170,7 +170,7 @@ rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, lo
|
||||
frame_t frame = flexran_get_current_frame(mod_id);
|
||||
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -183,7 +183,7 @@ frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann
|
||||
frame_t frame = flexran_get_current_frame(mod_id);
|
||||
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
|
||||
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -719,7 +719,7 @@ uint8_t flexran_get_num_pdcch_symb(mid_t mod_id, uint8_t cc_id)
|
||||
*/
|
||||
|
||||
|
||||
TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id)
|
||||
LTE_TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id)
|
||||
{
|
||||
if (!rrc_is_present(mod_id)) return -1;
|
||||
|
||||
@@ -740,11 +740,11 @@ Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, mid
|
||||
|
||||
if (!ue_context_p) return -1;
|
||||
if (!ue_context_p->ue_context.measGapConfig) return -1;
|
||||
if (ue_context_p->ue_context.measGapConfig->present != MeasGapConfig_PR_setup) return -1;
|
||||
if (ue_context_p->ue_context.measGapConfig->present != LTE_MeasGapConfig_PR_setup) return -1;
|
||||
switch (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present) {
|
||||
case MeasGapConfig__setup__gapOffset_PR_gp0:
|
||||
case LTE_MeasGapConfig__setup__gapOffset_PR_gp0:
|
||||
return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP1;
|
||||
case MeasGapConfig__setup__gapOffset_PR_gp1:
|
||||
case LTE_MeasGapConfig__setup__gapOffset_PR_gp1:
|
||||
return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_GP2;
|
||||
default:
|
||||
return PROTOCOL__FLEX_MEAS_GAP_CONFIG_PATTERN__FLMGCP_OFF;
|
||||
@@ -761,11 +761,11 @@ long flexran_get_meas_gap_config_offset(mid_t mod_id, mid_t ue_id)
|
||||
|
||||
if (!ue_context_p) return -1;
|
||||
if (!ue_context_p->ue_context.measGapConfig) return -1;
|
||||
if (ue_context_p->ue_context.measGapConfig->present != MeasGapConfig_PR_setup) return -1;
|
||||
if (ue_context_p->ue_context.measGapConfig->present != LTE_MeasGapConfig_PR_setup) return -1;
|
||||
switch (ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.present) {
|
||||
case MeasGapConfig__setup__gapOffset_PR_gp0:
|
||||
case LTE_MeasGapConfig__setup__gapOffset_PR_gp0:
|
||||
return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp0;
|
||||
case MeasGapConfig__setup__gapOffset_PR_gp1:
|
||||
case LTE_MeasGapConfig__setup__gapOffset_PR_gp1:
|
||||
return ue_context_p->ue_context.measGapConfig->choice.setup.gapOffset.choice.gp1;
|
||||
default:
|
||||
return -1;
|
||||
@@ -804,7 +804,7 @@ int flexran_get_half_duplex(mid_t mod_id, mid_t ue_id)
|
||||
|
||||
if (!ue_context_p) return -1;
|
||||
if (!ue_context_p->ue_context.UE_Capability) return -1;
|
||||
SupportedBandListEUTRA_t *bands = &ue_context_p->ue_context.UE_Capability->rf_Parameters.supportedBandListEUTRA;
|
||||
LTE_SupportedBandListEUTRA_t *bands = &ue_context_p->ue_context.UE_Capability->rf_Parameters.supportedBandListEUTRA;
|
||||
for (int i = 0; i < bands->list.count; i++) {
|
||||
if (bands->list.array[i]->halfDuplex > 0) return 1;
|
||||
}
|
||||
@@ -976,7 +976,7 @@ BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, mid_t ue_id, uin
|
||||
return RC.rrc[mod_id]->carrier[cc_id].sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission;
|
||||
}
|
||||
|
||||
CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id)
|
||||
LTE_CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id)
|
||||
{
|
||||
if (!rrc_is_present(mod_id)) return -1;
|
||||
|
||||
@@ -1041,9 +1041,9 @@ int flexran_get_ue_transmission_antenna(mid_t mod_id, mid_t ue_id)
|
||||
if (!ue_context_p->ue_context.physicalConfigDedicated) return -1;
|
||||
if (!ue_context_p->ue_context.physicalConfigDedicated->antennaInfo) return -1;
|
||||
switch (ue_context_p->ue_context.physicalConfigDedicated->antennaInfo->choice.explicitValue.ue_TransmitAntennaSelection.choice.setup) {
|
||||
case AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_closedLoop:
|
||||
case LTE_AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_closedLoop:
|
||||
return 2;
|
||||
case AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_openLoop:
|
||||
case LTE_AntennaInfoDedicated__ue_TransmitAntennaSelection__setup_openLoop:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
@@ -1365,7 +1365,7 @@ uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid)
|
||||
|
||||
/******************** RRC *****************************/
|
||||
|
||||
MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id)
|
||||
LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id)
|
||||
{
|
||||
if (!rrc_is_present(mod_id)) return -1;
|
||||
|
||||
@@ -1412,11 +1412,11 @@ int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id)
|
||||
if (!ue_context_p) return 0;
|
||||
if (!ue_context_p->ue_context.measResults) return 0;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return 0;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return 0;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return 0;
|
||||
return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.count;
|
||||
}
|
||||
|
||||
PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id)
|
||||
LTE_PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id)
|
||||
{
|
||||
if (!rrc_is_present(mod_id)) return -1;
|
||||
|
||||
@@ -1426,7 +1426,7 @@ PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int ce
|
||||
if (!ue_context_p) return -1;
|
||||
if (!ue_context_p->ue_context.measResults) return -1;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]) return -1;
|
||||
return ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->physCellId;
|
||||
}
|
||||
@@ -1441,7 +1441,7 @@ float flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id)
|
||||
if (!ue_context_p) return -1;
|
||||
if (!ue_context_p->ue_context.measResults) return -1;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]) return -1;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult) return 0;
|
||||
return RSRP_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrpResult)];
|
||||
@@ -1457,7 +1457,7 @@ float flexran_get_rrc_neigh_rsrq(mid_t mod_id, mid_t ue_id, int cell_id)
|
||||
if (!ue_context_p) return -1;
|
||||
if (!ue_context_p->ue_context.measResults) return -1;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells) return -1;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
|
||||
if (ue_context_p->ue_context.measResults->measResultNeighCells->present != LTE_MeasResults__measResultNeighCells_PR_measResultListEUTRA) return -1;
|
||||
if (!ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult) return 0;
|
||||
return RSRQ_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult)];
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ PHICH_DURATION_t flexran_get_phich_duration(mid_t mod_id, uint8_t cc_id);
|
||||
/* Get timer in subframes. Controls the synchronization
|
||||
status of the UE, not the actual timing
|
||||
advance procedure. See TS 36.321 */
|
||||
TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id);
|
||||
LTE_TimeAlignmentTimer_t flexran_get_time_alignment_timer(mid_t mod_id, mid_t ue_id);
|
||||
|
||||
/* Get measurement gap configuration. See TS 36.133 */
|
||||
Protocol__FlexMeasGapConfigPattern flexran_get_meas_gap_config(mid_t mod_id, mid_t ue_id);
|
||||
@@ -365,7 +365,7 @@ BOOLEAN_t flexran_get_simultaneous_ack_nack_cqi(mid_t mod_id, mid_t ue_id);
|
||||
BOOLEAN_t flexran_get_ack_nack_simultaneous_trans(mid_t mod_id, mid_t ue_id, uint8_t cc_id);
|
||||
|
||||
/* Get aperiodic CQI report mode */
|
||||
CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id);
|
||||
LTE_CQI_ReportModeAperiodic_t flexran_get_aperiodic_cqi_rep_mode(mid_t mod_id,mid_t ue_id);
|
||||
|
||||
/* Get ACK/NACK feedback mode. TDD only */
|
||||
long flexran_get_tdd_ack_nack_feedback_mode(mid_t mod_id, mid_t ue_id);
|
||||
@@ -481,7 +481,7 @@ uint32_t flexran_get_pdcp_rx_oo(mid_t mod_id, mid_t ue_id, lcid_t lcid);
|
||||
|
||||
/*********************RRC**********************/
|
||||
/*Get primary cell measuremeant id flexRAN*/
|
||||
MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id);
|
||||
LTE_MeasId_t flexran_get_rrc_pcell_measid(mid_t mod_id, mid_t ue_id);
|
||||
|
||||
/*Get primary cell RSRP measurement flexRAN*/
|
||||
float flexran_get_rrc_pcell_rsrp(mid_t mod_id, mid_t ue_id);
|
||||
@@ -493,7 +493,7 @@ float flexran_get_rrc_pcell_rsrq(mid_t mod_id, mid_t ue_id);
|
||||
int flexran_get_rrc_num_ncell(mid_t mod_id, mid_t ue_id);
|
||||
|
||||
/*Get physical cell id*/
|
||||
PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id);
|
||||
LTE_PhysCellId_t flexran_get_rrc_neigh_phy_cell_id(mid_t mod_id, mid_t ue_id, int cell_id);
|
||||
|
||||
/*Get RSRP of neighbouring Cell*/
|
||||
float flexran_get_rrc_neigh_rsrp(mid_t mod_id, mid_t ue_id, int cell_id);
|
||||
|
||||
@@ -32,16 +32,16 @@
|
||||
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "SystemInformationBlockType2.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "PRACH-ConfigSIB-v1310.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "MeasGapConfig.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MAC-MainConfig.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#include "LTE_MAC-MainConfig.h"
|
||||
#include "mac.h"
|
||||
#include "mac_proto.h"
|
||||
#include "mac_extern.h"
|
||||
@@ -49,11 +49,11 @@
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-AreaInfo-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-AreaInfo-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
@@ -239,13 +239,13 @@ void config_mib(int Mod_idP,
|
||||
int CC_idP,
|
||||
int eutra_bandP,
|
||||
int dl_BandwidthP,
|
||||
PHICH_Config_t *phich_configP,
|
||||
LTE_PHICH_Config_t *phich_configP,
|
||||
int Nid_cellP,
|
||||
int NcpP,
|
||||
int p_eNBP,
|
||||
uint32_t dl_CarrierFreqP,
|
||||
uint32_t ul_CarrierFreqP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint32_t pbch_repetitionP
|
||||
#endif
|
||||
@@ -317,14 +317,14 @@ void config_mib(int Mod_idP,
|
||||
cfg->sch_config.physical_cell_id.tl.tag = NFAPI_SCH_CONFIG_PHYSICAL_CELL_ID_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.value = pbch_repetitionP;
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG;
|
||||
cfg->num_tlv++;
|
||||
#endif
|
||||
LOG_I(MAC,
|
||||
"%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
" PBCH repetition %d"
|
||||
#endif
|
||||
@@ -342,13 +342,13 @@ void config_mib(int Mod_idP,
|
||||
,cfg->sch_config.primary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.secondary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.physical_cell_id.value
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,cfg->emtc_config.pbch_repetitions_enable_r13.value
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
void config_sib1(int Mod_idP, int CC_idP, TDD_Config_t * tdd_ConfigP)
|
||||
void config_sib1(int Mod_idP, int CC_idP, LTE_TDD_Config_t * tdd_ConfigP)
|
||||
{
|
||||
|
||||
|
||||
@@ -380,14 +380,14 @@ int power_off_dB[6] = { 78, 118, 140, 170, 188, 200 };
|
||||
void
|
||||
config_sib2(int Mod_idP,
|
||||
int CC_idP,
|
||||
RadioResourceConfigCommonSIB_t * radioResourceConfigCommonP,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t * radioResourceConfigCommon_BRP,
|
||||
LTE_RadioResourceConfigCommonSIB_t * radioResourceConfigCommonP,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t * radioResourceConfigCommon_BRP,
|
||||
#endif
|
||||
ARFCN_ValueEUTRA_t *ul_CArrierFreqP,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreqP,
|
||||
long *ul_BandwidthP,
|
||||
AdditionalSpectrumEmission_t *additionalSpectrumEmissionP,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigListP) {
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmissionP,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigListP) {
|
||||
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
|
||||
@@ -474,7 +474,7 @@ config_sib2(int Mod_idP,
|
||||
|
||||
|
||||
// how to enable/disable SRS?
|
||||
if (radioResourceConfigCommonP->soundingRS_UL_ConfigCommon.present==SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
if (radioResourceConfigCommonP->soundingRS_UL_ConfigCommon.present== LTE_SoundingRS_UL_ConfigCommon_PR_setup) {
|
||||
cfg->srs_config.bandwidth_configuration.value = radioResourceConfigCommonP->soundingRS_UL_ConfigCommon.choice.setup.srs_BandwidthConfig;
|
||||
cfg->srs_config.bandwidth_configuration.tl.tag = NFAPI_SRS_CONFIG_BANDWIDTH_CONFIGURATION_TAG;
|
||||
cfg->num_tlv++;
|
||||
@@ -497,7 +497,7 @@ config_sib2(int Mod_idP,
|
||||
cfg->num_tlv++;
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.schedulingInfoSIB1_BR_r13 > 0) {
|
||||
AssertFatal(radioResourceConfigCommon_BRP != NULL, "radioResource rou is missing\n");
|
||||
AssertFatal(radioResourceConfigCommon_BRP->ext4 != NULL, "ext4 is missing\n");
|
||||
@@ -513,11 +513,11 @@ config_sib2(int Mod_idP,
|
||||
cfg->emtc_config.prach_catm_high_speed_flag.tl.tag = NFAPI_EMTC_CONFIG_PRACH_CATM_HIGH_SPEED_FLAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach = radioResourceConfigCommon_BRP->ext4->prach_ConfigCommon_v1310;
|
||||
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach = radioResourceConfigCommon_BRP->ext4->prach_ConfigCommon_v1310;
|
||||
|
||||
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
|
||||
PRACH_ParametersCE_r13_t *p;
|
||||
LTE_PRACH_ParametersCE_r13_t *p;
|
||||
cfg->emtc_config.prach_ce_level_0_enable.value = 0;
|
||||
cfg->emtc_config.prach_ce_level_0_enable.tl.tag=NFAPI_EMTC_CONFIG_PRACH_CE_LEVEL_0_ENABLE_TAG;
|
||||
cfg->num_tlv++;
|
||||
@@ -664,18 +664,18 @@ config_sib2(int Mod_idP,
|
||||
cfg->num_tlv++;
|
||||
}
|
||||
|
||||
struct FreqHoppingParameters_r13 *ext4_freqHoppingParameters = radioResourceConfigCommonP->ext4->freqHoppingParameters_r13;
|
||||
struct LTE_FreqHoppingParameters_r13 *ext4_freqHoppingParameters = radioResourceConfigCommonP->ext4->freqHoppingParameters_r13;
|
||||
if ((ext4_freqHoppingParameters) &&
|
||||
(ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeA_r13)){
|
||||
switch(ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeA_r13->present) {
|
||||
case FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_NOTHING: /* No components present */
|
||||
case LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_NOTHING: /* No components present */
|
||||
break;
|
||||
case FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_FDD_r13:
|
||||
case LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_FDD_r13:
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodea.value = ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeA_r13->choice.interval_FDD_r13;
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodea.tl.tag = NFAPI_EMTC_CONFIG_PUCCH_INTERVAL_ULHOPPINGCONFIGCOMMONMODEA_TAG;
|
||||
cfg->num_tlv++;
|
||||
break;
|
||||
case FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_TDD_r13:
|
||||
case LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeA_r13_PR_interval_TDD_r13:
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodea.value = ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeA_r13->choice.interval_TDD_r13;
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodea.tl.tag = NFAPI_EMTC_CONFIG_PUCCH_INTERVAL_ULHOPPINGCONFIGCOMMONMODEA_TAG;
|
||||
cfg->num_tlv++;
|
||||
@@ -685,14 +685,14 @@ config_sib2(int Mod_idP,
|
||||
if ((ext4_freqHoppingParameters) &&
|
||||
(ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeB_r13)){
|
||||
switch(ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeB_r13->present) {
|
||||
case FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_NOTHING: /* No components present */
|
||||
case LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_NOTHING: /* No components present */
|
||||
break;
|
||||
case FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_FDD_r13:
|
||||
case LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_FDD_r13:
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodeb.value = ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeB_r13->choice.interval_FDD_r13;
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodeb.tl.tag = NFAPI_EMTC_CONFIG_PUCCH_INTERVAL_ULHOPPINGCONFIGCOMMONMODEB_TAG;
|
||||
cfg->num_tlv++;
|
||||
break;
|
||||
case FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_TDD_r13:
|
||||
case LTE_FreqHoppingParameters_r13__interval_ULHoppingConfigCommonModeB_r13_PR_interval_TDD_r13:
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodeb.value = ext4_freqHoppingParameters->interval_ULHoppingConfigCommonModeB_r13->choice.interval_TDD_r13;
|
||||
cfg->emtc_config.pucch_interval_ulhoppingconfigcommonmodeb.tl.tag = NFAPI_EMTC_CONFIG_PUCCH_INTERVAL_ULHOPPINGCONFIGCOMMONMODEB_TAG;
|
||||
cfg->num_tlv++;
|
||||
@@ -708,7 +708,7 @@ void
|
||||
config_dedicated(int Mod_idP,
|
||||
int CC_idP,
|
||||
uint16_t rnti,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated)
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -716,7 +716,7 @@ config_dedicated(int Mod_idP,
|
||||
void
|
||||
config_dedicated_scell(int Mod_idP,
|
||||
uint16_t rnti,
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10)
|
||||
LTE_SCellToAddMod_r10_t * sCellToAddMod_r10)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -728,45 +728,45 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
int physCellId,
|
||||
int p_eNB,
|
||||
int Ncp, int eutra_band, uint32_t dl_CarrierFreq,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int pbch_repetition,
|
||||
#endif
|
||||
rnti_t rntiP,
|
||||
BCCH_BCH_Message_t * mib,
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
LTE_BCCH_BCH_Message_t * mib,
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
struct PhysicalConfigDedicated
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
MeasObjectToAddMod_t ** measObj,
|
||||
MAC_MainConfig_t * mac_MainConfig,
|
||||
LTE_MeasObjectToAddMod_t ** measObj,
|
||||
LTE_MAC_MainConfig_t * mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
LogicalChannelConfig_t * logicalChannelConfig,
|
||||
MeasGapConfig_t * measGapConfig,
|
||||
TDD_Config_t * tdd_Config,
|
||||
MobilityControlInfo_t * mobilityControlInfo,
|
||||
SchedulingInfoList_t * schedulingInfoList,
|
||||
LTE_LogicalChannelConfig_t * logicalChannelConfig,
|
||||
LTE_MeasGapConfig_t * measGapConfig,
|
||||
LTE_TDD_Config_t * tdd_Config,
|
||||
LTE_MobilityControlInfo_t * mobilityControlInfo,
|
||||
LTE_SchedulingInfoList_t * schedulingInfoList,
|
||||
uint32_t ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t * pmch_InfoList
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t * pmch_InfoList
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
SystemInformationBlockType1_v1310_IEs_t *
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_v13ext
|
||||
#endif
|
||||
) {
|
||||
@@ -815,7 +815,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
p_eNB,
|
||||
dl_CarrierFreq,
|
||||
ul_CarrierFreq
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, pbch_repetition
|
||||
#endif
|
||||
);
|
||||
@@ -827,7 +827,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList = schedulingInfoList;
|
||||
config_sib1(Mod_idP,CC_idP,tdd_Config);
|
||||
}
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
if (sib1_v13ext != NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
|
||||
}
|
||||
@@ -886,7 +886,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
dl_Bandwidth;
|
||||
|
||||
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
NULL, ul_Bandwidth, additionalSpectrumEmission,
|
||||
@@ -933,7 +933,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
}
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
UE_id = find_UE_id(Mod_idP, rntiP);
|
||||
@@ -966,11 +966,11 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
RC.mac[Mod_idP]->common_channels[0].MBMS_flag = MBMS_Flag;
|
||||
#endif
|
||||
}
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
// One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time
|
||||
|
||||
@@ -33,16 +33,16 @@
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "SystemInformationBlockType2.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "PRACH-ConfigSIB-v1310.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "MeasGapConfig.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "MAC-MainConfig.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#include "LTE_MAC-MainConfig.h"
|
||||
#include "mac.h"
|
||||
#include "mac_proto.h"
|
||||
#include "mac_extern.h"
|
||||
@@ -51,11 +51,11 @@
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-AreaInfo-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-AreaInfo-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
|
||||
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
|
||||
@@ -107,38 +107,38 @@ int
|
||||
rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
int CC_idP,
|
||||
uint8_t eNB_index,
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
struct PhysicalConfigDedicated
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
MeasObjectToAddMod_t ** measObj,
|
||||
MAC_MainConfig_t * mac_MainConfig,
|
||||
LTE_MeasObjectToAddMod_t ** measObj,
|
||||
LTE_MAC_MainConfig_t * mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
LogicalChannelConfig_t * logicalChannelConfig,
|
||||
MeasGapConfig_t * measGapConfig,
|
||||
TDD_Config_t * tdd_Config,
|
||||
MobilityControlInfo_t * mobilityControlInfo,
|
||||
LTE_LogicalChannelConfig_t * logicalChannelConfig,
|
||||
LTE_MeasGapConfig_t * measGapConfig,
|
||||
LTE_TDD_Config_t * tdd_Config,
|
||||
LTE_MobilityControlInfo_t * mobilityControlInfo,
|
||||
uint8_t * SIwindowsize,
|
||||
uint16_t * SIperiod,
|
||||
ARFCN_ValueEUTRA_t * ul_CarrierFreq,
|
||||
LTE_ARFCN_ValueEUTRA_t * ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t * pmch_InfoList
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t * pmch_InfoList
|
||||
#endif
|
||||
#ifdef CBA
|
||||
, uint8_t num_active_cba_groups, uint16_t cba_rnti
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,config_action_t config_action
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
@@ -219,11 +219,11 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
|
||||
#if (RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
#else
|
||||
(uint16_t) PeriodicBSR_Timer_r12_infinity;
|
||||
(uint16_t) LTE_PeriodicBSR_Timer_r12_infinity;
|
||||
#endif
|
||||
;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.maxHARQ_Tx =
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
}
|
||||
if(nfapi_mode!=3)
|
||||
phy_config_harq_ue(Mod_idP, 0, eNB_index,
|
||||
@@ -246,17 +246,17 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t) mac_MainConfig->ul_SCH_Config->
|
||||
retxBSR_Timer;
|
||||
} else {
|
||||
#if (RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
|
||||
#else
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t) RetxBSR_Timer_r12_sf2560;
|
||||
(uint16_t) LTE_RetxBSR_Timer_r12_sf2560;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mac_MainConfig->ext1
|
||||
&& mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
|
||||
@@ -326,13 +326,13 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].PHR_reconfigured = 0;
|
||||
UE_mac_inst[Mod_idP].PHR_state =
|
||||
MAC_MainConfig__phr_Config_PR_setup;
|
||||
LTE_MAC_MainConfig__phr_Config_PR_setup;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicPHR_Timer =
|
||||
MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
|
||||
LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.prohibitPHR_Timer =
|
||||
MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
|
||||
LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.PathlossChange =
|
||||
MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
|
||||
LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
|
||||
}
|
||||
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicPHR_SF =
|
||||
@@ -362,7 +362,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
physicalConfigDedicated);
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
|
||||
}
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
|
||||
@@ -410,14 +410,14 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
rach_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.rach_ConfigCommon,
|
||||
sizeof(RACH_ConfigCommon_t));
|
||||
sizeof(LTE_RACH_ConfigCommon_t));
|
||||
}
|
||||
|
||||
memcpy((void *) &UE_mac_inst[Mod_idP].
|
||||
radioResourceConfigCommon->prach_Config.prach_ConfigInfo,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.prach_Config.prach_ConfigInfo,
|
||||
sizeof(PRACH_ConfigInfo_t));
|
||||
sizeof(LTE_PRACH_ConfigInfo_t));
|
||||
UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
prach_Config.rootSequenceIndex =
|
||||
mobilityControlInfo->radioResourceConfigCommon.
|
||||
@@ -430,19 +430,19 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
pdsch_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.pdsch_ConfigCommon,
|
||||
sizeof(PDSCH_ConfigCommon_t));
|
||||
sizeof(LTE_PDSCH_ConfigCommon_t));
|
||||
}
|
||||
// not a pointer: mobilityControlInfo->radioResourceConfigCommon.pusch_ConfigCommon
|
||||
memcpy((void *) &UE_mac_inst[Mod_idP].
|
||||
radioResourceConfigCommon->pusch_ConfigCommon,
|
||||
(void *) &mobilityControlInfo->
|
||||
radioResourceConfigCommon.pusch_ConfigCommon,
|
||||
sizeof(PUSCH_ConfigCommon_t));
|
||||
sizeof(LTE_PUSCH_ConfigCommon_t));
|
||||
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.phich_Config) {
|
||||
/* memcpy((void *)&UE_mac_inst[Mod_idP].radioResourceConfigCommon->phich_Config,
|
||||
(void *)mobilityControlInfo->radioResourceConfigCommon.phich_Config,
|
||||
sizeof(PHICH_Config_t)); */
|
||||
sizeof(LTE_PHICH_Config_t)); */
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.
|
||||
@@ -452,7 +452,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
pucch_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.pucch_ConfigCommon,
|
||||
sizeof(PUCCH_ConfigCommon_t));
|
||||
sizeof(LTE_PUCCH_ConfigCommon_t));
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->
|
||||
@@ -462,7 +462,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
soundingRS_UL_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.soundingRS_UL_ConfigCommon,
|
||||
sizeof(SoundingRS_UL_ConfigCommon_t));
|
||||
sizeof(LTE_SoundingRS_UL_ConfigCommon_t));
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->
|
||||
@@ -472,7 +472,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
uplinkPowerControlCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.uplinkPowerControlCommon,
|
||||
sizeof(UplinkPowerControlCommon_t));
|
||||
sizeof(LTE_UplinkPowerControlCommon_t));
|
||||
}
|
||||
//configure antennaInfoCommon somewhere here..
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.p_Max) {
|
||||
@@ -491,7 +491,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
ul_CyclicPrefixLength,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.ul_CyclicPrefixLength,
|
||||
sizeof(UL_CyclicPrefixLength_t));
|
||||
sizeof(LTE_UL_CyclicPrefixLength_t));
|
||||
}
|
||||
// store the previous rnti in case of failure, and set thenew rnti
|
||||
UE_mac_inst[Mod_idP].crnti_before_ho = UE_mac_inst[Mod_idP].crnti;
|
||||
@@ -532,7 +532,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
// UE_mac_inst[Mod_idP].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
}
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n",
|
||||
@@ -590,7 +590,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
//for D2D
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
switch (config_action) {
|
||||
case CONFIG_ACTION_ADD:
|
||||
if (sourceL2Id){
|
||||
|
||||
@@ -79,8 +79,8 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
nfapi_ul_config_request_body_t *ul_req;
|
||||
int CC_id, UE_id;
|
||||
COMMON_channels_t *cc = RC.mac[module_idP]->common_channels;
|
||||
SoundingRS_UL_ConfigCommon_t *soundingRS_UL_ConfigCommon;
|
||||
struct SoundingRS_UL_ConfigDedicated *soundingRS_UL_ConfigDedicated;
|
||||
LTE_SoundingRS_UL_ConfigCommon_t *soundingRS_UL_ConfigCommon;
|
||||
struct LTE_SoundingRS_UL_ConfigDedicated *soundingRS_UL_ConfigDedicated;
|
||||
uint8_t TSFC;
|
||||
uint16_t deltaTSFC; // bitmap
|
||||
uint8_t srs_SubframeConfig;
|
||||
@@ -119,7 +119,7 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
UE_id);
|
||||
|
||||
if ((soundingRS_UL_ConfigDedicated = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->soundingRS_UL_ConfigDedicated) != NULL) {
|
||||
if (soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
if (soundingRS_UL_ConfigDedicated->present == LTE_SoundingRS_UL_ConfigDedicated_PR_setup) {
|
||||
get_srs_pos(&cc[CC_id],
|
||||
soundingRS_UL_ConfigDedicated->choice.
|
||||
setup.srs_ConfigIndex,
|
||||
@@ -162,7 +162,7 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
COMMON_channels_t *cc;
|
||||
nfapi_ul_config_request_body_t *ul_req;
|
||||
int CC_id, UE_id;
|
||||
struct CQI_ReportPeriodic *cqi_ReportPeriodic;
|
||||
struct LTE_CQI_ReportPeriodic *cqi_ReportPeriodic;
|
||||
uint16_t Npd, N_OFFSET_CQI;
|
||||
int H;
|
||||
|
||||
@@ -185,7 +185,7 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig) {
|
||||
if ((cqi_ReportPeriodic = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic) != NULL
|
||||
&& (cqi_ReportPeriodic->present != CQI_ReportPeriodic_PR_release)) {
|
||||
&& (cqi_ReportPeriodic->present != LTE_CQI_ReportPeriodic_PR_release)) {
|
||||
//Rel8 Periodic CQI/PMI/RI reporting
|
||||
|
||||
get_csi_params(cc, cqi_ReportPeriodic, &Npd,
|
||||
@@ -209,7 +209,7 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
ul_req->number_of_pdus++;
|
||||
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// PUT rel10-13 UCI options here
|
||||
#endif
|
||||
} else
|
||||
@@ -245,7 +245,7 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
nfapi_ul_config_request_body_t *ul_req_body;
|
||||
int CC_id;
|
||||
int UE_id;
|
||||
SchedulingRequestConfig_t *SRconfig;
|
||||
LTE_SchedulingRequestConfig_t *SRconfig;
|
||||
int skip_ue;
|
||||
int is_harq;
|
||||
nfapi_ul_config_sr_information sr;
|
||||
@@ -269,7 +269,7 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
UE_id);
|
||||
|
||||
if ((SRconfig = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig) != NULL) {
|
||||
if (SRconfig->present == SchedulingRequestConfig_PR_setup) {
|
||||
if (SRconfig->present == LTE_SchedulingRequestConfig_PR_setup) {
|
||||
if (SRconfig->choice.setup.sr_ConfigIndex <= 4) { // 5 ms SR period
|
||||
if ((subframeP % 5) != SRconfig->choice.setup.sr_ConfigIndex) continue;
|
||||
} else if (SRconfig->choice.setup.sr_ConfigIndex <= 14) { // 10 ms SR period
|
||||
@@ -312,7 +312,7 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x is_harq:%d\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti, is_harq);
|
||||
|
||||
// check Rel10 or Rel8 SR
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2)
|
||||
&& (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)
|
||||
&& (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
|
||||
@@ -517,7 +517,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
memset(cc[CC_id].vrb_map_UL, 0, 100);
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
cc[CC_id].mcch_active = 0;
|
||||
#endif
|
||||
|
||||
@@ -628,7 +628,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
|
||||
rrc_rx_tx(&ctxt, CC_id);
|
||||
#endif
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
if (cc[CC_id].MBMS_flag > 0) {
|
||||
|
||||
@@ -120,7 +120,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
|
||||
AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n",
|
||||
ra->rnti);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ra->rach_resource_type > 0) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n",
|
||||
@@ -272,16 +272,16 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
int num_nb = 0;
|
||||
|
||||
first_rb = 0;
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach;
|
||||
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13;
|
||||
PRACH_ParametersCE_r13_t *p[4] = { NULL, NULL, NULL, NULL };
|
||||
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach;
|
||||
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13;
|
||||
LTE_PRACH_ParametersCE_r13_t *p[4] = { NULL, NULL, NULL, NULL };
|
||||
|
||||
uint16_t absSF = (10 * frameP) + subframeP;
|
||||
uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe;
|
||||
@@ -584,6 +584,11 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
ra->state = WAITMSG3;
|
||||
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d: state:WAITMSG3\n", module_idP, frameP, subframeP);
|
||||
|
||||
T(T_ENB_MAC_UE_DL_RAR_PDU_WITH_DATA, T_INT(module_idP),
|
||||
T_INT(CC_idP), T_INT(ra->RA_rnti), T_INT(frameP),
|
||||
T_INT(subframeP), T_INT(0 /*harq_pid always 0? */ ),
|
||||
T_BUFFER(cc[CC_idP].RAR_pdu.payload, 7));
|
||||
|
||||
// DL request
|
||||
mac->TX_req[CC_idP].sfn_sf = (frameP << 4) + subframeP;
|
||||
TX_req =
|
||||
@@ -631,18 +636,18 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
uint8_t offset;
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
|
||||
|
||||
first_rb = 0;
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach;
|
||||
struct PUCCH_ConfigCommon_v1310 *ext4_pucch;
|
||||
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13;
|
||||
struct N1PUCCH_AN_InfoList_r13 *pucch_N1PUCCH_AN_InfoList_r13;
|
||||
PRACH_ParametersCE_r13_t *p[4] = { NULL, NULL, NULL, NULL };
|
||||
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach;
|
||||
struct LTE_PUCCH_ConfigCommon_v1310 *ext4_pucch;
|
||||
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13;
|
||||
struct LTE_N1PUCCH_AN_InfoList_r13 *pucch_N1PUCCH_AN_InfoList_r13;
|
||||
LTE_PRACH_ParametersCE_r13_t *p[4] = { NULL, NULL, NULL, NULL };
|
||||
int pucchreps[4] = { 1, 1, 1, 1 };
|
||||
int n1pucchan[4] = { 0, 0, 0, 0 };
|
||||
|
||||
@@ -722,7 +727,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
|
||||
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);*/
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ra->rach_resource_type > 0) {
|
||||
|
||||
// Generate DCI + repetitions first
|
||||
@@ -1232,7 +1237,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
|
||||
int round;
|
||||
/*
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
COMMON_channels_t *cc = mac->common_channels;
|
||||
|
||||
int rmax = 0;
|
||||
@@ -1285,7 +1290,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
|
||||
if (round != 8) {
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ra->rach_resource_type > 0) {
|
||||
AssertFatal(1 == 0,
|
||||
"Msg4 Retransmissions not handled yet for BL/CE UEs\n");
|
||||
@@ -1442,7 +1447,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
sub_frame_t subframeP,
|
||||
uint16_t preamble_index,
|
||||
int16_t timing_offset, uint16_t ra_rnti
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
)
|
||||
@@ -1453,10 +1458,10 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
RA_t *ra = &cc->ra[0];
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
|
||||
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
|
||||
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
|
||||
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
|
||||
|
||||
static uint8_t failure_cnt = 0;
|
||||
|
||||
@@ -1466,12 +1471,12 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
}
|
||||
|
||||
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, preamble_index);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, rach_resource_type);
|
||||
@@ -1481,7 +1486,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
uint16_t msg2_subframe = subframeP;
|
||||
int offset;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if (prach_ParametersListCE_r13 &&
|
||||
prach_ParametersListCE_r13->list.count < rach_resource_type) {
|
||||
@@ -1492,7 +1497,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0);
|
||||
@@ -1505,7 +1510,7 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
ra[i].state = MSG2;
|
||||
ra[i].timing_offset = timing_offset;
|
||||
ra[i].preamble_subframe = subframeP;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ra[i].rach_resource_type = rach_resource_type;
|
||||
ra[i].msg2_mpdcch_repetition_cnt = 0;
|
||||
ra[i].msg4_mpdcch_repetition_cnt = 0;
|
||||
|
||||
@@ -59,7 +59,7 @@ extern RAN_CONTEXT_t RC;
|
||||
// NEED TO ADD schedule_SI_BR for SIB1_BR and SIB23_BR
|
||||
// CCE_allocation_infeasible to be done for EPDCCH/MPDCCH
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
#define size_Sj25 2
|
||||
int Sj25[size_Sj25] = { 0, 3 };
|
||||
@@ -301,8 +301,8 @@ schedule_SIB1_BR(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
|
||||
int si_WindowLength_BR_r13tab[SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
|
||||
int si_TBS_r13tab[SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = { 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
|
||||
int si_WindowLength_BR_r13tab[LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
|
||||
int si_TBS_r13tab[LTE_SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = { 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
@@ -340,31 +340,31 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
||||
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL,
|
||||
"sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
|
||||
|
||||
SchedulingInfoList_BR_r13_t *schedulingInfoList_BR_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13;
|
||||
LTE_SchedulingInfoList_BR_r13_t *schedulingInfoList_BR_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13;
|
||||
AssertFatal(schedulingInfoList_BR_r13 != NULL,
|
||||
"sib_v13ext->schedulingInfoList_BR_r13 is null\n");
|
||||
|
||||
SchedulingInfoList_t *schedulingInfoList = cc->schedulingInfoList;
|
||||
LTE_SchedulingInfoList_t *schedulingInfoList = cc->schedulingInfoList;
|
||||
AssertFatal(schedulingInfoList_BR_r13->list.count == schedulingInfoList->list.count,
|
||||
"schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d\n",
|
||||
schedulingInfoList_BR_r13->list.count,
|
||||
schedulingInfoList->list.count);
|
||||
|
||||
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13<=SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
|
||||
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13<=LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
|
||||
"si_WindowLength_BR_r13 %d > %d\n",
|
||||
(int) cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13,
|
||||
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200);
|
||||
LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200);
|
||||
|
||||
// check that SI frequency-hopping is disabled
|
||||
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 == SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
|
||||
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 == LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
|
||||
"Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now\n");
|
||||
long si_WindowLength_BR_r13 = si_WindowLength_BR_r13tab[cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13];
|
||||
|
||||
long si_RepetitionPattern_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13;
|
||||
AssertFatal(si_RepetitionPattern_r13<=SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF,
|
||||
AssertFatal(si_RepetitionPattern_r13<=LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF,
|
||||
"si_RepetitionPattern_r13 %d > %d\n",
|
||||
(int) si_RepetitionPattern_r13,
|
||||
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF);
|
||||
LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF);
|
||||
// cycle through SIB list
|
||||
|
||||
for (i = 0; i < schedulingInfoList_BR_r13->list.count; i++) {
|
||||
@@ -533,7 +533,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length);
|
||||
|
||||
if ((frameP & 1023) < 40)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n",
|
||||
module_idP, frameP, CC_id, mib_sdu_length,
|
||||
@@ -758,6 +758,9 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
module_idP, CC_id, frameP, subframeP);
|
||||
}
|
||||
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
||||
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_pdu.payload[0],
|
||||
@@ -789,7 +792,7 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
}
|
||||
}
|
||||
}
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
schedule_SIB1_BR(module_idP, frameP, subframeP);
|
||||
schedule_SI_BR(module_idP, frameP, subframeP);
|
||||
#endif
|
||||
|
||||
@@ -866,7 +866,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
|
||||
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -881,7 +881,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
|
||||
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[0]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -975,7 +975,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
|
||||
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -991,7 +991,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
|
||||
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -1046,7 +1046,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -1064,7 +1064,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
|
||||
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -2104,11 +2104,11 @@ void schedule_PCH(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
||||
|
||||
// Rel10 fields
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
|
||||
#endif
|
||||
// Rel13 fields
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
|
||||
|
||||
@@ -132,7 +132,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
|
||||
rlc_status =
|
||||
mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP,
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -1246,7 +1246,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
|
||||
if (TBS - ta_len - header_len_dcch > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch)
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
); // transport block set size
|
||||
@@ -1262,7 +1262,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
(char *)
|
||||
&dlsch_buffer
|
||||
[0]
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -1351,7 +1351,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
// check for DCCH1 and update header information (assume 2 byte sub-header)
|
||||
if (TBS - ta_len - header_len_dcch - sdu_length_total > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total)
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
); // transport block set size less allocations for timing advance and
|
||||
@@ -1367,7 +1367,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
(char *)
|
||||
&dlsch_buffer
|
||||
[sdu_length_total]
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -1429,7 +1429,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
header_len_dcch -
|
||||
sdu_length_total -
|
||||
header_len_dtch
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -1448,7 +1448,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
*)
|
||||
&dlsch_buffer
|
||||
[sdu_length_total]
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -2867,7 +2867,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
get_TBS_UL(UE_template->mcs_UL[harq_pid],
|
||||
rb_table[rb_table_index])
|
||||
);
|
||||
#ifdef Rel14
|
||||
#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_tmp->ul_config_pdu_list[ul_req_index],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
@@ -3013,7 +3013,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
0, // n_srs
|
||||
UE_template->TBS_UL[harq_pid]
|
||||
);
|
||||
#ifdef Rel14
|
||||
#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_tmp->ul_config_pdu_list[ul_req_index],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
int8_t
|
||||
get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
|
||||
uint8_t mbsfn_sync_area)
|
||||
@@ -151,7 +151,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
|
||||
// 1st: Check the MBSFN subframes from SIB2 info (SF allocation pattern i, max 8 non-overlapping patterns exist)
|
||||
if (frameP % mbsfn_period == cc->mbsfn_SubframeConfig[j]->radioframeAllocationOffset) { // MBSFN frameP
|
||||
if (cc->mbsfn_SubframeConfig[j]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { // one-frameP format
|
||||
if (cc->mbsfn_SubframeConfig[j]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { // one-frameP format
|
||||
|
||||
// Find the first subframeP in this MCH to transmit MSI
|
||||
if (frameP % mch_scheduling_period ==
|
||||
@@ -585,7 +585,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
|
||||
TBS =
|
||||
get_TBS_DL(cc->MCH_pdu.mcs, to_prb(cc->mib->message.dl_Bandwidth));
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// do not let mcch and mtch multiplexing when relaying is active
|
||||
// for sync area 1, so not transmit data
|
||||
//if ((i == 0) && ((RC.mac[module_idP]->MBMS_flag != multicast_relay) || (RC.mac[module_idP]->mcch_active==0))) {
|
||||
@@ -633,7 +633,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
MTCH,
|
||||
TBS - header_len_mcch - header_len_msi -
|
||||
sdu_length_total - header_len_mtch
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -652,7 +652,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, MTCH, 0, //not used
|
||||
(char *)
|
||||
&mch_buffer[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -676,7 +676,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
header_len_mtch = 0;
|
||||
}
|
||||
}
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -788,7 +788,7 @@ get_srs_pos(COMMON_channels_t * cc, uint16_t isrs,
|
||||
|
||||
void
|
||||
get_csi_params(COMMON_channels_t * cc,
|
||||
struct CQI_ReportPeriodic *cqi_ReportPeriodic,
|
||||
struct LTE_CQI_ReportPeriodic *cqi_ReportPeriodic,
|
||||
uint16_t * Npd, uint16_t * N_OFFSET_CQI, int *H)
|
||||
{
|
||||
uint16_t cqi_PMI_ConfigIndex =
|
||||
@@ -861,7 +861,7 @@ get_csi_params(COMMON_channels_t * cc,
|
||||
// get H
|
||||
if (cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.
|
||||
present ==
|
||||
CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI)
|
||||
LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI)
|
||||
*H = 1 +
|
||||
(Jtab[cc->mib->message.dl_Bandwidth] *
|
||||
cqi_ReportPeriodic->choice.setup.
|
||||
@@ -873,7 +873,7 @@ get_csi_params(COMMON_channels_t * cc,
|
||||
uint8_t
|
||||
get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
uint8_t ri,
|
||||
CQI_ReportModeAperiodic_t *
|
||||
LTE_CQI_ReportModeAperiodic_t *
|
||||
cqi_ReportModeAperiodic)
|
||||
{
|
||||
int Ntab[6] = { 0, 4, 7, 9, 10, 13 };
|
||||
@@ -885,7 +885,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
"cqi_ReportPeriodic is null!\n");
|
||||
|
||||
switch (*cqi_ReportModeAperiodic) {
|
||||
case CQI_ReportModeAperiodic_rm12:
|
||||
case LTE_CQI_ReportModeAperiodic_rm12:
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9
|
||||
|| tmode == 10,
|
||||
"Illegal TM (%d) for CQI_ReportModeAperiodic_rm12\n",
|
||||
@@ -901,7 +901,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
else if (ri > 1 && cc->p_eNB == 4)
|
||||
return (8 + (N << 2));
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm20:
|
||||
case LTE_CQI_ReportModeAperiodic_rm20:
|
||||
// Table 5.2.2.6.3-1 (36.212)
|
||||
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3 || tmode == 7
|
||||
|| tmode == 9
|
||||
@@ -913,7 +913,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
"TM9/10 will be handled later for CQI_ReportModeAperiodic_rm20\n");
|
||||
return (4 + 2 + L);
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm22:
|
||||
case LTE_CQI_ReportModeAperiodic_rm22:
|
||||
// Table 5.2.2.6.3-2 (36.212)
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9
|
||||
|| tmode == 10,
|
||||
@@ -931,7 +931,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
if (ri >= 2 && cc->p_eNB == 4)
|
||||
return (4 + 2 + 4 + 2 + L + 8);
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm30:
|
||||
case LTE_CQI_ReportModeAperiodic_rm30:
|
||||
// Table 5.2.2.6.2-1 (36.212)
|
||||
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3 || tmode == 7
|
||||
|| tmode == 8 || tmode == 9
|
||||
@@ -943,7 +943,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
"TM8/9/10 will be handled later for CQI_ReportModeAperiodic_rm30\n");
|
||||
return (4 + (N << 1));
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm31:
|
||||
case LTE_CQI_ReportModeAperiodic_rm31:
|
||||
// Table 5.2.2.6.2-2 (36.212)
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9
|
||||
|| tmode == 10,
|
||||
@@ -961,8 +961,8 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
else if (ri >= 2 && cc->p_eNB == 4)
|
||||
return (4 + (N << 1) + 4 + (N << 1) + 4);
|
||||
break;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
case CQI_ReportModeAperiodic_rm32_v1250:
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
case LTE_CQI_ReportModeAperiodic_rm32_v1250:
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9
|
||||
|| tmode == 10,
|
||||
"Illegal TM (%d) for CQI_ReportModeAperiodic_rm32\n",
|
||||
@@ -970,14 +970,14 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
AssertFatal(1 == 0,
|
||||
"CQI_ReportModeAperiodic_rm32_v1250 not supported yet\n");
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm10_v1310:
|
||||
case LTE_CQI_ReportModeAperiodic_rm10_v1310:
|
||||
// Table 5.2.2.6.1-1F/G (36.212)
|
||||
if (ri == 1)
|
||||
return (4); // F
|
||||
else
|
||||
return (7); // G
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm11_v1310:
|
||||
case LTE_CQI_ReportModeAperiodic_rm11_v1310:
|
||||
// Table 5.2.2.6.1-1H (36.212)
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9
|
||||
|| tmode == 10,
|
||||
@@ -995,7 +995,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
return (4 + 4 + 4);
|
||||
|
||||
break;
|
||||
#endif /* #if (RRC_VERSION >= MAKE_VERSION(12, 5, 0)) */
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0)) */
|
||||
}
|
||||
AssertFatal(1 == 0, "Shouldn't get here\n");
|
||||
return (0);
|
||||
@@ -1004,7 +1004,7 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
uint8_t
|
||||
get_rel8_dl_cqi_pmi_size(UE_sched_ctrl * sched_ctl, int CC_idP,
|
||||
COMMON_channels_t * cc, uint8_t tmode,
|
||||
struct CQI_ReportPeriodic * cqi_ReportPeriodic)
|
||||
struct LTE_CQI_ReportPeriodic * cqi_ReportPeriodic)
|
||||
{
|
||||
int no_pmi = 0;
|
||||
// Ltab[6] = {0,log2(15/4/2),log2(25/4/2),log2(50/6/3),log2(75/8/4),log2(100/8/4)};
|
||||
@@ -1014,10 +1014,10 @@ get_rel8_dl_cqi_pmi_size(UE_sched_ctrl * sched_ctl, int CC_idP,
|
||||
|
||||
AssertFatal(cqi_ReportPeriodic != NULL,
|
||||
"cqi_ReportPeriodic is null!\n");
|
||||
AssertFatal(cqi_ReportPeriodic->present != CQI_ReportPeriodic_PR_NOTHING,
|
||||
AssertFatal(cqi_ReportPeriodic->present != LTE_CQI_ReportPeriodic_PR_NOTHING,
|
||||
"cqi_ReportPeriodic->present == CQI_ReportPeriodic_PR_NOTHING!\n");
|
||||
AssertFatal(cqi_ReportPeriodic->choice.
|
||||
setup.cqi_FormatIndicatorPeriodic.present != CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_NOTHING,
|
||||
setup.cqi_FormatIndicatorPeriodic.present != LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_NOTHING,
|
||||
"cqi_ReportPeriodic->cqi_FormatIndicatorPeriodic.choice.setup.present == CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_NOTHING!\n");
|
||||
|
||||
switch (tmode) {
|
||||
@@ -1032,7 +1032,7 @@ get_rel8_dl_cqi_pmi_size(UE_sched_ctrl * sched_ctl, int CC_idP,
|
||||
no_pmi = 0;
|
||||
}
|
||||
|
||||
if ((cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_widebandCQI)
|
||||
if ((cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_widebandCQI)
|
||||
|| (sched_ctl->feedback_cnt[CC_idP] == 0)) {
|
||||
// send wideband report every opportunity if wideband reporting mode is selected, else every H opportunities
|
||||
if (no_pmi == 1) return (4);
|
||||
@@ -1044,7 +1044,7 @@ get_rel8_dl_cqi_pmi_size(UE_sched_ctrl * sched_ctl, int CC_idP,
|
||||
AssertFatal(1 == 0,
|
||||
"illegal combination p %d, ri %d, no_pmi %d\n",
|
||||
cc->p_eNB, ri, no_pmi);
|
||||
} else if (cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI) {
|
||||
} else if (cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI) {
|
||||
if ((no_pmi == 1) || ri == 1) return (4 + Ltab[cc->mib->message.dl_Bandwidth]);
|
||||
else return (7 + Ltab[cc->mib->message.dl_Bandwidth]);
|
||||
}
|
||||
@@ -1103,12 +1103,12 @@ program_dlsch_acknak(module_id_t module_idP, int CC_idP, int UE_idP,
|
||||
nfapi_ul_config_ulsch_harq_information *ulsch_harq_information = NULL;
|
||||
nfapi_ul_config_harq_information *harq_information = NULL;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
|
||||
if ((UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2)
|
||||
&& (UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020)
|
||||
&& (UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10)
|
||||
&& (*UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10 == PUCCH_ConfigDedicated_v1020__simultaneousPUCCH_PUSCH_r10_true))
|
||||
&& (*UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10 == LTE_PUCCH_ConfigDedicated_v1020__simultaneousPUCCH_PUSCH_r10_true))
|
||||
use_simultaneous_pucch_pusch = 1;
|
||||
#endif
|
||||
|
||||
@@ -1261,7 +1261,7 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
|
||||
int UE_id = find_UE_id(module_idP, rntiP);
|
||||
|
||||
PUSCH_ConfigDedicated_t *puschConfigDedicated;
|
||||
LTE_PUSCH_ConfigDedicated_t *puschConfigDedicated;
|
||||
// PUSCH_ConfigDedicated_v1020_t *puschConfigDedicated_v1020;
|
||||
// PUSCH_ConfigDedicated_v1130_t *puschConfigDedicated_v1130;
|
||||
// PUSCH_ConfigDedicated_v1250_t *puschConfigDedicated_v1250;
|
||||
@@ -1270,17 +1270,17 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
AssertFatal(UE_list != NULL, "UE_list is null\n");
|
||||
AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated != NULL,
|
||||
"physicalConfigDedicated for rnti %x is null\n", rntiP);
|
||||
AssertFatal((puschConfigDedicated = (PUSCH_ConfigDedicated_t *)
|
||||
AssertFatal((puschConfigDedicated = (LTE_PUSCH_ConfigDedicated_t *)
|
||||
UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pusch_ConfigDedicated) != NULL,
|
||||
"physicalConfigDedicated->puschConfigDedicated for rnti %x is null\n",
|
||||
rntiP);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
/* if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2) puschConfigDedicated_v1020 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2->pusch_ConfigDedicated_v1020;
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(11, 3, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(11, 3, 0))
|
||||
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4) puschConfigDedicated_v1130 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4->pusch_ConfigDedicated_v1130;
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250;
|
||||
#endif
|
||||
*/
|
||||
@@ -1289,7 +1289,7 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated != NULL,
|
||||
"pucch_ConfigDedicated is null!\n");
|
||||
if ((UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode != NULL)
|
||||
&& (*UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode == PUCCH_ConfigDedicated__tdd_AckNackFeedbackMode_multiplexing))
|
||||
&& (*UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode == LTE_PUCCH_ConfigDedicated__tdd_AckNackFeedbackMode_multiplexing))
|
||||
harq_information->harq_information_rel10.ack_nack_mode = 1; // multiplexing
|
||||
else
|
||||
harq_information->harq_information_rel10.ack_nack_mode = 0; // bundling
|
||||
@@ -1374,7 +1374,7 @@ fill_nfapi_harq_information(module_id_t module_idP,
|
||||
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated != NULL
|
||||
&& UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated != NULL
|
||||
&& (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode != NULL)
|
||||
&& (*UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode == PUCCH_ConfigDedicated__tdd_AckNackFeedbackMode_multiplexing))
|
||||
&& (*UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode == LTE_PUCCH_ConfigDedicated__tdd_AckNackFeedbackMode_multiplexing))
|
||||
{
|
||||
harq_information->harq_information_rel10_tdd.harq_size = 2; // 2-bit ACK/NAK
|
||||
harq_information->harq_information_rel10_tdd.ack_nack_mode = 1; // multiplexing
|
||||
@@ -1398,7 +1398,7 @@ fill_nfapi_harq_information(module_id_t module_idP,
|
||||
AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated != NULL,
|
||||
"pucch_ConfigDedicated is null for TDD!\n");
|
||||
if ((UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode != NULL)
|
||||
&& (*UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode == PUCCH_ConfigDedicated__tdd_AckNackFeedbackMode_multiplexing)) {
|
||||
&& (*UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode == LTE_PUCCH_ConfigDedicated__tdd_AckNackFeedbackMode_multiplexing)) {
|
||||
harq_information->harq_information_rel10_tdd.ack_nack_mode = 1; // multiplexing
|
||||
} else {
|
||||
harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling
|
||||
@@ -1544,7 +1544,7 @@ void
|
||||
fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
uint8_t cqi_req,
|
||||
COMMON_channels_t *cc,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
uint8_t tmode,
|
||||
uint32_t handle,
|
||||
uint16_t rnti,
|
||||
@@ -1615,7 +1615,7 @@ fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pd
|
||||
}
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
void
|
||||
fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *
|
||||
ul_config_pdu, uint8_t ue_type,
|
||||
@@ -1658,12 +1658,12 @@ mpdcch_sf_condition(eNB_MAC_INST * eNB, int CC_id, frame_t frameP,
|
||||
sub_frame_t subframeP, int rmax,
|
||||
MPDCCH_TYPES_t mpdcch_type, int UE_id)
|
||||
{
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach =
|
||||
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach =
|
||||
eNB->common_channels[CC_id].radioResourceConfigCommon_BR->
|
||||
ext4->prach_ConfigCommon_v1310;
|
||||
|
||||
int T;
|
||||
EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11;
|
||||
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11;
|
||||
|
||||
switch (mpdcch_type) {
|
||||
case TYPE0:
|
||||
@@ -1916,7 +1916,7 @@ void dump_ue_list(UE_list_t * listP, int ul_flag)
|
||||
}
|
||||
|
||||
int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
)
|
||||
@@ -1950,7 +1950,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
|
||||
UE_list->UE_template[cc_idP][UE_id].pre_assigned_mcs_ul = 0;
|
||||
#endif
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
UE_list->UE_template[cc_idP][UE_id].rach_resource_type =
|
||||
rach_resource_type;
|
||||
#endif
|
||||
@@ -2272,7 +2272,7 @@ uint8_t get_tmode(module_id_t module_idP, int CC_idP, int UE_idP)
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc = &eNB->common_channels[CC_idP];
|
||||
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated =
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated =
|
||||
eNB->UE_list.physicalConfigDedicated[CC_idP][UE_idP];
|
||||
|
||||
if (physicalConfigDedicated == NULL) { // RRCConnectionSetup not received by UE yet
|
||||
@@ -2285,16 +2285,16 @@ uint8_t get_tmode(module_id_t module_idP, int CC_idP, int UE_idP)
|
||||
UE_idP);
|
||||
|
||||
AssertFatal(physicalConfigDedicated->antennaInfo->present !=
|
||||
PhysicalConfigDedicated__antennaInfo_PR_NOTHING,
|
||||
LTE_PhysicalConfigDedicated__antennaInfo_PR_NOTHING,
|
||||
"antennaInfo (mod_id %d, CC_id %d) is set to NOTHING\n",
|
||||
module_idP, CC_idP);
|
||||
|
||||
if (physicalConfigDedicated->antennaInfo->present ==
|
||||
PhysicalConfigDedicated__antennaInfo_PR_explicitValue) {
|
||||
LTE_PhysicalConfigDedicated__antennaInfo_PR_explicitValue) {
|
||||
return (physicalConfigDedicated->antennaInfo->
|
||||
choice.explicitValue.transmissionMode);
|
||||
} else if (physicalConfigDedicated->antennaInfo->present ==
|
||||
PhysicalConfigDedicated__antennaInfo_PR_defaultValue) {
|
||||
LTE_PhysicalConfigDedicated__antennaInfo_PR_defaultValue) {
|
||||
AssertFatal(cc->p_eNB <= 2, "p_eNB is %d, should be <2\n",
|
||||
cc->p_eNB);
|
||||
return (cc->p_eNB);
|
||||
@@ -3310,7 +3310,7 @@ CCE_allocation_infeasible(int module_idP,
|
||||
|
||||
return res;
|
||||
}
|
||||
void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP,
|
||||
void get_retransmission_timing(LTE_TDD_Config_t *tdd_Config, frame_t *frameP,
|
||||
sub_frame_t *subframeP)
|
||||
{
|
||||
|
||||
@@ -3361,7 +3361,7 @@ uint8_t get_dl_subframe_count(int tdd_config_sfa, sub_frame_t subframeP){
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP){
|
||||
uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP){
|
||||
int harq_pid;
|
||||
if(tdd_Config){
|
||||
|
||||
@@ -3382,7 +3382,7 @@ uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, su
|
||||
return -1;
|
||||
}
|
||||
|
||||
unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe)
|
||||
unsigned char ul_ACK_subframe2M(LTE_TDD_Config_t *tdd_Config,unsigned char subframe)
|
||||
{
|
||||
|
||||
if (tdd_Config == NULL) {
|
||||
@@ -3447,7 +3447,7 @@ unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe)
|
||||
return(0);
|
||||
}
|
||||
|
||||
unsigned char ul_ACK_subframe2dl_subframe(TDD_Config_t *tdd_Config,unsigned char subframe,unsigned char ACK_index)
|
||||
unsigned char ul_ACK_subframe2dl_subframe(LTE_TDD_Config_t *tdd_Config,unsigned char subframe,unsigned char ACK_index)
|
||||
{
|
||||
|
||||
if (tdd_Config == NULL) {
|
||||
@@ -3531,7 +3531,7 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
int frame_tx;
|
||||
uint8_t harq_pid;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
if (UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated != NULL &&
|
||||
UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated->pucch_ConfigDedicated != NULL &&
|
||||
(UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated->ext7)
|
||||
@@ -4010,7 +4010,7 @@ extract_pucch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list;
|
||||
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP];
|
||||
struct CQI_ReportPeriodic *cqi_ReportPeriodic;
|
||||
struct LTE_CQI_ReportPeriodic *cqi_ReportPeriodic;
|
||||
int no_pmi;
|
||||
uint8_t Ltab[6] = { 0, 2, 4, 4, 4, 4 };
|
||||
uint8_t Jtab[6] = { 0, 2, 2, 3, 4, 4 };
|
||||
@@ -4025,10 +4025,10 @@ extract_pucch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
"cqi_ReportPeriodic is null for UE %d\n", UE_id);
|
||||
|
||||
// determine feedback mode
|
||||
AssertFatal(cqi_ReportPeriodic->present != CQI_ReportPeriodic_PR_NOTHING,
|
||||
"cqi_ReportPeriodic->present == CQI_ReportPeriodic_PR_NOTHING!\n");
|
||||
AssertFatal(cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present != CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_NOTHING,
|
||||
"cqi_ReportPeriodic->cqi_FormatIndicatorPeriodic.choice.setup.present == CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_NOTHING!\n");
|
||||
AssertFatal(cqi_ReportPeriodic->present != LTE_CQI_ReportPeriodic_PR_NOTHING,
|
||||
"cqi_ReportPeriodic->present == LTE_CQI_ReportPeriodic_PR_NOTHING!\n");
|
||||
AssertFatal(cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present != LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_NOTHING,
|
||||
"cqi_ReportPeriodic->cqi_FormatIndicatorPeriodic.choice.setup.present == LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_NOTHING!\n");
|
||||
|
||||
uint16_t Npd, N_OFFSET_CQI;
|
||||
int H, K, bandwidth_part, L, Lmask;
|
||||
@@ -4062,7 +4062,7 @@ extract_pucch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
no_pmi = 0;
|
||||
}
|
||||
|
||||
if ((cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_widebandCQI)
|
||||
if ((cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_widebandCQI)
|
||||
|| (feedback_cnt == 0)) {
|
||||
// Note: This implements only Tables: 5.3.3.1-1,5.3.3.1-1A and 5.3.3.1-2 from 36.213 (1,2,4 antenna ports Wideband CQI/PMI)
|
||||
|
||||
@@ -4095,7 +4095,7 @@ extract_pucch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
AssertFatal(1 == 0,
|
||||
"illegal combination p %d, ri %d, no_pmi %d\n",
|
||||
cc->p_eNB, ri, no_pmi);
|
||||
} else if (cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI)
|
||||
} else if (cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present == LTE_CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI)
|
||||
{
|
||||
// This is Table 5.2.3.3.2-2 for 36.213
|
||||
if (ri == 1) {
|
||||
@@ -4126,7 +4126,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
int i;
|
||||
uint64_t p = *(uint64_t *) pdu;
|
||||
int curbyte, curbit;
|
||||
CQI_ReportModeAperiodic_t *cqi_ReportModeAperiodic;
|
||||
LTE_CQI_ReportModeAperiodic_t *cqi_ReportModeAperiodic;
|
||||
|
||||
AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated != NULL,
|
||||
"physicalConfigDedicated is null for UE %d\n", UE_id);
|
||||
@@ -4143,7 +4143,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
int m;
|
||||
|
||||
switch (*cqi_ReportModeAperiodic) {
|
||||
case CQI_ReportModeAperiodic_rm12:
|
||||
case LTE_CQI_ReportModeAperiodic_rm12:
|
||||
AssertFatal(0 == 1, "to be fixed, don't use p but pdu directly\n");
|
||||
// wideband multiple PMI (TM4/6), Table 5.2.2.6.1-1 (for TM4/6)
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10,
|
||||
@@ -4192,7 +4192,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
}
|
||||
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm20:
|
||||
case LTE_CQI_ReportModeAperiodic_rm20:
|
||||
AssertFatal(0 == 1, "to be fixed, don't use p but pdu directly\n");
|
||||
// UE-selected subband CQI no PMI (TM1/2/3/7) , Table 5.2.2.6.3-1 from 36.213
|
||||
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3
|
||||
@@ -4209,7 +4209,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
for (m = 0; m < Mtab_uesel[bw]; m++)
|
||||
sched_ctl->aperiodic_subband_diffcqi0[CC_idP][v[m]] = diffcqi0;
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm22:
|
||||
case LTE_CQI_ReportModeAperiodic_rm22:
|
||||
AssertFatal(0 == 1, "to be fixed, don't use p but pdu directly\n");
|
||||
// UE-selected subband CQI multiple PMI (TM4/6) Table 5.2.2.6.3-2 from 36.213
|
||||
|
||||
@@ -4254,7 +4254,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
sched_ctl->aperiodic_subband_pmi[CC_idP][v[m]] = pmi_uesel;
|
||||
}
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm30:
|
||||
case LTE_CQI_ReportModeAperiodic_rm30:
|
||||
//subband CQI no PMI (TM1/2/3/7)
|
||||
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3
|
||||
|| tmode == 7,
|
||||
@@ -4275,7 +4275,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
sched_ctl->dl_cqi[CC_idP] =
|
||||
sched_ctl->aperiodic_wideband_cqi0[CC_idP];
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm31:
|
||||
case LTE_CQI_ReportModeAperiodic_rm31:
|
||||
AssertFatal(0 == 1, "to be fixed, don't use p but pdu directly\n");
|
||||
//subband CQI single PMI (TM4/5/6)
|
||||
AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8
|
||||
@@ -4346,8 +4346,8 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
}
|
||||
|
||||
break;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
case CQI_ReportModeAperiodic_rm32_v1250:
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
case LTE_CQI_ReportModeAperiodic_rm32_v1250:
|
||||
AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8
|
||||
|| tmode == 9
|
||||
|| tmode == 10,
|
||||
@@ -4356,15 +4356,15 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm32 to be done\n");
|
||||
break;
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 1, 0))
|
||||
case CQI_ReportModeAperiodic_rm10_v1310:
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0))
|
||||
case LTE_CQI_ReportModeAperiodic_rm10_v1310:
|
||||
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3
|
||||
|| tmode == 7,
|
||||
"Illegal transmission mode %d for CQI_ReportModeAperiodic_rm10\n",
|
||||
tmode);
|
||||
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm10 to be done\n");
|
||||
break;
|
||||
case CQI_ReportModeAperiodic_rm11_v1310:
|
||||
case LTE_CQI_ReportModeAperiodic_rm11_v1310:
|
||||
AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8
|
||||
|| tmode == 9
|
||||
|| tmode == 10,
|
||||
@@ -4372,7 +4372,7 @@ extract_pusch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
tmode);
|
||||
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm11 to be done\n");
|
||||
break;
|
||||
#endif /* #if (RRC_VERSION >= MAKE_VERSION(13, 1, 0)) */
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0)) */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -561,7 +561,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP,
|
||||
mac->common_channels[CC_idP].
|
||||
ra[ii].rnti, harq_pid
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
mac->common_channels[CC_idP].
|
||||
ra[ii].rach_resource_type
|
||||
@@ -1029,7 +1029,8 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
|
||||
for (i = 0; i < NB_RA_PROC_MAX; i++) {
|
||||
if ((cc->ra[i].state == WAITMSG3) &&
|
||||
(cc->ra[i].Msg3_subframe == sched_subframe)) {
|
||||
first_rb[CC_id]++;
|
||||
if (first_rb[CC_id] < cc->ra[i].msg3_first_rb + cc->ra[i].msg3_nb_rb)
|
||||
first_rb[CC_id] = cc->ra[i].msg3_first_rb + cc->ra[i].msg3_nb_rb;
|
||||
// cc->ray[i].Msg3_subframe = -1;
|
||||
break;
|
||||
}
|
||||
@@ -1427,7 +1428,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
mcs_UL[harq_pid],
|
||||
rb_table
|
||||
[rb_table_index]));
|
||||
#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_tmp_body->ul_config_pdu_list[ul_req_index], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
@@ -1511,7 +1512,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
0, // n_srs
|
||||
UE_template->
|
||||
TBS_UL[harq_pid]);
|
||||
#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_tmp_body->ul_config_pdu_list[ul_req_index], UE_template->rach_resource_type > 2 ? 2 : 1, 1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
|
||||
@@ -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");
|
||||
|
||||
+65
-65
@@ -44,29 +44,29 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "BCCH-BCH-Message.h"
|
||||
#include "RadioResourceConfigCommon.h"
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "SchedulingInfoList.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "RACH-ConfigCommon.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "MobilityControlInfo.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#include "LTE_BCCH-BCH-Message.h"
|
||||
#include "LTE_RadioResourceConfigCommon.h"
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_SchedulingInfoList.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#include "LTE_RACH-ConfigCommon.h"
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
#include "LTE_MobilityControlInfo.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "LTE_SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "SystemInformationBlockType1-v1310-IEs.h"
|
||||
#include "SystemInformationBlockType18-r12.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "LTE_SystemInformationBlockType1-v1310-IEs.h"
|
||||
#include "LTE_SystemInformationBlockType18-r12.h"
|
||||
#endif
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigCommonSIB.h"
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
#define DCH_PAYLOAD_SIZE_MAX 4096
|
||||
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
// Mask for identifying subframe for MBMS
|
||||
#define MBSFN_TDD_SF3 0x80 // for TDD
|
||||
@@ -380,7 +380,7 @@ typedef struct {
|
||||
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX];
|
||||
} __attribute__ ((__packed__)) PCCH_PDU;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/*! \brief MCCH payload */
|
||||
typedef struct {
|
||||
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX];
|
||||
@@ -437,7 +437,7 @@ typedef struct {
|
||||
/*!\brief LCID of padding LCID for DLSCH */
|
||||
#define SHORT_PADDING 31
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// MCH LCHAN IDs (table6.2.1-4 TS36.321)
|
||||
/*!\brief LCID of MCCH for DL */
|
||||
#define MCCH_LCHANID 0
|
||||
@@ -900,14 +900,14 @@ typedef struct {
|
||||
eNB_UE_estimated_distances distance;
|
||||
#endif
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t rach_resource_type;
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
frame_t Msg2_frame;
|
||||
#endif
|
||||
sub_frame_t Msg2_subframe;
|
||||
|
||||
PhysicalConfigDedicated_t *physicalConfigDedicated;
|
||||
LTE_PhysicalConfigDedicated_t *physicalConfigDedicated;
|
||||
|
||||
} UE_TEMPLATE;
|
||||
|
||||
@@ -1047,7 +1047,7 @@ typedef struct {
|
||||
int msg4_TBsize;
|
||||
/// MCS used for Msg4
|
||||
int msg4_mcs;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t rach_resource_type;
|
||||
uint8_t msg2_mpdcch_repetition_cnt;
|
||||
uint8_t msg4_mpdcch_repetition_cnt;
|
||||
@@ -1243,14 +1243,14 @@ typedef struct {
|
||||
int Ncp;
|
||||
int eutra_band;
|
||||
uint32_t dl_CarrierFreq;
|
||||
BCCH_BCH_Message_t *mib;
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
|
||||
LTE_BCCH_BCH_Message_t *mib;
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
|
||||
#endif
|
||||
TDD_Config_t *tdd_Config;
|
||||
SchedulingInfoList_t *schedulingInfoList;
|
||||
ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
||||
LTE_TDD_Config_t *tdd_Config;
|
||||
LTE_SchedulingInfoList_t *schedulingInfoList;
|
||||
LTE_ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
||||
long ul_Bandwidth;
|
||||
/// Outgoing MIB PDU for PHY
|
||||
MIB_PDU MIB_pdu;
|
||||
@@ -1273,10 +1273,10 @@ typedef struct {
|
||||
/// VRB map for common channels and retransmissions by PHICH
|
||||
uint8_t vrb_map_UL[100];
|
||||
/// MBSFN SubframeConfig
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
||||
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// MBMS Flag
|
||||
uint8_t MBMS_flag;
|
||||
/// Outgoing MCCH pdu for PHY
|
||||
@@ -1290,17 +1290,17 @@ typedef struct {
|
||||
/// number of active MBSFN area
|
||||
uint8_t num_active_mbsfn_area;
|
||||
/// MBSFN Area Info
|
||||
struct MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
|
||||
struct LTE_MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
|
||||
/// PMCH Config
|
||||
struct PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
|
||||
struct LTE_PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
|
||||
/// MBMS session info list
|
||||
struct MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
|
||||
struct LTE_MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
|
||||
/// Outgoing MCH pdu for PHY
|
||||
MCH_PDU MCH_pdu;
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
/// Rel13 parameters from SIB1
|
||||
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
|
||||
/// Counter for SIB1-BR scheduling
|
||||
int SIB1_BR_cnt;
|
||||
/// Outgoing BCCH-BR pdu for PHY
|
||||
@@ -1454,9 +1454,9 @@ typedef struct {
|
||||
/// default value is false
|
||||
uint16_t ttiBundling;
|
||||
/// default value is release
|
||||
struct DRX_Config *drx_config;
|
||||
struct LTE_DRX_Config *drx_config;
|
||||
/// default value is release
|
||||
struct MAC_MainConfig__phr_Config *phr_config;
|
||||
struct LTE_MAC_MainConfig__phr_Config *phr_config;
|
||||
///timer before triggering a periodic PHR
|
||||
uint16_t periodicPHR_Timer;
|
||||
///timer before triggering a prohibit PHR
|
||||
@@ -1498,30 +1498,30 @@ typedef struct {
|
||||
/// uplink active flag
|
||||
uint8_t ul_active;
|
||||
/// pointer to RRC PHY configuration
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
/// pointer to RACH_ConfigDedicated (NULL when not active, i.e. upon HO completion or T304 expiry)
|
||||
struct RACH_ConfigDedicated *rach_ConfigDedicated;
|
||||
struct LTE_RACH_ConfigDedicated *rach_ConfigDedicated;
|
||||
/// pointer to RRC PHY configuration
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// pointer to RRC PHY configuration SCEll
|
||||
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
|
||||
struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
|
||||
/// Preconfiguration for Sidelink
|
||||
struct SL_Preconfiguration_r12 *SL_Preconfiguration;
|
||||
struct LTE_SL_Preconfiguration_r12 *SL_Preconfiguration;
|
||||
/// RX Pool for Sidelink from SIB18
|
||||
SL_CommRxPoolList_r12_t commRxPool_r12;
|
||||
LTE_SL_CommRxPoolList_r12_t commRxPool_r12;
|
||||
/// TX Pool Normal for Sidelink from SIB18
|
||||
struct SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
|
||||
struct LTE_SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
|
||||
/// TX Pool Exceptional for Sidelink from SIB18
|
||||
struct SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
|
||||
struct LTE_SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
|
||||
/// Common Sync Config for Sidelink from SIB18
|
||||
struct SL_SyncConfigList_r12 *commSyncConfig_r12;
|
||||
struct LTE_SL_SyncConfigList_r12 *commSyncConfig_r12;
|
||||
/// Dedicated Sync TX control for Sidelink
|
||||
struct SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
|
||||
struct LTE_SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
|
||||
/// Dedicated Discovery TX control for Sidelink
|
||||
struct SL_DiscConfig_r12 *sl_DiscConfig_r12;
|
||||
struct LTE_SL_DiscConfig_r12 *sl_DiscConfig_r12;
|
||||
/// Dedicated TX config for Sidelink
|
||||
struct SL_CommConfig_r12 *sl_CommConfig_r12;
|
||||
struct LTE_SL_CommConfig_r12 *sl_CommConfig_r12;
|
||||
//SL sourceL2ID
|
||||
uint32_t sourceL2Id;
|
||||
//SL groupL2Id
|
||||
@@ -1535,17 +1535,17 @@ typedef struct {
|
||||
|
||||
#endif
|
||||
/// pointer to TDD Configuration (NULL for FDD)
|
||||
TDD_Config_t *tdd_Config;
|
||||
LTE_TDD_Config_t *tdd_Config;
|
||||
/// Number of adjacent cells to measure
|
||||
uint8_t n_adj_cells;
|
||||
/// Array of adjacent physical cell ids
|
||||
uint32_t adj_cell_id[6];
|
||||
/// Pointer to RRC MAC configuration
|
||||
MAC_MainConfig_t *macConfig;
|
||||
LTE_MAC_MainConfig_t *macConfig;
|
||||
/// Pointer to RRC Measurement gap configuration
|
||||
MeasGapConfig_t *measGapConfig;
|
||||
LTE_MeasGapConfig_t *measGapConfig;
|
||||
/// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
|
||||
LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
|
||||
LTE_LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
|
||||
/// Scheduling Information
|
||||
UE_SCHEDULING_INFO scheduling_info;
|
||||
/// Outgoing CCCH pdu for PHY
|
||||
@@ -1554,7 +1554,7 @@ typedef struct {
|
||||
RAR_PDU RAR_pdu;
|
||||
/// Incoming DLSCH pdu for PHY
|
||||
DLSCH_PDU DLSCH_pdu[MAX_MOBILES_PER_ENB][2];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int sltx_active;
|
||||
SLSCH_t slsch;
|
||||
SLDCH_t sldch;
|
||||
@@ -1610,16 +1610,16 @@ typedef struct {
|
||||
uint8_t periodBSRTimer_expires_flag;
|
||||
|
||||
/// MBSFN_Subframe Configuration
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
/// number of active MBSFN area
|
||||
uint8_t num_active_mbsfn_area;
|
||||
/// MBSFN Area Info
|
||||
struct MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
|
||||
struct LTE_MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
|
||||
/// PMCH Config
|
||||
struct PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
|
||||
struct LTE_PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
|
||||
/// MCCH status
|
||||
uint8_t mcch_status;
|
||||
/// MSI status
|
||||
@@ -1627,7 +1627,7 @@ typedef struct {
|
||||
uint8_t msi_current_alloc;
|
||||
uint8_t msi_pmch;
|
||||
|
||||
struct MBSFN_SubframeConfig *commonSF_Alloc_r9_mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
struct LTE_MBSFN_SubframeConfig *commonSF_Alloc_r9_mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
uint8_t commonSF_AllocPeriod_r9;
|
||||
int common_num_sf_alloc;
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
|
||||
void initiate_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
sub_frame_t subframeP, uint16_t preamble_index,
|
||||
int16_t timing_offset, uint16_t rnti
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
);
|
||||
@@ -309,7 +309,7 @@ unsigned short fill_rar(const module_id_t module_idP,
|
||||
const uint16_t N_RB_UL,
|
||||
const uint8_t input_buffer_length);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
unsigned short fill_rar_br(eNB_MAC_INST * eNB,
|
||||
int CC_id,
|
||||
RA_t * ra,
|
||||
@@ -465,7 +465,7 @@ void set_ue_dai(sub_frame_t subframeP,
|
||||
int UE_id,
|
||||
uint8_t CC_id, uint8_t tdd_config, UE_list_t * UE_list);
|
||||
|
||||
uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
|
||||
uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
|
||||
/** \brief First stage of PCH Scheduling. Gets a PCH SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
|
||||
@param Mod_id Instance ID of eNB
|
||||
@param frame Frame index
|
||||
@@ -549,7 +549,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
|
||||
sl_discovery_flag_t sl_discovery_flag
|
||||
);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/* \brief Called by PHY to transfer MCH transport block to ue MAC.
|
||||
@param Mod_id Index of module instance
|
||||
@param frame Frame index
|
||||
@@ -694,7 +694,7 @@ int to_prb(int);
|
||||
int to_rbg(int);
|
||||
int mac_init(void);
|
||||
int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
);
|
||||
@@ -956,46 +956,46 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
int p_eNB,
|
||||
int Ncp,
|
||||
int eutra_band, uint32_t dl_CarrierFreq,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int pbch_repetition,
|
||||
#endif
|
||||
rnti_t rntiP,
|
||||
BCCH_BCH_Message_t * mib,
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
LTE_BCCH_BCH_Message_t * mib,
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon_BR,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
LTE_radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
struct PhysicalConfigDedicated
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
MeasObjectToAddMod_t ** measObj,
|
||||
MAC_MainConfig_t * mac_MainConfig,
|
||||
LTE_MeasObjectToAddMod_t ** measObj,
|
||||
LTE_MAC_MainConfig_t * mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
LogicalChannelConfig_t * logicalChannelConfig,
|
||||
MeasGapConfig_t * measGapConfig,
|
||||
TDD_Config_t * tdd_Config,
|
||||
MobilityControlInfo_t * mobilityControlInfo,
|
||||
SchedulingInfoList_t * schedulingInfoList,
|
||||
LTE_LogicalChannelConfig_t * logicalChannelConfig,
|
||||
LTE_MeasGapConfig_t * measGapConfig,
|
||||
LTE_TDD_Config_t * tdd_Config,
|
||||
LTE_MobilityControlInfo_t * mobilityControlInfo,
|
||||
LTE_SchedulingInfoList_t * schedulingInfoList,
|
||||
uint32_t ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t * pmch_InfoList
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t * pmch_InfoList
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
SystemInformationBlockType1_v1310_IEs_t *
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_ext_r13
|
||||
#endif
|
||||
);
|
||||
@@ -1023,40 +1023,40 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
int rrc_mac_config_req_ue(module_id_t module_idP,
|
||||
int CC_id,
|
||||
uint8_t eNB_index,
|
||||
RadioResourceConfigCommonSIB_t *
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
struct PhysicalConfigDedicated
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t * sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
MeasObjectToAddMod_t ** measObj,
|
||||
MAC_MainConfig_t * mac_MainConfig,
|
||||
LTE_MeasObjectToAddMod_t ** measObj,
|
||||
LTE_MAC_MainConfig_t * mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
LogicalChannelConfig_t * logicalChannelConfig,
|
||||
MeasGapConfig_t * measGapConfig,
|
||||
TDD_Config_t * tdd_Config,
|
||||
MobilityControlInfo_t * mobilityControlInfo,
|
||||
LTE_LogicalChannelConfig_t * logicalChannelConfig,
|
||||
LTE_MeasGapConfig_t * measGapConfig,
|
||||
LTE_TDD_Config_t * tdd_Config,
|
||||
LTE_MobilityControlInfo_t * mobilityControlInfo,
|
||||
uint8_t * SIwindowsize,
|
||||
uint16_t * SIperiod,
|
||||
ARFCN_ValueEUTRA_t * ul_CarrierFreq,
|
||||
LTE_ARFCN_ValueEUTRA_t * ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
,
|
||||
uint8_t MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t * pmch_InfoList
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t * pmch_InfoList
|
||||
#endif
|
||||
#ifdef CBA
|
||||
,
|
||||
uint8_t num_active_cba_groups, uint16_t cba_rnti
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,config_action_t config_action
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
@@ -1084,11 +1084,11 @@ uint16_t mac_computeRIV(uint16_t N_RB_DL, uint16_t RBstart,
|
||||
|
||||
int get_phich_resource_times6(COMMON_channels_t * cc);
|
||||
|
||||
uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
|
||||
uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
|
||||
|
||||
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
|
||||
|
||||
unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe);
|
||||
unsigned char ul_ACK_subframe2M(LTE_TDD_Config_t *tdd_Config,unsigned char subframe);
|
||||
|
||||
int to_rbg(int dl_Bandwidth);
|
||||
|
||||
@@ -1113,17 +1113,17 @@ void get_srs_pos(COMMON_channels_t * cc, uint16_t isrs,
|
||||
uint16_t * psrsPeriodicity, uint16_t * psrsOffset);
|
||||
|
||||
void get_csi_params(COMMON_channels_t * cc,
|
||||
struct CQI_ReportPeriodic *cqi_PMI_ConfigIndex,
|
||||
struct LTE_CQI_ReportPeriodic *cqi_PMI_ConfigIndex,
|
||||
uint16_t * Npd, uint16_t * N_OFFSET_CQI, int *H);
|
||||
|
||||
uint8_t get_rel8_dl_cqi_pmi_size(UE_sched_ctrl * sched_ctl, int CC_idP,
|
||||
COMMON_channels_t * cc, uint8_t tmode,
|
||||
struct CQI_ReportPeriodic
|
||||
struct LTE_CQI_ReportPeriodic
|
||||
*cqi_ReportPeriodic);
|
||||
|
||||
uint8_t get_dl_cqi_pmi_size_pusch(COMMON_channels_t * cc, uint8_t tmode,
|
||||
uint8_t ri,
|
||||
CQI_ReportModeAperiodic_t *
|
||||
LTE_CQI_ReportModeAperiodic_t *
|
||||
cqi_ReportModeAperiodic);
|
||||
void extract_pucch_csi(module_id_t mod_idP, int CC_idP, int UE_id,
|
||||
frame_t frameP, sub_frame_t subframeP,
|
||||
@@ -1140,7 +1140,7 @@ uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t * tx_req_body,
|
||||
void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *
|
||||
ul_config_pdu, uint8_t cqi_req,
|
||||
COMMON_channels_t * cc,
|
||||
struct PhysicalConfigDedicated
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
uint8_t tmode, uint32_t handle,
|
||||
uint16_t rnti,
|
||||
@@ -1159,7 +1159,7 @@ void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *
|
||||
uint8_t current_tx_nb,
|
||||
uint8_t n_srs, uint16_t size);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *
|
||||
ul_config_pdu, uint8_t ue_type,
|
||||
uint16_t
|
||||
@@ -1236,7 +1236,7 @@ uint8_t get_tmode(module_id_t module_idP, int CC_idP, int UE_idP);
|
||||
uint8_t get_ul_req_index(module_id_t module_idP, int CC_idP,
|
||||
sub_frame_t subframeP);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int get_numnarrowbandbits(long dl_Bandwidth);
|
||||
|
||||
int mpdcch_sf_condition(eNB_MAC_INST * eNB, int CC_id, frame_t frameP,
|
||||
|
||||
@@ -124,7 +124,7 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
DCI1C_5MHz_t MCCH_alloc_pdu;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ store_dlsch_buffer(module_id_t Mod_id,
|
||||
|
||||
rlc_status = mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -57,12 +57,12 @@ get_prach_resources(module_id_t module_idP,
|
||||
uint8_t eNB_index,
|
||||
uint8_t t_id,
|
||||
uint8_t first_Msg3,
|
||||
RACH_ConfigDedicated_t * rach_ConfigDedicated)
|
||||
LTE_RACH_ConfigDedicated_t * rach_ConfigDedicated)
|
||||
{
|
||||
uint8_t Msg3_size = UE_mac_inst[module_idP].RA_Msg3_size;
|
||||
PRACH_RESOURCES_t *prach_resources =
|
||||
&UE_mac_inst[module_idP].RA_prach_resources;
|
||||
RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
|
||||
LTE_RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
|
||||
uint8_t noGroupB = 0;
|
||||
uint8_t f_id = 0, num_prach = 0;
|
||||
int numberOfRA_Preambles;
|
||||
@@ -311,8 +311,8 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
|
||||
uint8_t lcid = CCCH;
|
||||
uint16_t Size16;
|
||||
struct RACH_ConfigCommon *rach_ConfigCommon =
|
||||
(struct RACH_ConfigCommon *) NULL;
|
||||
struct LTE_RACH_ConfigCommon *rach_ConfigCommon =
|
||||
(struct LTE_RACH_ConfigCommon *) NULL;
|
||||
int32_t frame_diff = 0;
|
||||
uint8_t dcch_header_len = 0;
|
||||
uint16_t sdu_lengths;
|
||||
@@ -408,7 +408,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
eNB_indexP, frameP, subframeP,
|
||||
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -428,7 +428,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
|
||||
sdu_lengths = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
|
||||
(char *) &ulsch_buff[0]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -553,37 +553,37 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
int preambleTransMax = -1;
|
||||
switch (rach_ConfigCommon->ra_SupervisionInfo.
|
||||
preambleTransMax) {
|
||||
case PreambleTransMax_n3:
|
||||
case LTE_PreambleTransMax_n3:
|
||||
preambleTransMax = 3;
|
||||
break;
|
||||
case PreambleTransMax_n4:
|
||||
case LTE_PreambleTransMax_n4:
|
||||
preambleTransMax = 4;
|
||||
break;
|
||||
case PreambleTransMax_n5:
|
||||
case LTE_PreambleTransMax_n5:
|
||||
preambleTransMax = 5;
|
||||
break;
|
||||
case PreambleTransMax_n6:
|
||||
case LTE_PreambleTransMax_n6:
|
||||
preambleTransMax = 6;
|
||||
break;
|
||||
case PreambleTransMax_n7:
|
||||
case LTE_PreambleTransMax_n7:
|
||||
preambleTransMax = 7;
|
||||
break;
|
||||
case PreambleTransMax_n8:
|
||||
case LTE_PreambleTransMax_n8:
|
||||
preambleTransMax = 8;
|
||||
break;
|
||||
case PreambleTransMax_n10:
|
||||
case LTE_PreambleTransMax_n10:
|
||||
preambleTransMax = 10;
|
||||
break;
|
||||
case PreambleTransMax_n20:
|
||||
case LTE_PreambleTransMax_n20:
|
||||
preambleTransMax = 20;
|
||||
break;
|
||||
case PreambleTransMax_n50:
|
||||
case LTE_PreambleTransMax_n50:
|
||||
preambleTransMax = 50;
|
||||
break;
|
||||
case PreambleTransMax_n100:
|
||||
case LTE_PreambleTransMax_n100:
|
||||
preambleTransMax = 100;
|
||||
break;
|
||||
case PreambleTransMax_n200:
|
||||
case LTE_PreambleTransMax_n200:
|
||||
preambleTransMax = 200;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ fill_rar(const module_id_t module_idP,
|
||||
return (ra->rnti);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//------------------------------------------------------------------------------
|
||||
unsigned short
|
||||
fill_rar_br(eNB_MAC_INST * eNB,
|
||||
|
||||
@@ -96,22 +96,22 @@ void ue_init_mac(module_id_t module_idP)
|
||||
LOG_I(MAC, "[UE%d] Applying default macMainConfig\n", module_idP);
|
||||
//UE_mac_inst[module_idP].scheduling_info.macConfig=NULL;
|
||||
UE_mac_inst[module_idP].scheduling_info.retxBSR_Timer =
|
||||
RetxBSR_Timer_r12_sf10240;
|
||||
LTE_RetxBSR_Timer_r12_sf10240;
|
||||
UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer =
|
||||
PeriodicBSR_Timer_r12_infinity;
|
||||
LTE_PeriodicBSR_Timer_r12_infinity;
|
||||
UE_mac_inst[module_idP].scheduling_info.periodicPHR_Timer =
|
||||
MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
|
||||
LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
|
||||
UE_mac_inst[module_idP].scheduling_info.prohibitPHR_Timer =
|
||||
MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
|
||||
LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
|
||||
UE_mac_inst[module_idP].scheduling_info.PathlossChange_db =
|
||||
MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
|
||||
LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
|
||||
UE_mac_inst[module_idP].PHR_state =
|
||||
MAC_MainConfig__phr_Config_PR_setup;
|
||||
LTE_MAC_MainConfig__phr_Config_PR_setup;
|
||||
UE_mac_inst[module_idP].scheduling_info.SR_COUNTER = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.sr_ProhibitTimer = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.sr_ProhibitTimer_Running = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.maxHARQ_Tx =
|
||||
MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
UE_mac_inst[module_idP].scheduling_info.ttiBundling = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.extendedBSR_Sizes_r10 = 0;
|
||||
UE_mac_inst[module_idP].scheduling_info.extendedPHR_r10 = 0;
|
||||
@@ -304,14 +304,14 @@ ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
// determin the measurement gap
|
||||
if (UE_mac_inst[module_idP].measGapConfig != NULL) {
|
||||
if (UE_mac_inst[module_idP].measGapConfig->choice.setup.
|
||||
gapOffset.present == MeasGapConfig__setup__gapOffset_PR_gp0) {
|
||||
gapOffset.present == LTE_MeasGapConfig__setup__gapOffset_PR_gp0) {
|
||||
MGRP = 40;
|
||||
gapOffset =
|
||||
UE_mac_inst[module_idP].measGapConfig->choice.
|
||||
setup.gapOffset.choice.gp0;
|
||||
} else if (UE_mac_inst[module_idP].measGapConfig->choice.
|
||||
setup.gapOffset.present ==
|
||||
MeasGapConfig__setup__gapOffset_PR_gp1) {
|
||||
LTE_MeasGapConfig__setup__gapOffset_PR_gp1) {
|
||||
MGRP = 80;
|
||||
gapOffset =
|
||||
UE_mac_inst[module_idP].measGapConfig->choice.
|
||||
@@ -689,7 +689,7 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
unsigned char *parse_mch_header(unsigned char *mac_header,
|
||||
unsigned char *num_sdu,
|
||||
unsigned char *rx_lcids,
|
||||
@@ -1017,7 +1017,7 @@ int ue_query_p_mch(module_id_t module_idP, uint32_t frameP, uint32_t subframe, i
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) // one-frameP format
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) // one-frameP format
|
||||
continue;
|
||||
|
||||
// four-frameP format
|
||||
@@ -1032,7 +1032,7 @@ int ue_query_p_mch(module_id_t module_idP, uint32_t frameP, uint32_t subframe, i
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) // one-frameP format
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) // one-frameP format
|
||||
continue;
|
||||
|
||||
// four-frameP format
|
||||
@@ -1167,7 +1167,7 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
break;
|
||||
}
|
||||
|
||||
if (UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { // one-frameP format
|
||||
if (UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) { // one-frameP format
|
||||
if (frameP % mbsfn_period == mbsfn_alloc_offset) { // MBSFN frameP
|
||||
|
||||
if (UE_mac_inst[module_idP].pmch_Config[0]) {
|
||||
@@ -1372,7 +1372,7 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present != MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
|
||||
continue;
|
||||
|
||||
uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0];
|
||||
@@ -1919,7 +1919,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
// periodicBSR-Timer expires, trigger BSR
|
||||
if ((UE_mac_inst[module_idP].scheduling_info.periodicBSR_Timer !=
|
||||
PeriodicBSR_Timer_r12_infinity)
|
||||
LTE_PeriodicBSR_Timer_r12_infinity)
|
||||
&& (UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF == 0)) {
|
||||
// Trigger BSR Periodic
|
||||
UE_mac_inst[module_idP].BSR_reporting_active |=
|
||||
@@ -2055,7 +2055,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
lcid,
|
||||
buflen_remain,
|
||||
(char *)&ulsch_buff[sdu_length_total]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -2447,7 +2447,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
// Reset Periodic Timer except when BSR is truncated
|
||||
if ((bsr_t == NULL)
|
||||
&& (UE_mac_inst[module_idP].scheduling_info.
|
||||
periodicBSR_Timer != PeriodicBSR_Timer_r12_infinity)) {
|
||||
periodicBSR_Timer != LTE_PeriodicBSR_Timer_r12_infinity)) {
|
||||
UE_mac_inst[module_idP].scheduling_info.periodicBSR_SF =
|
||||
get_sf_periodicBSRTimer(UE_mac_inst
|
||||
[module_idP].scheduling_info.
|
||||
@@ -2506,8 +2506,8 @@ ue_scheduler(const module_id_t module_idP,
|
||||
int bucketsizeduration_max = -1;
|
||||
// mac_rlc_status_resp_t rlc_status[MAX_NUM_LCGID]; // 4
|
||||
// int8_t lcg_id;
|
||||
struct RACH_ConfigCommon *rach_ConfigCommon =
|
||||
(struct RACH_ConfigCommon *) NULL;
|
||||
struct LTE_RACH_ConfigCommon *rach_ConfigCommon =
|
||||
(struct LTE_RACH_ConfigCommon *) NULL;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
@@ -2600,7 +2600,7 @@ ue_scheduler(const module_id_t module_idP,
|
||||
eNB_indexP);
|
||||
//Invalid...need to add another MAC UE state for re-connection procedure
|
||||
phy_config_afterHO_ue(module_idP, 0, eNB_indexP,
|
||||
(MobilityControlInfo_t *) NULL, 1);
|
||||
(LTE_MobilityControlInfo_t *) NULL, 1);
|
||||
//return(3);
|
||||
break;
|
||||
|
||||
@@ -2765,7 +2765,7 @@ ue_scheduler(const module_id_t module_idP,
|
||||
physicalConfigDedicated->schedulingRequestConfig == NULL)
|
||||
|| (UE_mac_inst[module_idP].
|
||||
physicalConfigDedicated->schedulingRequestConfig->present ==
|
||||
SchedulingRequestConfig_PR_release)) {
|
||||
LTE_SchedulingRequestConfig_PR_release)) {
|
||||
|
||||
// initiate RA with CRNTI included in msg3 (no contention) as descibed in 36.321 sec 5.1.5
|
||||
|
||||
@@ -2776,7 +2776,7 @@ ue_scheduler(const module_id_t module_idP,
|
||||
}
|
||||
// Put this in a function
|
||||
// Call PHR procedure as described in Section 5.4.6 in 36.321
|
||||
if (UE_mac_inst[module_idP].PHR_state == MAC_MainConfig__phr_Config_PR_setup) { // normal operation
|
||||
if (UE_mac_inst[module_idP].PHR_state == LTE_MAC_MainConfig__phr_Config_PR_setup) { // normal operation
|
||||
|
||||
if (UE_mac_inst[module_idP].PHR_reconfigured == 1) { // upon (re)configuration of the power headroom reporting functionality by upper layers
|
||||
UE_mac_inst[module_idP].PHR_reporting_active = 1;
|
||||
@@ -3037,7 +3037,7 @@ update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
|
||||
lcid,
|
||||
0xFFFF //TBS is not used in RLC at this step, set a special value for debug
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -3182,63 +3182,63 @@ int get_sf_periodicBSRTimer(uint8_t sf_offset)
|
||||
{
|
||||
|
||||
switch (sf_offset) {
|
||||
case PeriodicBSR_Timer_r12_sf5:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf5:
|
||||
return 5;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf10:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf10:
|
||||
return 10;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf16:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf16:
|
||||
return 16;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf20:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf20:
|
||||
return 20;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf32:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf32:
|
||||
return 32;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf40:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf40:
|
||||
return 40;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf64:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf64:
|
||||
return 64;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf80:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf80:
|
||||
return 80;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf128:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf128:
|
||||
return 128;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf160:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf160:
|
||||
return 160;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf320:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf320:
|
||||
return 320;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf640:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf640:
|
||||
return 640;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf1280:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf1280:
|
||||
return 1280;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_sf2560:
|
||||
case LTE_PeriodicBSR_Timer_r12_sf2560:
|
||||
return 2560;
|
||||
break;
|
||||
|
||||
case PeriodicBSR_Timer_r12_infinity:
|
||||
case LTE_PeriodicBSR_Timer_r12_infinity:
|
||||
default:
|
||||
return 0xFFFF;
|
||||
break;
|
||||
@@ -3249,27 +3249,27 @@ int get_sf_retxBSRTimer(uint8_t sf_offset)
|
||||
{
|
||||
|
||||
switch (sf_offset) {
|
||||
case RetxBSR_Timer_r12_sf320:
|
||||
case LTE_RetxBSR_Timer_r12_sf320:
|
||||
return 320;
|
||||
break;
|
||||
|
||||
case RetxBSR_Timer_r12_sf640:
|
||||
case LTE_RetxBSR_Timer_r12_sf640:
|
||||
return 640;
|
||||
break;
|
||||
|
||||
case RetxBSR_Timer_r12_sf1280:
|
||||
case LTE_RetxBSR_Timer_r12_sf1280:
|
||||
return 1280;
|
||||
break;
|
||||
|
||||
case RetxBSR_Timer_r12_sf2560:
|
||||
case LTE_RetxBSR_Timer_r12_sf2560:
|
||||
return 2560;
|
||||
break;
|
||||
|
||||
case RetxBSR_Timer_r12_sf5120:
|
||||
case LTE_RetxBSR_Timer_r12_sf5120:
|
||||
return 5120;
|
||||
break;
|
||||
|
||||
case RetxBSR_Timer_r12_sf10240:
|
||||
case LTE_RetxBSR_Timer_r12_sf10240:
|
||||
return 10240;
|
||||
break;
|
||||
|
||||
@@ -3283,32 +3283,32 @@ int get_ms_bucketsizeduration(uint8_t bucketsizeduration)
|
||||
{
|
||||
|
||||
switch (bucketsizeduration) {
|
||||
case LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50:
|
||||
case LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50:
|
||||
return
|
||||
50;
|
||||
break;
|
||||
|
||||
case LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms100:
|
||||
case LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms100:
|
||||
return
|
||||
100;
|
||||
break;
|
||||
|
||||
case LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms150:
|
||||
case LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms150:
|
||||
return
|
||||
150;
|
||||
break;
|
||||
|
||||
case LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms300:
|
||||
case LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms300:
|
||||
return
|
||||
300;
|
||||
break;
|
||||
|
||||
case LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms500:
|
||||
case LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms500:
|
||||
return
|
||||
500;
|
||||
break;
|
||||
|
||||
case LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000:
|
||||
case LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000:
|
||||
return
|
||||
1000;
|
||||
break;
|
||||
@@ -3369,19 +3369,19 @@ int get_sf_prohibitPHR_Timer(uint8_t prohibitPHR_Timer)
|
||||
int get_db_dl_PathlossChange(uint8_t dl_PathlossChange)
|
||||
{
|
||||
switch (dl_PathlossChange) {
|
||||
case MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1:
|
||||
case LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1:
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3:
|
||||
case LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3:
|
||||
return 3;
|
||||
break;
|
||||
|
||||
case MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB6:
|
||||
case LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB6:
|
||||
return 6;
|
||||
break;
|
||||
|
||||
case MAC_MainConfig__phr_Config__setup__dl_PathlossChange_infinity:
|
||||
case LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_infinity:
|
||||
default:
|
||||
return -1;
|
||||
break;
|
||||
@@ -3478,7 +3478,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
|
||||
ue->slsch_lcid,
|
||||
req,
|
||||
(char*)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG))
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ue->sourceL2Id,
|
||||
ue->destinationL2Id
|
||||
#endif
|
||||
|
||||
@@ -96,7 +96,7 @@ boolean_t pdcp_data_req(
|
||||
const sdu_size_t sdu_buffer_sizeP,
|
||||
unsigned char *const sdu_buffer_pP,
|
||||
const pdcp_transmission_mode_t modeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
@@ -143,7 +143,7 @@ boolean_t pdcp_data_req(
|
||||
if (srb_flagP) {
|
||||
AssertError (rb_idP < 3, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, 3, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
} else {
|
||||
AssertError (rb_idP < maxDRB, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
AssertError (rb_idP < LTE_maxDRB, return FALSE, "RB id is too high (%u/%d) %u %u!\n", rb_idP, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ boolean_t pdcp_data_req(
|
||||
sdu_buffer_sizeP);
|
||||
#endif
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -317,7 +317,7 @@ boolean_t pdcp_data_req(
|
||||
pdcp_apply_security(ctxt_pP,
|
||||
pdcp_p,
|
||||
srb_flagP,
|
||||
rb_idP % maxDRB,
|
||||
rb_idP % LTE_maxDRB,
|
||||
pdcp_header_len,
|
||||
current_sn,
|
||||
pdcp_pdu_p->data,
|
||||
@@ -367,7 +367,7 @@ boolean_t pdcp_data_req(
|
||||
"[MSG] PDCP DL %s PDU on rb_id %d\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,sourceL2Id
|
||||
,destinationL2Id
|
||||
#endif
|
||||
@@ -504,15 +504,15 @@ pdcp_data_ind(
|
||||
}
|
||||
|
||||
} else {
|
||||
rb_id = rb_idP % maxDRB;
|
||||
AssertError (rb_id < maxDRB, return FALSE, "RB id is too high (%u/%d) %u UE %x!\n",
|
||||
rb_id = rb_idP % LTE_maxDRB;
|
||||
AssertError (rb_id < LTE_maxDRB, return FALSE, "RB id is too high (%u/%d) %u UE %x!\n",
|
||||
rb_id,
|
||||
maxDRB,
|
||||
LTE_maxDRB,
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->rnti);
|
||||
AssertError (rb_id > 0, return FALSE, "RB id is too low (%u/%d) %u UE %x!\n",
|
||||
rb_id,
|
||||
maxDRB,
|
||||
LTE_maxDRB,
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->rnti);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_id, srb_flagP);
|
||||
@@ -798,7 +798,7 @@ pdcp_data_ind(
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 1;
|
||||
#endif
|
||||
} else {
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * maxDRB);
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * LTE_maxDRB);
|
||||
}
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
|
||||
|
||||
@@ -980,7 +980,7 @@ pdcp_run (
|
||||
RRC_DCCH_DATA_REQ (msg_p).sdu_size,
|
||||
RRC_DCCH_DATA_REQ (msg_p).sdu_p,
|
||||
RRC_DCCH_DATA_REQ (msg_p).mode
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -1083,8 +1083,8 @@ pdcp_remove_UE(
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
DRB_Identity_t srb_id = 0;
|
||||
DRB_Identity_t drb_id = 0;
|
||||
LTE_DRB_Identity_t srb_id = 0;
|
||||
LTE_DRB_Identity_t drb_id = 0;
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_rc;
|
||||
int i;
|
||||
@@ -1102,7 +1102,7 @@ pdcp_remove_UE(
|
||||
h_rc = hashtable_remove(pdcp_coll_p, key);
|
||||
}
|
||||
|
||||
for (drb_id=0; drb_id<maxDRB; drb_id++) {
|
||||
for (drb_id=0; drb_id<LTE_maxDRB; drb_id++) {
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||
h_rc = hashtable_remove(pdcp_coll_p, key);
|
||||
|
||||
@@ -1131,44 +1131,44 @@ pdcp_remove_UE(
|
||||
boolean_t
|
||||
rrc_pdcp_config_asn1_req (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
SRB_ToAddModList_t *const srb2add_list_pP,
|
||||
DRB_ToAddModList_t *const drb2add_list_pP,
|
||||
DRB_ToReleaseList_t *const drb2release_list_pP,
|
||||
LTE_SRB_ToAddModList_t *const srb2add_list_pP,
|
||||
LTE_DRB_ToAddModList_t *const drb2add_list_pP,
|
||||
LTE_DRB_ToReleaseList_t *const drb2release_list_pP,
|
||||
const uint8_t security_modeP,
|
||||
uint8_t *const kRRCenc_pP,
|
||||
uint8_t *const kRRCint_pP,
|
||||
uint8_t *const kUPenc_pP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,PMCH_InfoList_r9_t* const pmch_InfoList_r9_pP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,LTE_PMCH_InfoList_r9_t* const pmch_InfoList_r9_pP
|
||||
#endif
|
||||
,rb_id_t *const defaultDRB
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
long int lc_id = 0;
|
||||
DRB_Identity_t srb_id = 0;
|
||||
LTE_DRB_Identity_t srb_id = 0;
|
||||
long int mch_id = 0;
|
||||
rlc_mode_t rlc_type = RLC_MODE_NONE;
|
||||
DRB_Identity_t drb_id = 0;
|
||||
DRB_Identity_t *pdrb_id_p = NULL;
|
||||
LTE_DRB_Identity_t drb_id = 0;
|
||||
LTE_DRB_Identity_t *pdrb_id_p = NULL;
|
||||
uint8_t drb_sn = 12;
|
||||
uint8_t srb_sn = 5; // fixed sn for SRBs
|
||||
uint8_t drb_report = 0;
|
||||
long int cnt = 0;
|
||||
uint16_t header_compression_profile = 0;
|
||||
config_action_t action = CONFIG_ACTION_ADD;
|
||||
SRB_ToAddMod_t *srb_toaddmod_p = NULL;
|
||||
DRB_ToAddMod_t *drb_toaddmod_p = NULL;
|
||||
LTE_SRB_ToAddMod_t *srb_toaddmod_p = NULL;
|
||||
LTE_DRB_ToAddMod_t *drb_toaddmod_p = NULL;
|
||||
pdcp_t *pdcp_p = NULL;
|
||||
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_rc;
|
||||
hash_key_t key_defaultDRB = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_defaultDRB_rc;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
int i,j;
|
||||
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
|
||||
MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
|
||||
LTE_MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
|
||||
LTE_MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
|
||||
#endif
|
||||
|
||||
LOG_T(PDCP, PROTOCOL_CTXT_FMT" %s() SRB2ADD %p DRB2ADD %p DRB2RELEASE %p\n",
|
||||
@@ -1215,12 +1215,12 @@ rrc_pdcp_config_asn1_req (
|
||||
|
||||
if (srb_toaddmod_p->rlc_Config) {
|
||||
switch (srb_toaddmod_p->rlc_Config->present) {
|
||||
case SRB_ToAddMod__rlc_Config_PR_NOTHING:
|
||||
case LTE_SRB_ToAddMod__rlc_Config_PR_NOTHING:
|
||||
break;
|
||||
|
||||
case SRB_ToAddMod__rlc_Config_PR_explicitValue:
|
||||
case LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue:
|
||||
switch (srb_toaddmod_p->rlc_Config->choice.explicitValue.present) {
|
||||
case RLC_Config_PR_NOTHING:
|
||||
case LTE_RLC_Config_PR_NOTHING:
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1245,7 +1245,7 @@ rrc_pdcp_config_asn1_req (
|
||||
|
||||
break;
|
||||
|
||||
case SRB_ToAddMod__rlc_Config_PR_defaultValue:
|
||||
case LTE_SRB_ToAddMod__rlc_Config_PR_defaultValue:
|
||||
pdcp_config_req_asn1 (
|
||||
ctxt_pP,
|
||||
pdcp_p,
|
||||
@@ -1294,7 +1294,7 @@ rrc_pdcp_config_asn1_req (
|
||||
continue;
|
||||
}
|
||||
|
||||
DevCheck4(drb_id < maxDRB, drb_id, maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
DevCheck4(drb_id < LTE_maxDRB, drb_id, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
|
||||
|
||||
@@ -1343,7 +1343,7 @@ rrc_pdcp_config_asn1_req (
|
||||
|
||||
if (drb_toaddmod_p->pdcp_Config->rlc_AM) {
|
||||
drb_report = drb_toaddmod_p->pdcp_Config->rlc_AM->statusReportRequired;
|
||||
drb_sn = PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits; // default SN size
|
||||
drb_sn = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits; // default SN size
|
||||
rlc_type = RLC_MODE_AM;
|
||||
}
|
||||
|
||||
@@ -1353,12 +1353,12 @@ rrc_pdcp_config_asn1_req (
|
||||
}
|
||||
|
||||
switch (drb_toaddmod_p->pdcp_Config->headerCompression.present) {
|
||||
case PDCP_Config__headerCompression_PR_NOTHING:
|
||||
case PDCP_Config__headerCompression_PR_notUsed:
|
||||
case LTE_PDCP_Config__headerCompression_PR_NOTHING:
|
||||
case LTE_PDCP_Config__headerCompression_PR_notUsed:
|
||||
header_compression_profile=0x0;
|
||||
break;
|
||||
|
||||
case PDCP_Config__headerCompression_PR_rohc:
|
||||
case LTE_PDCP_Config__headerCompression_PR_rohc:
|
||||
|
||||
// parse the struc and get the rohc profile
|
||||
if(drb_toaddmod_p->pdcp_Config->headerCompression.choice.rohc.profiles.profile0x0001) {
|
||||
@@ -1463,7 +1463,7 @@ rrc_pdcp_config_asn1_req (
|
||||
}
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
|
||||
if (pmch_InfoList_r9_pP != NULL) {
|
||||
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
|
||||
@@ -1480,7 +1480,7 @@ rrc_pdcp_config_asn1_req (
|
||||
|
||||
// can set the mch_id = i
|
||||
if (ctxt_pP->enb_flag) {
|
||||
drb_id = (mch_id * maxSessionPerPMCH ) + lc_id ;//+ (maxDRB + 3)*MAX_MOBILES_PER_ENB; // 1
|
||||
drb_id = (mch_id * LTE_maxSessionPerPMCH ) + lc_id ;//+ (LTE_maxDRB + 3)*MAX_MOBILES_PER_ENB; // 1
|
||||
|
||||
if (pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == TRUE) {
|
||||
action = CONFIG_ACTION_MBMS_MODIFY;
|
||||
@@ -1488,7 +1488,7 @@ rrc_pdcp_config_asn1_req (
|
||||
action = CONFIG_ACTION_MBMS_ADD;
|
||||
}
|
||||
} else {
|
||||
drb_id = (mch_id * maxSessionPerPMCH ) + lc_id; // + (maxDRB + 3); // 15
|
||||
drb_id = (mch_id * LTE_maxSessionPerPMCH ) + lc_id; // + (LTE_maxDRB + 3); // 15
|
||||
|
||||
if (pdcp_mbms_array_ue[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == TRUE) {
|
||||
action = CONFIG_ACTION_MBMS_MODIFY;
|
||||
@@ -1580,9 +1580,9 @@ pdcp_config_req_asn1 (
|
||||
pdcp_pP->header_compression_profile = header_compression_profileP;
|
||||
pdcp_pP->status_report = rb_reportP;
|
||||
|
||||
if (rb_snP == PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits) {
|
||||
if (rb_snP == LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits) {
|
||||
pdcp_pP->seq_num_size = PDCP_SN_12BIT;
|
||||
} else if (rb_snP == PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
} else if (rb_snP == LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
pdcp_pP->seq_num_size = PDCP_SN_7BIT;
|
||||
} else {
|
||||
pdcp_pP->seq_num_size = PDCP_SN_5BIT;
|
||||
@@ -1640,9 +1640,9 @@ pdcp_config_req_asn1 (
|
||||
kUPenc_pP);
|
||||
}
|
||||
|
||||
if (rb_snP == PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
if (rb_snP == LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
pdcp_pP->seq_num_size = 7;
|
||||
} else if (rb_snP == PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits) {
|
||||
} else if (rb_snP == LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits) {
|
||||
pdcp_pP->seq_num_size = 12;
|
||||
} else {
|
||||
pdcp_pP->seq_num_size=5;
|
||||
@@ -1685,7 +1685,7 @@ pdcp_config_req_asn1 (
|
||||
|
||||
memset(pdcp_pP, 0, sizeof(pdcp_t));
|
||||
break;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
case CONFIG_ACTION_MBMS_ADD:
|
||||
case CONFIG_ACTION_MBMS_MODIFY:
|
||||
@@ -2006,7 +2006,7 @@ void pdcp_layer_init(void)
|
||||
|
||||
module_id_t instance;
|
||||
int i,j;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
mbms_session_id_t session_id;
|
||||
mbms_service_id_t service_id;
|
||||
#endif
|
||||
@@ -2014,14 +2014,14 @@ void pdcp_layer_init(void)
|
||||
* Initialize SDU list
|
||||
*/
|
||||
list_init(&pdcp_sdu_list, NULL);
|
||||
pdcp_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, pdcp_free);
|
||||
pdcp_coll_p = hashtable_create ((LTE_maxDRB + 2) * 16, NULL, pdcp_free);
|
||||
AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed");
|
||||
|
||||
for (instance = 0; instance < MAX_MOBILES_PER_ENB; instance++) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (service_id = 0; service_id < maxServiceCount; service_id++) {
|
||||
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
|
||||
for (service_id = 0; service_id < LTE_maxServiceCount; service_id++) {
|
||||
for (session_id = 0; session_id < LTE_maxSessionPerPMCH; session_id++) {
|
||||
memset(&pdcp_mbms_array_ue[instance][service_id][session_id], 0, sizeof(pdcp_mbms_t));
|
||||
}
|
||||
}
|
||||
@@ -2032,10 +2032,10 @@ void pdcp_layer_init(void)
|
||||
|
||||
|
||||
for (instance = 0; instance < NUMBER_OF_eNB_MAX; instance++) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (service_id = 0; service_id < maxServiceCount; service_id++) {
|
||||
for (session_id = 0; session_id < maxSessionPerPMCH; session_id++) {
|
||||
for (service_id = 0; service_id < LTE_maxServiceCount; service_id++) {
|
||||
for (session_id = 0; session_id < LTE_maxSessionPerPMCH; session_id++) {
|
||||
memset(&pdcp_mbms_array_eNB[instance][service_id][session_id], 0, sizeof(pdcp_mbms_t));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "DRB-ToAddMod.h"
|
||||
#include "DRB-ToAddModList.h"
|
||||
#include "SRB-ToAddMod.h"
|
||||
#include "SRB-ToAddModList.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBMS-SessionInfoList-r9.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#include "LTE_DRB-ToAddMod.h"
|
||||
#include "LTE_DRB-ToAddModList.h"
|
||||
#include "LTE_SRB-ToAddMod.h"
|
||||
#include "LTE_SRB-ToAddModList.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBMS-SessionInfoList-r9.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ typedef struct pdcp_s {
|
||||
|
||||
} pdcp_t;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
typedef struct pdcp_mbms_s {
|
||||
boolean_t instanciated_instance;
|
||||
rb_id_t rb_id;
|
||||
@@ -232,7 +232,7 @@ boolean_t pdcp_data_req(
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
unsigned char* const sdu_buffer,
|
||||
const pdcp_transmission_mode_t mode
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
@@ -292,15 +292,15 @@ void rrc_pdcp_config_req (
|
||||
*/
|
||||
boolean_t rrc_pdcp_config_asn1_req (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
SRB_ToAddModList_t *const srb2add_list,
|
||||
DRB_ToAddModList_t *const drb2add_list,
|
||||
DRB_ToReleaseList_t *const drb2release_list,
|
||||
LTE_SRB_ToAddModList_t *const srb2add_list,
|
||||
LTE_DRB_ToAddModList_t *const drb2add_list,
|
||||
LTE_DRB_ToReleaseList_t *const drb2release_list,
|
||||
const uint8_t security_modeP,
|
||||
uint8_t *const kRRCenc,
|
||||
uint8_t *const kRRCint,
|
||||
uint8_t *const kUPenc
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,PMCH_InfoList_r9_t *pmch_InfoList_r9
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9
|
||||
#endif
|
||||
,rb_id_t *const defaultDRB
|
||||
);
|
||||
@@ -404,7 +404,7 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
@@ -415,7 +415,7 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
@@ -429,7 +429,7 @@ struct pdcp_netlink_element_s {
|
||||
};
|
||||
|
||||
//TTN for D2D (PC5S)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#define PDCP_SOCKET_PORT_NO 9999 //temporary value
|
||||
#define PC5_SIGNALLING_PAYLOAD_SIZE 100 //should be updated with a correct value
|
||||
int pdcp_pc5_sockfd;
|
||||
@@ -499,9 +499,9 @@ pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
|
||||
rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
|
||||
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
|
||||
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
#endif
|
||||
sdu_size_t pdcp_output_sdu_bytes_to_write;
|
||||
sdu_size_t pdcp_output_header_bytes_to_write;
|
||||
|
||||
@@ -178,7 +178,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
|
||||
LOG_D(PDCP,"Sending to GTPV1U %d bytes\n", ((pdcp_data_ind_header_t *)(sdu_p->data))->data_size);
|
||||
gtpv1u_new_data_req(
|
||||
ctxt_pP->module_id, //gtpv1u_data_t *gtpv1u_data_p,
|
||||
ctxt_pP->rnti,//rb_id/maxDRB, TO DO UE ID
|
||||
ctxt_pP->rnti,//rb_id/LTE_maxDRB, TO DO UE ID
|
||||
((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id + 4,
|
||||
&(((uint8_t *) sdu_p->data)[sizeof (pdcp_data_ind_header_t)]),
|
||||
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size,
|
||||
@@ -202,7 +202,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
|
||||
cont = 0;
|
||||
|
||||
//TTN - for D2D (PC5S)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
sidelink_pc5s_element *sl_pc5s_msg_recv = NULL;
|
||||
char send_buf[BUFSIZE];
|
||||
int rb_id = ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id;
|
||||
@@ -452,7 +452,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pdcp_data_req(&ctxt, SRB_FLAG_NO, rab_id, RLC_MUI_UNDEFINED,
|
||||
RLC_SDU_CONFIRM_NO, len, (unsigned char *)nl_rx_buf,
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -488,7 +488,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pdcp_t* pdcp_p = NULL;
|
||||
|
||||
//TTN for D2D (PC5S)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int prose_addr_len;
|
||||
char send_buf[BUFSIZE], receive_buf[BUFSIZE];
|
||||
//int optval;
|
||||
@@ -509,7 +509,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
|
||||
while (pdcp_netlink_dequeue_element(ctxt_pP, &data_p) != 0) {
|
||||
DevAssert(data_p != NULL);
|
||||
rab_id = data_p->pdcp_read_header.rb_id % maxDRB;
|
||||
rab_id = data_p->pdcp_read_header.rb_id % LTE_maxDRB;
|
||||
// ctxt_pP->rnti is NOT_A_RNTI
|
||||
ctxt_cpy.rnti = pdcp_module_id_to_rnti[ctxt_cpy.module_id][data_p->pdcp_read_header.inst];
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_cpy.rnti, ctxt_pP->enb_flag, rab_id, SRB_FLAG_NO);
|
||||
@@ -526,7 +526,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
|
||||
CHECK_CTXT_ARGS(&ctxt_cpy);
|
||||
|
||||
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
|
||||
AssertFatal (rab_id < LTE_maxDRB, "RB id is too high (%u/%d)!\n", rab_id, LTE_maxDRB);
|
||||
|
||||
if (rab_id != 0) {
|
||||
LOG_D(PDCP, "[FRAME %05d][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ "
|
||||
@@ -543,7 +543,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
if ((data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) /*TRAFFIC_IPV6_TYPE_MULTICAST */ ||
|
||||
(data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_MULTICAST) /*TRAFFIC_IPV4_TYPE_MULTICAST */ ||
|
||||
(data_p->pdcp_read_header.traffic_type == TRAFFIC_IPV4_TYPE_BROADCAST) /*TRAFFIC_IPV4_TYPE_BROADCAST */ ) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
PDCP_TRANSMISSION_MODE_TRANSPARENT;
|
||||
#else
|
||||
pdcp_mode= PDCP_TRANSMISSION_MODE_DATA;
|
||||
@@ -561,13 +561,13 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
#endif
|
||||
pdcp_data_req(&ctxt_cpy,
|
||||
SRB_FLAG_NO,
|
||||
rab_id % maxDRB,
|
||||
rab_id % LTE_maxDRB,
|
||||
RLC_MUI_UNDEFINED,
|
||||
RLC_SDU_CONFIRM_NO,
|
||||
data_p->pdcp_read_header.data_size,
|
||||
data_p->data,
|
||||
pdcp_mode
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -595,7 +595,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
data_p->pdcp_read_header.data_size,
|
||||
data_p->data,
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -612,7 +612,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
data_p->pdcp_read_header.data_size,
|
||||
data_p->data,
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -632,7 +632,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
|
||||
|
||||
//TTN for D2D (PC5S)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
prose_addr_len = sizeof(prose_pdcp_addr);
|
||||
// receive a message from ProSe App
|
||||
memset(receive_buf, 0, BUFSIZE);
|
||||
@@ -680,18 +680,18 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
ctxt.frame = ctxt_cpy.frame;
|
||||
ctxt.enb_flag = ENB_FLAG_YES;
|
||||
ctxt.module_id = pc5s_header.inst + oai_emulation.info.first_enb_local;
|
||||
ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id ][pc5s_header->rb_id / maxDRB + oai_emulation.info.first_ue_local];
|
||||
rab_id = pc5s_header->rb_id % maxDRB;
|
||||
ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id ][pc5s_header->rb_id / LTE_maxDRB + oai_emulation.info.first_ue_local];
|
||||
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
||||
} else {
|
||||
ctxt.frame = ctxt_cpy.frame;
|
||||
ctxt.enb_flag = ENB_FLAG_NO;
|
||||
ctxt.module_id = pc5s_header->inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
|
||||
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
||||
rab_id = pc5s_header->rb_id % maxDRB;
|
||||
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
||||
}
|
||||
|
||||
CHECK_CTXT_ARGS(&ctxt);
|
||||
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
|
||||
AssertFatal (rab_id < LTE_maxDRB, "RB id is too high (%u/%d)!\n", rab_id, LTE_maxDRB);
|
||||
/*LGpdcp_read_header.inst = (pc5s_header.inst >= oai_emulation.info.nb_enb_local) ? \
|
||||
pc5s_header.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local :
|
||||
pc5s_header.inst + oai_emulation.info.first_enb_local;*/
|
||||
@@ -706,11 +706,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
|
||||
if (ctxt_cpy.enb_flag) {
|
||||
ctxt.module_id = 0;
|
||||
rab_id = pc5s_header->rb_id % maxDRB;
|
||||
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
||||
ctxt.rnti = pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index];
|
||||
} else {
|
||||
ctxt.module_id = 0;
|
||||
rab_id = pc5s_header->rb_id % maxDRB;
|
||||
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
||||
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
||||
}
|
||||
#endif
|
||||
@@ -726,7 +726,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n",
|
||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
||||
} else {
|
||||
rab_id = rab_id % maxDRB;
|
||||
rab_id = rab_id % LTE_maxDRB;
|
||||
LOG_I(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)\n",
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||
@@ -774,7 +774,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pc5s_header->data_size,
|
||||
(unsigned char *)receive_buf,
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,&pc5s_header->sourceL2Id
|
||||
,&pc5s_header->destinationL2Id
|
||||
#endif
|
||||
@@ -832,7 +832,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pc5s_header->data_size,
|
||||
(unsigned char *)receive_buf,
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,&pc5s_header->sourceL2Id
|
||||
,&pc5s_header->destinationL2Id
|
||||
#endif
|
||||
@@ -897,18 +897,18 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
ctxt.frame = ctxt_cpy.frame;
|
||||
ctxt.enb_flag = ENB_FLAG_YES;
|
||||
ctxt.module_id = pdcp_read_header_g.inst + oai_emulation.info.first_enb_local;
|
||||
ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id ][pdcp_read_header_g.rb_id / maxDRB + oai_emulation.info.first_ue_local];
|
||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||
ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id ][pdcp_read_header_g.rb_id / LTE_maxDRB + oai_emulation.info.first_ue_local];
|
||||
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
||||
} else {
|
||||
ctxt.frame = ctxt_cpy.frame;
|
||||
ctxt.enb_flag = ENB_FLAG_NO;
|
||||
ctxt.module_id = pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
|
||||
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
||||
}
|
||||
|
||||
CHECK_CTXT_ARGS(&ctxt);
|
||||
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
|
||||
AssertFatal (rab_id < LTE_maxDRB, "RB id is too high (%u/%d)!\n", rab_id, LTE_maxDRB);
|
||||
/*LGpdcp_read_header.inst = (pdcp_read_header_g.inst >= oai_emulation.info.nb_enb_local) ? \
|
||||
pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local :
|
||||
pdcp_read_header_g.inst + oai_emulation.info.first_enb_local;*/
|
||||
@@ -924,11 +924,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
#endif
|
||||
if (ctxt_cpy.enb_flag) {
|
||||
ctxt.module_id = 0;
|
||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||
ctxt.rnti = pdcp_eNB_UE_instance_to_rnti[pdcp_read_header_g.rb_id / maxDRB];
|
||||
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
||||
ctxt.rnti = pdcp_eNB_UE_instance_to_rnti[pdcp_read_header_g.rb_id / LTE_maxDRB];
|
||||
} else {
|
||||
ctxt.module_id = 0;
|
||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
||||
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
||||
}
|
||||
|
||||
@@ -936,7 +936,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
|
||||
if (ctxt.enb_flag) {
|
||||
if (rab_id != 0) {
|
||||
rab_id = rab_id % maxDRB;
|
||||
rab_id = rab_id % LTE_maxDRB;
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
|
||||
|
||||
@@ -979,7 +979,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pdcp_read_header_g.data_size,
|
||||
(unsigned char *)NLMSG_DATA(nas_nlh_rx),
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -1016,7 +1016,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pdcp_read_header_g.data_size,
|
||||
(unsigned char *)NLMSG_DATA(nas_nlh_rx),
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
@@ -1033,7 +1033,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%d)\n",
|
||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
||||
} else {
|
||||
rab_id = rab_id % maxDRB;
|
||||
rab_id = rab_id % LTE_maxDRB;
|
||||
LOG_D(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)\n",
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||
@@ -1082,7 +1082,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pdcp_read_header_g.data_size,
|
||||
(unsigned char *)NLMSG_DATA(nas_nlh_rx),
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,&pdcp_read_header_g.sourceL2Id
|
||||
,&pdcp_read_header_g.destinationL2Id
|
||||
#endif
|
||||
@@ -1140,7 +1140,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
pdcp_read_header_g.data_size,
|
||||
(unsigned char *)NLMSG_DATA(nas_nlh_rx),
|
||||
PDCP_TRANSMISSION_MODE_DATA
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,&pdcp_read_header_g.sourceL2Id
|
||||
,&pdcp_read_header_g.destinationL2Id
|
||||
#endif
|
||||
@@ -1188,7 +1188,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
|
||||
}
|
||||
|
||||
//TTN for D2D (PC5S)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void
|
||||
pdcp_pc5_socket_init() {
|
||||
|
||||
@@ -53,7 +53,7 @@ extern int reception_from_rohc_bs(void);
|
||||
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane);
|
||||
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer,
|
||||
uint8_t is_data_pdu
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
|
||||
@@ -62,7 +62,7 @@ uint32_t pdcp_get_next_count_tx(
|
||||
/* 5 bits length SN */
|
||||
count = ((pdcp_pP->tx_hfn << 5) | (pdcp_sn & 0x001F));
|
||||
} else {
|
||||
if (pdcp_pP->seq_num_size == PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
if (pdcp_pP->seq_num_size == LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
count = ((pdcp_pP->tx_hfn << 7) | (pdcp_sn & 0x07F));
|
||||
} else { /*Default is the 12 bits length SN */
|
||||
count = ((pdcp_pP->tx_hfn << 12) | (pdcp_sn & 0x0FFF));
|
||||
@@ -88,7 +88,7 @@ uint32_t pdcp_get_next_count_rx(
|
||||
/* 5 bits length SN */
|
||||
count = (((pdcp_pP->rx_hfn + pdcp_pP->rx_hfn_offset) << 5) | (pdcp_sn & 0x001F));
|
||||
} else {
|
||||
if (pdcp_pP->seq_num_size == PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
if (pdcp_pP->seq_num_size == LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len7bits) {
|
||||
/* 7 bits length SN */
|
||||
count = (((pdcp_pP->rx_hfn + pdcp_pP->rx_hfn_offset) << 7) | (pdcp_sn & 0x007F));
|
||||
} else { // default
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#include "list.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "UL-AM-RLC.h"
|
||||
#include "DL-AM-RLC.h"
|
||||
#include "LTE_UL-AM-RLC.h"
|
||||
#include "LTE_DL-AM-RLC.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -237,24 +237,24 @@ config_req_rlc_am (
|
||||
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,l_rlc_p));
|
||||
}
|
||||
}
|
||||
uint16_t pollPDU_tab[PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,RLC_AM_POLL_PDU_INFINITE}; //PollPDU_pInfinity is chosen to 0xFFFF for now
|
||||
uint32_t maxRetxThreshold_tab[UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32};
|
||||
uint32_t pollByte_tab[PollByte_spare1]= {25000,50000,75000,100000,125000,250000,375000,500000,750000,1000000,1250000,1500000,2000000,3000000,RLC_AM_POLL_BYTE_INFINITE}; // PollByte_kBinfinity is chosen to 0xFFFFFFFF for now
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t PollRetransmit_tab[T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000};
|
||||
uint16_t pollPDU_tab[LTE_PollPDU_pInfinity+1]= {4,8,16,32,64,128,256,RLC_AM_POLL_PDU_INFINITE}; //PollPDU_pInfinity is chosen to 0xFFFF for now
|
||||
uint32_t maxRetxThreshold_tab[LTE_UL_AM_RLC__maxRetxThreshold_t32+1]= {1,2,3,4,6,8,16,32};
|
||||
uint32_t pollByte_tab[LTE_PollByte_spare1]= {25000,50000,75000,100000,125000,250000,375000,500000,750000,1000000,1250000,1500000,2000000,3000000,RLC_AM_POLL_BYTE_INFINITE}; // PollByte_kBinfinity is chosen to 0xFFFFFFFF for now
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t PollRetransmit_tab[LTE_T_PollRetransmit_spare5]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,2000,4000};
|
||||
uint32_t am_t_Reordering_tab[32]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
|
||||
uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400};
|
||||
uint32_t t_StatusProhibit_tab[LTE_T_StatusProhibit_spare2]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500,800,1000,1200,1600,2000,2400};
|
||||
#else
|
||||
uint32_t PollRetransmit_tab[T_PollRetransmit_spare9]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
|
||||
uint32_t am_t_Reordering_tab[T_Reordering_spare1]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
||||
uint32_t t_StatusProhibit_tab[T_StatusProhibit_spare8]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
|
||||
uint32_t PollRetransmit_tab[LTE_T_PollRetransmit_spare9]= {5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
|
||||
uint32_t am_t_Reordering_tab[LTE_T_Reordering_spare1]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
||||
uint32_t t_StatusProhibit_tab[LTE_T_StatusProhibit_spare8]= {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,300,350,400,450,500};
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void config_req_rlc_am_asn1 (
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const struct RLC_Config__am * const config_am_pP,
|
||||
const struct LTE_RLC_Config__am * const config_am_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP)
|
||||
{
|
||||
@@ -268,17 +268,17 @@ void config_req_rlc_am_asn1 (
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
l_rlc_p = &rlc_union_p->rlc.am;
|
||||
|
||||
if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= UL_AM_RLC__maxRetxThreshold_t32) &&
|
||||
(config_am_pP->ul_AM_RLC.pollPDU<=PollPDU_pInfinity) &&
|
||||
(config_am_pP->ul_AM_RLC.pollByte<PollByte_spare1) &&
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(config_am_pP->ul_AM_RLC.t_PollRetransmit<T_PollRetransmit_spare5) &&
|
||||
if ((config_am_pP->ul_AM_RLC.maxRetxThreshold <= LTE_UL_AM_RLC__maxRetxThreshold_t32) &&
|
||||
(config_am_pP->ul_AM_RLC.pollPDU<=LTE_PollPDU_pInfinity) &&
|
||||
(config_am_pP->ul_AM_RLC.pollByte<LTE_PollByte_spare1) &&
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(config_am_pP->ul_AM_RLC.t_PollRetransmit<LTE_T_PollRetransmit_spare5) &&
|
||||
(config_am_pP->dl_AM_RLC.t_Reordering<32) &&
|
||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare2) ) {
|
||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<LTE_T_StatusProhibit_spare2) ) {
|
||||
#else
|
||||
(config_am_pP->ul_AM_RLC.t_PollRetransmit<T_PollRetransmit_spare9) &&
|
||||
(config_am_pP->dl_AM_RLC.t_Reordering<T_Reordering_spare1) &&
|
||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ) {
|
||||
(config_am_pP->ul_AM_RLC.t_PollRetransmitLTE_T_PollRetransmit_spare9) &&
|
||||
(config_am_pP->dl_AM_RLC.t_Reordering<LTE_T_Reordering_spare1) &&
|
||||
(config_am_pP->dl_AM_RLC.t_StatusProhibit<LTE_T_StatusProhibit_spare8) ) {
|
||||
#endif
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
# include "rlc_am_rx_list.h"
|
||||
# include "rlc_am_reassembly.h"
|
||||
# include "rlc_am_init.h"
|
||||
# include "RLC-Config.h"
|
||||
# include "LTE_RLC-Config.h"
|
||||
# include "assertions.h"
|
||||
//# include "rlc_am_test.h"
|
||||
|
||||
@@ -138,7 +138,7 @@ config_req_rlc_am (
|
||||
void config_req_rlc_am_asn1 (
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
const srb_flag_t srb_flagP,
|
||||
const struct RLC_Config__am * const config_amP,
|
||||
const struct LTE_RLC_Config__am * const config_amP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include "rlc_um_control_primitives.h"
|
||||
#include "T-Reordering.h"
|
||||
#include "LTE_T-Reordering.h"
|
||||
#include "msc.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -78,10 +78,10 @@ void config_req_rlc_um (
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
const uint32_t t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
|
||||
#else
|
||||
const uint32_t t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
||||
const uint32_t t_Reordering_tab[LTE_T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
|
||||
#endif
|
||||
|
||||
void config_req_rlc_um_asn1 (
|
||||
@@ -90,11 +90,11 @@ void config_req_rlc_um_asn1 (
|
||||
const MBMS_flag_t mbms_flagP,
|
||||
const mbms_session_id_t mbms_session_idP,
|
||||
const mbms_service_id_t mbms_service_idP,
|
||||
const UL_UM_RLC_t * const ul_rlc_pP,
|
||||
const DL_UM_RLC_t * const dl_rlc_pP,
|
||||
const LTE_UL_UM_RLC_t * const ul_rlc_pP,
|
||||
const LTE_DL_UM_RLC_t * const dl_rlc_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -108,7 +108,7 @@ void config_req_rlc_um_asn1 (
|
||||
hash_key_t key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
hashtable_rc_t h_rc;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbms_flagP) {
|
||||
//AssertFatal(dl_rlc_pP, "No RLC UM DL config");
|
||||
@@ -173,11 +173,11 @@ void config_req_rlc_um_asn1 (
|
||||
|
||||
if (ul_rlc_pP != NULL) {
|
||||
switch (ul_rlc_pP->sn_FieldLength) {
|
||||
case SN_FieldLength_size5:
|
||||
case LTE_SN_FieldLength_size5:
|
||||
ul_sn_FieldLength = 5;
|
||||
break;
|
||||
|
||||
case SN_FieldLength_size10:
|
||||
case LTE_SN_FieldLength_size10:
|
||||
ul_sn_FieldLength = 10;
|
||||
break;
|
||||
|
||||
@@ -201,11 +201,11 @@ void config_req_rlc_um_asn1 (
|
||||
|
||||
if (dl_rlc_pP != NULL) {
|
||||
switch (dl_rlc_pP->sn_FieldLength) {
|
||||
case SN_FieldLength_size5:
|
||||
case LTE_SN_FieldLength_size5:
|
||||
dl_sn_FieldLength = 5;
|
||||
break;
|
||||
|
||||
case SN_FieldLength_size10:
|
||||
case LTE_SN_FieldLength_size10:
|
||||
dl_sn_FieldLength = 10;
|
||||
break;
|
||||
|
||||
@@ -226,7 +226,7 @@ void config_req_rlc_um_asn1 (
|
||||
return;
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (dl_rlc_pP->t_Reordering<32) {
|
||||
#else
|
||||
if (dl_rlc_pP->t_Reordering<T_Reordering_spare1) {
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
# include "rlc_um_structs.h"
|
||||
# include "rlc_um_constants.h"
|
||||
# include "platform_types.h"
|
||||
# include "DL-UM-RLC.h"
|
||||
# include "UL-UM-RLC.h"
|
||||
# include "LTE_DL-UM-RLC.h"
|
||||
# include "LTE_UL-UM-RLC.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
typedef volatile struct {
|
||||
@@ -97,11 +97,11 @@ void config_req_rlc_um_asn1 (
|
||||
const MBMS_flag_t mbms_flagP,
|
||||
const mbms_session_id_t mbms_session_idP,
|
||||
const mbms_service_id_t mbms_service_idP,
|
||||
const UL_UM_RLC_t * const ul_rlc_pP,
|
||||
const DL_UM_RLC_t * const dl_rlc_pP,
|
||||
const LTE_UL_UM_RLC_t * const ul_rlc_pP,
|
||||
const LTE_DL_UM_RLC_t * const dl_rlc_pP,
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
|
||||
@@ -320,7 +320,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
confirm_t confirmP,
|
||||
sdu_size_t sdu_sizeP,
|
||||
mem_block_t *sdu_pP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
@@ -333,7 +333,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_rc;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
rlc_mbms_id_t *mbms_id_p = NULL;
|
||||
logical_chan_id_t log_ch_id = 0;
|
||||
#endif
|
||||
@@ -347,7 +347,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
sdu_sizeP,
|
||||
sdu_pP);
|
||||
#endif
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#else
|
||||
AssertFatal(MBMS_flagP == 0, "MBMS_flagP %u", MBMS_flagP);
|
||||
#endif
|
||||
@@ -383,13 +383,13 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
|
||||
#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0);
|
||||
#endif
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (MBMS_flagP == TRUE) {
|
||||
if (ctxt_pP->enb_flag) {
|
||||
@@ -534,7 +534,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
} else { /* MBMS_flag != 0 */
|
||||
// LOG_I(RLC,"DUY rlc_data_req: mbms_rb_id in RLC instant is: %d\n", mbms_rb_id);
|
||||
if (sdu_pP != NULL) {
|
||||
@@ -649,7 +649,7 @@ rlc_module_init (void)
|
||||
rlc_rrc_data_ind = NULL;
|
||||
rlc_rrc_data_conf = NULL;
|
||||
|
||||
rlc_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, rb_free_rlc_union);
|
||||
rlc_coll_p = hashtable_create ((LTE_maxDRB + 2) * 16, NULL, rb_free_rlc_union);
|
||||
//AssertFatal(rlc_coll_p != NULL, "UNRECOVERABLE error, RLC hashtable_create failed");
|
||||
if(rlc_coll_p == NULL) {
|
||||
LOG_E(RLC, "UNRECOVERABLE error, RLC hashtable_create failed\n");
|
||||
@@ -657,7 +657,7 @@ rlc_module_init (void)
|
||||
}
|
||||
|
||||
for (module_id1=0; module_id1 < MAX_MOBILES_PER_ENB; module_id1++) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
|
||||
rlc_mbms_lcid2service_session_id_ue[module_id1][k].service_id = 0;
|
||||
@@ -672,7 +672,7 @@ rlc_module_init (void)
|
||||
}
|
||||
|
||||
for (module_id1=0; module_id1 < NUMBER_OF_eNB_MAX; module_id1++) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
|
||||
rlc_mbms_lcid2service_session_id_eNB[module_id1][k].service_id = 0;
|
||||
|
||||
+24
-24
@@ -44,19 +44,19 @@
|
||||
# include "rlc_am_structs.h"
|
||||
# include "rlc_tm_structs.h"
|
||||
# include "rlc_um_structs.h"
|
||||
# include "asn_constant.h"
|
||||
# include "LTE_asn_constant.h"
|
||||
# include "common/utils/LOG/log.h"
|
||||
# include "mem_block.h"
|
||||
//# include "PHY/defs.h"
|
||||
# include "RLC-Config.h"
|
||||
# include "DRB-ToAddMod.h"
|
||||
# include "DRB-ToAddModList.h"
|
||||
# include "SRB-ToAddMod.h"
|
||||
# include "SRB-ToAddModList.h"
|
||||
# include "DRB-ToReleaseList.h"
|
||||
# include "LTE_RLC-Config.h"
|
||||
# include "LTE_DRB-ToAddMod.h"
|
||||
# include "LTE_DRB-ToAddModList.h"
|
||||
# include "LTE_SRB-ToAddMod.h"
|
||||
# include "LTE_SRB-ToAddModList.h"
|
||||
# include "LTE_DRB-ToReleaseList.h"
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
|
||||
typedef uint64_t hash_key_t;
|
||||
@@ -132,8 +132,8 @@ typedef struct {
|
||||
// PRIVATE INTERNALS OF RLC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define RLC_MAX_MBMS_LC (maxSessionPerPMCH * maxServiceCount)
|
||||
#define RLC_MAX_LC ((max_val_DRB_Identity+1)* MAX_MOBILES_PER_ENB)
|
||||
#define RLC_MAX_MBMS_LC (LTE_maxSessionPerPMCH * LTE_maxServiceCount)
|
||||
#define RLC_MAX_LC ((max_val_LTE_DRB_Identity+1)* MAX_MOBILES_PER_ENB)
|
||||
|
||||
void (*rlc_rrc_data_ind)(
|
||||
const protocol_ctxt_t* const ctxtP,
|
||||
@@ -183,7 +183,7 @@ typedef struct rlc_mbms_id_s {
|
||||
mbms_session_id_t session_id;
|
||||
} rlc_mbms_id_t;
|
||||
|
||||
#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
# if !defined(maxServiceCount)
|
||||
//unused arrays rlc_mbms_array_ue rlc_mbms_array_eNB
|
||||
# define maxServiceCount 1
|
||||
@@ -285,7 +285,7 @@ struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t, num_tb_t, crc_t
|
||||
//-----------------------------------------------------------------------------
|
||||
// PUBLIC INTERFACE WITH RRC
|
||||
//-----------------------------------------------------------------------------
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const SRB_ToAddMod_t* const srb2addmod, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP, const PMCH_InfoList_r9_t * const pmch_info_listP)
|
||||
* \brief Function for RRC to configure a Radio Bearer.
|
||||
* \param[in] ctxtP Running context.
|
||||
@@ -297,10 +297,10 @@ struct mac_data_ind mac_rlc_deserialize_tb (char*, tb_size_t, num_tb_t, crc_t
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||
const protocol_ctxt_t* const,
|
||||
const SRB_ToAddModList_t* const ,
|
||||
const DRB_ToAddModList_t* const ,
|
||||
const DRB_ToReleaseList_t* const ,
|
||||
const PMCH_InfoList_r9_t * const pmch_info_listP ,
|
||||
const LTE_SRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToReleaseList_t* const ,
|
||||
const LTE_PMCH_InfoList_r9_t * const pmch_info_listP ,
|
||||
const uint32_t ,
|
||||
const uint32_t );
|
||||
#else
|
||||
@@ -314,9 +314,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||
*/
|
||||
rlc_op_status_t rrc_rlc_config_asn1_req (
|
||||
const protocol_ctxt_t* const,
|
||||
const SRB_ToAddModList_t* const ,
|
||||
const DRB_ToAddModList_t* const ,
|
||||
const DRB_ToReleaseList_t* const );
|
||||
const LTE_SRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToAddModList_t* const ,
|
||||
const LTE_DRB_ToReleaseList_t* const );
|
||||
#endif
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* const, const srb_fl
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -424,7 +424,7 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -459,7 +459,7 @@ void mac_rlc_data_ind (const module_id_t, const rnti_t, con
|
||||
* \return The maximum number of bytes that the RLC instance can send in the next transmission sequence.
|
||||
*/
|
||||
mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -514,7 +514,7 @@ rlc_op_status_t rlc_data_req (
|
||||
const confirm_t ,
|
||||
const sdu_size_t ,
|
||||
mem_block_t * const
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const
|
||||
,const uint32_t * const
|
||||
#endif
|
||||
|
||||
@@ -128,7 +128,7 @@ tbs_size_t mac_rlc_data_req(
|
||||
const logical_chan_id_t channel_idP,
|
||||
const tb_size_t tb_sizeP,
|
||||
char *buffer_pP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -180,7 +180,7 @@ tbs_size_t mac_rlc_data_req(
|
||||
}
|
||||
} else {
|
||||
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if ((sourceL2Id > 0) && (destinationL2Id > 0))
|
||||
key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
|
||||
#endif
|
||||
@@ -330,7 +330,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
const MBMS_flag_t MBMS_flagP,
|
||||
const logical_chan_id_t channel_idP,
|
||||
const tb_size_t tb_sizeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -363,7 +363,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
|
||||
key = RLC_COLL_KEY_MBMS_VALUE(module_idP, rntiP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||
} else {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if ((sourceL2Id > 0) && (destinationL2Id > 0)) {
|
||||
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
|
||||
} else
|
||||
|
||||
@@ -41,7 +41,7 @@ rlc_op_status_t mpls_rlc_data_req (
|
||||
//-----------------------------------------------------------------------------
|
||||
// third arg should be set to 1 or 0
|
||||
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -33,25 +33,25 @@
|
||||
#include "rlc_um.h"
|
||||
#include "rlc_tm.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "RLC-Config.h"
|
||||
#include "DRB-ToAddMod.h"
|
||||
#include "DRB-ToAddModList.h"
|
||||
#include "SRB-ToAddMod.h"
|
||||
#include "SRB-ToAddModList.h"
|
||||
#include "DL-UM-RLC.h"
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#include "LTE_RLC-Config.h"
|
||||
#include "LTE_DRB-ToAddMod.h"
|
||||
#include "LTE_DRB-ToAddModList.h"
|
||||
#include "LTE_SRB-ToAddMod.h"
|
||||
#include "LTE_SRB-ToAddModList.h"
|
||||
#include "LTE_DL-UM-RLC.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "assertions.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP,
|
||||
const SRB_ToAddModList_t * const srb2add_listP,
|
||||
const DRB_ToAddModList_t * const drb2add_listP,
|
||||
const DRB_ToReleaseList_t * const drb2release_listP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,const PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP
|
||||
const LTE_SRB_ToAddModList_t * const srb2add_listP,
|
||||
const LTE_DRB_ToAddModList_t * const drb2add_listP,
|
||||
const LTE_DRB_ToReleaseList_t * const drb2release_listP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP
|
||||
,const uint32_t sourceL2Id
|
||||
,const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -60,21 +60,21 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
//-----------------------------------------------------------------------------
|
||||
rb_id_t rb_id = 0;
|
||||
logical_chan_id_t lc_id = 0;
|
||||
DRB_Identity_t drb_id = 0;
|
||||
DRB_Identity_t* pdrb_id = NULL;
|
||||
LTE_DRB_Identity_t drb_id = 0;
|
||||
LTE_DRB_Identity_t* pdrb_id = NULL;
|
||||
long int cnt = 0;
|
||||
const SRB_ToAddMod_t *srb_toaddmod_p = NULL;
|
||||
const DRB_ToAddMod_t *drb_toaddmod_p = NULL;
|
||||
const LTE_SRB_ToAddMod_t *srb_toaddmod_p = NULL;
|
||||
const LTE_DRB_ToAddMod_t *drb_toaddmod_p = NULL;
|
||||
rlc_union_t *rlc_union_p = NULL;
|
||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_rc;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
int i, j;
|
||||
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
|
||||
MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
|
||||
LTE_MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
|
||||
LTE_MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
|
||||
mbms_session_id_t mbms_session_id;
|
||||
mbms_service_id_t mbms_service_id;
|
||||
DL_UM_RLC_t dl_um_rlc;
|
||||
LTE_DL_UM_RLC_t dl_um_rlc;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -97,17 +97,17 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
if (srb_toaddmod_p->rlc_Config) {
|
||||
switch (srb_toaddmod_p->rlc_Config->present) {
|
||||
case SRB_ToAddMod__rlc_Config_PR_NOTHING:
|
||||
case LTE_SRB_ToAddMod__rlc_Config_PR_NOTHING:
|
||||
break;
|
||||
|
||||
case SRB_ToAddMod__rlc_Config_PR_explicitValue:
|
||||
case LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue:
|
||||
switch (srb_toaddmod_p->rlc_Config->choice.explicitValue.present) {
|
||||
case RLC_Config_PR_NOTHING:
|
||||
case LTE_RLC_Config_PR_NOTHING:
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_am:
|
||||
case LTE_RLC_Config_PR_am:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -125,9 +125,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_um_Bi_Directional:
|
||||
case LTE_RLC_Config_PR_um_Bi_Directional:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -141,7 +141,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.ul_UM_RLC,
|
||||
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Bi_Directional.dl_UM_RLC,
|
||||
rb_id, lc_id
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -153,9 +153,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_um_Uni_Directional_UL:
|
||||
case LTE_RLC_Config_PR_um_Uni_Directional_UL:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -169,7 +169,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_UL.ul_UM_RLC,
|
||||
NULL,
|
||||
rb_id, lc_id
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -181,9 +181,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_um_Uni_Directional_DL:
|
||||
case LTE_RLC_Config_PR_um_Uni_Directional_DL:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_UM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -197,7 +197,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
NULL,
|
||||
&srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.um_Uni_Directional_DL.dl_UM_RLC,
|
||||
rb_id, lc_id
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -218,19 +218,19 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
break;
|
||||
|
||||
case SRB_ToAddMod__rlc_Config_PR_defaultValue:
|
||||
case LTE_SRB_ToAddMod__rlc_Config_PR_defaultValue:
|
||||
//#warning TO DO SRB_ToAddMod__rlc_Config_PR_defaultValue
|
||||
LOG_I(RRC, "RLC SRB1 is default value !!\n");
|
||||
struct RLC_Config__am * config_am_pP = &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am;
|
||||
config_am_pP->dl_AM_RLC.t_Reordering = T_Reordering_ms35;
|
||||
config_am_pP->dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms0;
|
||||
config_am_pP->ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms45;
|
||||
config_am_pP->ul_AM_RLC.pollPDU = PollPDU_pInfinity;
|
||||
config_am_pP->ul_AM_RLC.pollByte = PollByte_kBinfinity;
|
||||
config_am_pP->ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t4;
|
||||
struct LTE_RLC_Config__am * config_am_pP = &srb_toaddmod_p->rlc_Config->choice.explicitValue.choice.am;
|
||||
config_am_pP->dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
|
||||
config_am_pP->dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms0;
|
||||
config_am_pP->ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms45;
|
||||
config_am_pP->ul_AM_RLC.pollPDU = LTE_PollPDU_pInfinity;
|
||||
config_am_pP->ul_AM_RLC.pollByte = LTE_PollByte_kBinfinity;
|
||||
config_am_pP->ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t4;
|
||||
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, rb_id, lc_id, RLC_MODE_AM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -294,12 +294,12 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
if (drb_toaddmod_p->rlc_Config) {
|
||||
|
||||
switch (drb_toaddmod_p->rlc_Config->present) {
|
||||
case RLC_Config_PR_NOTHING:
|
||||
case LTE_RLC_Config_PR_NOTHING:
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_am:
|
||||
case LTE_RLC_Config_PR_am:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_AM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -313,9 +313,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_um_Bi_Directional:
|
||||
case LTE_RLC_Config_PR_um_Bi_Directional:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,sourceL2Id,
|
||||
destinationL2Id
|
||||
#endif
|
||||
@@ -329,7 +329,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
&drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.ul_UM_RLC,
|
||||
&drb_toaddmod_p->rlc_Config->choice.um_Bi_Directional.dl_UM_RLC,
|
||||
drb_id, lc_id
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,sourceL2Id,
|
||||
destinationL2Id
|
||||
#endif
|
||||
@@ -338,9 +338,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_um_Uni_Directional_UL:
|
||||
case LTE_RLC_Config_PR_um_Uni_Directional_UL:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -354,7 +354,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
&drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_UL.ul_UM_RLC,
|
||||
NULL,
|
||||
drb_id, lc_id
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -362,9 +362,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
break;
|
||||
|
||||
case RLC_Config_PR_um_Uni_Directional_DL:
|
||||
case LTE_RLC_Config_PR_um_Uni_Directional_DL:
|
||||
if (rrc_rlc_add_rlc (ctxt_pP, SRB_FLAG_NO, MBMS_FLAG_NO, drb_id, lc_id, RLC_MODE_UM
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -378,7 +378,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
NULL,
|
||||
&drb_toaddmod_p->rlc_Config->choice.um_Uni_Directional_DL.dl_UM_RLC,
|
||||
drb_id, lc_id
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -406,7 +406,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
}
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (pmch_InfoList_r9_pP != NULL) {
|
||||
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
|
||||
@@ -424,13 +424,13 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
|
||||
// can set the mch_id = i
|
||||
if (ctxt_pP->enb_flag) {
|
||||
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id;//+ (maxDRB + 3) * MAX_MOBILES_PER_ENB; // 1
|
||||
rb_id = (mbms_service_id * LTE_maxSessionPerPMCH ) + mbms_session_id;//+ (LTE_maxDRB + 3) * MAX_MOBILES_PER_ENB; // 1
|
||||
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lc_id].service_id = mbms_service_id;
|
||||
rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lc_id].session_id = mbms_session_id;
|
||||
rlc_mbms_enb_set_lcid_by_rb_id(ctxt_pP->module_id,rb_id,lc_id);
|
||||
|
||||
} else {
|
||||
rb_id = (mbms_service_id * maxSessionPerPMCH ) + mbms_session_id; // + (maxDRB + 3); // 15
|
||||
rb_id = (mbms_service_id * LTE_maxSessionPerPMCH ) + mbms_session_id; // + (LTE_maxDRB + 3); // 15
|
||||
rlc_mbms_lcid2service_session_id_ue[ctxt_pP->module_id][lc_id].service_id = mbms_service_id;
|
||||
rlc_mbms_lcid2service_session_id_ue[ctxt_pP->module_id][lc_id].session_id = mbms_session_id;
|
||||
rlc_mbms_ue_set_lcid_by_rb_id(ctxt_pP->module_id,rb_id,lc_id);
|
||||
@@ -461,8 +461,8 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
mbms_session_id,
|
||||
mbms_service_id
|
||||
);
|
||||
dl_um_rlc.sn_FieldLength = SN_FieldLength_size5;
|
||||
dl_um_rlc.t_Reordering = T_Reordering_ms0;
|
||||
dl_um_rlc.sn_FieldLength = LTE_SN_FieldLength_size5;
|
||||
dl_um_rlc.t_Reordering = LTE_T_Reordering_ms0;
|
||||
|
||||
config_req_rlc_um_asn1 (
|
||||
ctxt_pP,
|
||||
@@ -473,7 +473,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
||||
NULL,
|
||||
&dl_um_rlc,
|
||||
rb_id, lc_id
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
);
|
||||
@@ -536,7 +536,7 @@ rlc_op_status_t rrc_rlc_remove_ue (
|
||||
rb_id);
|
||||
}
|
||||
|
||||
for (rb_id = 1; rb_id <= maxDRB; rb_id++) {
|
||||
for (rb_id = 1; rb_id <= LTE_maxDRB; rb_id++) {
|
||||
rrc_rlc_remove_rlc(ctxt_pP,
|
||||
SRB_FLAG_NO,
|
||||
MBMS_FLAG_NO,
|
||||
@@ -560,14 +560,14 @@ rlc_op_status_t rrc_rlc_remove_rlc (
|
||||
hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_lcid_rc;
|
||||
rlc_union_t *rlc_union_p = NULL;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
rlc_mbms_id_t *mbms_id_p = NULL;
|
||||
#endif
|
||||
|
||||
/* for no gcc warnings */
|
||||
(void)lcid;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (MBMS_flagP == TRUE) {
|
||||
if (ctxt_pP->enb_flag) {
|
||||
@@ -658,7 +658,7 @@ rlc_union_t* rrc_rlc_add_rlc (
|
||||
const rb_id_t rb_idP,
|
||||
const logical_chan_id_t chan_idP,
|
||||
const rlc_mode_t rlc_modeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t sourceL2Id,
|
||||
const uint32_t destinationL2Id
|
||||
#endif
|
||||
@@ -671,7 +671,7 @@ rlc_union_t* rrc_rlc_add_rlc (
|
||||
hash_key_t key_lcid = HASHTABLE_NOT_A_KEY_VALUE;
|
||||
hashtable_rc_t h_lcid_rc;
|
||||
rlc_union_t *rlc_union_p = NULL;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
rlc_mbms_id_t *mbms_id_p = NULL;
|
||||
logical_chan_id_t lcid = 0;
|
||||
#endif
|
||||
@@ -691,7 +691,7 @@ rlc_union_t* rrc_rlc_add_rlc (
|
||||
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (MBMS_flagP == TRUE) {
|
||||
if (ctxt_pP->enb_flag) {
|
||||
@@ -741,7 +741,7 @@ rlc_union_t* rrc_rlc_add_rlc (
|
||||
h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
|
||||
|
||||
if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (MBMS_flagP == TRUE) {
|
||||
LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n",
|
||||
@@ -806,7 +806,7 @@ rlc_op_status_t rrc_rlc_config_req (
|
||||
|
||||
case CONFIG_ACTION_ADD:
|
||||
if (rrc_rlc_add_rlc(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, rb_idP, rlc_infoP.rlc_mode
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
0
|
||||
#endif
|
||||
@@ -885,7 +885,7 @@ rlc_op_status_t rrc_rlc_data_req (
|
||||
if (sdu != NULL) {
|
||||
memcpy (sdu->data, sduP, sdu_sizeP);
|
||||
return rlc_data_req(ctxt_pP, SRB_FLAG_YES, MBMS_flagP, rb_idP, muiP, confirmP, sdu_sizeP, sdu
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -248,7 +248,7 @@ ue_ip_common_ip2wireless(
|
||||
//---------------------------------------------------------------------------
|
||||
struct pdcp_data_req_header_s pdcph;
|
||||
ue_ip_priv_t *priv_p=netdev_priv(ue_ip_dev[instP]);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ipversion_t *ipv_p = NULL;
|
||||
unsigned int hard_header_len = 0;
|
||||
unsigned char *src_addr = 0;
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
@@ -101,7 +101,7 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
|
||||
@@ -33,13 +33,13 @@ void handle_rach(UL_IND_t *UL_info) {
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) {
|
||||
|
||||
AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n");
|
||||
|
||||
@@ -76,7 +76,7 @@ typedef struct{
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
//#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
|
||||
#include "PhysicalConfigDedicated-NB-r13.h"
|
||||
#include "LTE_PhysicalConfigDedicated-NB-r13.h"
|
||||
//#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
#include "openair2/COMMON/platform_types.h"
|
||||
//#include "openair1/SCHED/IF_Module_L1_primitives_NB_IoT.h"
|
||||
@@ -54,7 +54,7 @@ typedef struct{
|
||||
uint16_t npdcch_Offset_USS; //Alfa_offset (see TS 36.213 ch 16.6)
|
||||
|
||||
|
||||
ACK_NACK_NumRepetitions_NB_r13_t *ack_nack_numRepetitions_MSG4; //pointer to the first cell of a list of ack_nack_num_repetitions
|
||||
LTE_ACK_NACK_NumRepetitions_NB_r13_t *ack_nack_numRepetitions_MSG4; //pointer to the first cell of a list of ack_nack_num_repetitions
|
||||
|
||||
//ulPowerControlCommon (UE side)
|
||||
uint16_t p0_nominal_npusch;
|
||||
|
||||
@@ -71,7 +71,7 @@ mac_rrc_data_req(
|
||||
|
||||
eNB_RRC_INST *rrc;
|
||||
rrc_eNB_carrier_data_t *carrier;
|
||||
BCCH_BCH_Message_t *mib;
|
||||
LTE_BCCH_BCH_Message_t *mib;
|
||||
|
||||
|
||||
rrc = RC.rrc[Mod_idP];
|
||||
@@ -126,7 +126,7 @@ mac_rrc_data_req(
|
||||
if( (Srb_id & RAB_OFFSET ) == MIBCH) {
|
||||
|
||||
mib->message.systemFrameNumber.buf = &sfn;
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message,
|
||||
NULL,
|
||||
(void*)mib,
|
||||
carrier->MIB,
|
||||
@@ -178,7 +178,7 @@ mac_rrc_data_req(
|
||||
return (Sdu_size);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if((Srb_id & RAB_OFFSET) == MCCH) {
|
||||
if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS[mbsfn_sync_area].Active==0) {
|
||||
@@ -202,9 +202,9 @@ mac_rrc_data_req(
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
|
||||
}
|
||||
|
||||
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR){
|
||||
memcpy(&buffer_pP[0],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_BR,
|
||||
|
||||
@@ -63,7 +63,7 @@ mac_rrc_data_req_ue(
|
||||
LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(RRC,"[UE %d] Frame %d Filling SL DISCOVERY SRB_ID %d\n",Mod_idP,frameP,Srb_id);
|
||||
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size);
|
||||
|
||||
@@ -217,7 +217,7 @@ mac_rrc_data_ind_ue(
|
||||
}
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if ((srb_idP & RAB_OFFSET) == MCCH) {
|
||||
LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %d from eNB %d\n",
|
||||
@@ -253,7 +253,7 @@ mac_rrc_data_ind_ue(
|
||||
decode_SL_Discovery_Message(&ctxt, eNB_indexP, sduP, sdu_lenP);
|
||||
}
|
||||
|
||||
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#endif // #if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
return(0);
|
||||
|
||||
@@ -327,7 +327,7 @@ rrc_data_req_ue(
|
||||
sdu_sizeP,
|
||||
buffer_pP,
|
||||
modeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@
|
||||
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
||||
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include "SL-DestinationInfoList-r12.h"
|
||||
#include "LTE_SL-DestinationInfoList-r12.h"
|
||||
|
||||
/*
|
||||
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
|
||||
@@ -110,7 +110,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv);
|
||||
@param discTxResourceReq Pointer to number of discovery messages for discovery announcements for which UE requests E-UTRAN to assign dedicated resources
|
||||
@param mode Indicates different requests from upper layers
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq, SL_TRIGGER_t mode);
|
||||
uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, LTE_SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq, SL_TRIGGER_t mode);
|
||||
|
||||
/** \brief Generate an RRCConnectionSetupComplete UL-DCCH-Message (UE)
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
|
||||
@@ -149,8 +149,8 @@ do_RRCConnectionSetup(
|
||||
uint8_t* const buffer,
|
||||
const uint8_t transmission_mode,
|
||||
const uint8_t Transaction_id,
|
||||
SRB_ToAddModList_t** SRB_configList,
|
||||
struct PhysicalConfigDedicated** physicalConfigDedicated
|
||||
LTE_SRB_ToAddModList_t** SRB_configList,
|
||||
struct LTE_PhysicalConfigDedicated** physicalConfigDedicated
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -180,26 +180,26 @@ do_RRCConnectionReconfiguration(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
uint8_t Transaction_id,
|
||||
SRB_ToAddModList_t *SRB_list,
|
||||
DRB_ToAddModList_t *DRB_list,
|
||||
DRB_ToReleaseList_t *DRB_list2,
|
||||
struct SPS_Config *sps_Config,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
MeasObjectToAddModList_t *MeasObj_list,
|
||||
ReportConfigToAddModList_t *ReportConfig_list,
|
||||
QuantityConfig_t *quantityConfig,
|
||||
MeasIdToAddModList_t *MeasId_list,
|
||||
MAC_MainConfig_t *mac_MainConfig,
|
||||
MeasGapConfig_t *measGapConfig,
|
||||
MobilityControlInfo_t *mobilityInfo,
|
||||
struct MeasConfig__speedStatePars *speedStatePars,
|
||||
RSRP_Range_t *rsrp,
|
||||
C_RNTI_t *cba_rnti,
|
||||
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList,
|
||||
SL_CommConfig_r12_t *sl_CommConfig,
|
||||
SL_DiscConfig_r12_t *sl_DiscConfig
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
, SCellToAddMod_r10_t *SCell_config
|
||||
LTE_SRB_ToAddModList_t *SRB_list,
|
||||
LTE_DRB_ToAddModList_t *DRB_list,
|
||||
LTE_DRB_ToReleaseList_t *DRB_list2,
|
||||
struct LTE_SPS_Config *sps_Config,
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
LTE_MeasObjectToAddModList_t *MeasObj_list,
|
||||
LTE_ReportConfigToAddModList_t *ReportConfig_list,
|
||||
LTE_QuantityConfig_t *quantityConfig,
|
||||
LTE_MeasIdToAddModList_t *MeasId_list,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
LTE_MeasGapConfig_t *measGapConfig,
|
||||
LTE_MobilityControlInfo_t *mobilityInfo,
|
||||
struct LTE_MeasConfig__speedStatePars *speedStatePars,
|
||||
LTE_RSRP_Range_t *rsrp,
|
||||
LTE_C_RNTI_t *cba_rnti,
|
||||
struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList,
|
||||
LTE_SL_CommConfig_r12_t *sl_CommConfig,
|
||||
LTE_SL_DiscConfig_r12_t *sl_DiscConfig
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
, LTE_SCellToAddMod_r10_t *SCell_config
|
||||
#endif
|
||||
);
|
||||
/**
|
||||
@@ -222,8 +222,8 @@ do_RRCConnectionReestablishment(
|
||||
uint8_t* const buffer,
|
||||
const uint8_t transmission_mode,
|
||||
const uint8_t Transaction_id,
|
||||
SRB_ToAddModList_t **SRB_configList,
|
||||
struct PhysicalConfigDedicated **physicalConfigDedicated);
|
||||
LTE_SRB_ToAddModList_t **SRB_configList,
|
||||
struct LTE_PhysicalConfigDedicated **physicalConfigDedicated);
|
||||
|
||||
/**
|
||||
\brief Generate an RRCConnectionReestablishmentReject DL-CCCH-Message (eNB).
|
||||
@@ -261,7 +261,7 @@ uint8_t do_RRCConnectionRelease(uint8_t Mod_id, uint8_t *buffer,int Transaction_
|
||||
* @returns Size of encoded bit stream in bytes
|
||||
*/
|
||||
uint8_t do_MCCHMessage(uint8_t *buffer);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/***
|
||||
* \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
|
||||
* @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
|
||||
@@ -270,8 +270,8 @@ uint8_t do_MCCHMessage(uint8_t *buffer);
|
||||
uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
uint8_t sync_area,
|
||||
uint8_t *buffer,
|
||||
MCCH_Message_t *mcch_message,
|
||||
MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
|
||||
LTE_MCCH_Message_t *mcch_message,
|
||||
LTE_MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
|
||||
#endif
|
||||
|
||||
uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,long rsrp_s,long rsrq_s,long rsrp_t,long rsrq_t);
|
||||
@@ -282,7 +282,7 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, ue_paging_identity_t ue_pagin
|
||||
|
||||
uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer);
|
||||
|
||||
OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer);
|
||||
OAI_UECapability_t *fill_ue_capability(char *LTE_UE_EUTRA_Capability_xer);
|
||||
|
||||
uint8_t
|
||||
do_UECapabilityEnquiry(
|
||||
|
||||
@@ -43,26 +43,26 @@
|
||||
|
||||
|
||||
//#include for NB-IoT-------------------
|
||||
#include "RRCConnectionRequest-NB.h"
|
||||
#include "BCCH-DL-SCH-Message-NB.h"
|
||||
#include "UL-CCCH-Message-NB.h"
|
||||
#include "UL-DCCH-Message-NB.h"
|
||||
#include "DL-CCCH-Message-NB.h"
|
||||
#include "DL-DCCH-Message-NB.h"
|
||||
#include "EstablishmentCause-NB-r13.h"
|
||||
#include "RRCConnectionSetup-NB.h"
|
||||
#include "SRB-ToAddModList-NB-r13.h"
|
||||
#include "DRB-ToAddModList-NB-r13.h"
|
||||
#include "LTE_RRCConnectionRequest-NB.h"
|
||||
#include "LTE_BCCH-DL-SCH-Message-NB.h"
|
||||
#include "LTE_UL-CCCH-Message-NB.h"
|
||||
#include "LTE_UL-DCCH-Message-NB.h"
|
||||
#include "LTE_DL-CCCH-Message-NB.h"
|
||||
#include "LTE_DL-DCCH-Message-NB.h"
|
||||
#include "LTE_EstablishmentCause-NB-r13.h"
|
||||
#include "LTE_RRCConnectionSetup-NB.h"
|
||||
#include "LTE_SRB-ToAddModList-NB-r13.h"
|
||||
#include "LTE_DRB-ToAddModList-NB-r13.h"
|
||||
#include "RRC/LTE/defs_NB_IoT.h"
|
||||
#include "RRCConnectionSetupComplete-NB.h"
|
||||
#include "RRCConnectionReconfigurationComplete-NB.h"
|
||||
#include "RRCConnectionReconfiguration-NB.h"
|
||||
#include "MasterInformationBlock-NB.h"
|
||||
#include "SystemInformation-NB.h"
|
||||
#include "SystemInformationBlockType1.h"
|
||||
#include "SIB-Type-NB-r13.h"
|
||||
#include "RRCConnectionResume-NB.h"
|
||||
#include "RRCConnectionReestablishment-NB.h"
|
||||
#include "LTE_RRCConnectionSetupComplete-NB.h"
|
||||
#include "LTE_RRCConnectionReconfigurationComplete-NB.h"
|
||||
#include "LTE_RRCConnectionReconfiguration-NB.h"
|
||||
#include "LTE_MasterInformationBlock-NB.h"
|
||||
#include "LTE_SystemInformation-NB.h"
|
||||
#include "LTE_SystemInformationBlockType1.h"
|
||||
#include "LTE_SIB-Type-NB-r13.h"
|
||||
#include "LTE_RRCConnectionResume-NB.h"
|
||||
#include "LTE_RRCConnectionReestablishment-NB.h"
|
||||
#include "../defs_NB_IoT.h"
|
||||
//----------------------------------------
|
||||
|
||||
@@ -84,7 +84,7 @@ uint8_t do_MIB_NB_IoT(
|
||||
uint32_t hyper_frame)
|
||||
{
|
||||
asn_enc_rval_t enc_rval;
|
||||
BCCH_BCH_Message_NB_t *mib_NB_IoT = &(carrier->mib_NB_IoT);
|
||||
LTE_BCCH_BCH_Message_NB_t *mib_NB_IoT = &(carrier->mib_NB_IoT);
|
||||
|
||||
/*
|
||||
* systemFrameNumber-MSB: (TS 36.331 pag 576)
|
||||
@@ -123,14 +123,14 @@ uint8_t do_MIB_NB_IoT(
|
||||
mib_NB_IoT->message.ab_Enabled_r13 = 0;
|
||||
|
||||
//to be decided
|
||||
mib_NB_IoT->message.operationModeInfo_r13.present = MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13;
|
||||
mib_NB_IoT->message.operationModeInfo_r13.present = LTE_MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13;
|
||||
mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13 = 0;
|
||||
|
||||
printf("[MIB] Initialization of frame information,sfn_MSB %x, hsfn_LSB %x\n",
|
||||
(uint32_t)sfn_MSB,
|
||||
(uint32_t)hsfn_LSB);
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_NB,
|
||||
NULL,
|
||||
(void*)mib_NB_IoT,
|
||||
carrier->MIB_NB_IoT,
|
||||
@@ -155,16 +155,16 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
uint32_t frame
|
||||
)
|
||||
{
|
||||
BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT);
|
||||
SystemInformationBlockType1_NB_t **sib1_NB_IoT= &(carrier->sib1_NB_IoT);
|
||||
LTE_BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT);
|
||||
LTE_SystemInformationBlockType1_NB_t **sib1_NB_IoT= &(carrier->sib1_NB_IoT);
|
||||
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
PLMN_IdentityInfo_NB_r13_t PLMN_identity_info_NB_IoT;
|
||||
MCC_MNC_Digit_t dummy_mcc[3],dummy_mnc[3];
|
||||
SchedulingInfo_NB_r13_t *schedulingInfo_NB_IoT;
|
||||
SIB_Type_NB_r13_t *sib_type_NB_IoT;
|
||||
LTE_PLMN_IdentityInfo_NB_r13_t PLMN_identity_info_NB_IoT;
|
||||
LTE_MCC_MNC_Digit_t dummy_mcc[3],dummy_mnc[3];
|
||||
LTE_SchedulingInfo_NB_r13_t *schedulingInfo_NB_IoT;
|
||||
LTE_SIB_Type_NB_r13_t *sib_type_NB_IoT;
|
||||
|
||||
|
||||
long* attachWithoutPDN_Connectivity = NULL;
|
||||
@@ -175,9 +175,9 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
eutraControlRegionSize = CALLOC(1,sizeof(long));
|
||||
long systemInfoValueTagSI = 0;
|
||||
|
||||
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_NB_t));
|
||||
bcch_message->message.present = BCCH_DL_SCH_MessageType_NB_PR_c1;
|
||||
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13;
|
||||
memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_NB_t));
|
||||
bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_NB_PR_c1;
|
||||
bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13;
|
||||
|
||||
//allocation
|
||||
*sib1_NB_IoT = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13;
|
||||
@@ -195,7 +195,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
(*sib1_NB_IoT)->hyperSFN_MSB_r13.size = 1;
|
||||
(*sib1_NB_IoT)->hyperSFN_MSB_r13.bits_unused = 0;
|
||||
|
||||
memset(&PLMN_identity_info_NB_IoT,0,sizeof(PLMN_IdentityInfo_NB_r13_t));
|
||||
memset(&PLMN_identity_info_NB_IoT,0,sizeof(LTE_PLMN_IdentityInfo_NB_r13_t));
|
||||
|
||||
PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc = CALLOC(1,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc));
|
||||
memset(PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc,0,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc));
|
||||
@@ -251,7 +251,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
}
|
||||
|
||||
//still set to "notReserved" as in the previous case
|
||||
PLMN_identity_info_NB_IoT.cellReservedForOperatorUse_r13=PLMN_IdentityInfo_NB_r13__cellReservedForOperatorUse_r13_notReserved;
|
||||
PLMN_identity_info_NB_IoT.cellReservedForOperatorUse_r13=LTE_PLMN_IdentityInfo_NB_r13__cellReservedForOperatorUse_r13_notReserved;
|
||||
|
||||
*attachWithoutPDN_Connectivity = 0;
|
||||
PLMN_identity_info_NB_IoT.attachWithoutPDN_Connectivity_r13 = attachWithoutPDN_Connectivity;
|
||||
@@ -289,16 +289,16 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4;
|
||||
|
||||
//Still set to "notBarred" as in the previous case
|
||||
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellBarred_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred;
|
||||
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellBarred_r13=LTE_SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred;
|
||||
|
||||
//Still Set to "notAllowed" like in the previous case
|
||||
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.intraFreqReselection_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed;
|
||||
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.intraFreqReselection_r13=LTE_SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed;
|
||||
|
||||
|
||||
(*sib1_NB_IoT)->cellSelectionInfo_r13.q_RxLevMin_r13=-65; //which value?? TS 36.331 V14.2.1 pag. 589
|
||||
(*sib1_NB_IoT)->cellSelectionInfo_r13.q_QualMin_r13 = 0; //FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value)
|
||||
|
||||
(*sib1_NB_IoT)->p_Max_r13 = CALLOC(1, sizeof(P_Max_t));
|
||||
(*sib1_NB_IoT)->p_Max_r13 = CALLOC(1, sizeof(LTE_P_Max_t));
|
||||
*((*sib1_NB_IoT)->p_Max_r13) = 23;
|
||||
|
||||
//FIXME
|
||||
@@ -318,8 +318,8 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
*/
|
||||
|
||||
|
||||
(*sib1_NB_IoT)->downlinkBitmap_r13 = CALLOC(1, sizeof(struct DL_Bitmap_NB_r13));
|
||||
((*sib1_NB_IoT)->downlinkBitmap_r13)->present= DL_Bitmap_NB_r13_PR_NOTHING;
|
||||
(*sib1_NB_IoT)->downlinkBitmap_r13 = CALLOC(1, sizeof(struct LTE_DL_Bitmap_NB_r13));
|
||||
((*sib1_NB_IoT)->downlinkBitmap_r13)->present= LTE_DL_Bitmap_NB_r13_PR_NOTHING;
|
||||
|
||||
*eutraControlRegionSize = 1;
|
||||
(*sib1_NB_IoT)->eutraControlRegionSize_r13 = eutraControlRegionSize;
|
||||
@@ -328,22 +328,22 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
*nrs_CRS_PowerOffset= 0;
|
||||
(*sib1_NB_IoT)->nrs_CRS_PowerOffset_r13 = nrs_CRS_PowerOffset;
|
||||
|
||||
schedulingInfo_NB_IoT = (SchedulingInfo_NB_r13_t*) malloc (3*sizeof(SchedulingInfo_NB_r13_t));
|
||||
sib_type_NB_IoT = (SIB_Type_NB_r13_t *) malloc (3*sizeof(SIB_Type_NB_r13_t));
|
||||
schedulingInfo_NB_IoT = (LTE_SchedulingInfo_NB_r13_t*) malloc (3*sizeof(LTE_SchedulingInfo_NB_r13_t));
|
||||
sib_type_NB_IoT = (LTE_SIB_Type_NB_r13_t *) malloc (3*sizeof(LTE_SIB_Type_NB_r13_t));
|
||||
|
||||
memset(&schedulingInfo_NB_IoT[0],0,sizeof(SchedulingInfo_NB_r13_t));
|
||||
memset(&schedulingInfo_NB_IoT[1],0,sizeof(SchedulingInfo_NB_r13_t));
|
||||
memset(&schedulingInfo_NB_IoT[2],0,sizeof(SchedulingInfo_NB_r13_t));
|
||||
memset(&sib_type_NB_IoT[0],0,sizeof(SIB_Type_NB_r13_t));
|
||||
memset(&sib_type_NB_IoT[1],0,sizeof(SIB_Type_NB_r13_t));
|
||||
memset(&sib_type_NB_IoT[2],0,sizeof(SIB_Type_NB_r13_t));
|
||||
memset(&schedulingInfo_NB_IoT[0],0,sizeof(LTE_SchedulingInfo_NB_r13_t));
|
||||
memset(&schedulingInfo_NB_IoT[1],0,sizeof(LTE_SchedulingInfo_NB_r13_t));
|
||||
memset(&schedulingInfo_NB_IoT[2],0,sizeof(LTE_SchedulingInfo_NB_r13_t));
|
||||
memset(&sib_type_NB_IoT[0],0,sizeof(LTE_SIB_Type_NB_r13_t));
|
||||
memset(&sib_type_NB_IoT[1],0,sizeof(LTE_SIB_Type_NB_r13_t));
|
||||
memset(&sib_type_NB_IoT[2],0,sizeof(LTE_SIB_Type_NB_r13_t));
|
||||
|
||||
|
||||
// Now, follow the scheduler SIB configuration
|
||||
// There is only one sib2+sib3 common setting
|
||||
schedulingInfo_NB_IoT[0].si_Periodicity_r13=SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096;
|
||||
schedulingInfo_NB_IoT[0].si_RepetitionPattern_r13=SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF; //This Indicates the starting radio frames within the SI window used for SI message transmission.
|
||||
schedulingInfo_NB_IoT[0].si_TB_r13= SchedulingInfo_NB_r13__si_TB_r13_b680;//208 bits
|
||||
schedulingInfo_NB_IoT[0].si_Periodicity_r13=LTE_SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096;
|
||||
schedulingInfo_NB_IoT[0].si_RepetitionPattern_r13=LTE_SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every2ndRF; //This Indicates the starting radio frames within the SI window used for SI message transmission.
|
||||
schedulingInfo_NB_IoT[0].si_TB_r13= LTE_SchedulingInfo_NB_r13__si_TB_r13_b680;//208 bits
|
||||
|
||||
|
||||
// This is for SIB2/3
|
||||
@@ -351,7 +351,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
* in the first SystemInformation message
|
||||
* listed in the schedulingInfoList list.
|
||||
* */
|
||||
sib_type_NB_IoT[0]=SIB_Type_NB_r13_sibType3_NB_r13;
|
||||
sib_type_NB_IoT[0]=LTE_SIB_Type_NB_r13_sibType3_NB_r13;
|
||||
|
||||
ASN_SEQUENCE_ADD(&schedulingInfo_NB_IoT[0].sib_MappingInfo_r13.list,&sib_type_NB_IoT[0]);
|
||||
ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->schedulingInfoList_r13.list,&schedulingInfo_NB_IoT[0]);
|
||||
@@ -369,7 +369,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
}
|
||||
|
||||
//FIXME which value chose for the following parameter
|
||||
(*sib1_NB_IoT)->si_WindowLength_r13=SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
|
||||
(*sib1_NB_IoT)->si_WindowLength_r13=LTE_SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
|
||||
(*sib1_NB_IoT)->si_RadioFrameOffset_r13= 0;
|
||||
|
||||
/*In Nb-IoT change/update of specific SI message can additionally be indicated by a SI message specific value tag
|
||||
@@ -377,17 +377,17 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
*contained in systemInfoValueTagList_r13
|
||||
**/
|
||||
//FIXME correct?
|
||||
(*sib1_NB_IoT)->systemInfoValueTagList_r13 = CALLOC(1, sizeof(struct SystemInfoValueTagList_NB_r13));
|
||||
(*sib1_NB_IoT)->systemInfoValueTagList_r13 = CALLOC(1, sizeof(struct LTE_SystemInfoValueTagList_NB_r13));
|
||||
asn_set_empty(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list);
|
||||
ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list,&systemInfoValueTagSI);
|
||||
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
}
|
||||
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_NB,
|
||||
NULL,
|
||||
(void*)bcch_message,
|
||||
carrier->SIB1_NB_IoT,
|
||||
@@ -417,16 +417,16 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
rrc_eNB_carrier_data_NB_IoT_t *carrier,//MP: this is already a carrier[CC_id]
|
||||
NbIoTRrcConfigurationReq *configuration ) //openair2/COMMON/rrc_messages_types.h
|
||||
{
|
||||
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_NB_part;
|
||||
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib3_NB_part;
|
||||
struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_NB_part;
|
||||
struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib3_NB_part;
|
||||
|
||||
BCCH_DL_SCH_Message_NB_t *bcch_message = &(carrier->systemInformation_NB_IoT); //is the systeminformation-->BCCH_DL_SCH_Message_NB
|
||||
SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
|
||||
SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
|
||||
LTE_BCCH_DL_SCH_Message_NB_t *bcch_message = &(carrier->systemInformation_NB_IoT); //is the systeminformation-->BCCH_DL_SCH_Message_NB
|
||||
LTE_SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
|
||||
LTE_SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
RACH_Info_NB_r13_t rach_Info_NB_IoT;
|
||||
NPRACH_Parameters_NB_r13_t *nprach_parameters;
|
||||
LTE_RACH_Info_NB_r13_t rach_Info_NB_IoT;
|
||||
LTE_NPRACH_Parameters_NB_r13_t *nprach_parameters;
|
||||
|
||||
//optional
|
||||
long *connEstFailOffset = NULL;
|
||||
@@ -435,16 +435,16 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
// RSRP_ThresholdsNPRACH_InfoList_NB_r13_t *rsrp_ThresholdsPrachInfoList;
|
||||
// RSRP_Range_t rsrp_range;
|
||||
|
||||
ACK_NACK_NumRepetitions_NB_r13_t ack_nack_repetition;
|
||||
struct NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13 *dmrs_config;
|
||||
struct DL_GapConfig_NB_r13 *dl_Gap;
|
||||
LTE_ACK_NACK_NumRepetitions_NB_r13_t ack_nack_repetition;
|
||||
struct LTE_NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13 *dmrs_config;
|
||||
struct LTE_DL_GapConfig_NB_r13 *dl_Gap;
|
||||
|
||||
long *srs_SubframeConfig;
|
||||
srs_SubframeConfig= CALLOC(1, sizeof(long));
|
||||
|
||||
|
||||
if (bcch_message) {
|
||||
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_NB_t));
|
||||
memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_NB_t));
|
||||
} else {
|
||||
LOG_E(RRC,"[NB-IoT %d] BCCH_MESSAGE_NB is null, exiting\n", Mod_id);
|
||||
exit(-1);
|
||||
@@ -464,13 +464,13 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
|
||||
LOG_I(RRC,"[NB-IoT %d] Configuration SIB2/3\n", Mod_id);
|
||||
|
||||
sib2_NB_part = CALLOC(1,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
sib3_NB_part = CALLOC(1,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
memset(sib2_NB_part,0,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
memset(sib3_NB_part,0,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
sib2_NB_part = CALLOC(1,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
sib3_NB_part = CALLOC(1,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
memset(sib2_NB_part,0,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
memset(sib3_NB_part,0,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
|
||||
|
||||
sib2_NB_part->present = SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib2_r13;
|
||||
sib3_NB_part->present = SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib3_r13;
|
||||
sib2_NB_part->present = LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib2_r13;
|
||||
sib3_NB_part->present = LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib3_r13;
|
||||
|
||||
//may bug if not correct allocation of memory
|
||||
carrier->sib2_NB_IoT = &sib2_NB_part->choice.sib2_r13;
|
||||
@@ -478,11 +478,11 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
sib2_NB_IoT = carrier->sib2_NB_IoT;
|
||||
sib3_NB_IoT = carrier->sib3_NB_IoT;
|
||||
|
||||
nprach_parameters = (NPRACH_Parameters_NB_r13_t *) malloc (3*sizeof(NPRACH_Parameters_NB_r13_t));
|
||||
nprach_parameters = (LTE_NPRACH_Parameters_NB_r13_t *) malloc (3*sizeof(LTE_NPRACH_Parameters_NB_r13_t));
|
||||
|
||||
memset(&nprach_parameters[0],0,sizeof(NPRACH_Parameters_NB_r13_t));
|
||||
memset(&nprach_parameters[1],0,sizeof(NPRACH_Parameters_NB_r13_t));
|
||||
memset(&nprach_parameters[2],0,sizeof(NPRACH_Parameters_NB_r13_t));
|
||||
memset(&nprach_parameters[0],0,sizeof(LTE_NPRACH_Parameters_NB_r13_t));
|
||||
memset(&nprach_parameters[1],0,sizeof(LTE_NPRACH_Parameters_NB_r13_t));
|
||||
memset(&nprach_parameters[2],0,sizeof(LTE_NPRACH_Parameters_NB_r13_t));
|
||||
|
||||
/// SIB2-NB-----------------------------------------
|
||||
|
||||
@@ -582,7 +582,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
|
||||
|
||||
/*OPTIONAL*/
|
||||
dmrs_config = CALLOC(1,sizeof(struct NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13));
|
||||
dmrs_config = CALLOC(1,sizeof(struct LTE_NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13));
|
||||
dmrs_config->threeTone_CyclicShift_r13 = configuration->npusch_threeTone_CyclicShift_r13;
|
||||
dmrs_config->sixTone_CyclicShift_r13 = configuration->npusch_sixTone_CyclicShift_r13;
|
||||
|
||||
@@ -606,7 +606,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
|
||||
|
||||
//dl_GAP---------------------------------------------------------------------------------/*OPTIONAL*/
|
||||
dl_Gap = CALLOC(1,sizeof(struct DL_GapConfig_NB_r13));
|
||||
dl_Gap = CALLOC(1,sizeof(struct LTE_DL_GapConfig_NB_r13));
|
||||
dl_Gap->dl_GapDurationCoeff_r13= configuration-> dl_GapDurationCoeff_NB;
|
||||
dl_Gap->dl_GapPeriodicity_r13= configuration->dl_GapPeriodicity_NB;
|
||||
dl_Gap->dl_GapThreshold_r13= configuration->dl_GapThreshold_NB;
|
||||
@@ -631,14 +631,14 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
sib2_NB_IoT->freqInfo_r13.additionalSpectrumEmission_r13 = 1;
|
||||
sib2_NB_IoT->freqInfo_r13.ul_CarrierFreq_r13 = NULL; /*OPTIONAL*/
|
||||
|
||||
sib2_NB_IoT->timeAlignmentTimerCommon_r13=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120;
|
||||
sib2_NB_IoT->timeAlignmentTimerCommon_r13=LTE_TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120;
|
||||
|
||||
/*OPTIONAL*/
|
||||
sib2_NB_IoT->multiBandInfoList_r13 = NULL;
|
||||
|
||||
/// SIB3-NB-------------------------------------------------------
|
||||
|
||||
sib3_NB_IoT->cellReselectionInfoCommon_r13.q_Hyst_r13=SystemInformationBlockType3_NB_r13__cellReselectionInfoCommon_r13__q_Hyst_r13_dB4;
|
||||
sib3_NB_IoT->cellReselectionInfoCommon_r13.q_Hyst_r13=LTE_SystemInformationBlockType3_NB_r13__cellReselectionInfoCommon_r13__q_Hyst_r13_dB4;
|
||||
sib3_NB_IoT->cellReselectionServingFreqInfo_r13.s_NonIntraSearch_r13=0; //or define in configuration?
|
||||
|
||||
sib3_NB_IoT->intraFreqCellReselectionInfo_r13.q_RxLevMin_r13 = -70;
|
||||
@@ -656,10 +656,10 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
|
||||
|
||||
///BCCH message (generate the SI message)
|
||||
bcch_message->message.present = BCCH_DL_SCH_MessageType_NB_PR_c1;
|
||||
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformation_r13;
|
||||
bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_NB_PR_c1;
|
||||
bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformation_r13;
|
||||
|
||||
bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.present = SystemInformation_NB__criticalExtensions_PR_systemInformation_r13;
|
||||
bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.present = LTE_SystemInformation_NB__criticalExtensions_PR_systemInformation_r13;
|
||||
bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.count=0;
|
||||
|
||||
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list,
|
||||
@@ -668,9 +668,9 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
sib3_NB_part);
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_NB,
|
||||
NULL,
|
||||
(void*)bcch_message,
|
||||
carrier->SIB23_NB_IoT,
|
||||
@@ -704,8 +704,8 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
uint8_t* const buffer, //Srb0.Tx_buffer.Payload
|
||||
const uint8_t Transaction_id,
|
||||
const NB_IoT_DL_FRAME_PARMS* const frame_parms, // maybe not used
|
||||
SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //for both SRB1bis and SRB1
|
||||
struct PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT
|
||||
LTE_SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //for both SRB1bis and SRB1
|
||||
struct LTE_PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT
|
||||
)
|
||||
|
||||
{
|
||||
@@ -725,26 +725,26 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
// struct SRB_ToAddMod_NB_r13__rlc_Config_r13* SRB1_rlc_config_NB = NULL;
|
||||
// struct SRB_ToAddMod_NB_r13__logicalChannelConfig_r13* SRB1_lchan_config_NB = NULL;
|
||||
|
||||
struct SRB_ToAddMod_NB_r13* SRB1bis_config_NB_IoT = NULL;
|
||||
struct SRB_ToAddMod_NB_r13__rlc_Config_r13* SRB1bis_rlc_config_NB_IoT = NULL;
|
||||
struct SRB_ToAddMod_NB_r13__logicalChannelConfig_r13* SRB1bis_lchan_config_NB_IoT = NULL;
|
||||
struct LTE_SRB_ToAddMod_NB_r13* SRB1bis_config_NB_IoT = NULL;
|
||||
struct LTE_SRB_ToAddMod_NB_r13__rlc_Config_r13* SRB1bis_rlc_config_NB_IoT = NULL;
|
||||
struct LTE_SRB_ToAddMod_NB_r13__logicalChannelConfig_r13* SRB1bis_lchan_config_NB_IoT = NULL;
|
||||
|
||||
//No UL_specific parameters for NB-IoT in LogicalChanelConfig-NB
|
||||
|
||||
PhysicalConfigDedicated_NB_r13_t* physicalConfigDedicated2_NB_IoT = NULL;
|
||||
DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
RRCConnectionSetup_NB_t* rrcConnectionSetup_NB_IoT = NULL;
|
||||
LTE_PhysicalConfigDedicated_NB_r13_t* physicalConfigDedicated2_NB_IoT = NULL;
|
||||
LTE_DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
LTE_RRCConnectionSetup_NB_t* rrcConnectionSetup_NB_IoT = NULL;
|
||||
|
||||
memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(DL_CCCH_Message_NB_t));
|
||||
dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionSetup_r13;
|
||||
memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(LTE_DL_CCCH_Message_NB_t));
|
||||
dl_ccch_msg_NB_IoT.message.present = LTE_DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = LTE_DL_CCCH_MessageType_NB__c1_PR_rrcConnectionSetup_r13;
|
||||
rrcConnectionSetup_NB_IoT = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionSetup_r13;
|
||||
|
||||
|
||||
if (*SRB_configList_NB_IoT) {
|
||||
free(*SRB_configList_NB_IoT);
|
||||
}
|
||||
*SRB_configList_NB_IoT = CALLOC(1,sizeof(SRB_ToAddModList_NB_r13_t));
|
||||
*SRB_configList_NB_IoT = CALLOC(1,sizeof(LTE_SRB_ToAddModList_NB_r13_t));
|
||||
|
||||
/// SRB1--------------------
|
||||
{
|
||||
@@ -796,18 +796,18 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
SRB1bis_rlc_config_NB_IoT = CALLOC(1,sizeof(*SRB1bis_rlc_config_NB_IoT));
|
||||
SRB1bis_config_NB_IoT->rlc_Config_r13 = SRB1bis_rlc_config_NB_IoT;
|
||||
|
||||
SRB1bis_rlc_config_NB_IoT->present = SRB_ToAddMod_NB_r13__rlc_Config_r13_PR_explicitValue;
|
||||
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.present=RLC_Config_NB_r13_PR_am;//MP: the only possible RLC config in NB_IoT
|
||||
SRB1bis_rlc_config_NB_IoT->present = LTE_SRB_ToAddMod_NB_r13__rlc_Config_r13_PR_explicitValue;
|
||||
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.present=LTE_RLC_Config_NB_r13_PR_am;//MP: the only possible RLC config in NB_IoT
|
||||
|
||||
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = T_PollRetransmit_NB_r13_ms25000;
|
||||
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t8;
|
||||
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = LTE_T_PollRetransmit_NB_r13_ms25000;
|
||||
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = LTE_UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t8;
|
||||
//(musT be disabled--> SRB1 config pag 640 specs )
|
||||
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 =NULL;
|
||||
|
||||
SRB1bis_lchan_config_NB_IoT = CALLOC(1,sizeof(*SRB1bis_lchan_config_NB_IoT));
|
||||
SRB1bis_config_NB_IoT->logicalChannelConfig_r13 = SRB1bis_lchan_config_NB_IoT;
|
||||
|
||||
SRB1bis_lchan_config_NB_IoT->present = SRB_ToAddMod_NB_r13__logicalChannelConfig_r13_PR_explicitValue;
|
||||
SRB1bis_lchan_config_NB_IoT->present = LTE_SRB_ToAddMod_NB_r13__logicalChannelConfig_r13_PR_explicitValue;
|
||||
|
||||
prioritySRB1bis = CALLOC(1, sizeof(long));
|
||||
*prioritySRB1bis = 1; //same as SRB1?
|
||||
@@ -846,13 +846,13 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
//DL
|
||||
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.dl_CarrierFreq_r13.carrierFreq_r13=0;//random value set
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.downlinkBitmapNonAnchor_r13= CALLOC(1,sizeof(struct DL_CarrierConfigDedicated_NB_r13__downlinkBitmapNonAnchor_r13));
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.downlinkBitmapNonAnchor_r13= CALLOC(1,sizeof(struct LTE_DL_CarrierConfigDedicated_NB_r13__downlinkBitmapNonAnchor_r13));
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.downlinkBitmapNonAnchor_r13->present=
|
||||
DL_CarrierConfigDedicated_NB_r13__downlinkBitmapNonAnchor_r13_PR_useNoBitmap_r13;
|
||||
LTE_DL_CarrierConfigDedicated_NB_r13__downlinkBitmapNonAnchor_r13_PR_useNoBitmap_r13;
|
||||
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.dl_GapNonAnchor_r13 = CALLOC(1,sizeof(struct DL_CarrierConfigDedicated_NB_r13__dl_GapNonAnchor_r13));
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.dl_GapNonAnchor_r13 = CALLOC(1,sizeof(struct LTE_DL_CarrierConfigDedicated_NB_r13__dl_GapNonAnchor_r13));
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.dl_GapNonAnchor_r13->present =
|
||||
DL_CarrierConfigDedicated_NB_r13__dl_GapNonAnchor_r13_PR_useNoGap_r13;
|
||||
LTE_DL_CarrierConfigDedicated_NB_r13__dl_GapNonAnchor_r13_PR_useNoGap_r13;
|
||||
|
||||
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13->dl_CarrierConfig_r13.inbandCarrierInfo_r13= NULL;
|
||||
|
||||
@@ -877,8 +877,8 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
|
||||
//Fill the rrcConnectionSetup-NB message
|
||||
rrcConnectionSetup_NB_IoT->rrc_TransactionIdentifier = Transaction_id; //input value
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.present = RRCConnectionSetup_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.present =RRCConnectionSetup_NB__criticalExtensions__c1_PR_rrcConnectionSetup_r13 ;
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.present = LTE_RRCConnectionSetup_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.present =LTE_RRCConnectionSetup_NB__criticalExtensions__c1_PR_rrcConnectionSetup_r13 ;
|
||||
//MP: carry only SRB1bis at the moment and phyConfigDedicated
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.srb_ToAddModList_r13 = *SRB_configList_NB_IoT;
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.drb_ToAddModList_r13 = NULL;
|
||||
@@ -888,9 +888,9 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.mac_MainConfig_r13 = NULL;
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_CCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg_NB_IoT,
|
||||
buffer,
|
||||
@@ -917,32 +917,32 @@ uint8_t do_SecurityModeCommand_NB_IoT(
|
||||
const uint8_t cipheringAlgorithm,
|
||||
const uint8_t integrityProtAlgorithm)
|
||||
{
|
||||
DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
LTE_DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(DL_DCCH_Message_NB_t));
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(LTE_DL_DCCH_Message_NB_t));
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.present = DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = DL_DCCH_MessageType_NB__c1_PR_securityModeCommand_r13;
|
||||
dl_dcch_msg_NB_IoT.message.present = LTE_DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = LTE_DL_DCCH_MessageType_NB__c1_PR_securityModeCommand_r13;
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.securityModeCommand_r13.rrc_TransactionIdentifier = Transaction_id;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.securityModeCommand_r13.criticalExtensions.present = SecurityModeCommand__criticalExtensions_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.securityModeCommand_r13.criticalExtensions.present = LTE_SecurityModeCommand__criticalExtensions_PR_c1;
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.securityModeCommand_r13.criticalExtensions.choice.c1.present =
|
||||
SecurityModeCommand__criticalExtensions__c1_PR_securityModeCommand_r8;
|
||||
LTE_SecurityModeCommand__criticalExtensions__c1_PR_securityModeCommand_r8;
|
||||
|
||||
// the two following information could be based on the mod_id
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.securityModeCommand_r13.criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.cipheringAlgorithm
|
||||
= (CipheringAlgorithm_r12_t)cipheringAlgorithm; //bug solved
|
||||
= (LTE_CipheringAlgorithm_r12_t)cipheringAlgorithm; //bug solved
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.securityModeCommand_r13.criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm
|
||||
= (e_SecurityAlgorithmConfig__integrityProtAlgorithm)integrityProtAlgorithm;
|
||||
= (e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm)integrityProtAlgorithm;
|
||||
|
||||
//only changed "asn_DEF_DL_DCCH_Message_NB"
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg_NB_IoT,
|
||||
buffer,
|
||||
@@ -983,28 +983,28 @@ uint8_t do_UECapabilityEnquiry_NB_IoT(
|
||||
|
||||
{
|
||||
|
||||
DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
LTE_DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
//no RAT type in NB-IoT
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(DL_DCCH_Message_NB_t));
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(LTE_DL_DCCH_Message_NB_t));
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.present = DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = DL_DCCH_MessageType_NB__c1_PR_ueCapabilityEnquiry_r13;
|
||||
dl_dcch_msg_NB_IoT.message.present = LTE_DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = LTE_DL_DCCH_MessageType_NB__c1_PR_ueCapabilityEnquiry_r13;
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.ueCapabilityEnquiry_r13.rrc_TransactionIdentifier = Transaction_id;
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.ueCapabilityEnquiry_r13.criticalExtensions.present = UECapabilityEnquiry_NB__criticalExtensions_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.ueCapabilityEnquiry_r13.criticalExtensions.present = LTE_UECapabilityEnquiry_NB__criticalExtensions_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.ueCapabilityEnquiry_r13.criticalExtensions.choice.c1.present =
|
||||
UECapabilityEnquiry_NB__criticalExtensions__c1_PR_ueCapabilityEnquiry_r13;
|
||||
LTE_UECapabilityEnquiry_NB__criticalExtensions__c1_PR_ueCapabilityEnquiry_r13;
|
||||
|
||||
//no ue_CapabilityRequest (list of RAT_Type)
|
||||
|
||||
//only changed "asn_DEF_DL_DCCH_Message_NB"
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg_NB_IoT,
|
||||
buffer,
|
||||
@@ -1042,32 +1042,32 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
uint8_t Transaction_id,
|
||||
SRB_ToAddModList_NB_r13_t *SRB1_list_NB, //SRB_ConfigList2 (default)--> only SRB1
|
||||
DRB_ToAddModList_NB_r13_t *DRB_list_NB_IoT, //DRB_ConfigList (default)
|
||||
DRB_ToReleaseList_NB_r13_t *DRB_list2_NB_IoT, //is NULL when passed
|
||||
struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated_NB_IoT,
|
||||
MAC_MainConfig_NB_r13_t *mac_MainConfig_NB_IoT,
|
||||
struct RRCConnectionReconfiguration_NB_r13_IEs__dedicatedInfoNASList_r13* dedicatedInfoNASList_NB_IoT)
|
||||
LTE_SRB_ToAddModList_NB_r13_t *SRB1_list_NB, //SRB_ConfigList2 (default)--> only SRB1
|
||||
LTE_DRB_ToAddModList_NB_r13_t *DRB_list_NB_IoT, //DRB_ConfigList (default)
|
||||
LTE_DRB_ToReleaseList_NB_r13_t *DRB_list2_NB_IoT, //is NULL when passed
|
||||
struct LTE_PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated_NB_IoT,
|
||||
LTE_MAC_MainConfig_NB_r13_t *mac_MainConfig_NB_IoT,
|
||||
struct LTE_RRCConnectionReconfiguration_NB_r13_IEs__dedicatedInfoNASList_r13* dedicatedInfoNASList_NB_IoT)
|
||||
|
||||
{
|
||||
|
||||
//check on DRB_list if contains more than 2 DRB?
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
RRCConnectionReconfiguration_NB_t *rrcConnectionReconfiguration_NB;
|
||||
LTE_DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
LTE_RRCConnectionReconfiguration_NB_t *rrcConnectionReconfiguration_NB;
|
||||
|
||||
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(DL_DCCH_Message_NB_t));
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(LTE_DL_DCCH_Message_NB_t));
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.present = DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = DL_DCCH_MessageType_NB__c1_PR_rrcConnectionReconfiguration_r13;
|
||||
dl_dcch_msg_NB_IoT.message.present = LTE_DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = LTE_DL_DCCH_MessageType_NB__c1_PR_rrcConnectionReconfiguration_r13;
|
||||
rrcConnectionReconfiguration_NB = &dl_dcch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionReconfiguration_r13;
|
||||
|
||||
// RRCConnectionReconfiguration
|
||||
rrcConnectionReconfiguration_NB->rrc_TransactionIdentifier = Transaction_id;
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.present = RRCConnectionReconfiguration_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.present =RRCConnectionReconfiguration_NB__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r13 ;
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.present = LTE_RRCConnectionReconfiguration_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.present =LTE_RRCConnectionReconfiguration_NB__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r13 ;
|
||||
|
||||
//RAdioResourceconfigDedicated
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r13.radioResourceConfigDedicated_r13 =
|
||||
@@ -1083,7 +1083,7 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r13.radioResourceConfigDedicated_r13->mac_MainConfig_r13 =
|
||||
CALLOC(1, sizeof(*rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r13.radioResourceConfigDedicated_r13->mac_MainConfig_r13));
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r13.radioResourceConfigDedicated_r13->mac_MainConfig_r13->present
|
||||
=RadioResourceConfigDedicated_NB_r13__mac_MainConfig_r13_PR_explicitValue_r13;
|
||||
=LTE_RadioResourceConfigDedicated_NB_r13__mac_MainConfig_r13_PR_explicitValue_r13;
|
||||
//why memcopy only this one?
|
||||
memcpy(&rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r13.radioResourceConfigDedicated_r13->mac_MainConfig_r13->choice.explicitValue_r13,
|
||||
mac_MainConfig_NB_IoT, sizeof(*mac_MainConfig_NB_IoT));
|
||||
@@ -1099,7 +1099,7 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
|
||||
//mainly used for cell-reselection/handover purposes??
|
||||
rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r13.fullConfig_r13 = NULL;
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg_NB_IoT,
|
||||
buffer,
|
||||
@@ -1111,7 +1111,7 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
|
||||
|
||||
//changed only asn_DEF_DL_DCCH_Message_NB
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message_NB,(void*)&dl_dcch_msg_NB_IoT);
|
||||
xer_fprint(stdout,&asn_DEF_LTE_DL_DCCH_Message_NB,(void*)&dl_dcch_msg_NB_IoT);
|
||||
}
|
||||
|
||||
//#if defined(ENABLE_ITTI)
|
||||
@@ -1131,22 +1131,22 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
RRCConnectionReestablishmentReject_t *rrcConnectionReestablishmentReject;
|
||||
LTE_DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
LTE_RRCConnectionReestablishmentReject_t *rrcConnectionReestablishmentReject;
|
||||
|
||||
memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(DL_CCCH_Message_NB_t));
|
||||
dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishmentReject_r13;
|
||||
memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(LTE_DL_CCCH_Message_NB_t));
|
||||
dl_ccch_msg_NB_IoT.message.present = LTE_DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = LTE_DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishmentReject_r13;
|
||||
rrcConnectionReestablishmentReject = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionReestablishmentReject_r13;
|
||||
|
||||
// RRCConnectionReestablishmentReject //exactly the same as LTE
|
||||
rrcConnectionReestablishmentReject->criticalExtensions.present = RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8;
|
||||
rrcConnectionReestablishmentReject->criticalExtensions.present = LTE_RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8;
|
||||
|
||||
//Only change in "asn_DEF_DL_CCCH_Message_NB"
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_CCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg_NB_IoT,
|
||||
buffer,
|
||||
@@ -1163,7 +1163,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
|
||||
char message_string[20000];
|
||||
size_t message_string_size;
|
||||
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
|
||||
MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB_NB_IoT, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
|
||||
@@ -1193,17 +1193,17 @@ uint8_t do_RRCConnectionReject_NB_IoT(
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
RRCConnectionReject_NB_t *rrcConnectionReject_NB_IoT;
|
||||
LTE_DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
LTE_RRCConnectionReject_NB_t *rrcConnectionReject_NB_IoT;
|
||||
|
||||
memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(DL_CCCH_Message_NB_t));
|
||||
dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReject_r13;
|
||||
memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(LTE_DL_CCCH_Message_NB_t));
|
||||
dl_ccch_msg_NB_IoT.message.present = LTE_DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = LTE_DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReject_r13;
|
||||
rrcConnectionReject_NB_IoT = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionReject_r13;
|
||||
|
||||
// RRCConnectionReject-NB_IoT
|
||||
rrcConnectionReject_NB_IoT->criticalExtensions.present = RRCConnectionReject_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.present = RRCConnectionReject_NB__criticalExtensions__c1_PR_rrcConnectionReject_r13;
|
||||
rrcConnectionReject_NB_IoT->criticalExtensions.present = LTE_RRCConnectionReject_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.present = LTE_RRCConnectionReject_NB__criticalExtensions__c1_PR_rrcConnectionReject_r13;
|
||||
/* let's put an extended wait time of 1s for the moment */
|
||||
rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.extendedWaitTime_r13 = 1;
|
||||
//new-use of suspend indication
|
||||
@@ -1211,13 +1211,13 @@ uint8_t do_RRCConnectionReject_NB_IoT(
|
||||
rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.rrc_SuspendIndication_r13=
|
||||
CALLOC(1, sizeof(long));
|
||||
*(rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.rrc_SuspendIndication_r13)=
|
||||
RRCConnectionReject_NB_r13_IEs__rrc_SuspendIndication_r13_true;
|
||||
LTE_RRCConnectionReject_NB_r13_IEs__rrc_SuspendIndication_r13_true;
|
||||
|
||||
//Only Modified "asn_DEF_DL_CCCH_Message_NB"
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_CCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg_NB_IoT,
|
||||
buffer,
|
||||
@@ -1233,7 +1233,7 @@ uint8_t do_RRCConnectionReject_NB_IoT(
|
||||
char message_string[20000];
|
||||
size_t message_string_size;
|
||||
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
|
||||
MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB_NB_IoT, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
|
||||
@@ -1269,19 +1269,19 @@ uint8_t do_DLInformationTransfer_NB_IoT(
|
||||
{
|
||||
ssize_t encoded;
|
||||
|
||||
DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
LTE_DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
|
||||
memset(&dl_dcch_msg_NB_IoT, 0, sizeof(DL_DCCH_Message_NB_t));
|
||||
memset(&dl_dcch_msg_NB_IoT, 0, sizeof(LTE_DL_DCCH_Message_NB_t));
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.present = DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = DL_DCCH_MessageType_NB__c1_PR_dlInformationTransfer_r13;
|
||||
dl_dcch_msg_NB_IoT.message.present = LTE_DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = LTE_DL_DCCH_MessageType_NB__c1_PR_dlInformationTransfer_r13;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.dlInformationTransfer_r13.rrc_TransactionIdentifier = transaction_id;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.dlInformationTransfer_r13.criticalExtensions.present = DLInformationTransfer_NB__criticalExtensions_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.dlInformationTransfer_r13.criticalExtensions.choice.c1.present = DLInformationTransfer_NB__criticalExtensions__c1_PR_dlInformationTransfer_r13;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.dlInformationTransfer_r13.criticalExtensions.present = LTE_DLInformationTransfer_NB__criticalExtensions_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.dlInformationTransfer_r13.criticalExtensions.choice.c1.present = LTE_DLInformationTransfer_NB__criticalExtensions__c1_PR_dlInformationTransfer_r13;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.dlInformationTransfer_r13.criticalExtensions.choice.c1.choice.dlInformationTransfer_r13.dedicatedInfoNAS_r13.size = pdu_length;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.choice.dlInformationTransfer_r13.criticalExtensions.choice.c1.choice.dlInformationTransfer_r13.dedicatedInfoNAS_r13.buf = pdu_buffer;
|
||||
|
||||
encoded = uper_encode_to_new_buffer (&asn_DEF_DL_DCCH_Message_NB, NULL, (void*) &dl_dcch_msg_NB_IoT, (void **) buffer);
|
||||
encoded = uper_encode_to_new_buffer (&asn_DEF_LTE_DL_DCCH_Message_NB, NULL, (void*) &dl_dcch_msg_NB_IoT, (void **) buffer);
|
||||
|
||||
//only change in "asn_DEF_DL_DCCH_Message_NB"
|
||||
#if defined(ENABLE_ITTI)
|
||||
@@ -1290,7 +1290,7 @@ uint8_t do_DLInformationTransfer_NB_IoT(
|
||||
char message_string[10000];
|
||||
size_t message_string_size;
|
||||
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message_NB, (void *)&dl_dcch_msg_NB_IoT)) > 0) {
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_DCCH_Message_NB, (void *)&dl_dcch_msg_NB_IoT)) > 0) {
|
||||
MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB_NB_IoT, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
|
||||
@@ -1317,23 +1317,23 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
|
||||
uint8_t* const buffer,
|
||||
const uint8_t Transaction_id,
|
||||
const NB_IoT_DL_FRAME_PARMS* const frame_parms, //to be changed
|
||||
SRB_ToAddModList_NB_r13_t* SRB_list_NB_IoT) //should contain SRB1 already configured?
|
||||
LTE_SRB_ToAddModList_NB_r13_t* SRB_list_NB_IoT) //should contain SRB1 already configured?
|
||||
{
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
RRCConnectionReestablishment_NB_t* rrcConnectionReestablishment_NB_IoT;
|
||||
LTE_DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
|
||||
LTE_RRCConnectionReestablishment_NB_t* rrcConnectionReestablishment_NB_IoT;
|
||||
|
||||
memset(&dl_ccch_msg_NB_IoT, 0, sizeof(DL_CCCH_Message_NB_t));
|
||||
memset(&dl_ccch_msg_NB_IoT, 0, sizeof(LTE_DL_CCCH_Message_NB_t));
|
||||
|
||||
dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishment_r13;
|
||||
dl_ccch_msg_NB_IoT.message.present = LTE_DL_CCCH_MessageType_NB_PR_c1;
|
||||
dl_ccch_msg_NB_IoT.message.choice.c1.present = LTE_DL_CCCH_MessageType_NB__c1_PR_rrcConnectionReestablishment_r13;
|
||||
rrcConnectionReestablishment_NB_IoT = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionReestablishment_r13;
|
||||
|
||||
//rrcConnectionReestablishment_NB
|
||||
rrcConnectionReestablishment_NB_IoT->rrc_TransactionIdentifier = Transaction_id;
|
||||
rrcConnectionReestablishment_NB_IoT->criticalExtensions.present = RRCConnectionReestablishment_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionReestablishment_NB_IoT->criticalExtensions.choice.c1.present = RRCConnectionReestablishment_NB__criticalExtensions__c1_PR_rrcConnectionReestablishment_r13;
|
||||
rrcConnectionReestablishment_NB_IoT->criticalExtensions.present = LTE_RRCConnectionReestablishment_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionReestablishment_NB_IoT->criticalExtensions.choice.c1.present = LTE_RRCConnectionReestablishment_NB__criticalExtensions__c1_PR_rrcConnectionReestablishment_r13;
|
||||
|
||||
rrcConnectionReestablishment_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.srb_ToAddModList_r13 = SRB_list_NB_IoT;
|
||||
rrcConnectionReestablishment_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.radioResourceConfigDedicated_r13.drb_ToAddModList_r13 = NULL;
|
||||
@@ -1344,7 +1344,7 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
|
||||
|
||||
rrcConnectionReestablishment_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.nextHopChainingCount_r13=0;
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_CCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg_NB_IoT,
|
||||
buffer,
|
||||
@@ -1356,7 +1356,7 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
|
||||
}
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB_IoT);
|
||||
xer_fprint(stdout,&asn_DEF_LTE_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
@@ -1365,7 +1365,7 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
|
||||
char message_string[30000];
|
||||
size_t message_string_size;
|
||||
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_DL_CCCH_Message_NB, (void *) &dl_ccch_msg_NB_IoT)) > 0) {
|
||||
MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB_NB_IoT, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText));
|
||||
@@ -1391,22 +1391,22 @@ uint8_t do_RRCConnectionRelease_NB_IoT(
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
RRCConnectionRelease_NB_t *rrcConnectionRelease_NB_IoT;
|
||||
LTE_DL_DCCH_Message_NB_t dl_dcch_msg_NB_IoT;
|
||||
LTE_RRCConnectionRelease_NB_t *rrcConnectionRelease_NB_IoT;
|
||||
|
||||
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(DL_DCCH_Message_NB_t));
|
||||
memset(&dl_dcch_msg_NB_IoT,0,sizeof(LTE_DL_DCCH_Message_NB_t));
|
||||
|
||||
dl_dcch_msg_NB_IoT.message.present = DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = DL_DCCH_MessageType_NB__c1_PR_rrcConnectionRelease_r13;
|
||||
dl_dcch_msg_NB_IoT.message.present = LTE_DL_DCCH_MessageType_NB_PR_c1;
|
||||
dl_dcch_msg_NB_IoT.message.choice.c1.present = LTE_DL_DCCH_MessageType_NB__c1_PR_rrcConnectionRelease_r13;
|
||||
rrcConnectionRelease_NB_IoT = &dl_dcch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionRelease_r13;
|
||||
|
||||
// RRCConnectionRelease
|
||||
rrcConnectionRelease_NB_IoT->rrc_TransactionIdentifier = Transaction_id;
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.present = RRCConnectionRelease_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.present =RRCConnectionRelease_NB__criticalExtensions__c1_PR_rrcConnectionRelease_r13 ;
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.present = LTE_RRCConnectionRelease_NB__criticalExtensions_PR_c1;
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.present = LTE_RRCConnectionRelease_NB__criticalExtensions__c1_PR_rrcConnectionRelease_r13 ;
|
||||
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r13.releaseCause_r13 = ReleaseCause_NB_r13_other;
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r13.releaseCause_r13 = LTE_ReleaseCause_NB_r13_other;
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r13.redirectedCarrierInfo_r13 = NULL;
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r13.extendedWaitTime_r13 = NULL;
|
||||
|
||||
@@ -1414,7 +1414,7 @@ uint8_t do_RRCConnectionRelease_NB_IoT(
|
||||
rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r13.nonCriticalExtension=CALLOC(1,
|
||||
sizeof(*rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r13.nonCriticalExtension));
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_DCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg_NB_IoT,
|
||||
buffer,
|
||||
|
||||
@@ -50,17 +50,17 @@
|
||||
|
||||
//#include "SystemInformationBlockType1-NB.h"
|
||||
//#include "SystemInformation-NB.h"
|
||||
#include "RRCConnectionReconfiguration-NB.h"
|
||||
#include "RRCConnectionReconfigurationComplete-NB.h"
|
||||
#include "RRCConnectionSetup-NB.h"
|
||||
#include "RRCConnectionSetupComplete-NB.h"
|
||||
#include "RRCConnectionRequest-NB.h"
|
||||
#include "RRCConnectionReestablishmentRequest-NB.h"
|
||||
#include "BCCH-DL-SCH-Message-NB.h"
|
||||
#include "BCCH-BCH-Message-NB.h"
|
||||
#include "AS-Config-NB.h"
|
||||
#include "AS-Context-NB.h"
|
||||
#include "UE-Capability-NB-r13.h" //equivalent of UE-EUTRA-Capability.h
|
||||
#include "LTE_RRCConnectionReconfiguration-NB.h"
|
||||
#include "LTE_RRCConnectionReconfigurationComplete-NB.h"
|
||||
#include "LTE_RRCConnectionSetup-NB.h"
|
||||
#include "LTE_RRCConnectionSetupComplete-NB.h"
|
||||
#include "LTE_RRCConnectionRequest-NB.h"
|
||||
#include "LTE_RRCConnectionReestablishmentRequest-NB.h"
|
||||
#include "LTE_BCCH-DL-SCH-Message-NB.h"
|
||||
#include "LTE_BCCH-BCH-Message-NB.h"
|
||||
#include "LTE_AS-Config-NB.h"
|
||||
#include "LTE_AS-Context-NB.h"
|
||||
#include "LTE_UE-Capability-NB-r13.h" //equivalent of UE-EUTRA-Capability.h
|
||||
//-------------------
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
@@ -122,7 +122,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
|
||||
uint8_t SIB1systemInfoValueTag;
|
||||
uint32_t SIStatus;
|
||||
uint32_t SIcnt;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
|
||||
#endif
|
||||
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
|
||||
@@ -235,14 +235,14 @@ typedef struct SRB_INFO_TABLE_ENTRY_NB_IoT_s {
|
||||
//MEAS_REPORT_LIST_s not implemented in NB-IoT but is used at UE side
|
||||
//HANDOVER_INFO_UE not implemented in NB-IoT
|
||||
typedef struct HANDOVER_INFO_UE_NB_IoT_s {
|
||||
PhysCellId_t targetCellId;
|
||||
LTE_PhysCellId_t targetCellId;
|
||||
uint8_t measFlag;
|
||||
} HANDOVER_INFO_UE_NB_IoT;
|
||||
|
||||
//NB-IoT eNB_RRC_UE_NB_IoT_s--(used as a context in eNB --> ue_context in rrc_eNB_ue_context)------
|
||||
typedef struct eNB_RRC_UE_NB_IoT_s {
|
||||
|
||||
EstablishmentCause_t establishment_cause;
|
||||
LTE_EstablishmentCause_t establishment_cause;
|
||||
uint8_t primaryCC_id;
|
||||
//in NB-IoT only SRB0, SRB1 and SRB1bis (until AS security activation) exist
|
||||
|
||||
@@ -256,14 +256,14 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
|
||||
* message previously sent by the eNB (e.g. RRCConnectionSetup -- RRCConnectionSetupComplete)
|
||||
* this because it could happen that more messages are transmitted at the same time
|
||||
*/
|
||||
SRB_ToAddModList_NB_r13_t* SRB_configList;//for SRB1 and SRB1bis
|
||||
SRB_ToAddModList_NB_r13_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
DRB_ToAddModList_NB_r13_t* DRB_configList; //for all the DRBs
|
||||
DRB_ToAddModList_NB_r13_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
|
||||
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList;//for SRB1 and SRB1bis
|
||||
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
|
||||
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList; //for all the DRBs
|
||||
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
|
||||
uint8_t DRB_active[2];//in LTE was 8 --> at most 2 for NB-IoT
|
||||
|
||||
struct PhysicalConfigDedicated_NB_r13* physicalConfigDedicated_NB_IoT;
|
||||
MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT;
|
||||
struct LTE_PhysicalConfigDedicated_NB_r13* physicalConfigDedicated_NB_IoT;
|
||||
LTE_MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT;
|
||||
|
||||
//No SPS(semi-persistent scheduling) in NB-IoT
|
||||
//No Measurement report in NB-IoT
|
||||
@@ -279,8 +279,8 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
|
||||
#endif
|
||||
|
||||
/* Used integrity/ciphering algorithms--> maintained the same for NB-IoT */
|
||||
e_CipheringAlgorithm_r12 ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version
|
||||
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
|
||||
e_LTE_CipheringAlgorithm_r12 ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version
|
||||
e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
|
||||
|
||||
uint8_t Status;
|
||||
rnti_t rnti;
|
||||
@@ -290,10 +290,10 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
|
||||
|
||||
/* Information from UE RRC ConnectionRequest-NB-r13_IE--> NB-IoT */
|
||||
UE_S_TMSI_NB_IoT Initialue_identity_s_TMSI;
|
||||
EstablishmentCause_NB_r13_t establishment_cause_NB_IoT; //different set for NB-IoT
|
||||
LTE_EstablishmentCause_NB_r13_t establishment_cause_NB_IoT; //different set for NB-IoT
|
||||
|
||||
/* Information from UE RRC ConnectionReestablishmentRequest-NB--> NB-IoT */
|
||||
ReestablishmentCause_NB_r13_t reestablishment_cause_NB_IoT; //different set for NB_IoT
|
||||
LTE_ReestablishmentCause_NB_r13_t reestablishment_cause_NB_IoT; //different set for NB_IoT
|
||||
|
||||
/* UE id for initial connection to S1AP */
|
||||
uint16_t ue_initial_id;
|
||||
@@ -389,18 +389,18 @@ typedef struct {
|
||||
uint16_t physCellId; //not stored in the MIB-NB but is getting through NPSS/NSSS
|
||||
|
||||
//are the only static one (memory has been already allocated)
|
||||
BCCH_BCH_Message_NB_t mib_NB_IoT;
|
||||
BCCH_DL_SCH_Message_NB_t siblock1_NB_IoT; //SIB1-NB
|
||||
BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI
|
||||
LTE_BCCH_BCH_Message_NB_t mib_NB_IoT;
|
||||
LTE_BCCH_DL_SCH_Message_NB_t siblock1_NB_IoT; //SIB1-NB
|
||||
LTE_BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI
|
||||
|
||||
SystemInformationBlockType1_NB_t *sib1_NB_IoT;
|
||||
SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
|
||||
SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
|
||||
LTE_SystemInformationBlockType1_NB_t *sib1_NB_IoT;
|
||||
LTE_SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
|
||||
LTE_SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
|
||||
//not implemented yet
|
||||
SystemInformationBlockType4_NB_r13_t *sib4_NB_IoT;
|
||||
SystemInformationBlockType5_NB_r13_t *sib5_NB_IoT;
|
||||
SystemInformationBlockType14_NB_r13_t *sib14_NB_IoT;
|
||||
SystemInformationBlockType16_NB_r13_t *sib16_NB_IoT;
|
||||
LTE_SystemInformationBlockType4_NB_r13_t *sib4_NB_IoT;
|
||||
LTE_SystemInformationBlockType5_NB_r13_t *sib5_NB_IoT;
|
||||
LTE_SystemInformationBlockType14_NB_r13_t *sib14_NB_IoT;
|
||||
LTE_SystemInformationBlockType16_NB_r13_t *sib16_NB_IoT;
|
||||
|
||||
|
||||
SRB_INFO_NB_IoT SI;
|
||||
@@ -466,7 +466,7 @@ typedef struct OAI_UECapability_NB_IoT_s {
|
||||
uint8_t sdu[MAX_UE_CAPABILITY_SIZE_NB_IoT];
|
||||
uint8_t sdu_size;
|
||||
////NB-IoT------
|
||||
UE_Capability_NB_r13_t UE_Capability_NB_IoT; //replace the UE_EUTRA_Capability of LTE
|
||||
LTE_UE_Capability_NB_r13_t UE_Capability_NB_IoT; //replace the UE_EUTRA_Capability of LTE
|
||||
} OAI_UECapability_NB_IoT_t;
|
||||
|
||||
#define RRC_BUFFER_SIZE_MAX_NB_IoT 1024
|
||||
@@ -501,7 +501,7 @@ typedef struct UE_RRC_INST_NB_IoT_s {
|
||||
SystemInformationBlockType1_t *sib1[NB_CNX_UE];
|
||||
SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
|
||||
*/
|
||||
SystemInformationBlockType2_t *sib2[NB_CNX_UE];
|
||||
LTE_SystemInformationBlockType2_t *sib2[NB_CNX_UE];
|
||||
/*
|
||||
SystemInformationBlockType3_t *sib3[NB_CNX_UE];
|
||||
SystemInformationBlockType4_t *sib4[NB_CNX_UE];
|
||||
@@ -513,7 +513,7 @@ typedef struct UE_RRC_INST_NB_IoT_s {
|
||||
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
|
||||
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
uint8_t MBMS_flag;
|
||||
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
|
||||
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "RRC/LTE/defs_NB_IoT.h"
|
||||
#include "PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "LogicalChannelConfig-NB-r13.h"
|
||||
#include "LTE_LogicalChannelConfig-NB-r13.h"
|
||||
#include "LAYER2/MAC/defs_NB_IoT.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
@@ -48,8 +48,8 @@ extern PHY_Config_NB_IoT_t *config_INFO;
|
||||
|
||||
extern rlc_info_t Rlc_info_am_NB_IoT,Rlc_info_am_config_NB_IoT;
|
||||
extern uint8_t DRB2LCHAN_NB_IoT[2];
|
||||
extern LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
extern LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
extern LTE_LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
extern LTE_LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
|
||||
|
||||
extern uint16_t T300_NB_IoT[8];
|
||||
extern uint16_t T301_NB_IoT[8];
|
||||
|
||||
@@ -203,7 +203,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB_IoT(
|
||||
void rrc_eNB_process_RRCConnectionSetupComplete_NB_IoT(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP,
|
||||
RRCConnectionSetupComplete_NB_r13_IEs_t * rrcConnectionSetupComplete_NB
|
||||
LTE_RRCConnectionSetupComplete_NB_r13_IEs_t * rrcConnectionSetupComplete_NB
|
||||
);
|
||||
|
||||
void rrc_eNB_generate_SecurityModeCommand_NB_IoT(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user