Merge branch 'develop' into parallel-phy-test-EMUFH

Conflicts:
	openair1/PHY/defs_eNB.h
	targets/RT/USER/lte-enb.c
This commit is contained in:
Wang Tsu-Han
2018-06-12 16:18:45 +02:00
413 changed files with 37386 additions and 29283 deletions
+74
View File
@@ -0,0 +1,74 @@
// Comments
pipeline {
agent {
label 'bellatrix'
}
options {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
//gitlabBuilds(builds: ["Build", "Test"])
}
stages {
stage ("Verify Parameters") {
steps {
echo 'Verify Parameters'
echo "Git URL is ${GIT_URL}"
echo "GitLab Act is ${env.gitlabActionType}"
script {
if ("MERGE".equals(env.gitlabActionType)) {
// GitLab-Jenkins pugin integration is lacking to perform the merge by itself
// Doing it manually --> it may have merge conflicts
sh "./ci-scripts/doGitLabMerge.sh ${env.gitlabSourceBranch} ${env.gitlabMergeRequestLastCommit} ${env.gitlabTargetBranch} ${GIT_COMMIT}"
sh "./ci-scripts/checkCodingFormattingRules.sh ${env.gitlabSourceBranch} ${env.gitlabTargetBranch}"
def res=readFile('./oai_rules_result.txt').trim();
if ("0".equals(res)) {
addGitLabMRComment comment: "All Changed files in Merge Request follow OAI Formatting Rules"
} else {
addGitLabMRComment comment: "Some Changed files in Merge Request DO NOT follow OAI Formatting Rules"
}
} else {
echo "Git Branch is ${GIT_BRANCH}"
echo "Git Commit is ${GIT_COMMIT}"
sh "./ci-scripts/checkCodingFormattingRules.sh"
}
}
}
}
}
post {
always {
script {
echo "End of script"
}
}
success {
script {
def message = "OAI build #" + BUILD_ID + " passed (" + BUILD_URL + ")"
if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
addGitLabMRComment comment: message
def message2 = "OAI build #" + BUILD_ID + " passed (" + BUILD_URL + ") -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
slackSend channel: 'ci-enb', color: 'good', message: message2
} else {
slackSend channel: 'ci-enb', color: 'good', message: message
}
}
}
failure {
script {
def message = "OAI build #" + BUILD_ID + " failed (" + BUILD_URL + ")"
if ("MERGE".equals(env.gitlabActionType)) {
echo "This is a MERGE event"
addGitLabMRComment comment: message
def message2 = "OAI build #" + BUILD_ID + " failed (" + BUILD_URL + ") -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
slackSend channel: 'ci-enb', color: 'danger', message: message2
} else {
slackSend channel: 'ci-enb', color: 'danger', message: message
}
}
}
}
}
+20
View File
@@ -0,0 +1,20 @@
# OAI is using a style that is similar to the Google style
--style=google
# long options can be written without the preceding '--'
# Convert tabs to spaces
convert-tabs
# Indentation is 2 spaces
indent=spaces=2
# Indent 'switch' blocks so that the 'case X:' statements are indented in the switch block.
indent-switches
# Indent C++ comments beginning in column one.
indent-col1-comments
# Pad empty lines around header blocks
break-blocks
delete-empty-lines
# Attach a pointer or reference operator (*, &, or ^) to the variable name (right)
align-pointer=name
# The code line length is 200 characters/columns
max-code-length=200
break-after-logical
lineend=linux
+51
View File
@@ -0,0 +1,51 @@
#!/bin/bash
if [ $# -eq 0 ]
then
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted `
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
exit 0
fi
if [ $# -eq 2 ]
then
# Merge request scenario
SOURCE_BRANCH=$1
echo "Source Branch is : $SOURCE_BRANCH"
TARGET_BRANCH=$2
echo "Target Branch is : $TARGET_BRANCH"
MERGE_COMMMIT=`git log -n1 | grep commit | sed -e "s@commit @@"`
echo "Merged Commit is : $MERGE_COMMMIT"
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
echo "Target Init is : $TARGET_INIT_COMMIT"
# Retrieve the list of modified files since the latest develop commit
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
NB_TO_FORMAT=0
for FULLFILE in $MODIFIED_FILES
do
echo $FULLFILE
filename=$(basename -- "$FULLFILE")
EXT="${filename##*.}"
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
then
TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted `
NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT))
fi
done
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
echo $NB_TO_FORMAT > ./oai_rules_result.txt
exit 0
fi
if [ $# -ne 0 ] || [ $# -ne 2 ]
then
echo "Syntax error: $0 without any option will check all files in repository"
echo " or: $0 source-branch target-branch"
echo " will only check files that are pushed for a merge-request"
exit 1
fi
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
if [ $# -ne 4 ]
then
echo "Syntax Error: $0 src-branch src-commit-id dest-branch dest-commit-id"
exit 1
fi
SOURCE_BRANCH=$1
echo "Source Branch is : $SOURCE_BRANCH"
SOURCE_COMMIT_ID=$2
echo "Source Commit ID is : $SOURCE_COMMIT_ID"
TARGET_BRANCH=$3
echo "Target Branch is : $TARGET_BRANCH"
TARGET_COMMIT_ID=$4
echo "Target Commit ID is : $TARGET_COMMIT_ID"
git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"
git checkout -f $SOURCE_COMMIT_ID
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
+240 -291
View File
@@ -113,6 +113,14 @@ macro(add_list_string_option name val helpstr)
add_definitions("-D${name}=\"${value}\"") add_definitions("-D${name}=\"${value}\"")
endif() endif()
endmacro(add_list_string_option) endmacro(add_list_string_option)
function(make_version VERSION_VALUE)
math(EXPR RESULT "0")
foreach (ARG ${ARGN})
math(EXPR RESULT "${RESULT} * 16 + ${ARG}")
endforeach()
set(${VERSION_VALUE} "${RESULT}" PARENT_SCOPE)
endfunction()
#################################################### ####################################################
# compilation flags # compilation flags
############################################# #############################################
@@ -162,7 +170,7 @@ set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ") "${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC ")
# add autotools definitions that were maybe used! # add autotools definitions that were maybe used!
set(CMAKE_C_FLAGS set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP" "${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'"
) )
set(CMAKE_CXX_FLAGS set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 " "${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 "
@@ -243,6 +251,7 @@ add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros") add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
add_boolean_option(USRP_REC_PLAY False "Enable USRP record playback mode") add_boolean_option(USRP_REC_PLAY False "Enable USRP record playback mode")
add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko") add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko")
add_boolean_option(BASIC_SIMULATOR False "Has to be True when building the basic simulator, False otherwise")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering") add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
@@ -284,16 +293,21 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
add_list2_option(RRC_ASN1_VERSION "Rel14" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA") add_list2_option(RRC_ASN1_VERSION "Rel14" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
if (${RRC_ASN1_VERSION} STREQUAL "Rel8") if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn) make_version(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") elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn) make_version(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") elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn) make_version(RRC_VERSION 10 2 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
else() else()
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1c/ASN1_files/RRC-e30.asn) make_version(RRC_VERSION 14 3 0)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/RRC-e30.asn)
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8") endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
add_definitions(-DRRC_VERSION=${RRC_VERSION})
set (RRC_FULL_DIR ${asn1_generated_dir}/${RRC_ASN1_VERSION}) set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
if(NOT EXISTS ${asn1c_call}) if(NOT EXISTS ${asn1c_call})
message( FATAL_ERROR "The script ${asn1c_call} must be present" ) message( FATAL_ERROR "The script ${asn1c_call} must be present" )
endif(NOT EXISTS ${asn1c_call}) endif(NOT EXISTS ${asn1c_call})
@@ -315,8 +329,8 @@ file(GLOB rrc_h ${RRC_FULL_DIR}/*.h)
set(rrc_h ${rrc_h} ${RRC_FULL_DIR}/asn1_constants.h) set(rrc_h ${rrc_h} ${RRC_FULL_DIR}/asn1_constants.h)
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
add_library(RRC_LIB ${rrc_h} ${rrc_source} add_library(RRC_LIB ${rrc_h} ${rrc_source}
${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1_msg.c ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg.c
${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1_msg_NB_IoT.c) ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c)
include_directories ("${RRC_FULL_DIR}") include_directories ("${RRC_FULL_DIR}")
# add the command to generate the source code # add the command to generate the source code
@@ -332,18 +346,20 @@ add_custom_command (
# Same limitation as described in RRC: unknown generated file list # Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time # so we generate it at cmake time
############## ##############
add_list1_option(S1AP_VERSION R10 "S1AP Asn.1 grammar version" R8 R9 R10) add_list1_option(S1AP_RELEASE R10 "S1AP ASN.1 grammar version" R8 R9 R10)
set(S1AP_DIR ${OPENAIR3_DIR}/S1AP) set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
if (${S1AP_VERSION} STREQUAL "R10") if (${S1AP_RELEASE} STREQUAL "R8")
set (ASN1RELDIR R10.5) make_version(S1AP_VERSION 8 10 0)
add_definitions("-DUPDATE_RELEASE_9 -DUPDATE_RELEASE_10")
elseif (${S1AP_VERSION} STREQUAL "R9")
set (ASN1RELDIR R9.8)
add_definitions("-DUPDATE_RELEASE_9")
else(${S1AP_VERSION} STREQUAL "R8")
set (ASN1RELDIR R8.10) set (ASN1RELDIR R8.10)
endif(${S1AP_VERSION} STREQUAL "R10") elseif (${S1AP_RELEASE} STREQUAL "R9")
make_version(S1AP_VERSION 9 8 0)
set (ASN1RELDIR R9.8)
elseif (${S1AP_RELEASE} STREQUAL "R10")
make_version(S1AP_VERSION 10 5 0)
set (ASN1RELDIR R10.5)
endif(${S1AP_RELEASE} STREQUAL "R8")
add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR}) set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
set(S1AP_ASN_FILES set(S1AP_ASN_FILES
${S1AP_ASN_DIR}/S1AP-CommonDataTypes.asn ${S1AP_ASN_DIR}/S1AP-CommonDataTypes.asn
@@ -351,7 +367,7 @@ set(S1AP_ASN_FILES
${S1AP_ASN_DIR}/S1AP-IEs.asn ${S1AP_ASN_DIR}/S1AP-IEs.asn
${S1AP_ASN_DIR}/S1AP-PDU.asn ${S1AP_ASN_DIR}/S1AP-PDU.asn
) )
set(S1AP_C_DIR ${asn1_generated_dir}/${ASN1RELDIR}) set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${ASN1RELDIR})
#message("calling ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}") #message("calling ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}")
execute_process(COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES} execute_process(COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
@@ -363,7 +379,7 @@ execute_process(COMMAND python ${S1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f${S1A
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "asn1tostruct.py: error") message(FATAL_ERROR "asn1tostruct.py: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
execute_process(COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_VERSION} execute_process(COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_RELEASE}
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${fix_asn1c_call}: error") message(FATAL_ERROR "${fix_asn1c_call}: error")
@@ -384,7 +400,7 @@ add_custom_command (
OUTPUT ${S1AP_OAI_generated} OUTPUT ${S1AP_OAI_generated}
COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES} COMMAND ${asn1c_call} ${S1AP_C_DIR} ${S1AP_ASN_FILES}
COMMAND python ${S1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f${S1AP_ASN_DIR}/S1AP-PDU-Contents.asn -o${S1AP_C_DIR} COMMAND python ${S1AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f${S1AP_ASN_DIR}/S1AP-PDU-Contents.asn -o${S1AP_C_DIR}
COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_VERSION} COMMAND ${fix_asn1c_call} ${S1AP_C_DIR} S1AP ${S1AP_RELEASE}
DEPENDS ${S1AP_ASN_FILES} DEPENDS ${S1AP_ASN_FILES}
) )
add_library(S1AP_LIB add_library(S1AP_LIB
@@ -418,13 +434,16 @@ add_library(S1AP_ENB
# Same limitation as described in RRC/S1AP: unknown generated file list # Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time # so we generate it at cmake time
############## ##############
add_list1_option(X2AP_VERSION R11 "X2AP Asn.1 grammar version" R10 R11) add_list1_option(X2AP_RELEASE R11 "X2AP ASN.1 grammar version" R10 R11)
set(X2AP_DIR ${OPENAIR2_DIR}/X2AP) set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
if (${X2AP_VERSION} STREQUAL "R11") if (${X2AP_RELEASE} STREQUAL "R10")
set (ASN1RELDIR R11.2) make_version(S1AP_VERSION 10 0 0)
elseif (${X2AP_VERSION} STREQUAL "R10")
set (ASN1RELDIR R.UNKNOWN) set (ASN1RELDIR R.UNKNOWN)
endif(${X2AP_VERSION} STREQUAL "R11") elseif (${X2AP_RELEASE} STREQUAL "R11")
make_version(S1AP_VERSION 11 2 0)
set (ASN1RELDIR R11.2)
endif(${X2AP_RELEASE} STREQUAL "R10")
add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR}) set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${ASN1RELDIR})
set(X2AP_ASN_FILES set(X2AP_ASN_FILES
${X2AP_ASN_DIR}/X2AP-CommonDataTypes.asn ${X2AP_ASN_DIR}/X2AP-CommonDataTypes.asn
@@ -434,7 +453,7 @@ set(X2AP_ASN_FILES
${X2AP_ASN_DIR}/X2AP-Containers.asn ${X2AP_ASN_DIR}/X2AP-Containers.asn
) )
set(X2AP_C_DIR ${asn1_generated_dir}/${ASN1RELDIR}) set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${ASN1RELDIR})
#message("calling ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}") #message("calling ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}")
execute_process(COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES} execute_process(COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
@@ -446,7 +465,7 @@ execute_process(COMMAND python ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "asn1tostruct.py: error") message(FATAL_ERROR "asn1tostruct.py: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
execute_process(COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION} execute_process(COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_RELEASE}
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${fix_asn1c_call}: error") message(FATAL_ERROR "${fix_asn1c_call}: error")
@@ -467,7 +486,7 @@ add_custom_command (
OUTPUT ${X2AP_OAI_generated} OUTPUT ${X2AP_OAI_generated}
COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES} COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_FILES}
COMMAND python ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2AP_ASN_DIR}/X2AP-PDU-Contents.asn -o ${X2AP_C_DIR} COMMAND python ${X2AP_DIR}/MESSAGES/ASN1/asn1tostruct.py -f ${X2AP_ASN_DIR}/X2AP-PDU-Contents.asn -o ${X2AP_C_DIR}
COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION} COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_RELEASE}
DEPENDS ${X2AP_ASN_FILES} DEPENDS ${X2AP_ASN_FILES}
) )
@@ -563,14 +582,26 @@ add_library(oai_mobipass MODULE ${TPLIB_MOBIPASS_SOURCE} )
get_target_property(mobipas_cflags oai_mobipass COMPILE_FLAGS) get_target_property(mobipas_cflags oai_mobipass COMPILE_FLAGS)
set_target_properties(oai_mobipass PROPERTIES COMPILE_FLAGS "${mobipass_cflags} -fvisibility=hidden") set_target_properties(oai_mobipass PROPERTIES COMPILE_FLAGS "${mobipass_cflags} -fvisibility=hidden")
# TCP bridge libraries
######################################################################
# this one is for internal use at Eurecom and is not documented
set(HWLIB_TCP_BRIDGE_SOURCE set(HWLIB_TCP_BRIDGE_SOURCE
${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge.c ${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge.c
) )
add_library(oai_tcp_bridge MODULE ${HWLIB_TCP_BRIDGE_SOURCE} ) add_library(tcp_bridge MODULE ${HWLIB_TCP_BRIDGE_SOURCE} )
#get_target_property(tcp_bridge_cflags oai_tcp_bridge COMPILE_FLAGS) #get_target_property(tcp_bridge_cflags tcp_bridge COMPILE_FLAGS)
#set_target_properties(oai_tcp_bridge PROPERTIES COMPILE_FLAGS "${tcp_bridge_cflags} -fvisibility=hidden") #set_target_properties(tcp_bridge PROPERTIES COMPILE_FLAGS "${tcp_bridge_cflags} -fvisibility=hidden")
set_target_properties(oai_tcp_bridge PROPERTIES COMPILE_FLAGS "-fvisibility=hidden") set_target_properties(tcp_bridge PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
# this one is to connect OAI eNB and OAI UE in the basic simulator
# see targets/ARCH/tcp_bridge/README.tcp_bridge_oai for usage
set(HWLIB_TCP_BRIDGE_OAI_SOURCE
${OPENAIR_TARGETS}/ARCH/tcp_bridge/tcp_bridge_oai.c
)
add_library(tcp_bridge_oai MODULE ${HWLIB_TCP_BRIDGE_OAI_SOURCE} )
set_target_properties(tcp_bridge_oai PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
########################################################## ##########################################################
@@ -635,12 +666,6 @@ add_boolean_option(DEBUG_PHY False "Enable PHY layer debugging opt
add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures") add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures")
add_boolean_option(DEBUG_DLSCH False "Enable debugging of DLSCH physical layer channel") add_boolean_option(DEBUG_DLSCH False "Enable debugging of DLSCH physical layer channel")
##########################
# 802.21 options
##########################
add_boolean_option(ENABLE_RAL False "ENABLE 802.21 INTERFACE")
add_boolean_option(USE_3GPP_ADDR_AS_LINK_ADDR False "As per attribute name")
########################## ##########################
# NAS LAYER OPTIONS # NAS LAYER OPTIONS
########################## ##########################
@@ -709,7 +734,7 @@ include_directories("${OPENAIR_BIN_DIR}")
# add directories to find all include files # add directories to find all include files
# the internal rule is to use generic names such as defs.h # the internal rule is to use generic names such as defs.h
# but to make it uniq name as adding the relative path in the include directtive # but to make it uniq name as adding the relative path in the include directtive
# example: #include "RRC/LITE/defs.h" # example: #include "RRC/LTE/rrc_defs.h"
#find_path (include_dirs_all *.h ${OPENAIR_DIR}) #find_path (include_dirs_all *.h ${OPENAIR_DIR})
#find_path (include_dirs_all *.h PATHS /usr/include NO_CMAKE_PATH) #find_path (include_dirs_all *.h PATHS /usr/include NO_CMAKE_PATH)
#include_directories("${include_dirs_all}") #include_directories("${include_dirs_all}")
@@ -741,11 +766,8 @@ include_directories("${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0")
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0") include_directories("${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0")
include_directories("${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0") include_directories("${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0")
include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0") include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0")
include_directories("${OPENAIR2_DIR}/RRC/LITE/MESSAGES") include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
include_directories("${OPENAIR2_DIR}/RRC/LITE") include_directories("${OPENAIR2_DIR}/RRC/LTE")
include_directories("${OPENAIR3_DIR}/RAL-LTE/INTERFACE-802.21/INCLUDE")
include_directories("${OPENAIR3_DIR}/RAL-LTE/LTE_RAL_ENB/INCLUDE")
include_directories("${OPENAIR3_DIR}/RAL-LTE/LTE_RAL_UE/INCLUDE")
include_directories("${OPENAIR_DIR}/common/utils") include_directories("${OPENAIR_DIR}/common/utils")
include_directories("${OPENAIR_DIR}/common/utils/itti") include_directories("${OPENAIR_DIR}/common/utils/itti")
include_directories("${OPENAIR3_DIR}/NAS/COMMON") include_directories("${OPENAIR3_DIR}/NAS/COMMON")
@@ -782,7 +804,7 @@ include_directories("${OPENAIR2_DIR}/UTIL/OTG")
include_directories("${OPENAIR2_DIR}/UTIL/CLI") include_directories("${OPENAIR2_DIR}/UTIL/CLI")
include_directories("${OPENAIR2_DIR}/UTIL/OPT") include_directories("${OPENAIR2_DIR}/UTIL/OPT")
include_directories("${OPENAIR2_DIR}/UTIL/OMV") include_directories("${OPENAIR2_DIR}/UTIL/OMV")
include_directories("${OPENAIR2_DIR}/RRC/LITE/MESSAGES") include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/shared") include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/shared")
include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/include") include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/include")
include_directories("${OPENAIR_DIR}") include_directories("${OPENAIR_DIR}")
@@ -894,9 +916,9 @@ endif()
include_directories(${OPENAIR_DIR}/common/utils/msc) include_directories(${OPENAIR_DIR}/common/utils/msc)
set(UTIL_SRC set(UTIL_SRC
${OPENAIR2_DIR}/UTIL/CLI/cli.c # ${OPENAIR2_DIR}/UTIL/CLI/cli.c
${OPENAIR2_DIR}/UTIL/CLI/cli_cmd.c # ${OPENAIR2_DIR}/UTIL/CLI/cli_cmd.c
${OPENAIR2_DIR}/UTIL/CLI/cli_server.c # ${OPENAIR2_DIR}/UTIL/CLI/cli_server.c
${OPENAIR2_DIR}/UTIL/FIFO/pad_list.c ${OPENAIR2_DIR}/UTIL/FIFO/pad_list.c
${OPENAIR2_DIR}/UTIL/LISTS/list.c ${OPENAIR2_DIR}/UTIL/LISTS/list.c
${OPENAIR2_DIR}/UTIL/LISTS/list2.c ${OPENAIR2_DIR}/UTIL/LISTS/list2.c
@@ -904,32 +926,32 @@ set(UTIL_SRC
${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c
${OPENAIR2_DIR}/UTIL/MATH/oml.c ${OPENAIR2_DIR}/UTIL/MATH/oml.c
${OPENAIR2_DIR}/UTIL/MEM/mem_block.c ${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
${OPENAIR2_DIR}/UTIL/OCG/OCG.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
${OPENAIR2_DIR}/UTIL/OCG/OCG_generate_report.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_generate_report.c
${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_filename.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_filename.c
${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_XML.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_parse_XML.c
${OPENAIR2_DIR}/UTIL/OCG/OCG_save_XML.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_save_XML.c
${OPENAIR2_DIR}/UTIL/OMG/common.c # ${OPENAIR2_DIR}/UTIL/OMG/common.c
${OPENAIR2_DIR}/UTIL/OMG/grid.c # ${OPENAIR2_DIR}/UTIL/OMG/grid.c
${OPENAIR2_DIR}/UTIL/OMG/job.c # ${OPENAIR2_DIR}/UTIL/OMG/job.c
${OPENAIR2_DIR}/UTIL/OMG/mobility_parser.c # ${OPENAIR2_DIR}/UTIL/OMG/mobility_parser.c
${OPENAIR2_DIR}/UTIL/OMG/omg.c # ${OPENAIR2_DIR}/UTIL/OMG/omg.c
#${OPENAIR2_DIR}/UTIL/OMG/omg_hashtable.c #${OPENAIR2_DIR}/UTIL/OMG/omg_hashtable.c
${OPENAIR2_DIR}/UTIL/OMG/rwalk.c # ${OPENAIR2_DIR}/UTIL/OMG/rwalk.c
${OPENAIR2_DIR}/UTIL/OMG/rwp.c # ${OPENAIR2_DIR}/UTIL/OMG/rwp.c
${OPENAIR2_DIR}/UTIL/OMG/static.c # ${OPENAIR2_DIR}/UTIL/OMG/static.c
${OPENAIR2_DIR}/UTIL/OMG/steadystaterwp.c # ${OPENAIR2_DIR}/UTIL/OMG/steadystaterwp.c
${OPENAIR2_DIR}/UTIL/OMG/trace.c # ${OPENAIR2_DIR}/UTIL/OMG/trace.c
${OPENAIR2_DIR}/UTIL/OMG/trace_hashtable.c # ${OPENAIR2_DIR}/UTIL/OMG/trace_hashtable.c
${OPENAIR2_DIR}/UTIL/OPT/probe.c ${OPENAIR2_DIR}/UTIL/OPT/probe.c
${OPENAIR2_DIR}/UTIL/OTG/otg_tx.c # ${OPENAIR2_DIR}/UTIL/OTG/otg_tx.c
${OPENAIR2_DIR}/UTIL/OTG/otg.c # ${OPENAIR2_DIR}/UTIL/OTG/otg.c
${OPENAIR2_DIR}/UTIL/OTG/otg_kpi.c # ${OPENAIR2_DIR}/UTIL/OTG/otg_kpi.c
${OPENAIR2_DIR}/UTIL/OTG/otg_models.c # ${OPENAIR2_DIR}/UTIL/OTG/otg_models.c
${OPENAIR2_DIR}/UTIL/OTG/otg_form.c # ${OPENAIR2_DIR}/UTIL/OTG/otg_form.c
${OPENAIR2_DIR}/UTIL/OTG/otg_rx.c # ${OPENAIR2_DIR}/UTIL/OTG/otg_rx.c
) )
add_library(UTIL ${UTIL_SRC}) add_library(UTIL ${UTIL_SRC})
@@ -963,30 +985,27 @@ set(SECU_CN_SRC
) )
add_library(SECU_CN ${SECU_CN_SRC}) add_library(SECU_CN ${SECU_CN_SRC})
# Scheduler # Physical Channel Procedures Scheduling
################################" ################################"
set(SCHED_SRC set(SCHED_SRC
${OPENAIR1_DIR}/SCHED/fapi_l1.c ${OPENAIR1_DIR}/SCHED/fapi_l1.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_eNb.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_eNb.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c
${OPENAIR1_DIR}/SCHED/ru_procedures.c
# ${OPENAIR1_DIR}/SCHED/phy_mac_stub.c
${OPENAIR1_DIR}/SCHED/pucch_pc.c
${OPENAIR1_DIR}/SCHED/pusch_pc.c
${OPENAIR1_DIR}/SCHED/srs_pc.c
) )
add_library(SCHED_LIB ${SCHED_SRC}) add_library(SCHED_LIB ${SCHED_SRC})
set(SCHED_SRC_UE set(SCHED_SRC_RU
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED/ru_procedures.c ${OPENAIR1_DIR}/SCHED/ru_procedures.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c ${OPENAIR1_DIR}/SCHED/prach_procedures.c
${OPENAIR1_DIR}/SCHED/pucch_pc.c )
${OPENAIR1_DIR}/SCHED/pusch_pc.c add_library(SCHED_RU_LIB ${SCHED_SRC_RU})
${OPENAIR1_DIR}/SCHED/srs_pc.c
set(SCHED_SRC_UE
${OPENAIR1_DIR}/SCHED_UE/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED_UE/pucch_pc.c
${OPENAIR1_DIR}/SCHED_UE/pusch_pc.c
${OPENAIR1_DIR}/SCHED_UE/srs_pc.c
) )
add_library(SCHED_UE_LIB ${SCHED_SRC_UE}) add_library(SCHED_UE_LIB ${SCHED_SRC_UE})
@@ -1057,156 +1076,26 @@ set(PHY_TURBOIF
) )
add_library(coding MODULE ${PHY_TURBOSRC} ) add_library(coding MODULE ${PHY_TURBOSRC} )
set(PHY_SRC set(PHY_SRC_COMMON
# depend on code generation from asn1c # depend on code generation from asn1c
${RRC_FULL_DIR}/asn1_constants.h ${RRC_FULL_DIR}/asn1_constants.h
# actual source # actual source
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pbch.c # ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c # ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sldch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/edci.c # ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slsch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c
${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/adjust_gain.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_cell_spec.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_uespec.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_gold.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_gold_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_ul_ref.c
${OPENAIR1_DIR}/PHY/CODING/lte_segmentation.c
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte.c
${OPENAIR1_DIR}/PHY/CODING/ccoding_byte_lte.c
${OPENAIR1_DIR}/PHY/CODING/crc_byte.c
${PHY_TURBOIF}
${OPENAIR1_DIR}/PHY/CODING/lte_rate_matching.c
${OPENAIR1_DIR}/PHY/CODING/viterbi.c
${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c
${OPENAIR1_DIR}/PHY/INIT/lte_init.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ue.c
${OPENAIR1_DIR}/PHY/INIT/init_top.c
${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c
${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c
${OPENAIR1_DIR}/PHY/TOOLS/cdot_prod.c
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
${OPENAIR1_DIR}/PHY/TOOLS/time_meas.c
${OPENAIR1_DIR}/PHY/TOOLS/lut.c
)
set(PHY_SRC_UE
# depend on code generation from asn1c
${RRC_FULL_DIR}/asn1_constants.h
# actual source
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/power_control.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_decoding.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_scrambling.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/srs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pbch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/edci.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/print_stats.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c ${OPENAIR1_DIR}/PHY/MODULATION/ofdm_mod.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c
${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/adjust_gain.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_cell_spec.c ${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_cell_spec.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_uespec.c ${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_dl_uespec.c
${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_gold.c ${OPENAIR1_DIR}/PHY/LTE_REFSIG/lte_gold.c
@@ -1222,8 +1111,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/CODING/lte_rate_matching.c ${OPENAIR1_DIR}/PHY/CODING/lte_rate_matching.c
${OPENAIR1_DIR}/PHY/CODING/viterbi.c ${OPENAIR1_DIR}/PHY/CODING/viterbi.c
${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c ${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ue.c
${OPENAIR1_DIR}/PHY/INIT/init_top.c ${OPENAIR1_DIR}/PHY/INIT/init_top.c
${OPENAIR1_DIR}/PHY/INIT/lte_parms.c ${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c ${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
@@ -1241,17 +1128,97 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/TOOLS/lut.c ${OPENAIR1_DIR}/PHY/TOOLS/lut.c
) )
set(PHY_SRC
# actual source
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pbch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/edci.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
${OPENAIR1_DIR}/PHY/INIT/lte_init.c
)
set(PHY_SRC_RU
# actual source
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c
${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
)
set(PHY_SRC_UE
# actual source
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/sss_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/uci_tools_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pbch_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dci_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/phich_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pcfich_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pucch_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/prach_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pmch_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/pch_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/slss.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/sldch.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/slsch.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/drs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz_ue.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_time.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/adjust_gain.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ue.c
)
if (${SMBV}) if (${SMBV})
set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c") set(PHY_SRC "${PHY_SRC} ${OPENAIR1_DIR}/PHY/TOOLS/smbv.c")
endif (${SMBV}) endif (${SMBV})
if (${COMPILATION_AVX2} STREQUAL "True") if (${COMPILATION_AVX2} STREQUAL "True")
set(PHY_SRC ${PHY_SRC} ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c) set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c)
set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_llr_computation_avx2.c)
endif () endif ()
add_library(PHY_COMMON ${PHY_SRC_COMMON})
add_library(PHY ${PHY_SRC}) add_library(PHY ${PHY_SRC})
add_library(PHY_UE ${PHY_SRC_UE}) add_library(PHY_UE ${PHY_SRC_UE})
add_library(PHY_RU ${PHY_SRC_RU})
#Layer 2 library #Layer 2 library
##################### #####################
@@ -1261,7 +1228,7 @@ set(RLC_DIR ${OPENAIR2_DIR}/LAYER2/RLC)
set(RLC_UM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0) set(RLC_UM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0)
set(RLC_AM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0) set(RLC_AM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0)
set(RLC_TM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0) set(RLC_TM_DIR ${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0)
set(RRC_DIR ${OPENAIR2_DIR}/RRC/LITE) set(RRC_DIR ${OPENAIR2_DIR}/RRC/LTE)
set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0) set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0)
set(L2_SRC set(L2_SRC
${OPENAIR2_DIR}/LAYER2/openair2_proc.c ${OPENAIR2_DIR}/LAYER2/openair2_proc.c
@@ -1351,14 +1318,15 @@ set(L2_SRC_UE
) )
set (MAC_SRC set (MAC_SRC
#${PHY_INTERFACE_DIR}/phy_stub_UE.c
${PHY_INTERFACE_DIR}/IF_Module.c ${PHY_INTERFACE_DIR}/IF_Module.c
${MAC_DIR}/main.c ${MAC_DIR}/main.c
${MAC_DIR}/main_ue.c #${MAC_DIR}/main_ue.c
${MAC_DIR}/ue_procedures.c #${MAC_DIR}/ue_procedures.c
${MAC_DIR}/ra_procedures.c #${MAC_DIR}/ra_procedures.c
${MAC_DIR}/l1_helpers.c ${MAC_DIR}/l1_helpers.c
${MAC_DIR}/rar_tools.c ${MAC_DIR}/rar_tools.c
${MAC_DIR}/rar_tools_ue.c #${MAC_DIR}/rar_tools_ue.c
${MAC_DIR}/eNB_scheduler.c ${MAC_DIR}/eNB_scheduler.c
${MAC_DIR}/eNB_scheduler_dlsch.c ${MAC_DIR}/eNB_scheduler_dlsch.c
${MAC_DIR}/eNB_scheduler_ulsch.c ${MAC_DIR}/eNB_scheduler_ulsch.c
@@ -1369,10 +1337,11 @@ set (MAC_SRC
${MAC_DIR}/eNB_scheduler_phytest.c ${MAC_DIR}/eNB_scheduler_phytest.c
${MAC_DIR}/pre_processor.c ${MAC_DIR}/pre_processor.c
${MAC_DIR}/config.c ${MAC_DIR}/config.c
${MAC_DIR}/config_ue.c #${MAC_DIR}/config_ue.c
) )
set (MAC_SRC_UE set (MAC_SRC_UE
${PHY_INTERFACE_DIR}/phy_stub_UE.c
${MAC_DIR}/main_ue.c ${MAC_DIR}/main_ue.c
${MAC_DIR}/ue_procedures.c ${MAC_DIR}/ue_procedures.c
${MAC_DIR}/ra_procedures.c ${MAC_DIR}/ra_procedures.c
@@ -1398,38 +1367,11 @@ add_library(L2_UE
${MAC_SRC_UE} ${MAC_SRC_UE}
) )
include_directories(${NFAPI_USER_DIR}) include_directories(${NFAPI_USER_DIR})
# L3 Libs # L3 Libs
########################## ##########################
set(RAL_LTE_DIR ${OPENAIR3_DIR}/RAL-LTE/)
if (${ENABLE_RAL})
set(RAL_LTE_SRC
${RRC_DIR}/rrc_UE_ral.c
${RRC_DIR}/rrc_eNB_ral.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_action.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_main.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_mih_msg.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_parameters.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_process.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_rrc_msg.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_subscribe.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_thresholds.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_action.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_main.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_mih_msg.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_parameters.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_process.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_rrc_msg.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_subscribe.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_thresholds.c
)
add_library(RAL ${RAL_LTE_SRC})
set(RAL_LIB RAL)
endif()
# CN libs # CN libs
########################## ##########################
@@ -1776,8 +1718,8 @@ ${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
${OPENAIR1_DIR}/SIMULATION/RF/rf.c ${OPENAIR1_DIR}/SIMULATION/RF/rf.c
${OPENAIR1_DIR}/SIMULATION/RF/dac.c ${OPENAIR1_DIR}/SIMULATION/RF/dac.c
${OPENAIR1_DIR}/SIMULATION/RF/adc.c ${OPENAIR1_DIR}/SIMULATION/RF/adc.c
@@ -1964,10 +1906,11 @@ add_executable(lte-softmodem
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c ${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
@@ -1981,7 +1924,7 @@ add_executable(lte-softmodem
target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl) -Wl,--end-group z dl)
@@ -2003,12 +1946,13 @@ add_executable(lte-softmodem-nos1
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c ${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_SOURCE_SOFTMODEM}
@@ -2018,13 +1962,13 @@ add_executable(lte-softmodem-nos1
) )
target_link_libraries (lte-softmodem-nos1 target_link_libraries (lte-softmodem-nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB}
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl ) -Wl,--end-group z dl )
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${T_LIB}) target_link_libraries (lte-softmodem-nos1 ${T_LIB})
@@ -2039,10 +1983,11 @@ add_executable(lte-uesoftmodem
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c ${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
@@ -2055,8 +2000,9 @@ add_executable(lte-uesoftmodem
target_link_libraries (lte-uesoftmodem target_link_libraries (lte-uesoftmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_UE_LIB PHY_UE LFDS L2_UE RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
@@ -2064,22 +2010,24 @@ target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${
target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-uesoftmodem ${T_LIB}) target_link_libraries (lte-uesoftmodem ${T_LIB})
# lte-softmodem-nos1 is both eNB and UE implementation # lte-uesoftmodem-nos1 is UE implementation
################################################### ###################################################
add_executable(lte-uesoftmodem-nos1 add_executable(lte-uesoftmodem-nos1
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h # ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c ${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c ${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM} ${XFORMS_SOURCE_SOFTMODEM}
@@ -2087,10 +2035,12 @@ add_executable(lte-uesoftmodem-nos1
${CONFIG_SOURCES} ${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES} ${SHLIB_LOADER_SOURCES}
) )
target_link_libraries (lte-uesoftmodem-nos1 target_link_libraries (lte-uesoftmodem-nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_UE_LIB PHY_UE LFDS L2_UE ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB}
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl ) -Wl,--end-group z dl )
target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES}) target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES})
@@ -2136,8 +2086,7 @@ add_executable(oaisim
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c # ${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c ${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c
${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c ${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c ${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c
@@ -2160,7 +2109,7 @@ add_executable(oaisim
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim target_link_libraries (oaisim
-Wl,-ldl,--start-group -Wl,-ldl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_UE_LIB PHY_UE LFDS L2_UE ${MSC_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB} RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE ${MSC_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB}
${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
-Wl,--end-group z dl) -Wl,--end-group z dl)
@@ -2181,10 +2130,10 @@ add_executable(oaisim_nos1
${OPENAIR_BIN_DIR}/messages_xml.h ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c # ${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c ${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c
${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c ${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c ${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c
@@ -2203,7 +2152,7 @@ add_executable(oaisim_nos1
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim_nos1 target_link_libraries (oaisim_nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_UE_LIB PHY_UE LFDS ${MSC_LIB} ${ITTI_LIB} SIMU L2_UE ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS ${MSC_LIB} ${ITTI_LIB} SIMU L2_UE ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
-Wl,--end-group z dl ) -Wl,--end-group z dl )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
@@ -2222,20 +2171,20 @@ target_link_libraries (oaisim_nos1 ${T_LIB})
#special case for dlim TM4, which uses its own version of phy_scope code #special case for dlim TM4, which uses its own version of phy_scope code
add_executable(dlsim_tm4 add_executable(dlsim_tm4
${OPENAIR_BIN_DIR}/messages_xml.h # ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c
${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c ${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c
${T_SOURCE} ${T_SOURCE}
) )
target_link_libraries (dlsim_tm4 target_link_libraries (dlsim_tm4
-Wl,--start-group SIMU UTIL SCHED_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB}
) )
foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim) foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
add_executable(${myExe} add_executable(${myExe}
${OPENAIR_BIN_DIR}/messages_xml.h # ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${T_SOURCE} ${T_SOURCE}
@@ -2244,7 +2193,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
) )
target_link_libraries (${myExe} target_link_libraries (${myExe}
-Wl,--start-group SIMU UTIL SCHED_LIB PHY LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
) )
endforeach(myExe) endforeach(myExe)
@@ -2257,7 +2206,7 @@ add_executable(test_epc_generate_scenario
${OPENAIR2_DIR}/COMMON/messages_def.h ${OPENAIR2_DIR}/COMMON/messages_def.h
${OPENAIR2_DIR}/COMMON/messages_types.h ${OPENAIR2_DIR}/COMMON/messages_types.h
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
${OPENAIR_BIN_DIR}/messages_xml.h # ${OPENAIR_BIN_DIR}/messages_xml.h
) )
target_link_libraries (test_epc_generate_scenario target_link_libraries (test_epc_generate_scenario
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
@@ -2281,7 +2230,7 @@ add_executable(test_epc_play_scenario
) )
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c) target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
target_link_libraries (test_epc_play_scenario target_link_libraries (test_epc_play_scenario
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
) )
@@ -2350,7 +2299,7 @@ endforeach()
# castxml doesn't work with c11 (gcc 5 default) # castxml doesn't work with c11 (gcc 5 default)
# force castxml and clang compilation with gnu89 standard # force castxml and clang compilation with gnu89 standard
# we can't use cXX standard as pthread_rwlock_t is gnu standard # we can't use cXX standard as pthread_rwlock_t is gnu standard
list(APPEND itti_compiler_options "-std=gnu89") list(APPEND itti_compiler_options "-std=gnu89;-D'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h) set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h)
if(EXISTS /usr/bin/gccxml) if(EXISTS /usr/bin/gccxml)
set(xml_command gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H}) set(xml_command gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H})
@@ -2438,7 +2387,7 @@ list(APPEND oai_nw_drv_src device.c common.c ioctl.c classifier.c tool.c)
if(OAI_NW_DRIVER_USE_NETLINK) if(OAI_NW_DRIVER_USE_NETLINK)
list(APPEND oai_nw_drv_src netlink.c) list(APPEND oai_nw_drv_src netlink.c)
endif() endif()
make_driver(oai_nw_drv ${OPENAIR2_DIR}/NETWORK_DRIVER/LITE ${oai_nw_drv_src}) make_driver(oai_nw_drv ${OPENAIR2_DIR}/NETWORK_DRIVER/LTE ${oai_nw_drv_src})
# Exmimo board drivers # Exmimo board drivers
######################### #########################
+124
View File
@@ -68,6 +68,7 @@ DISABLE_LOG_X="False"
USRP_REC_PLAY="False" USRP_REC_PLAY="False"
BUILD_ECLIPSE=0 BUILD_ECLIPSE=0
UE_NAS_USE_TUN="False" UE_NAS_USE_TUN="False"
BASIC_SIMULATOR=0
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
@@ -159,6 +160,9 @@ Options
Build for I/Q record-playback modes Build for I/Q record-playback modes
--ue-nas-use-tun --ue-nas-use-tun
Use TUN devices for the UEs instead of ue_ip.ko Use TUN devices for the UEs instead of ue_ip.ko
--basic-simulator
Generates a basic [1 UE + 1 eNB + no channel] simulator.
See targets/ARCH/tcp_bridge/README.tcp_bridge_oai for documentation.
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
@@ -354,6 +358,10 @@ function main() {
UE_NAS_USE_TUN="True" UE_NAS_USE_TUN="True"
echo_info "Enabling UE NAS TUN device usage instead of ue_ip.ko" echo_info "Enabling UE NAS TUN device usage instead of ue_ip.ko"
shift 1;; shift 1;;
--basic-simulator)
BASIC_SIMULATOR=1
echo_info "Compiling the basic simulator"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
@@ -919,6 +927,122 @@ fi
else else
echo_info "10. Bypassing the Tests ..." echo_info "10. Bypassing the Tests ..."
fi fi
# basic simulator
#####################
if [ "$BASIC_SIMULATOR" = "1" ]; then
echo_info "Build basic simulator"
[ "$CLEAN" = "1" ] && rm -rf $OPENAIR_DIR/cmake_targets/basic_simulator
[ "$CLEAN" = "1" ] && rm -rf $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/enb
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/ue
mkdir -p $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
# enb
cmake_file=$OPENAIR_DIR/cmake_targets/basic_simulator/enb/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RF_BOARD \"OAI_USRP\")" >> $cmake_file
echo "set ( TRANSP_PRO \"None\")" >> $cmake_file
echo "set(PACKAGE_NAME \"simulator_enb\")" >> $cmake_file
echo "set (DEADLINE_SCHEDULER \"False\" )" >> $cmake_file
echo "set (CPU_AFFINITY \"False\" )" >> $cmake_file
echo "set ( T_TRACER \"True\" )" >> $cmake_file
echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
echo_info "Build eNB"
echo_info "logs are in $dlog/basic_simulator_enb.txt"
set +e
{
cd $OPENAIR_DIR/cmake_targets/basic_simulator/enb
cmake .
make -j`nproc` coding params_libconfig tcp_bridge_oai lte-softmodem
ln -sf libtcp_bridge_oai.so liboai_device.so
cd ../..
} > $dlog/basic_simulator_enb.txt 2>&1
set -e
if [ -s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/lte-softmodem -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libcoding.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libparams_libconfig.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libtcp_bridge_oai.so ] ; then
echo_success "eNB compiled"
check_warnings "$dlog/basic_simulator_enb.txt"
else
echo_error "eNB compilation failed"
exit 1
fi
# ue
echo_info "Compile conf2uedata"
cd $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
eval $CMAKE_CMD
compilations \
nas_sim_tools conf2uedata \
conf2uedata $dbin/conf2uedata
cmake_file=$OPENAIR_DIR/cmake_targets/basic_simulator/ue/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RF_BOARD \"OAI_USRP\")" >> $cmake_file
echo "set ( TRANSP_PRO \"None\")" >> $cmake_file
echo "set(PACKAGE_NAME \"simulator_ue\")" >> $cmake_file
echo "set (DEADLINE_SCHEDULER \"False\" )" >> $cmake_file
echo "set (CPU_AFFINITY \"False\" )" >> $cmake_file
echo "set ( T_TRACER \"False\" )" >> $cmake_file
echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
echo "set (LINUX True )" >> $cmake_file
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
echo_info "Build UE"
echo_info "logs are in $dlog/basic_simulator_ue.txt"
set +e
{
cd $OPENAIR_DIR/cmake_targets/basic_simulator/ue
cmake .
make -j`nproc` coding params_libconfig tcp_bridge_oai lte-uesoftmodem
ln -sf libtcp_bridge_oai.so liboai_device.so
cd ../..
} > $dlog/basic_simulator_ue.txt 2>&1
set -e
if [ -s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/lte-uesoftmodem -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libcoding.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libparams_libconfig.so -a \
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libtcp_bridge_oai.so ] ; then
echo_success "UE compiled"
check_warnings "$dlog/basic_simulator_ue.txt"
else
echo_error "UE compilation failed"
exit 1
fi
echo_info "Generate UE SIM data"
$OPENAIR_DIR/targets/bin/conf2uedata -c $OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o $OPENAIR_DIR/cmake_targets/basic_simulator/ue
fi
} }
main "$@" main "$@"
+1 -1
View File
@@ -8,5 +8,5 @@ set(DEBUG_PHY False)
set(MU_RECIEVER False) set(MU_RECIEVER False)
set(NAS_UE False) set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False) set(MESSAGE_CHART_GENERATOR False)
set(RRC_ASN1_VERSION "Rel14")
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
+11 -7
View File
@@ -95,6 +95,7 @@ get_distribution_release() {
check_supported_distribution() { check_supported_distribution() {
local distribution=$(get_distribution_release) local distribution=$(get_distribution_release)
case "$distribution" in case "$distribution" in
"ubuntu18.04") return 0 ;;
"ubuntu17.10") return 0 ;; "ubuntu17.10") return 0 ;;
"ubuntu17.04") return 0 ;; "ubuntu17.04") return 0 ;;
"ubuntu16.04") return 0 ;; "ubuntu16.04") return 0 ;;
@@ -267,7 +268,7 @@ check_install_usrp_uhd_driver(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then if [[ "$OS_DISTRO" == "ubuntu" ]]; then
#first we remove old installation #first we remove old installation
$SUDO apt-get remove -y uhd || true $SUDO apt-get remove -y uhd || true
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y $SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y || true
v=$(lsb_release -cs) v=$(lsb_release -cs)
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
#The new USRP repository #The new USRP repository
@@ -488,19 +489,24 @@ check_install_oai_software() {
$SUDO apt install -y software-properties-common $SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in case "$(get_distribution_release)" in
"ubuntu14.04") "ubuntu14.04")
specific_packages="libtasn1-3-dev gccxml libgnutls-dev libatlas-dev" specific_packages="libtasn1-3-dev gccxml libgnutls-dev libatlas-dev iproute libconfig8-dev"
# For iperf3 # For iperf3
$SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe" $SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe"
$SUDO apt-get update $SUDO apt-get update
;; ;;
"ubuntu16.04") "ubuntu16.04")
specific_packages="libtasn1-6-dev gccxml libgnutls-dev libatlas-dev" specific_packages="libtasn1-6-dev gccxml libgnutls-dev libatlas-dev iproute libconfig8-dev"
;; ;;
"ubuntu17.04") "ubuntu17.04")
specific_packages="libtasn1-6-dev castxml libgnutls28-dev libatlas-dev" specific_packages="libtasn1-6-dev castxml libgnutls28-dev libatlas-dev iproute libconfig8-dev"
;; ;;
"ubuntu17.10") "ubuntu17.10")
specific_packages="libtasn1-6-dev castxml libgnutls28-dev" specific_packages="libtasn1-6-dev castxml libgnutls28-dev iproute libconfig8-dev"
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
;;
"ubuntu18.04")
specific_packages="libtasn1-6-dev castxml libgnutls28-dev iproute2 libconfig-dev"
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu" LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so" LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
;; ;;
@@ -524,12 +530,10 @@ check_install_oai_software() {
gtkwave \ gtkwave \
guile-2.0-dev \ guile-2.0-dev \
iperf \ iperf \
iproute \
iptables \ iptables \
iptables-dev \ iptables-dev \
libatlas-base-dev \ libatlas-base-dev \
libblas-dev \ libblas-dev \
libconfig8-dev \
libffi-dev \ libffi-dev \
libforms-bin \ libforms-bin \
libforms-dev \ libforms-dev \
+3 -3
View File
@@ -35,11 +35,11 @@
#include <pthread.h> #include <pthread.h>
#include "COMMON/platform_constants.h" #include "COMMON/platform_constants.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#include "RRC/LITE/defs.h" #include "RRC/LTE/rrc_defs.h"
#include "flexran_agent_defs.h" #include "flexran_agent_defs.h"
#include "gtpv1u.h" #include "gtpv1u.h"
@@ -49,7 +49,7 @@
#include "gtpv1u_eNB_defs.h" #include "gtpv1u_eNB_defs.h"
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LITE/defs_NB_IoT.h" #include "RRC/LTE/defs_NB_IoT.h"
typedef struct { typedef struct {
/// RAN context config file name /// RAN context config file name
char *config_file_name; char *config_file_name;
+11 -7
View File
@@ -88,7 +88,7 @@ static void new_thread(void *(*f)(void *), void *data)
/* defined in local_tracer.c */ /* defined in local_tracer.c */
void T_local_tracer_main(int remote_port, int wait_for_tracer, void T_local_tracer_main(int remote_port, int wait_for_tracer,
int local_socket); int local_socket, char *shm_file);
/* We monitor the tracee and the local tracer processes. /* We monitor the tracee and the local tracer processes.
* When one dies we forcefully kill the other. * When one dies we forcefully kill the other.
@@ -113,6 +113,9 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
int s; int s;
int T_shm_fd; int T_shm_fd;
int child1, child2; int child1, child2;
char shm_file[128];
sprintf(shm_file, "/%s%d", T_SHM_FILENAME, getpid());
if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair)) if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair))
{ perror("socketpair"); abort(); } { perror("socketpair"); abort(); }
@@ -122,7 +125,8 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
child1 = fork(); if (child1 == -1) abort(); child1 = fork(); if (child1 == -1) abort();
if (child1 == 0) { if (child1 == 0) {
close(socket_pair[1]); close(socket_pair[1]);
T_local_tracer_main(remote_port, wait_for_tracer, socket_pair[0]); T_local_tracer_main(remote_port, wait_for_tracer, socket_pair[0],
shm_file);
exit(0); exit(0);
} }
close(socket_pair[0]); close(socket_pair[0]);
@@ -142,13 +146,13 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
T_socket = s; T_socket = s;
/* setup shared memory */ /* setup shared memory */
T_shm_fd = shm_open(T_SHM_FILENAME, O_RDWR /*| O_SYNC*/, 0666); T_shm_fd = shm_open(shm_file, O_RDWR /*| O_SYNC*/, 0666);
shm_unlink(T_SHM_FILENAME); shm_unlink(shm_file);
if (T_shm_fd == -1) { perror(T_SHM_FILENAME); abort(); } if (T_shm_fd == -1) { perror(shm_file); abort(); }
T_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t), T_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t),
PROT_READ | PROT_WRITE, MAP_SHARED, T_shm_fd, 0); PROT_READ | PROT_WRITE, MAP_SHARED, T_shm_fd, 0);
if (T_cache == NULL) if (T_cache == MAP_FAILED)
{ perror(T_SHM_FILENAME); abort(); } { perror(shm_file); abort(); }
close(T_shm_fd); close(T_shm_fd);
new_thread(T_receive_thread, NULL); new_thread(T_receive_thread, NULL);
+11
View File
@@ -110,6 +110,16 @@ typedef struct {
extern volatile int *T_freelist_head; extern volatile int *T_freelist_head;
extern T_cache_t *T_cache; extern T_cache_t *T_cache;
/* When running the basic simulator, we may fill the T cache too fast.
* Let's not crash if it's full, just wait.
*/
#if BASIC_SIMULATOR
# define T_BASIC_SIMULATOR_WAIT \
while (T_cache[T_LOCAL_slot].busy) usleep(100)
#else
# define T_BASIC_SIMULATOR_WAIT /* */
#endif
/* used at header of Tn, allocates buffer */ /* used at header of Tn, allocates buffer */
#define T_LOCAL_DATA \ #define T_LOCAL_DATA \
char *T_LOCAL_buf; \ char *T_LOCAL_buf; \
@@ -118,6 +128,7 @@ extern T_cache_t *T_cache;
T_LOCAL_slot = __sync_fetch_and_add(T_freelist_head, 1) \ T_LOCAL_slot = __sync_fetch_and_add(T_freelist_head, 1) \
& (T_CACHE_SIZE - 1); \ & (T_CACHE_SIZE - 1); \
(void)__sync_fetch_and_and(T_freelist_head, T_CACHE_SIZE - 1); \ (void)__sync_fetch_and_and(T_freelist_head, T_CACHE_SIZE - 1); \
T_BASIC_SIMULATOR_WAIT; \
if (T_cache[T_LOCAL_slot].busy) { \ if (T_cache[T_LOCAL_slot].busy) { \
printf("%s:%d:%s: T cache is full - consider increasing its size\n", \ printf("%s:%d:%s: T cache is full - consider increasing its size\n", \
__FILE__, __LINE__, __FUNCTION__); \ __FILE__, __LINE__, __FUNCTION__); \
+12 -2
View File
@@ -8,10 +8,20 @@
#define T_MAX_ARGS 16 #define T_MAX_ARGS 16
/* maximum size of a message - increase if needed */ /* maximum size of a message - increase if needed */
#define T_BUFFER_MAX (1024*64) #if BASIC_SIMULATOR
/* let's have 100 RBs functional for the basic simulator */
# define T_BUFFER_MAX (1024*64*2)
#else
# define T_BUFFER_MAX (1024*64)
#endif
/* size of the local cache for messages (must be pow(2,something)) */ /* size of the local cache for messages (must be pow(2,something)) */
#define T_CACHE_SIZE (8192 * 2) #if BASIC_SIMULATOR
/* we don't need much space for the basic simulator */
# define T_CACHE_SIZE 1024
#else
# define T_CACHE_SIZE (8192 * 2)
#endif
/* maximum number of bytes a message can contain */ /* maximum number of bytes a message can contain */
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
+22 -8
View File
@@ -300,6 +300,20 @@ static void forward(void *_forwarder, char *buf, int size)
if (f->tail != NULL) f->tail->next = new; if (f->tail != NULL) f->tail->next = new;
f->tail = new; f->tail = new;
#if BASIC_SIMULATOR
/* When runnng the basic simulator, the tracer may be too slow.
* Let's not take too much memory in the tracee and
* wait if there is too much data to send. 200MB is
* arbitrary.
*/
while (f->memusage > 200 * 1024 * 1024) {
if (pthread_cond_signal(&f->cond)) abort();
if (pthread_mutex_unlock(&f->lock)) abort();
usleep(1000);
if (pthread_mutex_lock(&f->lock)) abort();
}
#endif /* BASIC_SIMULATOR */
f->memusage += size+4; f->memusage += size+4;
/* warn every 100MB */ /* warn every 100MB */
if (f->memusage > f->last_warning_memusage && if (f->memusage > f->last_warning_memusage &&
@@ -326,17 +340,17 @@ static void wait_message(void)
while (T_local_cache[T_busylist_head].busy == 0) usleep(1000); while (T_local_cache[T_busylist_head].busy == 0) usleep(1000);
} }
static void init_shm(void) static void init_shm(char *shm_file)
{ {
int i; int i;
int s = shm_open(T_SHM_FILENAME, O_RDWR | O_CREAT /*| O_SYNC*/, 0666); int s = shm_open(shm_file, O_RDWR | O_CREAT /*| O_SYNC*/, 0666);
if (s == -1) { perror(T_SHM_FILENAME); abort(); } if (s == -1) { perror(shm_file); abort(); }
if (ftruncate(s, T_CACHE_SIZE * sizeof(T_cache_t))) if (ftruncate(s, T_CACHE_SIZE * sizeof(T_cache_t)))
{ perror(T_SHM_FILENAME); abort(); } { perror(shm_file); abort(); }
T_local_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t), T_local_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t),
PROT_READ | PROT_WRITE, MAP_SHARED, s, 0); PROT_READ | PROT_WRITE, MAP_SHARED, s, 0);
if (T_local_cache == NULL) if (T_local_cache == MAP_FAILED)
{ perror(T_SHM_FILENAME); abort(); } { perror(shm_file); abort(); }
close(s); close(s);
/* let's garbage the memory to catch some potential problems /* let's garbage the memory to catch some potential problems
@@ -347,7 +361,7 @@ static void init_shm(void)
} }
void T_local_tracer_main(int remote_port, int wait_for_tracer, void T_local_tracer_main(int remote_port, int wait_for_tracer,
int local_socket) int local_socket, char *shm_file)
{ {
int s; int s;
int port = remote_port; int port = remote_port;
@@ -357,7 +371,7 @@ void T_local_tracer_main(int remote_port, int wait_for_tracer,
/* write on a socket fails if the other end is closed and we get SIGPIPE */ /* write on a socket fails if the other end is closed and we get SIGPIPE */
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort(); if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort();
init_shm(); init_shm(shm_file);
s = local_socket; s = local_socket;
if (dont_wait) { if (dont_wait) {
+3 -3
View File
@@ -12,7 +12,6 @@
#include "gui/gui.h" #include "gui/gui.h"
#include "filter/filter.h" #include "filter/filter.h"
#include "utils.h" #include "utils.h"
#include "../T_defs.h"
#include "event_selector.h" #include "event_selector.h"
#include "openair_logo.h" #include "openair_logo.h"
#include "config.h" #include "config.h"
@@ -875,6 +874,8 @@ int main(int n, char **v)
if (pthread_mutex_init(&enb_data.lock, NULL)) abort(); if (pthread_mutex_init(&enb_data.lock, NULL)) abort();
setup_event_selector(g, database, is_on, is_on_changed, &enb_data); setup_event_selector(g, database, is_on, is_on_changed, &enb_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
restart: restart:
clear_remote_config(); clear_remote_config();
enb_data.socket = connect_to(ip, port); enb_data.socket = connect_to(ip, port);
@@ -884,9 +885,8 @@ restart:
/* read messages */ /* read messages */
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(enb_data.socket, v, database); e = get_event(enb_data.socket, &ebuf, database);
if (e.type == -1) goto restart; if (e.type == -1) goto restart;
if (pthread_mutex_lock(&enb_data.lock)) abort(); if (pthread_mutex_lock(&enb_data.lock)) abort();
handle_event(h, e); handle_event(h, e);
+11 -5
View File
@@ -6,7 +6,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
event get_event(int socket, char *event_buffer, void *database) event get_event(int socket, OBUF *event_buffer, void *database)
{ {
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
struct timespec t; struct timespec t;
@@ -29,17 +29,23 @@ again:
#endif #endif
if (fullread(socket, &type, sizeof(int)) == -1) goto read_error; if (fullread(socket, &type, sizeof(int)) == -1) goto read_error;
length -= sizeof(int); length -= sizeof(int);
if (fullread(socket, event_buffer, length) == -1) goto read_error; if (event_buffer->omaxsize < length) {
event_buffer->omaxsize = (length + 65535) & ~65535;
event_buffer->obuf = realloc(event_buffer->obuf, event_buffer->omaxsize);
if (event_buffer->obuf == NULL) { printf("out of memory\n"); exit(1); }
}
if (fullread(socket, event_buffer->obuf, length) == -1) goto read_error;
event_buffer->osize = length;
if (type == -1) append_received_config_chunk(event_buffer, length); if (type == -1) append_received_config_chunk(event_buffer->obuf, length);
if (type == -2) verify_config(); if (type == -2) verify_config();
if (type == -1 || type == -2) goto again; if (type == -1 || type == -2) goto again;
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
return new_event(t, type, length, event_buffer, database); return new_event(t, type, length, event_buffer->obuf, database);
#else #else
return new_event(type, length, event_buffer, database); return new_event(type, length, event_buffer->obuf, database);
#endif #endif
read_error: read_error:
+2 -1
View File
@@ -1,6 +1,7 @@
#ifndef _EVENT_H_ #ifndef _EVENT_H_
#define _EVENT_H_ #define _EVENT_H_
#include "utils.h"
#include "../T_defs.h" #include "../T_defs.h"
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
#include <time.h> #include <time.h>
@@ -37,7 +38,7 @@ typedef struct {
int ecount; int ecount;
} event; } event;
event get_event(int s, char *v, void *d); event get_event(int s, OBUF *v, void *d);
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
event new_event(struct timespec sending_time, int type, event new_event(struct timespec sending_time, int type,
+3 -2
View File
@@ -99,10 +99,11 @@ int main(int n, char **v)
found = 0; found = 0;
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(fd, v, database); e = get_event(fd, &ebuf, database);
if (e.type == -1) break; if (e.type == -1) break;
if (e.type != input_event_id) continue; if (e.type != input_event_id) continue;
for (i = 0; i < filter_count; i++) for (i = 0; i < filter_count; i++)
+10 -1
View File
@@ -1,6 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "utils.h"
#include "../T_defs.h" #include "../T_defs.h"
void usage(void) void usage(void)
@@ -35,14 +36,22 @@ int main(int n, char **v)
in = fopen(input_filename, "r"); in = fopen(input_filename, "r");
if (in == NULL) { perror(input_filename); abort(); } if (in == NULL) { perror(input_filename); abort(); }
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) { while (1) {
int type; int type;
int32_t length; int32_t length;
char v[T_BUFFER_MAX]; char *v;
int vpos = 0; int vpos = 0;
/* read event from file */ /* read event from file */
if (fread(&length, 4, 1, in) != 1) break; if (fread(&length, 4, 1, in) != 1) break;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}
v = ebuf.obuf;
memcpy(v+vpos, &length, 4); memcpy(v+vpos, &length, 4);
vpos += 4; vpos += 4;
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
@@ -104,11 +104,12 @@ err:
fd = open(file, O_RDONLY); fd = open(file, O_RDONLY);
if (fd == -1) { perror(file); exit(1); } if (fd == -1) { perror(file); exit(1); }
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* get wanted frame/subframe */ /* get wanted frame/subframe */
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(fd, v, database); e = get_event(fd, &ebuf, database);
if (e.type == -1) break; if (e.type == -1) break;
if (e.type != input_event_id) continue; if (e.type != input_event_id) continue;
if (verbose) if (verbose)
@@ -100,10 +100,12 @@ err:
int last_frame = -1; int last_frame = -1;
int last_subframe = -1; int last_subframe = -1;
int subframe_written = 0; int subframe_written = 0;
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(fd, v, database); e = get_event(fd, &ebuf, database);
if (e.type == -1) break; if (e.type == -1) break;
if (e.type != output_event_id) continue; if (e.type != output_event_id) continue;
if (verbose) if (verbose)
@@ -73,17 +73,22 @@ int main(int n, char **v)
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1) socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
abort(); abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
char dump[10][T_BUFFER_MAX]; char dump[10][T_BUFFER_MAX];
event dump_ev[10]; event dump_ev[10];
FILE *z = fopen("/tmp/dd", "w"); if (z == NULL) abort(); FILE *z = fopen("/tmp/dd", "w"); if (z == NULL) abort();
while (1) { while (1) {
char v[T_BUFFER_MAX]; char *v;
event e; event e;
e = get_event(socket, v, database); e = get_event(socket, &ebuf, database);
v = ebuf.obuf;
if (e.type == -1) break; if (e.type == -1) break;
if (e.type == ev_input) { if (e.type == ev_input) {
int sf = e.e[2].i; int sf = e.e[2].i;
memcpy(dump[sf], v, T_BUFFER_MAX); if (ebuf.osize > T_BUFFER_MAX)
{ printf("event size too big\n"); exit(1); }
memcpy(dump[sf], ebuf.obuf, ebuf.osize);
dump_ev[sf] = e; dump_ev[sf] = e;
printf("input %d/%d\n", e.e[1].i, sf); printf("input %d/%d\n", e.e[1].i, sf);
if (fwrite(dump_ev[sf].e[4].b, dump_ev[sf].e[4].bsize, 1, z) != 1) abort(); if (fwrite(dump_ev[sf].e[4].b, dump_ev[sf].e[4].bsize, 1, z) != 1) abort();
+3 -2
View File
@@ -84,11 +84,12 @@ int main(int n, char **v)
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1) socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
abort(); abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
int on_off; int on_off;
e = get_event(socket, v, database); e = get_event(socket, &ebuf, database);
if (e.type == -1) break; if (e.type == -1) break;
if (e.type != ev_fun) if (e.type != ev_fun)
{ printf("unhandled event %d\n", e.type); continue; } { printf("unhandled event %d\n", e.type); continue; }
+3 -2
View File
@@ -246,11 +246,12 @@ int main(int n, char **v)
new_thread(receiver, &d); new_thread(receiver, &d);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */ /* read messages */
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(in, v, database); e = get_event(in, &ebuf, database);
if (e.type == -1) break; if (e.type == -1) break;
if (!(e.type == ul_id || e.type == dl_id)) continue; if (!(e.type == ul_id || e.type == dl_id)) continue;
handle_event(h, e); handle_event(h, e);
+9 -1
View File
@@ -123,14 +123,22 @@ int main(int n, char **v)
if (signal(SIGINT, force_stop) == SIG_ERR) abort(); if (signal(SIGINT, force_stop) == SIG_ERR) abort();
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort(); if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */ /* read messages */
while (run) { while (run) {
int type; int type;
int32_t length; int32_t length;
char v[T_BUFFER_MAX]; char *v;
int vpos = 0; int vpos = 0;
if (fullread(socket, &length, 4) == -1) goto read_error; if (fullread(socket, &length, 4) == -1) goto read_error;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}
v = ebuf.obuf;
memcpy(v+vpos, &length, 4); memcpy(v+vpos, &length, 4);
vpos += 4; vpos += 4;
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
+9 -1
View File
@@ -136,14 +136,22 @@ int main(int n, char **v)
new_thread(get_message_thread, &socket); new_thread(get_message_thread, &socket);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
while (1) { while (1) {
int type; int type;
int32_t length; int32_t length;
char v[T_BUFFER_MAX]; char *v;
int vpos = 0; int vpos = 0;
/* read event from file */ /* read event from file */
if (fread(&length, 4, 1, in) != 1) break; if (fread(&length, 4, 1, in) != 1) break;
if (ebuf.omaxsize < length) {
ebuf.omaxsize = (length + 65535) & ~65535;
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
}
v = ebuf.obuf;
memcpy(v+vpos, &length, 4); memcpy(v+vpos, &length, 4);
vpos += 4; vpos += 4;
#ifdef T_SEND_TIME #ifdef T_SEND_TIME
+3 -3
View File
@@ -10,7 +10,6 @@
#include "view/view.h" #include "view/view.h"
#include "gui/gui.h" #include "gui/gui.h"
#include "utils.h" #include "utils.h"
#include "../T_defs.h"
#include "event_selector.h" #include "event_selector.h"
#include "config.h" #include "config.h"
@@ -182,11 +181,12 @@ int main(int n, char **v)
/* send the first message - activate selected traces */ /* send the first message - activate selected traces */
is_on_changed(&textlog_data); is_on_changed(&textlog_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */ /* read messages */
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(textlog_data.socket, v, database); e = get_event(textlog_data.socket, &ebuf, database);
if (e.type == -1) abort(); if (e.type == -1) abort();
handle_event(h, e); handle_event(h, e);
} }
+3 -2
View File
@@ -287,11 +287,12 @@ int main(int n, char **v)
if (signal(SIGINT, force_stop) == SIG_ERR) abort(); if (signal(SIGINT, force_stop) == SIG_ERR) abort();
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort(); if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */ /* read messages */
while (run) { while (run) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(socket, v, database); e = get_event(socket, &ebuf, database);
if (e.type == -1) { printf("disconnected? let's quit gently\n"); break; } if (e.type == -1) { printf("disconnected? let's quit gently\n"); break; }
handle_event(h, e); handle_event(h, e);
} }
+3 -3
View File
@@ -12,7 +12,6 @@
#include "gui/gui.h" #include "gui/gui.h"
#include "filter/filter.h" #include "filter/filter.h"
#include "utils.h" #include "utils.h"
#include "../T_defs.h"
#include "event_selector.h" #include "event_selector.h"
#include "openair_logo.h" #include "openair_logo.h"
#include "config.h" #include "config.h"
@@ -854,6 +853,8 @@ int main(int n, char **v)
if (pthread_mutex_init(&ue_data.lock, NULL)) abort(); if (pthread_mutex_init(&ue_data.lock, NULL)) abort();
setup_event_selector(g, database, is_on, is_on_changed, &ue_data); setup_event_selector(g, database, is_on, is_on_changed, &ue_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
restart: restart:
clear_remote_config(); clear_remote_config();
ue_data.socket = connect_to(ip, port); ue_data.socket = connect_to(ip, port);
@@ -863,9 +864,8 @@ restart:
/* read messages */ /* read messages */
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(ue_data.socket, v, database); e = get_event(ue_data.socket, &ebuf, database);
if (e.type == -1) goto restart; if (e.type == -1) goto restart;
if (pthread_mutex_lock(&ue_data.lock)) abort(); if (pthread_mutex_lock(&ue_data.lock)) abort();
handle_event(h, e); handle_event(h, e);
+3 -3
View File
@@ -10,7 +10,6 @@
#include "view/view.h" #include "view/view.h"
#include "gui/gui.h" #include "gui/gui.h"
#include "utils.h" #include "utils.h"
#include "../T_defs.h"
#include "event_selector.h" #include "event_selector.h"
#include "config.h" #include "config.h"
@@ -188,11 +187,12 @@ int main(int n, char **v)
/* send the first message - activate selected traces */ /* send the first message - activate selected traces */
is_on_changed(&vcd_data); is_on_changed(&vcd_data);
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
/* read messages */ /* read messages */
while (1) { while (1) {
char v[T_BUFFER_MAX];
event e; event e;
e = get_event(vcd_data.socket, v, database); e = get_event(vcd_data.socket, &ebuf, database);
if (e.type == -1) abort(); if (e.type == -1) abort();
handle_event(h, e); handle_event(h, e);
} }
+1 -1
View File
@@ -37,7 +37,7 @@
#include <errno.h> #include <errno.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <dlfcn.h> #include <dlfcn.h>
#include "openair1/PHY/defs.h" #include "openair1/PHY/defs_common.h"
#define LOAD_MODULE_SHLIB_MAIN #define LOAD_MODULE_SHLIB_MAIN
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
+107
View File
@@ -0,0 +1,107 @@
Scenario 1 : Off-network UE2UE link
SynchREF UE (UE1)
UE1(eth0 - 10.10.10.1)--------UE2(eno1 - 10.10.10.2)
Here's an example of /etc/network/interfaces configuration for UE1
auto eth0
iface eth0 inet static
address 10.10.10.1
netmask 255.255.255.0
gateway 10.10.10.1
Prepare the environment:
- git clone https://gitlab.eurecom.fr/matzakos/LTE-D2D.git #branch: master
This branch contains all the current development for DDPS
- UE MAC<-> UE MAC for Scenario 1
- eNB MAC<->UE MAC (NFAPI Transport)
- RRC Extensions for “on-network” cases
NFAPI configuration (required even for Scenario 1 target)
- git clone https://github.com/cisco/open-nFAPI.git
- cd open-nfapi
- patch -p1 --dry-run < $OPENAIR_HOME/open-nfapi.oai.patch
Validate that there are no errors
- patch -p1 < $OPENAIR_HOME/open-nfapi.oai.patch
OAI build/execute
- export NFAPI_DIR=XXX (place where NFAPI was installed)
- cd cmake_targets
- ./build_oai --UE
(if necessary, use ./build_oai -I --UE to install required packages)
- cd lte_build_oai/build/
- cp ../../../targets/bin/.ue* .
- cp ../../../targets/bin/.usim* .
- sudo insmod ../../../targets/bin/ue_ip.ko
UE1:
- sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
- (if necessary) sudo route add default gw 10.10.10.1 eth0
UE2:
- sudo ifconfig oip0 10.0.0.2
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
- (if necessary) sudo route add default gw 10.10.10.1 eno1
UE1 and UE2: Get and build vencore_app from d2d-l3-stub (branch: l3_stub)
- gcc -I . vencore_app.c -o vencore_app -lpthread
--------------------------------
TEST ONE-TO-MANY
Run UE1 then UE2, for example:
UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
Test with Ping
- Sender - UE1: ping -I oip0 224.0.0.3
- Receiver - UE2: using wireshark
Test with Iperf
- Sender - UE1: iperf -c 224.0.0.3 -u -b 0.1M --bind 10.0.0.1 -t 100
- Receiver - UE2: sudo ./mcreceive 224.0.0.3 5001
Filter the incomming packets according to GroupL2Id: receiver (one-to-many) can discard the packets if it doesn't belong to this group.
For the moment, both sender and receiver use the same set of Ids (hardcoded)
UE1 (sender)
- sudo ./lte-softmodem-stub -U --emul-iface eth0
- ./vencore_app #send the sourceL2Id, groupL2Id to OAI
- ping -I oip0 224.0.0.3
UE2(receiver)
- sudo ./lte-softmodem-stub -U --emul-iface eno1
#we can see the incomming packets from OAI log, however, cannot see from Wireshark -> they are discarded at MAC layer
- ./vencore_app #we can see the packets appearing in Wireshark
--------------------------------------
TEST PC5-S (UE1 -sender, UE2 - receiver) and PC5-U for ONE-TO-ONE scenario
Configure UE1/UE2
UE1:
- sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 10.0.0.2 -j MARK --set-mark 3
- sudo route add default gw 10.10.10.1 eth0
UE2:
- sudo ifconfig oip0 10.0.0.2
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 10.0.0.1 -j MARK --set-mark 3
- sudo route add default gw 10.10.10.1 eno1
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -r #listen to incomming message from PC5-S
step 3:
- UE1: ./vencore_app -s #send a message via PC5-S (e.g., DirectCommunicationRequest)
Generate unicast traffic
UE1: ping -I oip0 10.0.0.2
--------------------------------------
TEST PC5-D
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
- UE1: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
+125 -57
View File
@@ -32,6 +32,7 @@
#include "nfapi.h" #include "nfapi.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
#include "common/ran_context.h" #include "common/ran_context.h"
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
//#include "openair1/PHY/vars.h" //#include "openair1/PHY/vars.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
@@ -47,7 +48,10 @@ extern RAN_CONTEXT_t RC;
#include "fapi_stub.h" #include "fapi_stub.h"
//#include "fapi_l1.h" //#include "fapi_l1.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "openair2/LAYER2/MAC/proto.h" #include "openair2/LAYER2/MAC/mac_proto.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#define NUM_P5_PHY 2 #define NUM_P5_PHY 2
@@ -61,8 +65,10 @@ extern pthread_mutex_t nfapi_sync_mutex;
extern int nfapi_sync_var; extern int nfapi_sync_var;
extern int sync_var; extern int sync_var;
char uecap_xer_in;
extern void init_eNB_afterRU(void); extern void init_eNB_afterRU(void);
extern void init_UE_stub(int nb_inst,int,int);
extern void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB, int frame, int subframe, eNB_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu); extern void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB, int frame, int subframe, eNB_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu);
extern void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfapi_ul_config_request_pdu_t *ul_config_pdu, uint16_t frame,uint8_t subframe,uint8_t srs_present); extern void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, nfapi_ul_config_request_pdu_t *ul_config_pdu, uint16_t frame,uint8_t subframe,uint8_t srs_present);
extern void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, eNB_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu, uint8_t codeword_index, uint8_t *sdu); extern void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame, int subframe, eNB_rxtx_proc_t *proc, nfapi_dl_config_request_pdu_t *dl_config_pdu, uint8_t codeword_index, uint8_t *sdu);
@@ -508,9 +514,31 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
pnf_info* pnf = (pnf_info*)(config->user_data); pnf_info* pnf = (pnf_info*)(config->user_data);
uint8_t num_tlv = 0; uint8_t num_tlv = 0;
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; //struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
// Panos: In the case of nfapi_mode = 3 (UE = PNF) we should not have dependency on any eNB var. So we aim
// to keep only the necessary just to keep the nfapi FSM rolling by sending a dummy response.
LTE_DL_FRAME_PARMS *fp;
if (nfapi_mode!=3) {
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
fp = &eNB->frame_parms;
}
else{
fp = (LTE_DL_FRAME_PARMS*) malloc(sizeof(LTE_DL_FRAME_PARMS));
}
#if 0
//DJP
auto found = std::find_if(pnf->phys.begin(), pnf->phys.end(), [&](phy_info& item)
{ return item.id == req->header.phy_id; });
if(found != pnf->phys.end())
{
phy_info& phy_info = (*found);
}
#endif
//DJP
phy_info* phy_info = pnf->phys; phy_info* phy_info = pnf->phys;
if(req->nfapi_config.timing_window.tl.tag == NFAPI_NFAPI_TIMING_WINDOW_TAG) { if(req->nfapi_config.timing_window.tl.tag == NFAPI_NFAPI_TIMING_WINDOW_TAG) {
@@ -667,6 +695,7 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
num_tlv++; num_tlv++;
} }
if(nfapi_mode!=3) {
printf("[PNF] CONFIG_REQUEST[num_tlv:%d] TLVs processed:%d\n", req->num_tlv, num_tlv); printf("[PNF] CONFIG_REQUEST[num_tlv:%d] TLVs processed:%d\n", req->num_tlv, num_tlv);
printf("[PNF] Simulating PHY CONFIG - DJP\n"); printf("[PNF] Simulating PHY CONFIG - DJP\n");
@@ -678,6 +707,7 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
phy_config_request(&phy_config); phy_config_request(&phy_config);
dump_frame_parms(fp); dump_frame_parms(fp);
}
phy_info->remote_port = req->nfapi_config.p7_vnf_port.value; phy_info->remote_port = req->nfapi_config.p7_vnf_port.value;
@@ -695,6 +725,8 @@ int config_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfap
nfapi_resp.error_code = 0; // DJP - some value resp->error_code; nfapi_resp.error_code = 0; // DJP - some value resp->error_code;
nfapi_pnf_config_resp(config, &nfapi_resp); nfapi_pnf_config_resp(config, &nfapi_resp);
printf("[PNF] Sent NFAPI_CONFIG_RESPONSE phy_id:%d\n", phy_info->id); printf("[PNF] Sent NFAPI_CONFIG_RESPONSE phy_id:%d\n", phy_info->id);
if(nfapi_mode ==3)
free(fp);
return 0; return 0;
} }
@@ -1081,6 +1113,7 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
} }
if(phy_info->timing_info_mode & 0x2) { if(phy_info->timing_info_mode & 0x2) {
//printf("Panos-D: start_request () Enabling timing_info_mode_aperiodic \n");
p7_config->timing_info_mode_aperiodic = 1; p7_config->timing_info_mode_aperiodic = 1;
} }
@@ -1090,77 +1123,110 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
p7_config->tx_req = &pnf_phy_tx_req; p7_config->tx_req = &pnf_phy_tx_req;
p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req; p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req;
memset(&dummy_dl_config_req, 0, sizeof(dummy_dl_config_req)); if (nfapi_mode==3) {
dummy_dl_config_req.dl_config_request_body.tl.tag=NFAPI_DL_CONFIG_REQUEST_BODY_TAG; p7_config->dl_config_req = &memcpy_dl_config_req;
dummy_dl_config_req.dl_config_request_body.number_pdcch_ofdm_symbols=1; p7_config->ul_config_req = &memcpy_ul_config_req;
dummy_dl_config_req.dl_config_request_body.number_dci=0; p7_config->hi_dci0_req = &memcpy_hi_dci0_req;
dummy_dl_config_req.dl_config_request_body.number_pdu=0; p7_config->tx_req = &memcpy_tx_req;
dummy_dl_config_req.dl_config_request_body.number_pdsch_rnti=0; }
dummy_dl_config_req.dl_config_request_body.transmission_power_pcfich=6000; else {
dummy_dl_config_req.dl_config_request_body.dl_config_pdu_list=0; p7_config->dl_config_req = &pnf_phy_dl_config_req;
p7_config->ul_config_req = &pnf_phy_ul_config_req;
p7_config->hi_dci0_req = &pnf_phy_hi_dci0_req;
p7_config->tx_req = &pnf_phy_tx_req;
}
p7_config->lbt_dl_config_req = &pnf_phy_lbt_dl_config_req;
memset(&dummy_tx_req, 0, sizeof(dummy_tx_req)); memset(&dummy_dl_config_req, 0, sizeof(dummy_dl_config_req));
dummy_tx_req.tx_request_body.number_of_pdus=0; dummy_dl_config_req.dl_config_request_body.tl.tag=NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
dummy_tx_req.tx_request_body.tl.tag=NFAPI_TX_REQUEST_BODY_TAG; dummy_dl_config_req.dl_config_request_body.number_pdcch_ofdm_symbols=1;
dummy_dl_config_req.dl_config_request_body.number_dci=0;
dummy_dl_config_req.dl_config_request_body.number_pdu=0;
dummy_dl_config_req.dl_config_request_body.number_pdsch_rnti=0;
dummy_dl_config_req.dl_config_request_body.transmission_power_pcfich=6000;
dummy_dl_config_req.dl_config_request_body.dl_config_pdu_list=0;
dummy_subframe.dl_config_req = &dummy_dl_config_req; memset(&dummy_tx_req, 0, sizeof(dummy_tx_req));
dummy_subframe.tx_req = 0;//&dummy_tx_req; dummy_tx_req.tx_request_body.number_of_pdus=0;
dummy_tx_req.tx_request_body.tl.tag=NFAPI_TX_REQUEST_BODY_TAG;
dummy_subframe.ul_config_req=0; dummy_subframe.dl_config_req = &dummy_dl_config_req;
dummy_subframe.hi_dci0_req=0; dummy_subframe.tx_req = 0;//&dummy_tx_req;
dummy_subframe.lbt_dl_config_req=0;
p7_config->dummy_subframe = dummy_subframe; dummy_subframe.ul_config_req=0;
dummy_subframe.hi_dci0_req=0;
dummy_subframe.lbt_dl_config_req=0;
p7_config->vendor_ext = &pnf_phy_vendor_ext; p7_config->dummy_subframe = dummy_subframe;
p7_config->allocate_p7_vendor_ext = &pnf_phy_allocate_p7_vendor_ext; p7_config->vendor_ext = &pnf_phy_vendor_ext;
p7_config->deallocate_p7_vendor_ext = &pnf_phy_deallocate_p7_vendor_ext;
p7_config->codec_config.unpack_p7_vendor_extension = &pnf_phy_unpack_p7_vendor_extension; p7_config->allocate_p7_vendor_ext = &pnf_phy_allocate_p7_vendor_ext;
p7_config->codec_config.pack_p7_vendor_extension = &pnf_phy_pack_p7_vendor_extension; p7_config->deallocate_p7_vendor_ext = &pnf_phy_deallocate_p7_vendor_ext;
p7_config->codec_config.unpack_vendor_extension_tlv = &pnf_phy_unpack_vendor_extension_tlv;
p7_config->codec_config.pack_vendor_extension_tlv = &pnf_phy_pack_vendor_extention_tlv;
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Creating P7 thread %s\n", __FUNCTION__); p7_config->codec_config.unpack_p7_vendor_extension = &pnf_phy_unpack_p7_vendor_extension;
pthread_t p7_thread; p7_config->codec_config.pack_p7_vendor_extension = &pnf_phy_pack_p7_vendor_extension;
pthread_create(&p7_thread, NULL, &pnf_p7_thread_start, p7_config); p7_config->codec_config.unpack_vendor_extension_tlv = &pnf_phy_unpack_vendor_extension_tlv;
p7_config->codec_config.pack_vendor_extension_tlv = &pnf_phy_pack_vendor_extention_tlv;
//((pnf_phy_user_data_t*)(phy_info->fapi->user_data))->p7_config = p7_config; NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Creating P7 thread %s\n", __FUNCTION__);
pthread_t p7_thread;
pthread_create(&p7_thread, NULL, &pnf_p7_thread_start, p7_config);
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Calling l1_north_init_eNB() %s\n", __FUNCTION__); //((pnf_phy_user_data_t*)(phy_info->fapi->user_data))->p7_config = p7_config;
l1_north_init_eNB();
NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] DJP - HACK - Set p7_config global ready for subframe ind%s\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Calling l1_north_init_eNB() %s\n", __FUNCTION__);
p7_config_g = p7_config; l1_north_init_eNB();
// Need to wait for main thread to create RU structures NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] DJP - HACK - Set p7_config global ready for subframe ind%s\n", __FUNCTION__);
while(config_sync_var<0) { p7_config_g = p7_config;
usleep(5000000);
printf("[PNF] waiting for OAI to be configured (eNB/RU)\n");
}
printf("[PNF] OAI eNB/RU configured\n");
printf("[PNF] About to call init_eNB_afterRU()\n"); //NFAPI_TRACE(NFAPI_TRACE_INFO, "[PNF] Panos-D: start_request, BUFFER SIZE: %d", p7_config_g->subframe_buffer_size);
init_eNB_afterRU(); //printf("Panos-D: start_request, bUFFER SIZE: %d", p7_config_g->subframe_buffer_size);
// Signal to main thread that it can carry on - otherwise RU will startup too quickly and it is not initialised // Need to wait for main thread to create RU structures
pthread_mutex_lock(&nfapi_sync_mutex); while(config_sync_var<0)
nfapi_sync_var=0; {
pthread_cond_broadcast(&nfapi_sync_cond); usleep(5000000);
pthread_mutex_unlock(&nfapi_sync_mutex); printf("[PNF] waiting for OAI to be configured (eNB/RU)\n");
}
printf("[PNF] OAI eNB/RU configured\n");
while(sync_var<0) { //printf("[PNF] About to call phy_init_RU() for RC.ru[0]:%p\n", RC.ru[0]);
usleep(5000000); //phy_init_RU(RC.ru[0]);
printf("[PNF] waiting for OAI to be started\n");
}
printf("[PNF] Sending PNF_START_RESP\n"); printf("[PNF] About to call init_eNB_afterRU()\n");
nfapi_send_pnf_start_resp(config, p7_config->phy_id);
printf("[PNF] Sending first P7 subframe ind\n"); // Panos: Instead
nfapi_pnf_p7_subframe_ind(p7_config, p7_config->phy_id, 0); // DJP - SFN_SF set to zero - correct??? /*if (nfapi_mode == 3) {
printf("[PNF] Sent first P7 subframe ind\n"); init_UE_stub(1,0,uecap_xer_in);
}*/
//else{
if (nfapi_mode != 3) {
// Panos
init_eNB_afterRU();
}
// Signal to main thread that it can carry on - otherwise RU will startup too quickly and it is not initialised
{
pthread_mutex_lock(&nfapi_sync_mutex);
nfapi_sync_var=0;
pthread_cond_broadcast(&nfapi_sync_cond);
pthread_mutex_unlock(&nfapi_sync_mutex);
}
while(sync_var<0)
{
usleep(5000000);
printf("[PNF] waiting for OAI to be started\n");
}
printf("[PNF] Sending PNF_START_RESP\n");
nfapi_send_pnf_start_resp(config, p7_config->phy_id);
printf("[PNF] Sending first P7 subframe ind\n");
nfapi_pnf_p7_subframe_ind(p7_config, p7_config->phy_id, 0); // DJP - SFN_SF set to zero - correct???
printf("[PNF] Sent first P7 subframe ind\n");
return 0; return 0;
} }
@@ -1464,7 +1530,9 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr,
printf("%s() PNF\n\n\n\n\n\n", __FUNCTION__); printf("%s() PNF\n\n\n\n\n\n", __FUNCTION__);
if(nfapi_mode!=3) {
nfapi_mode = 1; // PNF! nfapi_mode = 1; // PNF!
}
nfapi_pnf_config_t* config = nfapi_pnf_config_create(); nfapi_pnf_config_t* config = nfapi_pnf_config_create();
+2 -1
View File
@@ -37,7 +37,8 @@
#include "vendor_ext.h" #include "vendor_ext.h"
#include "nfapi_vnf.h" #include "nfapi_vnf.h"
#include "PHY/defs_eNB.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "common/ran_context.h" #include "common/ran_context.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
+6 -1
View File
@@ -1247,9 +1247,14 @@ void vnf_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
int16_t vnf_pnf_sfnsf_delta = NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf) - NFAPI_SFNSF2DEC(ind.last_sfn_sf); int16_t vnf_pnf_sfnsf_delta = NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf) - NFAPI_SFNSF2DEC(ind.last_sfn_sf);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PNF:SFN/SF:%d VNF:SFN/SF:%d deltaSFNSF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind.last_sfn_sf), NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), vnf_pnf_sfnsf_delta); //NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PNF:SFN/SF:%d VNF:SFN/SF:%d deltaSFNSF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind.last_sfn_sf), NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), vnf_pnf_sfnsf_delta);
if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1)
// Panos: Careful here!!!
//if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1)
if (vnf_pnf_sfnsf_delta>0 || vnf_pnf_sfnsf_delta < 0)
{ {
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SF DELTA between PNF and VNF delta:%d VNF:%d PNF:%d\n\n\n\n\n\n\n\n\n", __FUNCTION__, vnf_pnf_sfnsf_delta, NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), NFAPI_SFNSF2DEC(ind.last_sfn_sf)); NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SF DELTA between PNF and VNF delta:%d VNF:%d PNF:%d\n\n\n\n\n\n\n\n\n", __FUNCTION__, vnf_pnf_sfnsf_delta, NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), NFAPI_SFNSF2DEC(ind.last_sfn_sf));
// Panos: Careful here!!!
vnf_p7->p7_connections[0].sfn_sf = ind.last_sfn_sf;
} }
} }
} }
+1 -1
View File
@@ -29,7 +29,7 @@
#endif #endif
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include "PHY/CODING/defs.h" #include "PHY/CODING/coding_defs.h"
#include "extern_3GPPinterleaver.h" #include "extern_3GPPinterleaver.h"
//#define DEBUG_TURBO_ENCODER 1 //#define DEBUG_TURBO_ENCODER 1
+2 -2
View File
@@ -26,10 +26,10 @@
date: 09.2012 date: 09.2012
*/ */
#ifndef TC_MAIN #ifndef TC_MAIN
#include "defs.h" #include "coding_defs.h"
#include "extern_3GPPinterleaver.h" #include "extern_3GPPinterleaver.h"
#else #else
#include "vars.h" #include "coding_vars.h"
#include <stdint.h> #include <stdint.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
+2 -2
View File
@@ -27,8 +27,8 @@
*/ */
#include "PHY/defs.h" #include "PHY/defs_common.h"
#include "PHY/CODING/defs.h" #include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
@@ -42,8 +42,9 @@
#ifndef TEST_DEBUG #ifndef TEST_DEBUG
#include "PHY/defs.h" #include "PHY/impl_defs_top.h"
#include "PHY/CODING/defs.h" #include "PHY/defs_common.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "extern_3GPPinterleaver.h" #include "extern_3GPPinterleaver.h"
#else #else
@@ -41,8 +41,9 @@
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#ifndef TEST_DEBUG #ifndef TEST_DEBUG
#include "PHY/defs.h" #include "PHY/impl_defs_top.h"
#include "PHY/CODING/defs.h" #include "PHY/defs_common.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "extern_3GPPinterleaver.h" #include "extern_3GPPinterleaver.h"
#else #else
@@ -39,8 +39,8 @@
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#ifndef TEST_DEBUG #ifndef TEST_DEBUG
#include "PHY/defs.h" #include "PHY/defs_common.h"
#include "PHY/CODING/defs.h" #include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "extern_3GPPinterleaver.h" #include "extern_3GPPinterleaver.h"
#else #else
+1 -1
View File
@@ -24,7 +24,7 @@
author: raymond.knopp@eurecom.fr, based on similar code for 3GPP convolutional code (UMTS) by P. Humblet (2000) author: raymond.knopp@eurecom.fr, based on similar code for 3GPP convolutional code (UMTS) by P. Humblet (2000)
date: 10.2004 date: 10.2004
*/ */
#include "defs.h" #include "coding_defs.h"
unsigned short gdot11[] = { 0133, 0171 }; // {A,B} unsigned short gdot11[] = { 0133, 0171 }; // {A,B}
+1 -1
View File
@@ -24,7 +24,7 @@
author: raymond.knopp@eurecom.fr author: raymond.knopp@eurecom.fr
date: 21.10.2009 date: 21.10.2009
*/ */
#include "defs.h" #include "coding_defs.h"
//#define DEBUG_CCODE 1 //#define DEBUG_CCODE 1
@@ -29,7 +29,7 @@
#include <stdint.h> #include <stdint.h>
#include "PHY/defs.h" #include "PHY/defs_common.h"
#define CRC24_A 0 #define CRC24_A 0
#define CRC24_B 1 #define CRC24_B 1
@@ -75,20 +75,7 @@ int32_t lte_segmentation(uint8_t *input_buffer,
uint32_t *Kminus, uint32_t *Kminus,
uint32_t *F); uint32_t *F);
/** \fn int16_t estimate_ue_tx_power(uint32_t tbs, uint32_t nb_rb, uint8_t control_only, lte_prefix_type_t ncp, uint8_t use_srs)
\brief this functions calculates the delta MCS in dB based on the lte_segmentation function
\param tbs transport block size
\param nb_rb number of required rb
\param control_only a flag for the type of data
\param ncp cyclic prefix
\param use_srs a flag indicating the use of srs in the current SF
\returns ue_tx_power estimated ue tx power = delat_ mcs + bw_factor
*/
int16_t estimate_ue_tx_power(uint32_t tbs,
uint32_t nb_rb,
uint8_t control_only,
lte_prefix_type_t ncp,
uint8_t use_srs);
/** \fn uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w) /** \fn uint32_t sub_block_interleaving_turbo(uint32_t D, uint8_t *d,uint8_t *w)
\brief This is the subblock interleaving algorithm from 36-212 (Release 8, 8.6 2009-03), pages 15-16. \brief This is the subblock interleaving algorithm from 36-212 (Release 8, 8.6 2009-03), pages 15-16.
+2 -2
View File
@@ -33,8 +33,8 @@
#include <sys/types.h> #include <sys/types.h>
#include "PHY/defs.h" #include "PHY/defs_common.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "common/utils/load_module_shlib.h" #include "common/utils/load_module_shlib.h"
#include "common/utils/telnetsrv/telnetsrv.h" #include "common/utils/telnetsrv/telnetsrv.h"
+1 -1
View File
@@ -31,7 +31,7 @@
*/ */
#include "defs.h" #include "coding_defs.h"
/*ref 36-212 v8.6.0 , pp 8-9 */ /*ref 36-212 v8.6.0 , pp 8-9 */
+2 -2
View File
@@ -28,8 +28,8 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#endif #endif
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "assertions.h" #include "PHY/LTE_TRANSPORT/transport_common.h"
//#define cmin(a,b) ((a)<(b) ? (a) : (b)) //#define cmin(a,b) ((a)<(b) ? (a) : (b))
+3 -2
View File
@@ -24,8 +24,9 @@
author: raymond.knopp@eurecom.fr author: raymond.knopp@eurecom.fr
date: 21.10.2009 date: 21.10.2009
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "SCHED/extern.h" #include "PHY/LTE_TRANSPORT/transport_common.h"
#include "PHY/CODING/coding_defs.h"
//#define DEBUG_SEGMENTATION //#define DEBUG_SEGMENTATION
+2 -2
View File
@@ -29,8 +29,8 @@
*/ */
#ifndef TEST_DEBUG #ifndef TEST_DEBUG
#include "PHY/defs.h" #include "PHY/defs_common.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#else #else
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
+1 -1
View File
@@ -33,7 +33,7 @@
//#include "TDD-Config.h" //#include "TDD-Config.h"
//#include "MBSFN-SubframeConfigList.h" //#include "MBSFN-SubframeConfigList.h"
//#include "MobilityControlInfo.h" //#include "MobilityControlInfo.h"
//#if defined(Rel10) || defined(Rel14) //#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
//#include "SCellToAddMod-r10.h" //#include "SCellToAddMod-r10.h"
//#endif //#endif
+44 -3
View File
@@ -20,9 +20,50 @@
*/ */
/*!\brief Initilization and reconfiguration routines for LTE PHY */ /*!\brief Initilization and reconfiguration routines for LTE PHY */
#include "defs.h" #include "phy_init.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/CODING/extern.h" #include "PHY/CODING/coding_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
void generate_64qam_table(void)
{
int a,b,c,index;
for (a=-1; a<=1; a+=2)
for (b=-1; b<=1; b+=2)
for (c=-1; c<=1; c+=2) {
index = (1+a)*2 + (1+b) + (1+c)/2;
qam64_table[index] = -a*(QAM64_n1 + b*(QAM64_n2 + (c*QAM64_n3))); // 0 1 2
}
}
void generate_16qam_table(void)
{
int a,b,index;
for (a=-1; a<=1; a+=2)
for (b=-1; b<=1; b+=2) {
index = (1+a) + (1+b)/2;
qam16_table[index] = -a*(QAM16_n1 + (b*QAM16_n2));
}
}
void generate_qpsk_table(void)
{
int a,index;
for (a=-1; a<=1; a+=2) {
index = (1+a)/2;
qpsk_table[index] = -a*QPSK;
}
}
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms)
{ {
+13 -28
View File
@@ -19,14 +19,17 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "defs.h" #include "PHY/defs_eNB.h"
#include "SCHED/defs.h" #include "phy_init.h"
#include "PHY/extern.h" #include "SCHED/sched_eNB.h"
#include "SIMULATION/TOOLS/defs.h" #include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#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 "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h" #include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h" #include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h" #include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h" #include "assertions.h"
@@ -179,7 +182,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
fp->frame_type, fp->frame_type,
RC.eNB[Mod_id][CC_id]->X_u); RC.eNB[Mod_id][CC_id]->X_u);
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
fp->prach_emtc_config_common.prach_Config_enabled=1; fp->prach_emtc_config_common.prach_Config_enabled=1;
fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value; fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value;
@@ -721,24 +724,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
void phy_config_cba_rnti (module_id_t Mod_id,int CC_id,eNB_flag_t eNB_flag, uint8_t index, rnti_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups)
{
// uint8_t i;
if (eNB_flag == 0 ) {
//LOG_D(PHY,"[UE %d] configure cba group %d with rnti %x, num active cba grp %d\n", index, index, cba_rnti, num_active_cba_groups);
PHY_vars_UE_g[Mod_id][CC_id]->ulsch[index]->num_active_cba_groups=num_active_cba_groups;
PHY_vars_UE_g[Mod_id][CC_id]->ulsch[index]->cba_rnti[cba_group_id]=cba_rnti;
} else {
//for (i=index; i < NUMBER_OF_UE_MAX; i+=num_active_cba_groups){
// LOG_D(PHY,"[eNB %d] configure cba group %d with rnti %x for UE %d, num active cba grp %d\n",Mod_id, i%num_active_cba_groups, cba_rnti, i, num_active_cba_groups);
RC.eNB[Mod_id][CC_id]->ulsch[index]->num_active_cba_groups=num_active_cba_groups;
RC.eNB[Mod_id][CC_id]->ulsch[index]->cba_rnti[cba_group_id] = cba_rnti;
//}
}
}
int phy_init_lte_eNB(PHY_VARS_eNB *eNB, int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
unsigned char is_secondary_eNB, unsigned char is_secondary_eNB,
unsigned char abstraction_flag) unsigned char abstraction_flag)
@@ -750,7 +735,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars; LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = eNB->srs_vars; LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars; LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br; LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif #endif
int i, UE_id; int i, UE_id;
@@ -846,7 +831,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
prach_vars->rxsigF[0] = (int16_t**)malloc16_clear(64*sizeof(int16_t*)); prach_vars->rxsigF[0] = (int16_t**)malloc16_clear(64*sizeof(int16_t*));
// PRACH BR // PRACH BR
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) ); prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) );
// assume maximum of 64 RX antennas for PRACH receiver // assume maximum of 64 RX antennas for PRACH receiver
@@ -914,7 +899,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars; LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
LTE_eNB_SRS* const srs_vars = eNB->srs_vars; LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars; LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br; LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif #endif
int i, UE_id; int i, UE_id;
@@ -947,7 +932,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]); for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
free_and_zero(prach_vars->prach_ifft[0]); free_and_zero(prach_vars->prach_ifft[0]);
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (int ce_level = 0; ce_level < 4; ce_level++) { 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]); 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]); free_and_zero(prach_vars_br->prach_ifft[ce_level]);
+6 -7
View File
@@ -19,14 +19,13 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "defs.h" #include "phy_init.h"
#include "SCHED/defs.h" #include "SCHED/sched_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h" #include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h" #include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h" #include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h" #include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h" #include "assertions.h"
@@ -99,7 +98,7 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_rx; i++) { 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) ); 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]); LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (j=0;j<4;j++) { 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) ); 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]); LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
@@ -177,7 +176,7 @@ void phy_free_RU(RU_t *ru)
for (i = 0; i < ru->nb_rx; i++) { for (i = 0; i < ru->nb_rx; i++) {
free_and_zero(ru->prach_rxsigF[i]); free_and_zero(ru->prach_rxsigF[i]);
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]); for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]);
#endif #endif
} }
+23 -15
View File
@@ -19,21 +19,23 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "defs.h" #include "phy_init.h"
#include "SCHED/defs.h" #include "SCHED_UE/sched_UE.h"
#include "PHY/extern.h" #include "PHY/phy_extern_ue.h"
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h" #include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h" #include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h" #include "TDD-Config.h"
#include "LAYER2/MAC/extern.h"
#include "MBSFN-SubframeConfigList.h" #include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "assertions.h" #include "assertions.h"
#include <math.h> #include <math.h>
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10}; uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
extern uint8_t nfapi_mode;
void phy_config_sib1_ue(uint8_t Mod_id,int CC_id, void phy_config_sib1_ue(uint8_t Mod_id,int CC_id,
uint8_t eNB_id, uint8_t eNB_id,
@@ -340,7 +342,7 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n
} }
#if defined(Rel10) || defined(Rel14) #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
void phy_config_dedicated_scell_ue(uint8_t Mod_id, void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index, uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10, SCellToAddMod_r10_t *sCellToAddMod_r10,
@@ -563,14 +565,17 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
phy_vars_ue->decode_SIB = 0; phy_vars_ue->decode_SIB = 0;
phy_vars_ue->decode_MIB = 0; phy_vars_ue->decode_MIB = 0;
} }
//phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234)
phy_vars_ue->pdcch_vars[0][eNB_id]->crnti = phy_vars_ue->pdcch_vars[1][eNB_id]->crnti;
else
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
LOG_I(PHY,"C-RNTI %x %x \n", phy_vars_ue->pdcch_vars[0][eNB_id]->crnti, if(nfapi_mode!=3){
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti); //phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234)
phy_vars_ue->pdcch_vars[0][eNB_id]->crnti = phy_vars_ue->pdcch_vars[1][eNB_id]->crnti;
else
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
LOG_I(PHY,"C-RNTI %x %x \n", phy_vars_ue->pdcch_vars[0][eNB_id]->crnti,
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti);
}
} }
@@ -651,7 +656,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
int th_id; int th_id;
LOG_D(PHY,"Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx); LOG_D(PHY,"Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
@@ -853,6 +858,9 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
(*pdcch_vars_th)[th_id][eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) ); (*pdcch_vars_th)[th_id][eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); (*pdcch_vars_th)[th_id][eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) ); (*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
(*pdcch_vars_th)[th_id][eNB_id]->dciFormat = 0;
(*pdcch_vars_th)[th_id][eNB_id]->agregationLevel = 0xFF;
} }
for (i=0; i<fp->nb_antennas_rx; i++) { for (i=0; i<fp->nb_antennas_rx; i++) {
+7 -3
View File
@@ -25,10 +25,14 @@
#include <execinfo.h> #include <execinfo.h>
#include <signal.h> #include <signal.h>
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/sim.h"
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/defs_UE.h"
#include "PHY/phy_extern.h"
#include "phy_init.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
extern PHY_VARS_eNB *eNB; extern PHY_VARS_eNB *eNB;
extern PHY_VARS_UE *UE; extern PHY_VARS_UE *UE;
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "defs.h" #include "phy_init.h"
#include "log.h" #include "log.h"
uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6}; uint16_t dl_S_table_normal[10]={3,9,10,11,12,3,9,10,11,6};
@@ -22,8 +22,8 @@
#ifndef __INIT_DEFS__H__ #ifndef __INIT_DEFS__H__
#define __INIT_DEFS__H__ #define __INIT_DEFS__H__
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h" //#include "RadioResourceConfigCommonSIB.h"
@@ -32,7 +32,7 @@
#include "PHICH-Config.h" #include "PHICH-Config.h"
#include "MBSFN-SubframeConfigList.h" #include "MBSFN-SubframeConfigList.h"
#include "MobilityControlInfo.h" #include "MobilityControlInfo.h"
#if defined(Rel10) || defined(Rel14) #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "SCellToAddMod-r10.h" #include "SCellToAddMod-r10.h"
#endif #endif
/** @addtogroup _PHY_STRUCTURES_ /** @addtogroup _PHY_STRUCTURES_
@@ -349,7 +349,7 @@ void lte_param_init(PHY_VARS_eNB **eNBp,
uint32_t perfect_ce); uint32_t perfect_ce);
#if defined(Rel10) || defined(Rel14) #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
void phy_config_dedicated_scell_ue(uint8_t Mod_id, void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index, uint8_t eNB_index,
SCellToAddMod_r10_t *sCellToAddMod_r10, SCellToAddMod_r10_t *sCellToAddMod_r10,
+2 -2
View File
@@ -20,8 +20,8 @@
*/ */
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs_UE.h"
#include "PHY/extern.h" #include "PHY/phy_extern_ue.h"
void void
phy_adjust_gain (PHY_VARS_UE *ue, uint32_t rx_power_fil_dB, uint8_t eNB_id) phy_adjust_gain (PHY_VARS_UE *ue, uint32_t rx_power_fil_dB, uint8_t eNB_id)
@@ -19,8 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
// This is 512/(1:256) in __m128i format // This is 512/(1:256) in __m128i format
+8 -127
View File
@@ -20,10 +20,11 @@
*/ */
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs_UE.h"
#include "PHY/extern.h" #include "PHY/phy_extern_ue.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#define DEBUG_PHY #define DEBUG_PHY
@@ -84,6 +85,11 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
{ {
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3); diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
#if BASIC_SIMULATOR
/* a hack without which the UE does not connect (to be fixed somehow) */
diff = 0;
#endif
if ( abs(diff) < SYNCH_HYST ) if ( abs(diff) < SYNCH_HYST )
ue->rx_offset = 0; ue->rx_offset = 0;
else else
@@ -134,128 +140,3 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
} }
} }
int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_SRS *lte_eNB_srs,
unsigned int *eNB_id,
unsigned char clear,
unsigned char number_of_cards,
short coef)
{
static int max_pos_fil2 = 0;
int temp, i, aa, max_pos = 0,ind;
int max_val=0;
short Re,Im,ncoef;
#ifdef DEBUG_PHY
char fname[100],vname[100];
#endif
ncoef = 32768 - coef;
for (ind=0; ind<number_of_cards; ind++) {
if (ind==0)
max_val=0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
// do ifft of channel estimate
switch(frame_parms->N_RB_DL) {
case 6:
dft128((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
case 25:
dft512((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
case 50:
dft1024((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
case 100:
dft2048((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
}
#ifdef DEBUG_PHY
sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa);
sprintf(vname,"srs_time_%d%d",ind,aa);
write_output(fname,vname,lte_eNB_srs->srs_ch_estimates_time[aa],frame_parms->ofdm_symbol_size*2,2,1);
#endif
}
// we only use channel estimates from tx antenna 0 here
// remember we fixed the SRS to use only every second subcarriers
for (i = 0; i < frame_parms->ofdm_symbol_size/2; i++) {
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)lte_eNB_srs->srs_ch_estimates_time[aa])[(i<<1)];
Im = ((int16_t*)lte_eNB_srs->srs_ch_estimates_time[aa])[1+(i<<1)];
temp += (Re*Re/2) + (Im*Im/2);
}
if (temp > max_val) {
max_pos = i;
max_val = temp;
*eNB_id = ind;
}
}
}
// filter position to reduce jitter
if (clear == 1)
max_pos_fil2 = max_pos;
else
max_pos_fil2 = ((max_pos_fil2 * coef) + (max_pos * ncoef)) >> 15;
return(max_pos_fil2);
}
int lte_est_timing_advance_pusch(PHY_VARS_eNB* eNB,uint8_t UE_id)
{
int temp, i, aa, max_pos=0, max_val=0;
short Re,Im;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_PUSCH *eNB_pusch_vars = eNB->pusch_vars[UE_id];
int32_t **ul_ch_estimates_time= eNB_pusch_vars->drs_ch_estimates_time;
uint8_t cyclic_shift = 0;
int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
AssertFatal(frame_parms->ofdm_symbol_size > 127,"frame_parms->ofdm_symbol_size %d<128\n",frame_parms->ofdm_symbol_size);
AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<3,"frame_parms->nb_antennas_rx %d not in [0,1]\n",
frame_parms->nb_antennas_rx);
for (i = 0; i < frame_parms->ofdm_symbol_size; i++) {
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)ul_ch_estimates_time[aa])[(i<<1)];
Im = ((int16_t*)ul_ch_estimates_time[aa])[1+(i<<1)];
temp += (Re*Re/2) + (Im*Im/2);
}
if (temp > max_val) {
max_pos = i;
max_val = temp;
}
}
if (max_pos>frame_parms->ofdm_symbol_size/2)
max_pos = max_pos-frame_parms->ofdm_symbol_size;
//#ifdef DEBUG_PHY
LOG_D(PHY,"frame %d: max_pos = %d, sync_pos=%d\n",eNB->proc.frame_rx,max_pos,sync_pos);
//#endif //DEBUG_PHY
return max_pos - sync_pos;
}
@@ -0,0 +1,153 @@
/*
* 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
*/
#include "PHY/types.h"
#include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#define DEBUG_PHY
int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_SRS *lte_eNB_srs,
unsigned int *eNB_id,
unsigned char clear,
unsigned char number_of_cards,
short coef)
{
static int max_pos_fil2 = 0;
int temp, i, aa, max_pos = 0,ind;
int max_val=0;
short Re,Im,ncoef;
#ifdef DEBUG_PHY
char fname[100],vname[100];
#endif
ncoef = 32768 - coef;
for (ind=0; ind<number_of_cards; ind++) {
if (ind==0)
max_val=0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
// do ifft of channel estimate
switch(frame_parms->N_RB_DL) {
case 6:
dft128((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
case 25:
dft512((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
case 50:
dft1024((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
case 100:
dft2048((int16_t*) &lte_eNB_srs->srs_ch_estimates[aa][0],
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
1);
break;
}
#ifdef DEBUG_PHY
sprintf(fname,"srs_ch_estimates_time_%d%d.m",ind,aa);
sprintf(vname,"srs_time_%d%d",ind,aa);
write_output(fname,vname,lte_eNB_srs->srs_ch_estimates_time[aa],frame_parms->ofdm_symbol_size*2,2,1);
#endif
}
// we only use channel estimates from tx antenna 0 here
// remember we fixed the SRS to use only every second subcarriers
for (i = 0; i < frame_parms->ofdm_symbol_size/2; i++) {
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)lte_eNB_srs->srs_ch_estimates_time[aa])[(i<<1)];
Im = ((int16_t*)lte_eNB_srs->srs_ch_estimates_time[aa])[1+(i<<1)];
temp += (Re*Re/2) + (Im*Im/2);
}
if (temp > max_val) {
max_pos = i;
max_val = temp;
*eNB_id = ind;
}
}
}
// filter position to reduce jitter
if (clear == 1)
max_pos_fil2 = max_pos;
else
max_pos_fil2 = ((max_pos_fil2 * coef) + (max_pos * ncoef)) >> 15;
return(max_pos_fil2);
}
int lte_est_timing_advance_pusch(PHY_VARS_eNB* eNB,uint8_t UE_id)
{
int temp, i, aa, max_pos=0, max_val=0;
short Re,Im;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_PUSCH *eNB_pusch_vars = eNB->pusch_vars[UE_id];
int32_t **ul_ch_estimates_time= eNB_pusch_vars->drs_ch_estimates_time;
uint8_t cyclic_shift = 0;
int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
AssertFatal(frame_parms->ofdm_symbol_size > 127,"frame_parms->ofdm_symbol_size %d<128\n",frame_parms->ofdm_symbol_size);
AssertFatal(frame_parms->nb_antennas_rx >0 && frame_parms->nb_antennas_rx<3,"frame_parms->nb_antennas_rx %d not in [0,1]\n",
frame_parms->nb_antennas_rx);
for (i = 0; i < frame_parms->ofdm_symbol_size; i++) {
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)ul_ch_estimates_time[aa])[(i<<1)];
Im = ((int16_t*)ul_ch_estimates_time[aa])[1+(i<<1)];
temp += (Re*Re/2) + (Im*Im/2);
}
if (temp > max_val) {
max_pos = i;
max_val = temp;
}
}
if (max_pos>frame_parms->ofdm_symbol_size/2)
max_pos = max_pos-frame_parms->ofdm_symbol_size;
//#ifdef DEBUG_PHY
LOG_D(PHY,"frame %d: max_pos = %d, sync_pos=%d\n",eNB->proc.frame_rx,max_pos,sync_pos);
//#endif //DEBUG_PHY
return max_pos - sync_pos;
}
@@ -0,0 +1,138 @@
/*
* 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
*/
#include "PHY/types.h"
#include "PHY/defs_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/impl_defs_top.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#define DEBUG_PHY
// Adjust location synchronization point to account for drift
// The adjustment is performed once per frame based on the
// last channel estimate of the receiver
void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
PHY_VARS_UE *ue,
unsigned char eNB_id,
uint8_t subframe,
unsigned char clear,
short coef)
{
static int max_pos_fil = 0;
static int count_max_pos_ok = 0;
static int first_time = 1;
int temp = 0, i, aa, max_val = 0, max_pos = 0;
int diff;
short Re,Im,ncoef;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_IN);
ncoef = 32767 - coef;
#ifdef DEBUG_PHY
LOG_D(PHY,"AbsSubframe %d.%d: rx_offset (before) = %d\n",ue->proc.proc_rxtx[0].frame_rx%1024,subframe,ue->rx_offset);
#endif //DEBUG_PHY
// we only use channel estimates from tx antenna 0 here
for (i = 0; i < frame_parms->nb_prefix_samples; i++) {
temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2);
}
if (temp > max_val) {
max_pos = i;
max_val = temp;
}
}
// filter position to reduce jitter
if (clear == 1)
max_pos_fil = max_pos;
else
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
// do not filter to have proactive timing adjustment
max_pos_fil = max_pos;
if(subframe == 6)
{
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
if ( abs(diff) < SYNCH_HYST )
ue->rx_offset = 0;
else
ue->rx_offset = diff;
if(abs(diff)<5)
count_max_pos_ok ++;
else
count_max_pos_ok = 0;
if(count_max_pos_ok > 10 && first_time == 1)
{
first_time = 0;
ue->time_sync_cell = 1;
if (ue->mac_enabled==1) {
LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
//mac_resynch();
dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
ue->UE_mode[0] = PRACH;
}
else {
ue->UE_mode[0] = PUSCH;
}
}
if ( ue->rx_offset < 0 )
ue->rx_offset += FRAME_LENGTH_COMPLEX_SAMPLES;
if ( ue->rx_offset >= FRAME_LENGTH_COMPLEX_SAMPLES )
ue->rx_offset -= FRAME_LENGTH_COMPLEX_SAMPLES;
#ifdef DEBUG_PHY
LOG_D(PHY,"AbsSubframe %d.%d: ThreadId %d diff =%i rx_offset (final) = %i : clear %d,max_pos = %d,max_pos_fil = %d (peak %d) max_val %d target_pos %d \n",
ue->proc.proc_rxtx[ue->current_thread_id[subframe]].frame_rx,
subframe,
ue->current_thread_id[subframe],
diff,
ue->rx_offset,
clear,
max_pos,
max_pos_fil,
temp,max_val,
(frame_parms->nb_prefix_samples>>3));
#endif //DEBUG_PHY
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
}
}
@@ -20,8 +20,10 @@
*/ */
#include <string.h> #include <string.h>
#include "defs.h" #include "PHY/defs_UE.h"
#include "PHY/defs.h" #include "lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "filt16_32.h" #include "filt16_32.h"
//#define DEBUG_BF_CH //#define DEBUG_BF_CH
@@ -20,12 +20,13 @@
*/ */
#include <string.h> #include <string.h>
#include "defs.h" #include "PHY/defs_UE.h"
#include "SCHED/defs.h"
#include "PHY/defs.h"
#include "filt96_32.h" #include "filt96_32.h"
#include "T.h" #include "T.h"
//#define DEBUG_CH //#define DEBUG_CH
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "SCHED_UE/sched_UE.h"
int lte_dl_channel_estimation(PHY_VARS_UE *ue, int lte_dl_channel_estimation(PHY_VARS_UE *ue,
uint8_t eNB_id, uint8_t eNB_id,
@@ -20,8 +20,9 @@
*/ */
#include <string.h> #include <string.h>
#include "defs.h" #include "PHY/defs_UE.h"
#include "PHY/defs.h" #include "lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_CH //#define DEBUG_CH
int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
@@ -19,8 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
@@ -25,7 +25,7 @@
date: 19.11.2009 date: 19.11.2009
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
//#define DEBUG_PHY //#define DEBUG_PHY
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
@@ -22,7 +22,9 @@
#ifndef __LTE_ESTIMATION_DEFS__H__ #ifndef __LTE_ESTIMATION_DEFS__H__
#define __LTE_ESTIMATION_DEFS__H__ #define __LTE_ESTIMATION_DEFS__H__
#include "PHY/defs.h"
#include "PHY/defs_UE.h"
#include "PHY/defs_eNB.h"
/** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_ /** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_
* @{ * @{
*/ */
+10 -13
View File
@@ -26,19 +26,15 @@
*/ */
//#include <string.h> //#include <string.h>
#include "defs.h" #include "PHY/defs_UE.h"
#include "PHY/defs.h" #include "PHY/phy_extern_ue.h"
#include "PHY/extern.h"
#include "SCHED/extern.h"
#include <math.h> #include <math.h>
#ifdef OPENAIR2
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/extern.h" #include "RRC/LTE/rrc_extern.h"
#include "RRC/LITE/extern.h" #include "PHY_INTERFACE/phy_interface.h"
#include "PHY_INTERFACE/extern.h"
#endif
//#define DEBUG_PHY
int* sync_corr_ue0 = NULL; int* sync_corr_ue0 = NULL;
int* sync_corr_ue1 = NULL; int* sync_corr_ue1 = NULL;
@@ -487,8 +483,6 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
} }
//#define DEBUG_PHY
int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint32_t length, uint32_t length,
@@ -578,3 +572,6 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
} }
@@ -36,8 +36,8 @@
*/ */
//#include "defs.h" //#include "defs.h"
#include "PHY/defs.h" #include "PHY/defs_UE.h"
#include "PHY/extern.h" #include "PHY/phy_extern_ue.h"
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
#include "pss6144.h" #include "pss6144.h"
File diff suppressed because it is too large Load Diff
@@ -19,13 +19,14 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
//#define DEBUG_CH //#define DEBUG_CH
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "T.h" #include "T.h"
#include "lte_estimation.h"
// round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15)) // round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15))
static int16_t ru_90[2*128] = {32767, 0,32766, 402,32758, 804,32746, 1206,32729, 1608,32706, 2009,32679, 2411,32647, 2811,32610, 3212,32568, 3612,32522, 4011,32470, 4410,32413, 4808,32352, 5205,32286, 5602,32214, 5998,32138, 6393,32058, 6787,31972, 7180,31881, 7571,31786, 7962,31686, 8351,31581, 8740,31471, 9127,31357, 9512,31238, 9896,31114, 10279,30986, 10660,30853, 11039,30715, 11417,30572, 11793,30425, 12167,30274, 12540,30118, 12910,29957, 13279,29792, 13646,29622, 14010,29448, 14373,29269, 14733,29086, 15091,28899, 15447,28707, 15800,28511, 16151,28311, 16500,28106, 16846,27897, 17190,27684, 17531,27467, 17869,27246, 18205,27020, 18538,26791, 18868,26557, 19195,26320, 19520,26078, 19841,25833, 20160,25583, 20475,25330, 20788,25073, 21097,24812, 21403,24548, 21706,24279, 22006,24008, 22302,23732, 22595,23453, 22884,23170, 23170,22884, 23453,22595, 23732,22302, 24008,22006, 24279,21706, 24548,21403, 24812,21097, 25073,20788, 25330,20475, 25583,20160, 25833,19841, 26078,19520, 26320,19195, 26557,18868, 26791,18538, 27020,18205, 27246,17869, 27467,17531, 27684,17190, 27897,16846, 28106,16500, 28311,16151, 28511,15800, 28707,15447, 28899,15091, 29086,14733, 29269,14373, 29448,14010, 29622,13646, 29792,13279, 29957,12910, 30118,12540, 30274,12167, 30425,11793, 30572,11417, 30715,11039, 30853,10660, 30986,10279, 31114,9896, 31238,9512, 31357,9127, 31471,8740, 31581,8351, 31686,7962, 31786,7571, 31881,7180, 31972,6787, 32058,6393, 32138,5998, 32214,5602, 32286,5205, 32352,4808, 32413,4410, 32470,4011, 32522,3612, 32568,3212, 32610,2811, 32647,2411, 32679,2009, 32706,1608, 32729,1206, 32746,804, 32758,402, 32766}; static int16_t ru_90[2*128] = {32767, 0,32766, 402,32758, 804,32746, 1206,32729, 1608,32706, 2009,32679, 2411,32647, 2811,32610, 3212,32568, 3612,32522, 4011,32470, 4410,32413, 4808,32352, 5205,32286, 5602,32214, 5998,32138, 6393,32058, 6787,31972, 7180,31881, 7571,31786, 7962,31686, 8351,31581, 8740,31471, 9127,31357, 9512,31238, 9896,31114, 10279,30986, 10660,30853, 11039,30715, 11417,30572, 11793,30425, 12167,30274, 12540,30118, 12910,29957, 13279,29792, 13646,29622, 14010,29448, 14373,29269, 14733,29086, 15091,28899, 15447,28707, 15800,28511, 16151,28311, 16500,28106, 16846,27897, 17190,27684, 17531,27467, 17869,27246, 18205,27020, 18538,26791, 18868,26557, 19195,26320, 19520,26078, 19841,25833, 20160,25583, 20475,25330, 20788,25073, 21097,24812, 21403,24548, 21706,24279, 22006,24008, 22302,23732, 22595,23453, 22884,23170, 23170,22884, 23453,22595, 23732,22302, 24008,22006, 24279,21706, 24548,21403, 24812,21097, 25073,20788, 25330,20475, 25583,20160, 25833,19841, 26078,19520, 26320,19195, 26557,18868, 26791,18538, 27020,18205, 27246,17869, 27467,17531, 27684,17190, 27897,16846, 28106,16500, 28311,16151, 28511,15800, 28707,15447, 28899,15091, 29086,14733, 29269,14373, 29448,14010, 29622,13646, 29792,13279, 29957,12910, 30118,12540, 30274,12167, 30425,11793, 30572,11417, 30715,11039, 30853,10660, 30986,10279, 31114,9896, 31238,9512, 31357,9127, 31471,8740, 31581,8351, 31686,7962, 31786,7571, 31881,7180, 31972,6787, 32058,6393, 32138,5998, 32214,5602, 32286,5205, 32352,4808, 32413,4410, 32470,4011, 32522,3612, 32568,3212, 32610,2811, 32647,2411, 32679,2009, 32706,1608, 32729,1206, 32746,804, 32758,402, 32766};
+3 -2
View File
@@ -22,8 +22,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "defs.h" #include "PHY/defs_eNB.h"
#include "PHY/defs.h" #include "PHY/defs_UE.h"
#include "PHY/impl_defs_top.h"
//extern unsigned int lte_gold_table[3][20][2][14]; //extern unsigned int lte_gold_table[3][20][2][14];
//#define DEBUG_DL_CELL_SPEC //#define DEBUG_DL_CELL_SPEC
+4 -2
View File
@@ -24,8 +24,10 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "defs.h" #include "lte_refsig.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "PHY/impl_defs_top.h"
//extern unsigned int lte_gold_table[10][3][42]; //extern unsigned int lte_gold_table[10][3][42];
//#define DEBUG_DL_MBSFN //#define DEBUG_DL_MBSFN
+4 -2
View File
@@ -33,9 +33,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "defs.h" #include "lte_refsig.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "log.h" #include "log.h"
#include "PHY/impl_defs_top.h"
//extern unsigned int lte_gold_table[3][20][2][14]; //extern unsigned int lte_gold_table[3][20][2][14];
//#define DEBUG_DL_CELL_SPEC //#define DEBUG_DL_CELL_SPEC
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "defs.h" #include "lte_refsig.h"
/* c(n) = x1(n+Nc) + x2(n+Nc) mod 2 /* c(n) = x1(n+Nc) + x2(n+Nc) mod 2
+1 -1
View File
@@ -42,7 +42,7 @@
//unsigned int lte_gold_table[10][3][42]; // need 165 bytes for sequence //unsigned int lte_gold_table[10][3][42]; // need 165 bytes for sequence
//slot index x pilot within slot x sequence*/ //slot index x pilot within slot x sequence*/
#include "defs.h" #include "lte_refsig.h"
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn) void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn)
{ {
@@ -23,7 +23,8 @@
/* Author R. Knopp / EURECOM / OpenAirInterface.org */ /* Author R. Knopp / EURECOM / OpenAirInterface.org */
#ifndef __LTE_REFSIG_DEFS__H__ #ifndef __LTE_REFSIG_DEFS__H__
#define __LTE_REFSIG_DEFS__H__ #define __LTE_REFSIG_DEFS__H__
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
/** @ingroup _PHY_REF_SIG /** @ingroup _PHY_REF_SIG
* @{ * @{
+2 -1
View File
@@ -24,7 +24,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#endif #endif
#include "defs.h" #include "lte_refsig.h"
#include "PHY/defs_eNB.h"
uint16_t dftsizes[33] = {12,24,36,48,60,72,96,108,120,144,180,192,216,240,288,300,324,360,384,432,480,540,576,600,648,720,864,900,960,972,1080,1152,1200}; uint16_t dftsizes[33] = {12,24,36,48,60,72,96,108,120,144,180,192,216,240,288,300,324,360,384,432,480,540,576,600,648,720,864,900,960,972,1080,1152,1200};
File diff suppressed because it is too large Load Diff
+12
View File
@@ -30,8 +30,18 @@
* \warning * \warning
*/ */
#ifndef __DCI__h__
#define __DCI__h__
#include <stdint.h> #include <stdint.h>
#define CCEBITS 72
#define CCEPERSYMBOL 33 // This is for 1200 RE
#define CCEPERSYMBOL0 22 // This is for 1200 RE
#define DCI_BITS_MAX ((2*CCEPERSYMBOL+CCEPERSYMBOL0)*CCEBITS)
//#define Mquad (Msymb/4)
/// DCI Format Type 0 (5 MHz,TDD0, 27 bits) /// DCI Format Type 0 (5 MHz,TDD0, 27 bits)
struct DCI0_5MHz_TDD0 { struct DCI0_5MHz_TDD0 {
/// type = 0 => DCI Format 0, type = 1 => DCI Format 1A /// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
@@ -3014,3 +3024,5 @@ struct DCI_INFO_EXTRACTED {
uint64_t ap_si_nl_id:3; uint64_t ap_si_nl_id:3;
}; };
typedef struct DCI_INFO_EXTRACTED DCI_INFO_EXTRACTED_t; typedef struct DCI_INFO_EXTRACTED DCI_INFO_EXTRACTED_t;
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,89 @@
/*
* 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 PHY/LTE_TRANSPORT/dci_tools_common_extern.h
* \brief PHY Support routines (eNB/UE) for filling PDSCH/PUSCH/DLSCH/ULSCH data structures based on DCI PDUs generated by eNB MAC scheduler.
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#include <stdint.h>
extern uint32_t localRIV2alloc_LUT6[32];
extern uint32_t distRIV2alloc_even_LUT6[32];
extern uint32_t distRIV2alloc_odd_LUT6[32];
extern uint16_t RIV2nb_rb_LUT6[32];
extern uint16_t RIV2first_rb_LUT6[32];
extern uint16_t RIV_max6;
extern uint32_t localRIV2alloc_LUT25[512];
extern uint32_t distRIV2alloc_even_LUT25[512];
extern uint32_t distRIV2alloc_odd_LUT25[512];
extern uint16_t RIV2nb_rb_LUT25[512];
extern uint16_t RIV2first_rb_LUT25[512];
extern uint16_t RIV_max25;
extern uint32_t localRIV2alloc_LUT50_0[1600];
extern uint32_t localRIV2alloc_LUT50_1[1600];
extern uint32_t distRIV2alloc_gap0_even_LUT50_0[1600];
extern uint32_t distRIV2alloc_gap0_odd_LUT50_0[1600];
extern uint32_t distRIV2alloc_gap0_even_LUT50_1[1600];
extern uint32_t distRIV2alloc_gap0_odd_LUT50_1[1600];
extern uint32_t distRIV2alloc_gap1_even_LUT50_0[1600];
extern uint32_t distRIV2alloc_gap1_odd_LUT50_0[1600];
extern uint32_t distRIV2alloc_gap1_even_LUT50_1[1600];
extern uint32_t distRIV2alloc_gap1_odd_LUT50_1[1600];
extern uint16_t RIV2nb_rb_LUT50[1600];
extern uint16_t RIV2first_rb_LUT50[1600];
extern uint16_t RIV_max50;
extern uint32_t localRIV2alloc_LUT100_0[6000];
extern uint32_t localRIV2alloc_LUT100_1[6000];
extern uint32_t localRIV2alloc_LUT100_2[6000];
extern uint32_t localRIV2alloc_LUT100_3[6000];
extern uint32_t distRIV2alloc_gap0_even_LUT100_0[6000];
extern uint32_t distRIV2alloc_gap0_odd_LUT100_0[6000];
extern uint32_t distRIV2alloc_gap0_even_LUT100_1[6000];
extern uint32_t distRIV2alloc_gap0_odd_LUT100_1[6000];
extern uint32_t distRIV2alloc_gap0_even_LUT100_2[6000];
extern uint32_t distRIV2alloc_gap0_odd_LUT100_2[6000];
extern uint32_t distRIV2alloc_gap0_even_LUT100_3[6000];
extern uint32_t distRIV2alloc_gap0_odd_LUT100_3[6000];
extern uint32_t distRIV2alloc_gap1_even_LUT100_0[6000];
extern uint32_t distRIV2alloc_gap1_odd_LUT100_0[6000];
extern uint32_t distRIV2alloc_gap1_even_LUT100_1[6000];
extern uint32_t distRIV2alloc_gap1_odd_LUT100_1[6000];
extern uint32_t distRIV2alloc_gap1_even_LUT100_2[6000];
extern uint32_t distRIV2alloc_gap1_odd_LUT100_2[6000];
extern uint32_t distRIV2alloc_gap1_even_LUT100_3[6000];
extern uint32_t distRIV2alloc_gap1_odd_LUT100_3[6000];
extern uint16_t RIV2nb_rb_LUT100[6000];
extern uint16_t RIV2first_rb_LUT100[6000];
extern uint16_t RIV_max100;
extern int8_t *delta_PUCCH_lut;
extern int8_t delta_PUSCH_acc[4];
extern int8_t delta_PUSCH_abs[4];
+13 -194
View File
@@ -30,15 +30,14 @@
* \warning * \warning
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/CODING/defs.h" #include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/extern.h" #include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/defs.h" #include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "PHY/LTE_TRANSPORT/proto.h" #include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "SCHED/defs.h" #include "SCHED/sched_eNB.h"
#include "defs.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include <syscall.h> #include <syscall.h>
@@ -398,12 +397,12 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
uint8_t subframe, uint8_t subframe,
time_stats_t *rm_stats, time_stats_t *rm_stats,
time_stats_t *te_stats, time_stats_t *te_stats,
time_stats_t *te_wait_stats, time_stats_t *te_wait_stats,
time_stats_t *te_main_stats, time_stats_t *te_main_stats,
time_stats_t *te_wakeup_stats0, time_stats_t *te_wakeup_stats0,
time_stats_t *te_wakeup_stats1, time_stats_t *te_wakeup_stats1,
time_stats_t *i_stats, time_stats_t *i_stats,
int worker_num) int worker_num)
{ {
//start_meas(&eNB->dlsch_turbo_encoding_preperation_stats); //start_meas(&eNB->dlsch_turbo_encoding_preperation_stats);
@@ -900,186 +899,6 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
} }
int dlsch_encoding_SIC(PHY_VARS_UE *ue,
unsigned char *a,
uint8_t num_pdcch_symbols,
LTE_eNB_DLSCH_t *dlsch,
int frame,
uint8_t subframe,
time_stats_t *rm_stats,
time_stats_t *te_stats,
time_stats_t *i_stats)
{
unsigned int G;
unsigned int crc=1;
unsigned short iind;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
unsigned char harq_pid = ue->dlsch[subframe&2][0][0]->rnti;
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
unsigned int A;
unsigned char mod_order;
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
// unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
uint8_t beamforming_mode=0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
A = dlsch->harq_processes[harq_pid]->TBS; //6228
// printf("Encoder: A: %d\n",A);
mod_order = dlsch->harq_processes[harq_pid]->Qm;
if(dlsch->harq_processes[harq_pid]->mimo_mode == TM7)
beamforming_mode = 7;
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM8)
beamforming_mode = 8;
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM9_10)
beamforming_mode = 9;
G = get_G(frame_parms,nb_rb,dlsch->harq_processes[harq_pid]->rb_alloc,mod_order,dlsch->harq_processes[harq_pid]->Nl,num_pdcch_symbols,frame,subframe,beamforming_mode);
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
#ifdef DEBUG_DLSCH_CODING
printf("SIC encoding thinks this is a new packet \n");
#endif
/*
int i;
printf("dlsch (tx): \n");
for (i=0;i<(A>>3);i++)
printf("%02x.",a[i]);
printf("\n");
*/
// Add 24-bit crc (polynomial A) to payload
crc = crc24a(a,
A)>>8;
a[A>>3] = ((uint8_t*)&crc)[2];
a[1+(A>>3)] = ((uint8_t*)&crc)[1];
a[2+(A>>3)] = ((uint8_t*)&crc)[0];
// printf("CRC %x (A %d)\n",crc,A);
dlsch->harq_processes[harq_pid]->B = A+24;
// dlsch->harq_processes[harq_pid]->b = a;
memcpy(dlsch->harq_processes[harq_pid]->b,a,(A/8)+4);
if (lte_segmentation(dlsch->harq_processes[harq_pid]->b,
dlsch->harq_processes[harq_pid]->c,
dlsch->harq_processes[harq_pid]->B,
&dlsch->harq_processes[harq_pid]->C,
&dlsch->harq_processes[harq_pid]->Cplus,
&dlsch->harq_processes[harq_pid]->Cminus,
&dlsch->harq_processes[harq_pid]->Kplus,
&dlsch->harq_processes[harq_pid]->Kminus,
&dlsch->harq_processes[harq_pid]->F)<0)
return(-1);
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
if (r<dlsch->harq_processes[harq_pid]->Cminus)
Kr = dlsch->harq_processes[harq_pid]->Kminus;
else
Kr = dlsch->harq_processes[harq_pid]->Kplus;
Kr_bytes = Kr>>3;
// get interleaver index for Turbo code (lookup in Table 5.1.3-3 36-212, V8.6 2009-03, p. 13-14)
if (Kr_bytes<=64)
iind = (Kr_bytes-5);
else if (Kr_bytes <=128)
iind = 59 + ((Kr_bytes-64)>>1);
else if (Kr_bytes <= 256)
iind = 91 + ((Kr_bytes-128)>>2);
else if (Kr_bytes <= 768)
iind = 123 + ((Kr_bytes-256)>>3);
else {
printf("dlsch_coding: Illegal codeword size %d!!!\n",Kr_bytes);
return(-1);
}
#ifdef DEBUG_DLSCH_CODING
printf("Generating Code Segment %d (%d bits)\n",r,Kr);
// generate codewords
printf("bits_per_codeword (Kr)= %d, A %d\n",Kr,A);
printf("N_RB = %d\n",nb_rb);
printf("Ncp %d\n",frame_parms->Ncp);
printf("mod_order %d\n",mod_order);
#endif
#ifdef DEBUG_DLSCH_CODING
printf("Encoding ... iind %d f1 %d, f2 %d\n",iind,f1f2mat_old[iind*2],f1f2mat_old[(iind*2)+1]);
#endif
start_meas(te_stats);
encoder(dlsch->harq_processes[harq_pid]->c[r],
Kr>>3,
&dlsch->harq_processes[harq_pid]->d[r][96],
(r==0) ? dlsch->harq_processes[harq_pid]->F : 0,
f1f2mat_old[iind*2], // f1 (see 36121-820, page 14)
f1f2mat_old[(iind*2)+1] // f2 (see 36121-820, page 14)
);
stop_meas(te_stats);
#ifdef DEBUG_DLSCH_CODING
if (r==0)
write_output("enc_output0.m","enc0",&dlsch->harq_processes[harq_pid]->d[r][96],(3*8*Kr_bytes)+12,1,4);
#endif
start_meas(i_stats);
dlsch->harq_processes[harq_pid]->RTC[r] =
sub_block_interleaving_turbo(4+(Kr_bytes*8),
&dlsch->harq_processes[harq_pid]->d[r][96],
dlsch->harq_processes[harq_pid]->w[r]);
stop_meas(i_stats);
}
}
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
// outputs for each code segment, see Section 5.1.5 p.20
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
#ifdef DEBUG_DLSCH_CODING
printf("Rate Matching, Code segment %d (coded bits (G) %d,unpunctured/repeated bits per code segment %d,mod_order %d, nb_rb %d)...\n",
r,
G,
Kr*3,
mod_order,nb_rb);
#endif
start_meas(rm_stats);
#ifdef DEBUG_DLSCH_CODING
printf("rvidx in SIC encoding = %d\n", dlsch->harq_processes[harq_pid]->rvidx);
#endif
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
G, //G
dlsch->harq_processes[harq_pid]->w[r],
dlsch->harq_processes[harq_pid]->e+r_offset,
dlsch->harq_processes[harq_pid]->C, // C
dlsch->Nsoft, // Nsoft,
dlsch->Mdlharq,
dlsch->Kmimo,
dlsch->harq_processes[harq_pid]->rvidx,
dlsch->harq_processes[harq_pid]->Qm,
dlsch->harq_processes[harq_pid]->Nl,
r,
nb_rb);
// m); // r
stop_meas(rm_stats);
#ifdef DEBUG_DLSCH_CODING
if (r==dlsch->harq_processes[harq_pid]->C-1)
write_output("enc_output.m","enc",dlsch->harq_processes[harq_pid]->e,r_offset,1,4);
#endif
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
return(0);
}
+6 -83
View File
@@ -29,14 +29,14 @@
* \note * \note
* \warning * \warning
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/CODING/defs.h" #include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/extern.h" #include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/defs.h" #include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "defs.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
//#define DEBUG_DLSCH_MODULATION //#define DEBUG_DLSCH_MODULATION
#define NEW_ALLOC_RE #define NEW_ALLOC_RE
@@ -95,42 +95,7 @@ uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp,
return(0); return(0);
} }
void generate_64qam_table(void)
{
int a,b,c,index;
for (a=-1; a<=1; a+=2)
for (b=-1; b<=1; b+=2)
for (c=-1; c<=1; c+=2) {
index = (1+a)*2 + (1+b) + (1+c)/2;
qam64_table[index] = -a*(QAM64_n1 + b*(QAM64_n2 + (c*QAM64_n3))); // 0 1 2
}
}
void generate_16qam_table(void)
{
int a,b,index;
for (a=-1; a<=1; a+=2)
for (b=-1; b<=1; b+=2) {
index = (1+a) + (1+b)/2;
qam16_table[index] = -a*(QAM16_n1 + (b*QAM16_n2));
}
}
void generate_qpsk_table(void)
{
int a,index;
for (a=-1; a<=1; a+=2) {
index = (1+a)/2;
qpsk_table[index] = -a*QPSK;
}
}
@@ -1970,48 +1935,6 @@ int allocate_REs_in_RB_MCH(int32_t **txdataF,
return(0); return(0);
} }
uint8_t get_pmi(uint8_t N_RB_DL, MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb)
{
/*
MIMO_mode_t mode = dlsch_harq->mimo_mode;
uint32_t pmi_alloc = dlsch_harq->pmi_alloc;
*/
switch (N_RB_DL) {
case 6: // 1 PRB per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>(rb<<1))&3);
else
return((pmi_alloc>>rb)&1);
break;
default:
case 25: // 4 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb>>2)<<1))&3);
else
return((pmi_alloc>>(rb>>2))&1);
break;
case 50: // 6 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb/6)<<1))&3);
else
return((pmi_alloc>>(rb/6))&1);
break;
case 100: // 8 PRBs per subband
if (mode <= PUSCH_PRECODING1)
return((pmi_alloc>>((rb>>3)<<1))&3);
else
return((pmi_alloc>>(rb>>3))&1);
break;
}
}
inline int check_skip(int rb,int subframe_offset,LTE_DL_FRAME_PARMS *frame_parms,int l,int nsymb) __attribute__((always_inline)); inline int check_skip(int rb,int subframe_offset,LTE_DL_FRAME_PARMS *frame_parms,int l,int nsymb) __attribute__((always_inline));
+23 -21
View File
@@ -32,12 +32,12 @@
//#define DEBUG_SCRAMBLING 1 //#define DEBUG_SCRAMBLING 1
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/CODING/extern.h" #include "PHY/defs_UE.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "defs.h" #include "transport_eNB.h"
#include "extern.h" #include "PHY/phy_extern.h"
#include "PHY/extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
static inline unsigned int lte_gold_scram(unsigned int *x1, unsigned int *x2, unsigned char reset) __attribute__((always_inline)); static inline unsigned int lte_gold_scram(unsigned int *x1, unsigned int *x2, unsigned char reset) __attribute__((always_inline));
@@ -87,7 +87,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); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// Rule for accumulation of subframes for BL/CE UEs // Rule for accumulation of subframes for BL/CE UEs
uint8_t Nacc=4; uint8_t Nacc=4;
uint16_t j0,j,idelta; uint16_t j0,j,idelta;
@@ -110,7 +110,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
// reset = 1; // reset = 1;
// x1 is set in lte_gold_generic // x1 is set in lte_gold_generic
if (mbsfn_flag == 0) { if (mbsfn_flag == 0) {
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (dlsch->i0 != 0xFFFF) { if (dlsch->i0 != 0xFFFF) {
// rule for BL/CE UEs from Section 6.3.1 in 36.211 // rule for BL/CE UEs from Section 6.3.1 in 36.211
x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell; x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell;
@@ -124,7 +124,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
#ifdef DEBUG_SCRAMBLING #ifdef DEBUG_SCRAMBLING
#ifdef Rel14 #if (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); 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 #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); 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);
@@ -187,6 +187,20 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
void init_scrambling_lut(void) {
uint32_t s;
int i=0,j;
for (s=0;s<=65535;s++) {
for (j=0;j<16;j++) {
scrambling_lut[i++] = (uint8_t)((s>>j)&1);
}
}
}
void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag, int mbsfn_flag,
LTE_UE_DLSCH_t *dlsch, LTE_UE_DLSCH_t *dlsch,
@@ -228,7 +242,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
} }
void init_unscrambling_lut() { void init_unscrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
@@ -239,15 +253,3 @@ void init_unscrambling_lut() {
} }
} }
} }
void init_scrambling_lut() {
uint32_t s;
int i=0,j;
for (s=0;s<=65535;s++) {
for (j=0;j<16;j++) {
scrambling_lut[i++] = (uint8_t)((s>>j)&1);
}
}
}
+8 -6
View File
@@ -32,21 +32,23 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "SCHED/defs.h" #include "SCHED/sched_eNB.h"
#include "SIMULATION/TOOLS/defs.h" // for taus #include "SIMULATION/TOOLS/sim.h" // for taus
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#include "transport_proto.h"
#include "transport_common_proto.h"
#include "assertions.h" #include "assertions.h"
#include "T.h" #include "T.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_DCI_ENCODING 1 //#define DEBUG_DCI_ENCODING 1
//#define DEBUG_DCI_DECODING 1 //#define DEBUG_DCI_DECODING 1
//#define DEBUG_PHY //#define DEBUG_PHY
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) { void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
} }
+2 -1
View File
@@ -29,7 +29,8 @@
* \note * \note
* \warning * \warning
*/ */
#include "PHY/defs.h" #include "PHY/defs_common.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_GROUPHOP 1 //#define DEBUG_GROUPHOP 1
+7 -7
View File
@@ -30,10 +30,10 @@
* \warning * \warning
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/TOOLS/alaw_lut.h" #include "PHY/TOOLS/alaw_lut.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "SCHED/defs.h" #include "SCHED/sched_eNB.h"
//#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h" //#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
@@ -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 **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF; int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF; int16_t **prach_rxsigF = ru->prach_rxsigF;
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br; int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
#endif #endif
void *tx_buffer = ru->ifbuffer.tx[subframe&1]; 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; int16_t *rxF;
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (packet_type > IF4p5_PRACH) if (packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0]; rxF = &prach_rxsigF_br[packet_type - IF4p5_PRACH - 1][0][0];
else 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 **txdataF = ru->common.txdataF_BF;
int32_t **rxdataF = ru->common.rxdataF; int32_t **rxdataF = ru->common.rxdataF;
int16_t **prach_rxsigF = ru->prach_rxsigF; int16_t **prach_rxsigF = ru->prach_rxsigF;
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br; int16_t ***prach_rxsigF_br = ru->prach_rxsigF_br;
#endif #endif
void *rx_buffer = ru->ifbuffer.rx; 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; int16_t *rxF;
#ifdef Rel14 #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (*packet_type > IF4p5_PRACH) if (*packet_type > IF4p5_PRACH)
rxF = &prach_rxsigF_br[*packet_type - IF4p5_PRACH - 1][0][0]; rxF = &prach_rxsigF_br[*packet_type - IF4p5_PRACH - 1][0][0];
else else
+1 -1
View File
@@ -32,7 +32,7 @@
#ifndef __IF4_TOOLS_H__ #ifndef __IF4_TOOLS_H__
#define __IF4_TOOLS_H__ #define __IF4_TOOLS_H__
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
/// Macro for IF4 packet type /// Macro for IF4 packet type
#define IF4p5_PACKET_TYPE 0x080A #define IF4p5_PACKET_TYPE 0x080A
+1 -1
View File
@@ -30,7 +30,7 @@
* \warning * \warning
*/ */
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/TOOLS/alaw_lut.h" #include "PHY/TOOLS/alaw_lut.h"
#include "time_utils.h" #include "time_utils.h"
+1 -1
View File
@@ -34,7 +34,7 @@
#define __IF5_TOOLS_H__ #define __IF5_TOOLS_H__
#include <stdint.h> #include <stdint.h>
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#define IF5_RRH_GW_DL 0x0022 #define IF5_RRH_GW_DL 0x0022
#define IF5_RRH_GW_UL 0x0023 #define IF5_RRH_GW_UL 0x0023
+3 -3
View File
@@ -30,9 +30,9 @@
* \warning * \warning
*/ */
#include "PHY/defs.h" #include "PHY/defs_common.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/proto.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h"
unsigned char get_Qm(unsigned char I_MCS) unsigned char get_Qm(unsigned char I_MCS)
{ {
+4
View File
@@ -30,6 +30,9 @@
* \warning * \warning
*/ */
#ifndef __M_DCI__H__
#define __M_DCI__H__
#include <stdint.h> #include <stdint.h>
@@ -467,3 +470,4 @@ struct DCI6_2_di_20MHz {
typedef struct DCI6_2_di_20MHz DCI6_2_di_20MHz_t; typedef struct DCI6_2_di_20MHz DCI6_2_di_20MHz_t;
#define sizeof_DCI6_2_20MHz_t 13 #define sizeof_DCI6_2_20MHz_t 13
#endif

Some files were not shown because too many files have changed in this diff Show More