Commit 7a5c40c1 authored by bruno mongazon's avatar bruno mongazon

fix issue #320 after having to merge with develop again since committed in the meantime

parents 107e2561 54543537
...@@ -8,7 +8,7 @@ pipeline { ...@@ -8,7 +8,7 @@ pipeline {
disableConcurrentBuilds() disableConcurrentBuilds()
timestamps() timestamps()
gitLabConnection('OAI GitLab') gitLabConnection('OAI GitLab')
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Analysis with cppcheck"]) gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE--ethernet", "Analysis with cppcheck"])
} }
stages { stages {
...@@ -52,28 +52,42 @@ pipeline { ...@@ -52,28 +52,42 @@ pipeline {
stage ("Analysis with cppcheck") { stage ("Analysis with cppcheck") {
steps { steps {
gitlabCommitStatus(name: "Analysis with cppcheck") { gitlabCommitStatus(name: "Analysis with cppcheck") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck" sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
} }
} }
} }
stage ("Build eNb-USRP") { stage ("Build eNb-USRP") {
steps { steps {
gitlabCommitStatus(name: "Build eNb-USRP") { gitlabCommitStatus(name: "Build eNb-USRP") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp" sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
} }
} }
} }
stage ("Build basic simulator") { stage ("Build basic simulator") {
steps { steps {
gitlabCommitStatus(name: "Build basic-sim") { gitlabCommitStatus(name: "Build basic-sim") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim" sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
} }
} }
} }
stage ("Build physical simulators") { stage ("Build physical simulators") {
steps { steps {
gitlabCommitStatus(name: "Build phy-sim") { gitlabCommitStatus(name: "Build phy-sim") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim" sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
stage ("Build eNb-ethernet") {
steps {
gitlabCommitStatus(name: "Build eNb-ethernet") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
}
}
}
stage ("Build UE-ethernet") {
steps {
gitlabCommitStatus(name: "Build UE-ethernet") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
} }
} }
} }
...@@ -82,7 +96,7 @@ pipeline { ...@@ -82,7 +96,7 @@ pipeline {
always { always {
script { script {
dir ('archives') { dir ('archives') {
sh "zip -r vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck" sh "zip -r -qq vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck enb_eth ue_eth"
} }
if(fileExists('archives/vm_build_logs.zip')) { if(fileExists('archives/vm_build_logs.zip')) {
archiveArtifacts artifacts: 'archives/vm_build_logs.zip' archiveArtifacts artifacts: 'archives/vm_build_logs.zip'
...@@ -99,11 +113,18 @@ pipeline { ...@@ -99,11 +113,18 @@ pipeline {
} }
} }
} }
stage ("Destroy all Virtual Machines") {
steps {
sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
}
} }
post { post {
always { always {
script { script {
echo "End of script" // Stage destroy may not be run if error in previous stage
sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} }
} }
success { success {
......
...@@ -15,6 +15,12 @@ function usage { ...@@ -15,6 +15,12 @@ function usage {
echo "" echo ""
echo "Options:" echo "Options:"
echo "--------" echo "--------"
echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job."
echo ""
echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job."
echo ""
echo " --workspace #### OR -ws ####" echo " --workspace #### OR -ws ####"
echo " Specify the workspace." echo " Specify the workspace."
echo "" echo ""
...@@ -22,6 +28,8 @@ function usage { ...@@ -22,6 +28,8 @@ function usage {
echo " --variant basic-sim OR -v2" echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3" echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4" echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo " Specify the variant to build." echo " Specify the variant to build."
echo "" echo ""
echo " --keep-vm-alive OR -k" echo " --keep-vm-alive OR -k"
...@@ -40,10 +48,12 @@ function variant_usage { ...@@ -40,10 +48,12 @@ function variant_usage {
echo " --variant basic-sim OR -v2" echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3" echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4" echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo "" echo ""
} }
if [ $# -lt 1 ] || [ $# -gt 5 ] if [ $# -lt 1 ] || [ $# -gt 9 ]
then then
echo "Syntax Error: not the correct number of arguments" echo "Syntax Error: not the correct number of arguments"
echo "" echo ""
...@@ -51,6 +61,9 @@ then ...@@ -51,6 +61,9 @@ then
exit 1 exit 1
fi fi
VM_TEMPLATE=ci-
JOB_NAME=XX
BUILD_ID=XX
VM_NAME=ci-enb-usrp VM_NAME=ci-enb-usrp
ARCHIVES_LOC=enb_usrp ARCHIVES_LOC=enb_usrp
LOG_PATTERN=.Rel14.txt LOG_PATTERN=.Rel14.txt
...@@ -68,6 +81,16 @@ case $key in ...@@ -68,6 +81,16 @@ case $key in
usage usage
exit 0 exit 0
;; ;;
-jn|--job-name)
JOB_NAME="$2"
shift
shift
;;
-id|--build-id)
BUILD_ID="$2"
shift
shift
;;
-ws|--workspace) -ws|--workspace)
JENKINS_WKSP="$2" JENKINS_WKSP="$2"
shift shift
...@@ -109,6 +132,22 @@ case $key in ...@@ -109,6 +132,22 @@ case $key in
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2" BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
shift shift
;; ;;
-v7)
VM_NAME=ci-enb-ethernet
ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
shift
;;
-v8)
VM_NAME=ci-ue-ethernet
ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
shift
;;
--variant) --variant)
variant="$2" variant="$2"
case $variant in case $variant in
...@@ -140,6 +179,20 @@ case $key in ...@@ -140,6 +179,20 @@ case $key in
NB_PATTERN_FILES=1 NB_PATTERN_FILES=1
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2" BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
;; ;;
enb-ethernet)
VM_NAME=ci-enb-ethernet
ARCHIVES_LOC=enb_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
;;
ue-ethernet)
VM_NAME=ci-ue-ethernet
ARCHIVES_LOC=ue_eth
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=6
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
;;
*) *)
echo "" echo ""
echo "Syntax Error: Invalid Variant option -> $variant" echo "Syntax Error: Invalid Variant option -> $variant"
...@@ -170,6 +223,14 @@ then ...@@ -170,6 +223,14 @@ then
exit 1 exit 1
fi fi
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
then
VM_TEMPLATE=ci-
else
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
fi
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
VM_CMDS=${VM_NAME}_cmds.txt VM_CMDS=${VM_NAME}_cmds.txt
ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC} ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
...@@ -199,7 +260,7 @@ echo "############################################################" ...@@ -199,7 +260,7 @@ echo "############################################################"
echo "Running install and build script on VM ($VM_NAME)" echo "Running install and build script on VM ($VM_NAME)"
echo "############################################################" echo "############################################################"
echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
if [ "$VM_NAME" == "ci-cppcheck" ] if [[ "$VM_NAME" == *"-cppcheck"* ]]
then then
echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
...@@ -212,7 +273,7 @@ echo "mkdir tmp" >> $VM_CMDS ...@@ -212,7 +273,7 @@ echo "mkdir tmp" >> $VM_CMDS
echo "cd tmp" >> $VM_CMDS echo "cd tmp" >> $VM_CMDS
echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS
echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS
if [ "$VM_NAME" == "ci-cppcheck" ] if [[ "$VM_NAME" == *"-cppcheck"* ]]
then then
echo "mkdir cmake_targets/log" >> $VM_CMDS echo "mkdir cmake_targets/log" >> $VM_CMDS
echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
...@@ -243,7 +304,7 @@ then ...@@ -243,7 +304,7 @@ then
fi fi
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
if [ "$VM_NAME" == "ci-cppcheck" ] if [[ "$VM_NAME" == *"-cppcheck"* ]]
then then
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
fi fi
......
#!/bin/bash
function usage {
echo "OAI VM Destroy script"
echo " Original Author: Raphael Defosseux"
echo ""
echo "Usage:"
echo "------"
echo " destroyAllRunningVM.sh [OPTIONS]"
echo ""
echo "Options:"
echo "--------"
echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job."
echo ""
echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
if [ $# -gt 4 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
VM_TEMPLATE=ci-
JOB_NAME=XX
BUILD_ID=XX
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
-jn|--job-name)
JOB_NAME="$2"
shift
shift
;;
-id|--build-id)
BUILD_ID="$2"
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
then
VM_TEMPLATE=ci-
else
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
fi
LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
for CI_VM in $LIST_CI_VM
do
VM_IP_ADDR=`uvt-kvm ip $CI_VM`
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
uvt-kvm destroy $CI_VM
ssh-keygen -R $VM_IP_ADDR
done
exit 0
...@@ -232,6 +232,10 @@ function sca_summary_table_footer { ...@@ -232,6 +232,10 @@ function sca_summary_table_footer {
echo " <th>Total</th>" >> ./build_results.html echo " <th>Total</th>" >> ./build_results.html
echo " <th>Unknown</th>" >> ./build_results.html echo " <th>Unknown</th>" >> ./build_results.html
echo " <th>Unknown</th>" >> ./build_results.html echo " <th>Unknown</th>" >> ./build_results.html
if [ -f ccp_error_cnt.txt ]
then
rm -f ccp_error_cnt.txt
fi
fi fi
echo " </tr>" >> ./build_results.html echo " </tr>" >> ./build_results.html
echo " </table>" >> ./build_results.html echo " </table>" >> ./build_results.html
...@@ -505,6 +509,24 @@ summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt ...@@ -505,6 +509,24 @@ summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt
summary_table_row "Coding - Release 14" ./archives/phy_sim/coding.Rel14.txt "Built target coding" ./phy_sim_row3.html summary_table_row "Coding - Release 14" ./archives/phy_sim/coding.Rel14.txt "Built target coding" ./phy_sim_row3.html
summary_table_footer summary_table_footer
summary_table_header "OAI Build eNB -- ETHERNET transport option"
summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
summary_table_footer
summary_table_header "OAI Build UE -- ETHERNET transport option"
summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
summary_table_footer
echo " <h3>Details</h3>" >> ./build_results.html echo " <h3>Details</h3>" >> ./build_results.html
for DETAILS_TABLE in `ls ./enb_usrp_row*.html` for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
...@@ -519,7 +541,15 @@ for DETAILS_TABLE in `ls ./phy_sim_row*.html` ...@@ -519,7 +541,15 @@ for DETAILS_TABLE in `ls ./phy_sim_row*.html`
do do
cat $DETAILS_TABLE >> ./build_results.html cat $DETAILS_TABLE >> ./build_results.html
done done
rm -f ./enb_usrp_row*.html ./basic_sim_row*.html ./phy_sim_row*.html for DETAILS_TABLE in `ls ./enb_eth_row*.html`
do
cat $DETAILS_TABLE >> ./build_results.html
done
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
do
cat $DETAILS_TABLE >> ./build_results.html
done
rm -f ./enb_usrp_row*.html ./basic_sim_row*.html ./phy_sim_row*.html ./enb_eth_row*.html ./ue_eth_row*.html
echo "</body>" >> ./build_results.html echo "</body>" >> ./build_results.html
echo "</html>" >> ./build_results.html echo "</html>" >> ./build_results.html
......
...@@ -2021,7 +2021,7 @@ target_link_libraries (lte-uesoftmodem ${T_LIB}) ...@@ -2021,7 +2021,7 @@ target_link_libraries (lte-uesoftmodem ${T_LIB})
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
......
...@@ -546,7 +546,7 @@ function main() { ...@@ -546,7 +546,7 @@ function main() {
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file # echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
......
...@@ -67,16 +67,23 @@ ...@@ -67,16 +67,23 @@
# define MAX_MODULES NB_MODULES_MAX # define MAX_MODULES NB_MODULES_MAX
#ifdef LARGE_SCALE #ifndef UE_EXPANSION
# ifdef LARGE_SCALE
# define MAX_MOBILES_PER_ENB 128 # define MAX_MOBILES_PER_ENB 128
# define MAX_MOBILES_PER_ENB_NB_IoT 128 # define MAX_MOBILES_PER_ENB_NB_IoT 128
# define MAX_eNB 2 # define MAX_eNB 2
#else # else
# define MAX_MOBILES_PER_ENB 16 # define MAX_MOBILES_PER_ENB 16
# define MAX_MOBILES_PER_ENB_NB_IoT 16 # define MAX_MOBILES_PER_ENB_NB_IoT 16
# define MAX_eNB 2 # define MAX_eNB 2
# endif
#else
# define MAX_MOBILES_PER_ENB 256
# define MAX_MOBILES_PER_ENB_NB_IoT 256
# define MAX_eNB 2
#endif #endif
#define MAX_MANAGED_ENB_PER_MOBILE 2 #define MAX_MANAGED_ENB_PER_MOBILE 2
///NB-IOT ///NB-IOT
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include "assertions.h" #include "assertions.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "SIMULATION/TOOLS/sim.h"
#include "LAYER2/MAC/mac_proto.h" #include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/eNB_scheduler_fairRR.h" #include "LAYER2/MAC/eNB_scheduler_fairRR.h"
...@@ -53,6 +54,9 @@ extern uint8_t nfapi_mode; ...@@ -53,6 +54,9 @@ extern uint8_t nfapi_mode;
extern volatile int16_t phy_tx_txdataF_end; extern volatile int16_t phy_tx_txdataF_end;
extern int oai_exit; extern int oai_exit;
#endif #endif
extern uint16_t sfnsf_add_subframe(uint16_t frameP, uint16_t subframeP, int offset);
extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
/* internal vars */ /* internal vars */
DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs]; DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs];
int last_dlsch_ue_id[MAX_NUM_CCs] = {-1}; int last_dlsch_ue_id[MAX_NUM_CCs] = {-1};
...@@ -566,7 +570,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, ...@@ -566,7 +570,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
LTE_eNB_UE_stats *eNB_UE_stats2 = NULL; LTE_eNB_UE_stats *eNB_UE_stats2 = NULL;
UE_sched_ctrl *ue_sched_ctl1, *ue_sched_ctl2; UE_sched_ctrl *ue_sched_ctl1, *ue_sched_ctl2;
#endif #endif
memset(min_rb_unit,0,sizeof(min_rb_unit));
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here
...@@ -591,7 +595,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, ...@@ -591,7 +595,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
frameP, frameP,
subframeP, subframeP,
N_RBG[CC_id], N_RBG[CC_id],
nb_rbs_required, (uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required,
rballoc_sub, rballoc_sub,
MIMO_mode_indicator); MIMO_mode_indicator);
...@@ -600,12 +604,12 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, ...@@ -600,12 +604,12 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
#if (!defined(PRE_SCD_THREAD)) #if (!defined(PRE_SCD_THREAD))
// Store the DLSCH buffer for each logical channel // Store the DLSCH buffer for each logical channel
store_dlsch_buffer(Mod_id, frameP, subframeP); store_dlsch_buffer(Mod_id,0, frameP, subframeP);
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer // Calculate the number of RBs required by each UE on the basis of logical channel's buffer
assign_rbs_required(Mod_id, frameP, subframeP, nb_rbs_required, assign_rbs_required(Mod_id, 0, frameP, subframeP, nb_rbs_required,
min_rb_unit); min_rb_unit);
#else #else
memcpy(nb_rbs_required, pre_nb_rbs_required[dlsch_ue_select_tbl_in_use] , sizeof(uint16_t)*MAX_NUM_CCs*NUMBER_OF_UE_MAX); memcpy(nb_rbs_required, pre_nb_rbs_required[dlsch_ue_select_tbl_in_use] , sizeof(uint16_t)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
...@@ -664,8 +668,8 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id, ...@@ -664,8 +668,8 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
transmission_mode, transmission_mode,
min_rb_unit[CC_id], min_rb_unit[CC_id],
N_RB_DL, N_RB_DL,
nb_rbs_required, (uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required,
nb_rbs_required_remaining, (uint16_t (*)[NUMBER_OF_UE_MAX])nb_rbs_required_remaining,
rballoc_sub, rballoc_sub,
MIMO_mode_indicator); MIMO_mode_indicator);
temp_total_rbs_count -= ue_sched_ctl->pre_nb_available_rbs[CC_id]; temp_total_rbs_count -= ue_sched_ctl->pre_nb_available_rbs[CC_id];
...@@ -780,7 +784,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -780,7 +784,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
uint8_t CC_id; uint8_t CC_id;
int UE_id; int UE_id;
unsigned char aggregation; // unsigned char aggregation;
mac_rlc_status_resp_t rlc_status; mac_rlc_status_resp_t rlc_status;
unsigned char header_len_dcch = 0, header_len_dcch_tmp = 0; unsigned char header_len_dcch = 0, header_len_dcch_tmp = 0;
unsigned char header_len_dtch = 0, header_len_dtch_tmp = unsigned char header_len_dtch = 0, header_len_dtch_tmp =
...@@ -799,7 +803,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -799,7 +803,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
eNB_MAC_INST *eNB = RC.mac[module_idP]; eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc = eNB->common_channels; COMMON_channels_t *cc = eNB->common_channels;
UE_list_t *UE_list = &eNB->UE_list; UE_list_t *UE_list = &eNB->UE_list;
int continue_flag = 0; // int continue_flag = 0;
int32_t normalized_rx_power, target_rx_power; int32_t normalized_rx_power, target_rx_power;
int32_t tpc = 1; int32_t tpc = 1;
static int32_t tpc_accumulated = 0; static int32_t tpc_accumulated = 0;
...@@ -863,7 +867,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -863,7 +867,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
} }
//weight = get_ue_weight(module_idP,UE_id); //weight = get_ue_weight(module_idP,UE_id);
aggregation = 2; // aggregation = 2;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
N_RB_DL[CC_id] = to_prb(cc[CC_id].mib->message.dl_Bandwidth); N_RB_DL[CC_id] = to_prb(cc[CC_id].mib->message.dl_Bandwidth);
min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id); min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id);
...@@ -922,7 +926,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -922,7 +926,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id]; eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
/*
switch(get_tmode(module_idP,CC_id,UE_id)){ switch(get_tmode(module_idP,CC_id,UE_id)){
case 1: case 1:
case 2: case 2:
...@@ -941,7 +945,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -941,7 +945,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
aggregation = 2; aggregation = 2;
break; break;
} }
*/
if (cc[CC_id].tdd_Config != NULL) { //TDD if (cc[CC_id].tdd_Config != NULL) { //TDD
set_ue_dai (subframeP, set_ue_dai (subframeP,
UE_id, UE_id,
...@@ -951,6 +955,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -951,6 +955,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
// update UL DAI after DLSCH scheduling // update UL DAI after DLSCH scheduling
set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP); set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP);
} }
nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id]; nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id];
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP); harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frameP ,subframeP);
...@@ -1631,7 +1636,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1631,7 +1636,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
} }
//#endif //#endif
#ifdef DEBUG_eNB_SCHEDULER #ifdef DEBUG_eNB_SCHEDULER
LOG_T(MAC, "[eNB %d] First 16 bytes of DLSCH : \n"); LOG_T(MAC, "[eNB %d] First 16 bytes of DLSCH : \n",module_idP );
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
LOG_T(MAC, "%x.", dlsch_buffer[i]); LOG_T(MAC, "%x.", dlsch_buffer[i]);
...@@ -2642,19 +2647,19 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -2642,19 +2647,19 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
if(N_RB_UL == 25){ if(N_RB_UL == 25){
if (first_rb[CC_id] >= N_RB_UL-1) { if (first_rb[CC_id] >= N_RB_UL-1) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d N_RB_UL %d first_rb %d: dropping, not enough RBs\n", LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d N_RB_UL %d first_rb %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id, N_RB_UL, first_rb); module_idP,frameP,subframeP,UE_id,rnti,CC_id, N_RB_UL, first_rb[CC_id]);
break; break;
} }
}else if(N_RB_UL == 50){ }else if(N_RB_UL == 50){
if (first_rb[CC_id] >= N_RB_UL-2) { if (first_rb[CC_id] >= N_RB_UL-2) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d N_RB_UL %d first_rb %d: dropping, not enough RBs\n", LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d N_RB_UL %d first_rb %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id, N_RB_UL, first_rb); module_idP,frameP,subframeP,UE_id,rnti,CC_id, N_RB_UL, first_rb[CC_id]);
break; break;
} }
}else if(N_RB_UL == 100){ }else if(N_RB_UL == 100){
if (first_rb[CC_id] >= N_RB_UL-3) { if (first_rb[CC_id] >= N_RB_UL-3) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d N_RB_UL %d first_rb %d: dropping, not enough RBs\n", LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d N_RB_UL %d first_rb %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id, N_RB_UL, first_rb); module_idP,frameP,subframeP,UE_id,rnti,CC_id, N_RB_UL, first_rb[CC_id]);
break; break;
} }
} }
......
...@@ -441,6 +441,7 @@ void set_ue_dai(sub_frame_t subframeP, ...@@ -441,6 +441,7 @@ void set_ue_dai(sub_frame_t subframeP,
int UE_id, int UE_id,
uint8_t CC_id, uint8_t tdd_config, UE_list_t * UE_list); uint8_t CC_id, uint8_t tdd_config, UE_list_t * UE_list);
uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
/** \brief First stage of PCH Scheduling. Gets a PCH SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs). /** \brief First stage of PCH Scheduling. Gets a PCH SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
@param Mod_id Instance ID of eNB @param Mod_id Instance ID of eNB
@param frame Frame index @param frame Frame index
...@@ -675,6 +676,8 @@ int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid ...@@ -675,6 +676,8 @@ int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti, int harq_pid
); );
int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP); int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP);
void store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframeP);
void assign_rbs_required(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP, sub_frame_t subframe, uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB], int min_rb_unit[NFAPI_CC_MAX]);
int maxround(module_id_t Mod_id, uint16_t rnti, int frame, int maxround(module_id_t Mod_id, uint16_t rnti, int frame,
sub_frame_t subframe, uint8_t ul_flag); sub_frame_t subframe, uint8_t ul_flag);
......
...@@ -198,7 +198,7 @@ MACRLCs = ( ...@@ -198,7 +198,7 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "local_RRC"; tr_n_preference = "local_RRC";
phy_test_mode = 1; phy_test_mode = 0;
puSch10xSnr = 200; puSch10xSnr = 200;
puCch10xSnr = 200; puCch10xSnr = 200;
} }
......
...@@ -1781,10 +1781,6 @@ static void* ru_thread( void* param ) { ...@@ -1781,10 +1781,6 @@ static void* ru_thread( void* param ) {
// wakeup all eNB processes waiting for this RU // wakeup all eNB processes waiting for this RU
if (ru->num_eNB>0) wakeup_eNBs(ru); if (ru->num_eNB>0) wakeup_eNBs(ru);
// wait until eNBs are finished subframe RX n and TX n+sf_ahead
if(get_nprocs() > 4)
wait_on_condition(&proc->mutex_eNBs,&proc->cond_eNBs,&proc->instance_cnt_eNBs,"ru_thread");
#ifndef PHY_TX_THREAD #ifndef PHY_TX_THREAD
if(get_nprocs() <= 4){ if(get_nprocs() <= 4){
// do TX front-end processing if needed (precoding and/or IDFTs) // do TX front-end processing if needed (precoding and/or IDFTs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment