diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab
index 0def0c916a88ec2702d4bfdcd7753490919efafd..423e07be923195b9591bbb832017886ed7971d20 100644
--- a/ci-scripts/Jenkinsfile-gitlab
+++ b/ci-scripts/Jenkinsfile-gitlab
@@ -118,7 +118,7 @@ pipeline {
         stage ("Start VM -- basic-sim") {
             steps {
                 timeout (time: 5, unit: 'MINUTES') {
-                    sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
+                    sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
                 }
             }
         }
@@ -126,7 +126,7 @@ pipeline {
         stage ("Start VM -- enb-usrp") {
             steps {
                 timeout (time: 5, unit: 'MINUTES') {
-                    sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
+                    sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
                 }
             }
         }
@@ -134,7 +134,7 @@ pipeline {
         stage ("Start VM -- enb-ethernet") {
             steps {
                 timeout (time: 5, unit: 'MINUTES') {
-                    sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
+                    sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
                 }
             }
         }
@@ -142,7 +142,7 @@ pipeline {
         stage ("Start VM -- ue-ethernet") {
             steps {
                 timeout (time: 5, unit: 'MINUTES') {
-                    sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
+                    sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
                 }
             }
         }
@@ -150,7 +150,7 @@ pipeline {
         stage ("Start VM -- phy-sim") {
             steps {
                 timeout (time: 5, unit: 'MINUTES') {
-                    sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
+                    sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
                 }
             }
         }
@@ -158,7 +158,7 @@ pipeline {
         stage ("Start VM -- cppcheck") {
             steps {
                 timeout (time: 5, unit: 'MINUTES') {
-                    sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
+                    sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
                 }
             }
         }
@@ -169,7 +169,7 @@ pipeline {
                     steps {
                         gitlabCommitStatus(name: "Analysis with cppcheck") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
+                                sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
                             }
                         }
                     }
@@ -178,7 +178,7 @@ pipeline {
                     steps {
                         gitlabCommitStatus(name: "Build eNb-USRP") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
+                                sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
                             }
                         }
                     }
@@ -187,34 +187,34 @@ pipeline {
                     steps {
                         gitlabCommitStatus(name: "Build basic-sim") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
+                                sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
                             }
                         }
                     }
                 }
-                stage ("Build physical simulators") {
+                stage ("Build eNb-ethernet") {
                     steps {
-                        gitlabCommitStatus(name: "Build phy-sim") {
+                        gitlabCommitStatus(name: "Build eNb-ethernet") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
+                                sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
                             }
                         }
                     }
                 }
-                stage ("Build eNb-ethernet") {
+                stage ("Build UE-ethernet") {
                     steps {
-                        gitlabCommitStatus(name: "Build eNb-ethernet") {
+                        gitlabCommitStatus(name: "Build UE-ethernet") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
+                                sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
                             }
                         }
                     }
                 }
-                stage ("Build UE-ethernet") {
+                stage ("Build physical simulators") {
                     steps {
-                        gitlabCommitStatus(name: "Build UE-ethernet") {
+                        gitlabCommitStatus(name: "Build phy-sim") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/waitBuildOnVM.sh --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
+                               sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
                             }
                         }
                     }
@@ -252,7 +252,7 @@ pipeline {
                             archiveArtifacts artifacts: 'archives/vm_build_logs.zip'
                         }
                         if ("MERGE".equals(env.gitlabActionType)) {
-                            sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
+                            sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
                             sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
                             def res=readFile('./oai_warning_files.txt').trim();
                             if ("0".equals(res)) {
@@ -263,7 +263,7 @@ pipeline {
                                 addGitLabMRComment comment: message
                             }
                         } else {
-                            sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
+                            sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
                         }
                         if(fileExists('build_results.html')) {
                             sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' build_results.html"
@@ -280,7 +280,7 @@ pipeline {
                     steps {
                         gitlabCommitStatus(name: "Test phy-sim") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
+                                sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
                             }
                         }
                     }
@@ -289,7 +289,7 @@ pipeline {
                     steps {
                         gitlabCommitStatus(name: "Test basic-sim") {
                             timeout (time: 20, unit: 'MINUTES') {
-                                sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
+                                sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
                             }
                         }
                     }
@@ -484,9 +484,9 @@ pipeline {
                         if(fileExists('archives/vm_tests_logs.zip')) {
                             archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
                             if ("MERGE".equals(env.gitlabActionType)) {
-                                sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
+                                sh "./ci-scripts/oai-ci-vm-tool report-test --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
                             } else {
-                                sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
+                                sh "./ci-scripts/oai-ci-vm-tool report-test --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
                             }
                             if(fileExists('test_simulator_results.html')) {
                                 sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_simulator_results.html"
@@ -499,7 +499,7 @@ pipeline {
         }
         stage ("Destroy all Virtual Machines") {
             steps {
-                sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
+                sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
             }
         }
     }
@@ -507,7 +507,7 @@ pipeline {
         always {
             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}"
+                sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
                 emailext attachmentsPattern: '*results*.html',
                      body: '''Hi,
 Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran
index 6795eab9b8bccc4cd59660408f69f8bf7687d7ee..938110b458868be777bf0d76729605e750fb8345 100644
--- a/ci-scripts/Jenkinsfile-tmp-ran
+++ b/ci-scripts/Jenkinsfile-tmp-ran
@@ -53,6 +53,7 @@ def eNB_Repository
 def eNB_Branch
 def eNB_CommitID
 def eNB_AllowMergeRequestProcess = false
+def eNB_TargetBranch
 
 pipeline {
     agent {
@@ -150,6 +151,14 @@ pipeline {
                     echo "eNB_CommitID          :   ${eNB_CommitID}"
                     if (params.eNB_mergeRequest != null) {
                         eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
+                        if (eNB_AllowMergeRequestProcess) {
+                            if (params.eNB_TargetBranch != null) {
+                                eNB_TargetBranch = params.eNB_TargetBranch
+                            } else {
+                                eNB_TargetBranch = 'develop'
+                            }
+                            echo "eNB_TargetBranch      :   ${eNB_TargetBranch}"
+                        }
                     }
 
                     if (params.EPC_IPAddress == null) {
@@ -192,7 +201,7 @@ pipeline {
                                 [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
                                 [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
                             ]) {
-                                sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${testXMLFile}"
+                                sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${testXMLFile}"
                             }
                         } catch (Exception e) {
                             currentBuild.result = 'FAILURE'
diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh
index c1f554093d21ab9a59366095070606e1b015f4db..aed449f180f59fe1d0ba49ecd3e98c9062d09243 100755
--- a/ci-scripts/buildOnVM.sh
+++ b/ci-scripts/buildOnVM.sh
@@ -20,8 +20,8 @@
 # *      contact@openairinterface.org
 # */
 
-function usage {
-    echo "OAI VM Build Check script"
+function build_usage {
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
     echo "   Requirements:"
     echo "     -- uvtool uvtool-libvirt apt-cacher"
@@ -31,9 +31,9 @@ function usage {
     echo ""
     echo "Usage:"
     echo "------"
-    echo "    buildOnVM.sh [OPTIONS]"
+    echo "    oai-ci-vm-tool build [OPTIONS]"
     echo ""
-    echo "Options:"
+    echo "Mandatory Options:"
     echo "--------"
     echo "    --job-name #### OR -jn ####"
     echo "    Specify the name of the Jenkins job."
@@ -44,12 +44,9 @@ function usage {
     echo "    --workspace #### OR -ws ####"
     echo "    Specify the workspace."
     echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
+    echo "Options:"
+    echo "--------"
+    variant_usage
     echo "    Specify the variant to build."
     echo ""
     echo "    --keep-vm-alive OR -k"
@@ -63,382 +60,120 @@ function usage {
     echo ""
 }
 
-function variant_usage {
-    echo "OAI VM Build Check script"
-    echo "   Original Author: Raphael Defosseux"
-    echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
-    echo ""
-}
-
-if [ $# -lt 1 ] || [ $# -gt 9 ]
-then
-    echo "Syntax Error: not the correct number of arguments"
-    echo ""
-    usage
-    exit 1
-fi
-
-VM_TEMPLATE=ci-
-JOB_NAME=XX
-BUILD_ID=XX
-VM_NAME=ci-enb-usrp
-VM_MEMORY=2048
-VM_CPU=4
-ARCHIVES_LOC=enb_usrp
-LOG_PATTERN=.Rel14.txt
-NB_PATTERN_FILES=4
-BUILD_OPTIONS="--eNB -w USRP"
-KEEP_VM_ALIVE=0
-DAEMON=0
-
-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
-    ;;
-    -ws|--workspace)
-    JENKINS_WKSP="$2"
-    shift
-    shift
-    ;;
-    -k|--keep-vm-alive)
-    KEEP_VM_ALIVE=1
-    shift
-    ;;
-    -D|--daemon)
-    DAEMON=1
-    shift
-    ;;
-    -v1)
-    VM_NAME=ci-enb-usrp
-    ARCHIVES_LOC=enb_usrp
-    LOG_PATTERN=.Rel14.txt
-    NB_PATTERN_FILES=4
-    BUILD_OPTIONS="--eNB -w USRP --mu"
-    shift
-    ;;
-    -v2)
-    VM_NAME=ci-basic-sim
-    ARCHIVES_LOC=basic_sim
-    LOG_PATTERN=basic_simulator
-    NB_PATTERN_FILES=2
-    BUILD_OPTIONS="--basic-simulator"
-    VM_MEMORY=8192
-    VM_CPU=4
-    shift
-    ;;
-    -v3)
-    VM_NAME=ci-phy-sim
-    ARCHIVES_LOC=phy_sim
-    LOG_PATTERN=.Rel14.txt
-    NB_PATTERN_FILES=3
-    BUILD_OPTIONS="--phy_simulators"
-    shift
-    ;;
-    -v4)
-    VM_NAME=ci-cppcheck
-    VM_MEMORY=4096
-    ARCHIVES_LOC=cppcheck
-    LOG_PATTERN=cppcheck.xml
-    NB_PATTERN_FILES=1
-    BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
-    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="$2"
-    case $variant in
-        enb-usrp)
-        VM_NAME=ci-enb-usrp
-        ARCHIVES_LOC=enb_usrp
-        LOG_PATTERN=.Rel14.txt
-        NB_PATTERN_FILES=4
-        BUILD_OPTIONS="--eNB -w USRP --mu"
-        ;;
-        basic-sim)
-        VM_NAME=ci-basic-sim
-        ARCHIVES_LOC=basic_sim
-        LOG_PATTERN=basic_simulator
-        NB_PATTERN_FILES=2
-        BUILD_OPTIONS="--basic-simulator"
-        VM_MEMORY=8192
-        VM_CPU=4
-        ;;
-        phy-sim)
-        VM_NAME=ci-phy-sim
-        ARCHIVES_LOC=phy_sim
-        LOG_PATTERN=.Rel14.txt
-        NB_PATTERN_FILES=3
-        BUILD_OPTIONS="--phy_simulators"
-        ;;
-        cppcheck)
-        VM_NAME=ci-cppcheck
-        VM_MEMORY=4096
-        ARCHIVES_LOC=cppcheck
-        LOG_PATTERN=cppcheck.xml
-        NB_PATTERN_FILES=1
-        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 "Syntax Error: Invalid Variant option -> $variant"
-        echo ""
-        variant_usage
-        exit 1
-    esac
-    shift
-    shift
-    ;;
-    *)
-    echo "Syntax Error: unknown option: $key"
-    echo ""
-    usage
-    exit 1
-esac
-done
-
-if [ ! -f $JENKINS_WKSP/localZip.zip ]
-then
-    echo "Missing localZip.zip file!"
-    exit 1
-fi
-if [ ! -f /etc/apt/apt.conf.d/01proxy ]
-then
-    echo "Missing /etc/apt/apt.conf.d/01proxy file!"
-    echo "Is apt-cacher installed and configured?"
-    exit 1
-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
-ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
-
-echo "VM_NAME             = $VM_NAME"
-echo "VM_CMD_FILE         = $VM_CMDS"
-echo "JENKINS_WKSP        = $JENKINS_WKSP"
-echo "ARCHIVES_LOC        = $ARCHIVES_LOC"
-echo "BUILD_OPTIONS       = $BUILD_OPTIONS"
-
-IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
+function build_on_vm {
+    if [ ! -f $JENKINS_WKSP/localZip.zip ]
+    then
+        echo "Missing localZip.zip file!"
+        STATUS=1
+        return
+    fi
+    if [ ! -f /etc/apt/apt.conf.d/01proxy ]
+    then
+        echo "Missing /etc/apt/apt.conf.d/01proxy file!"
+        echo "Is apt-cacher installed and configured?"
+        STATUS=1
+        return
+    fi
 
-if [ $IS_VM_ALIVE -eq 0 ]
-then
     echo "############################################################"
-    echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
+    echo "OAI CI VM script"
     echo "############################################################"
-    uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
-fi
-
-echo "Waiting for VM to be started"
-uvt-kvm wait $VM_NAME --insecure
 
-VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
-echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
+    echo "VM_NAME             = $VM_NAME"
+    echo "VM_CMD_FILE         = $VM_CMDS"
+    echo "JENKINS_WKSP        = $JENKINS_WKSP"
+    echo "ARCHIVES_LOC        = $ARCHIVES_LOC"
+    echo "BUILD_OPTIONS       = $BUILD_OPTIONS"
 
-echo "############################################################"
-echo "Copying GIT repo into VM ($VM_NAME)" 
-echo "############################################################"
-scp -o StrictHostKeyChecking=no localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu
-scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$VM_IP_ADDR:/home/ubuntu
+    IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
 
-echo "############################################################"
-echo "Running install and build script on VM ($VM_NAME)"
-echo "############################################################"
-echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
-echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
-if [[ "$VM_NAME" == *"-cppcheck"* ]]
-then
-    if [ $DAEMON -eq 0 ]
-    then
-        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 --yes install zip cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
-    else
-        echo "echo \"sudo apt-get --yes --quiet install zip daemon cppcheck \"" >> $VM_CMDS
-        echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
-        echo "sudo apt-get --yes install zip daemon cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
-    fi
-else
-    if [ $DAEMON -eq 0 ]
+    if [ $IS_VM_ALIVE -eq 0 ]
     then
-        echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS
-        echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
-        echo "sudo apt-get --yes install zip subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
-    else
-        echo "echo \"sudo apt-get --yes --quiet install zip daemon subversion libboost-dev \"" >> $VM_CMDS
-        echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
-        echo "sudo apt-get --yes install zip daemon subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
-    fi
-fi
-echo "mkdir tmp" >> $VM_CMDS
-echo "cd tmp" >> $VM_CMDS
-echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS
-echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS
-if [[ "$VM_NAME" == *"-cppcheck"* ]]
-then
-    echo "mkdir cmake_targets/log" >> $VM_CMDS
-    echo "chmod 777 cmake_targets/log" >> $VM_CMDS
-    echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
-    echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS
-    if [ $DAEMON -eq 0 ]
-    then
-        echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS
-    else
-        echo "echo \"cppcheck $BUILD_OPTIONS .\" > ./my-vm-build.sh" >> $VM_CMDS
-        echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
-        echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp -O /home/ubuntu/tmp/cmake_targets/log/cppcheck_build.txt -E /home/ubuntu/tmp/cmake_targets/log/cppcheck.xml ./my-vm-build.sh" >> $VM_CMDS
-    fi
-else
-    echo "echo \"source oaienv\"" >> $VM_CMDS
-    echo "source oaienv" >> $VM_CMDS
-    echo "cd cmake_targets/" >> $VM_CMDS
-    echo "mkdir log" >> $VM_CMDS
-    echo "chmod 777 log" >> $VM_CMDS
-    echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS
-    if [ $DAEMON -eq 0 ]
-    then
-        echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS
-        echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS
-    else
-        echo "echo \"./build_oai -I $BUILD_OPTIONS\" > ./my-vm-build.sh" >> $VM_CMDS
-        echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
-        echo "echo \"sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh\"" >> $VM_CMDS
-        echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS
+        echo "VM_MEMORY           = $VM_MEMORY MBytes"
+        echo "VM_CPU              = $VM_CPU"
+        echo "############################################################"
+        echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
+        echo "############################################################"
+        uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
     fi
-fi
-ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
-if [ $DAEMON -eq 1 ]
-then
-    rm -f $VM_CMDS
-    echo "STATUS is OK"
-    exit 0
-fi
-
-echo "############################################################"
-echo "Creating a tmp folder to store results and artifacts"
-echo "############################################################"
-if [ ! -d $JENKINS_WKSP/archives ]
-then
-    mkdir $JENKINS_WKSP/archives
-fi
 
-if [ ! -d $ARCHIVES_LOC ]
-then
-    mkdir $ARCHIVES_LOC
-fi
+    echo "Waiting for VM to be started"
+    uvt-kvm wait $VM_NAME --insecure
 
-scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
-if [[ "$VM_NAME" == *"-cppcheck"* ]]
-then
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
-fi
+    VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
+    echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
 
-if [ $KEEP_VM_ALIVE -eq 0 ]
-then
     echo "############################################################"
-    echo "Destroying VM"
+    echo "Copying GIT repo into VM ($VM_NAME)" 
     echo "############################################################"
-    uvt-kvm destroy $VM_NAME
-    ssh-keygen -R $VM_IP_ADDR
-fi
-rm -f $VM_CMDS
-
-echo "############################################################"
-echo "Checking build status" 
-echo "############################################################"
+    scp -o StrictHostKeyChecking=no $JENKINS_WKSP/localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu
+    scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$VM_IP_ADDR:/home/ubuntu
 
-LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
-STATUS=0
-NB_FOUND_FILES=0
-
-for FULLFILE in $LOG_FILES 
-do
-    if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
+    echo "############################################################"
+    echo "Running install and build script on VM ($VM_NAME)"
+    echo "############################################################"
+    echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
+    echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
+    if [[ "$VM_NAME" == *"-cppcheck"* ]]
     then
-        filename=$(basename -- "$FULLFILE")
-        if [ "$LOG_PATTERN" == ".Rel14.txt" ]
+        if [ $DAEMON -eq 0 ]
         then
-            PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
+            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 --yes install zip cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
+        else
+            echo "echo \"sudo apt-get --yes --quiet install zip daemon cppcheck \"" >> $VM_CMDS
+            echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
+            echo "sudo apt-get --yes install zip daemon cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
         fi
-        if [ "$LOG_PATTERN" == "basic_simulator" ]
+    else
+        if [ $DAEMON -eq 0 ]
         then
-            PASS_PATTERN="lte-"
+            echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS
+            echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
+            echo "sudo apt-get --yes install zip subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
+        else
+            echo "echo \"sudo apt-get --yes --quiet install zip daemon subversion libboost-dev \"" >> $VM_CMDS
+            echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
+            echo "sudo apt-get --yes install zip daemon subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
         fi
-        if [ "$LOG_PATTERN" == "cppcheck.xml" ]
+    fi
+    echo "mkdir tmp" >> $VM_CMDS
+    echo "cd tmp" >> $VM_CMDS
+    echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS
+    echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS
+    if [[ "$VM_NAME" == *"-cppcheck"* ]]
+    then
+        echo "mkdir cmake_targets/log" >> $VM_CMDS
+        echo "chmod 777 cmake_targets/log" >> $VM_CMDS
+        echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
+        echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS
+        if [ $DAEMON -eq 0 ]
         then
-            PASS_PATTERN="results version"
-            LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE`
+            echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS
         else
-            LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
+            echo "echo \"cppcheck $BUILD_OPTIONS .\" > ./my-vm-build.sh" >> $VM_CMDS
+            echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
+            echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp -O /home/ubuntu/tmp/cmake_targets/log/cppcheck_build.txt -E /home/ubuntu/tmp/cmake_targets/log/cppcheck.xml ./my-vm-build.sh" >> $VM_CMDS
+        fi
+    else
+        echo "echo \"source oaienv\"" >> $VM_CMDS
+        echo "source oaienv" >> $VM_CMDS
+        echo "cd cmake_targets/" >> $VM_CMDS
+        echo "mkdir log" >> $VM_CMDS
+        echo "chmod 777 log" >> $VM_CMDS
+        echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS
+        if [ $DAEMON -eq 0 ]
+        then
+            echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS
+            echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS
+        else
+            echo "echo \"./build_oai -I $BUILD_OPTIONS\" > ./my-vm-build.sh" >> $VM_CMDS
+            echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
+            echo "echo \"sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh\"" >> $VM_CMDS
+            echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS
         fi
-        if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-        NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
     fi
-done
-
-if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
-
-if [ $STATUS -eq 0 ]
-then
-    echo "STATUS seems OK"
-else
-    echo "STATUS failed?"
-fi
-exit $STATUS
+    ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
+    rm -f $VM_CMDS
+}
diff --git a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf
index ec968e8cefde3241f81e74abb43af82ce5d0298a..b6028a81524f3a745485680a9660c5632d09278e 100644
--- a/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf
@@ -134,7 +134,7 @@ eNBs =
     };
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "10.0.0.2";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -144,13 +144,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "10.0.0.1/24";
-
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "10.0.0.1/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
 
diff --git a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf
index c2f69cb1b9680cc6a609174e0a818e0ca6533552..10cbd04e9a0fbe7b3bb0202de805734ea499dcb3 100644
--- a/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf
@@ -134,7 +134,7 @@ eNBs =
     };
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "10.0.0.2";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -144,13 +144,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "10.0.0.1/24";
-
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "10.0.0.1/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
 
diff --git a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf
index 6bdbd4e39b7ff0d5a9d9d7853b967aaa81529e9c..c79dbf1ac04921d47f955a79725053cc026c6030 100644
--- a/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf
@@ -134,7 +134,7 @@ eNBs =
     };
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "10.0.0.2";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -144,13 +144,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "10.0.0.1/24";
-
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "10.0.0.1/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
 
diff --git a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf
index 1a566e957900cc5334d7996a60934314213904cb..f3cb31f449b775f66b1884d30c3b28304bdbc857 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf
@@ -171,7 +171,7 @@ eNBs =
 
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.168.12.26";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -181,12 +181,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
   }
diff --git a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf
index fd49fe9d837b6a7a2d0a8b6dd2da863f47c16b12..e33daa7a8a4cf1c00907083359f9d9317a871af0 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf
@@ -171,7 +171,7 @@ eNBs =
 
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.168.12.26";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -181,12 +181,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
   }
diff --git a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf
index 1613dd4c320170e2518aaacb698aa578589f7af0..32e8bb99315e0ee7fefa56557f8809a0e4b05d2f 100644
--- a/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf
@@ -171,7 +171,7 @@ eNBs =
 
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.168.12.26";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -181,12 +181,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
   }
diff --git a/ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf b/ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf
new file mode 100644
index 0000000000000000000000000000000000000000..4e5510b0d429b94e3c1645c3fce137be2e600210
--- /dev/null
+++ b/ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf
@@ -0,0 +1,265 @@
+Active_eNBs = ( "eNB-Eurecom-LTEBox");
+# Asn1_verbosity, choice in: none, info, annoying
+Asn1_verbosity = "none";
+
+eNBs =
+(
+ {
+    ////////// Identification parameters:
+    eNB_ID    =  0xe00;
+
+    cell_type =  "CELL_MACRO_ENB";
+
+    eNB_name  =  "eNB-Eurecom-LTEBox";
+
+    // Tracking area code, 0x0000 and 0xfffe are reserved values
+    tracking_area_code = 1;
+    plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
+
+    tr_s_preference     = "local_mac"
+
+    ////////// Physical parameters:
+
+    component_carriers = (
+      {
+      node_function                 = "3GPP_eNODEB";
+      node_timing                   = "synch_to_ext_device";
+      node_synch_ref                = 0;
+      frame_type                    = "FDD";
+      tdd_config                    = 3;
+      tdd_config_s                  = 0;
+      prefix_type                   = "NORMAL";
+      eutra_band                    = 7;
+      downlink_frequency            = 2680000000L;
+      uplink_frequency_offset       = -120000000;
+      Nid_cell                      = 0;
+      N_RB_DL                       = 25;
+      Nid_cell_mbsfn                = 0;
+      nb_antenna_ports              = 2;
+      nb_antennas_tx                = 2;
+      nb_antennas_rx                = 2;
+      tx_gain                       = 90;
+      rx_gain                       = 125;
+      pbch_repetition               = "FALSE";
+      prach_root                    = 0;
+      prach_config_index            = 0;
+      prach_high_speed              = "DISABLE";
+      prach_zero_correlation        = 1;
+      prach_freq_offset             = 2;
+      pucch_delta_shift             = 1;
+      pucch_nRB_CQI                 = 0;
+      pucch_nCS_AN                  = 0;
+      pucch_n1_AN                   = 0;
+      pdsch_referenceSignalPower    = -25;
+      pdsch_p_b                     = 0;
+      pusch_n_SB                    = 1;
+      pusch_enable64QAM             = "DISABLE";
+      pusch_hoppingMode             = "interSubFrame";
+      pusch_hoppingOffset           = 0;
+      pusch_groupHoppingEnabled     = "ENABLE";
+      pusch_groupAssignment         = 0;
+      pusch_sequenceHoppingEnabled  = "DISABLE";
+      pusch_nDMRS1                  = 1;
+      phich_duration                = "NORMAL";
+      phich_resource                = "ONESIXTH";
+      srs_enable                    = "DISABLE";
+      /*
+      srs_BandwidthConfig           =;
+      srs_SubframeConfig            =;
+      srs_ackNackST                 =;
+      srs_MaxUpPts                  =;
+      */
+
+      pusch_p0_Nominal              = -96;
+      pusch_alpha                   = "AL1";
+      pucch_p0_Nominal              = -104;
+      msg3_delta_Preamble           = 6;
+      pucch_deltaF_Format1          = "deltaF2";
+      pucch_deltaF_Format1b         = "deltaF3";
+      pucch_deltaF_Format2          = "deltaF0";
+      pucch_deltaF_Format2a         = "deltaF0";
+      pucch_deltaF_Format2b         = "deltaF0";
+
+      rach_numberOfRA_Preambles               = 64;
+      rach_preamblesGroupAConfig              = "DISABLE";
+      /*
+      rach_sizeOfRA_PreamblesGroupA           = ;
+      rach_messageSizeGroupA                  = ;
+      rach_messagePowerOffsetGroupB           = ;
+      */
+      rach_powerRampingStep                   = 4;
+      rach_preambleInitialReceivedTargetPower = -108;
+      rach_preambleTransMax                   = 10;
+      rach_raResponseWindowSize               = 10;
+      rach_macContentionResolutionTimer       = 48;
+      rach_maxHARQ_Msg3Tx                     = 4;
+
+      pcch_default_PagingCycle      = 128;
+      pcch_nB                       = "oneT";
+      bcch_modificationPeriodCoeff  = 2;
+      ue_TimersAndConstants_t300    = 1000;
+      ue_TimersAndConstants_t301    = 1000;
+      ue_TimersAndConstants_t310    = 1000;
+      ue_TimersAndConstants_t311    = 10000;
+      ue_TimersAndConstants_n310    = 20;
+      ue_TimersAndConstants_n311    = 1;
+      ue_TransmissionMode           = 2;
+
+      //Parameters for SIB18
+      rxPool_sc_CP_Len                                                = "normal";
+      rxPool_sc_Period                                                = "sf40";
+      rxPool_data_CP_Len                                              = "normal";
+      rxPool_ResourceConfig_prb_Num                                   = 20;
+      rxPool_ResourceConfig_prb_Start                                 = 5;
+      rxPool_ResourceConfig_prb_End                                   = 44;
+      rxPool_ResourceConfig_offsetIndicator_present                   = "prSmall";
+      rxPool_ResourceConfig_offsetIndicator_choice                    = 0;
+      rxPool_ResourceConfig_subframeBitmap_present                    = "prBs40";
+      rxPool_ResourceConfig_subframeBitmap_choice_bs_buf              = "00000000000000000000";
+      rxPool_ResourceConfig_subframeBitmap_choice_bs_size             = 5;
+      rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused      = 0;
+/*
+      rxPool_dataHoppingConfig_hoppingParameter                       = 0;
+      rxPool_dataHoppingConfig_numSubbands                            = "ns1";
+      rxPool_dataHoppingConfig_rbOffset                               = 0;
+      rxPool_commTxResourceUC-ReqAllowed                              = "TRUE";
+*/
+      // Parameters for SIB19
+      discRxPool_cp_Len                                               = "normal"
+      discRxPool_discPeriod                                           = "rf32"
+      discRxPool_numRetx                                              = 1;
+      discRxPool_numRepetition                                        = 2;
+      discRxPool_ResourceConfig_prb_Num                               = 5;
+      discRxPool_ResourceConfig_prb_Start                             = 3;
+      discRxPool_ResourceConfig_prb_End                               = 21;
+      discRxPool_ResourceConfig_offsetIndicator_present               = "prSmall";
+      discRxPool_ResourceConfig_offsetIndicator_choice                = 0;
+      discRxPool_ResourceConfig_subframeBitmap_present                = "prBs40";
+      discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf          = "f0ffffffff";
+      discRxPool_ResourceConfig_subframeBitmap_choice_bs_size         = 5;
+      discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused  = 0;
+
+      }
+    );
+
+
+    srb1_parameters :
+    {
+        # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
+        timer_poll_retransmit    = 80;
+
+        # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
+        timer_reordering         = 35;
+
+        # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
+        timer_status_prohibit    = 0;
+
+        # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
+        poll_pdu                 =  4;
+
+        # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
+        poll_byte                =  99999;
+
+        # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
+        max_retx_threshold       =  4;
+    }
+
+    # ------- SCTP definitions
+    SCTP :
+    {
+        # Number of streams to use in input/output
+        SCTP_INSTREAMS  = 2;
+        SCTP_OUTSTREAMS = 2;
+    };
+
+
+    ////////// MME parameters:
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
+                              ipv6       = "192:168:30::17";
+                              active     = "yes";
+                              preference = "ipv4";
+                            }
+                          );
+
+    NETWORK_INTERFACES :
+    {
+        ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
+        ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
+        ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
+        ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
+    };
+  }
+);
+
+MACRLCs = (
+    {
+    num_cc = 1;
+    tr_s_preference = "local_L1";
+    tr_n_preference = "local_RRC";
+    phy_test_mode   = 0;
+    puSch10xSnr     = 200;
+    puCch10xSnr     = 200;
+    }  
+);
+
+L1s = (
+    {
+    num_cc = 1;
+    tr_n_preference = "local_mac";
+    }  
+);
+
+RUs = (
+    {          
+    local_rf                      = "yes"
+    nb_tx                         = 2
+    nb_rx                         = 2
+    att_tx                        = 0
+    att_rx                        = 0;
+    bands                         = [7];
+    max_pdschReferenceSignalPower = -27;
+    max_rxgain                    = 115;
+    eNB_instances                 = [0];
+    }
+);  
+
+THREAD_STRUCT = (
+  {
+    #three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
+    parallel_config    = "PARALLEL_RU_L1_TRX_SPLIT";
+    #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
+    worker_config      = "WORKER_ENABLE";
+  }
+);
+
+NETWORK_CONTROLLER :
+{
+    FLEXRAN_ENABLED        = "no";
+    FLEXRAN_INTERFACE_NAME = "lo";
+    FLEXRAN_IPV4_ADDRESS   = "127.0.0.1";
+    FLEXRAN_PORT           = 2210;
+    FLEXRAN_CACHE          = "/mnt/oai_agent_cache";
+    FLEXRAN_AWAIT_RECONF   = "no";
+};
+
+log_config :
+     {
+       global_log_level                      ="info";
+       global_log_verbosity                  ="medium";
+       hw_log_level                          ="info";
+       hw_log_verbosity                      ="medium";
+       phy_log_level                         ="info";
+       phy_log_verbosity                     ="medium";
+       mac_log_level                         ="info";
+       mac_log_verbosity                     ="high";
+       rlc_log_level                         ="info";
+       rlc_log_verbosity                     ="medium";
+       pdcp_log_level                        ="info";
+       pdcp_log_verbosity                    ="medium";
+       rrc_log_level                         ="info";
+       rrc_log_verbosity                     ="medium";
+    };
+
diff --git a/ci-scripts/conf_files/lte-fdd-basic-sim.conf b/ci-scripts/conf_files/lte-fdd-basic-sim.conf
index 0211e126a14708955af6173f279b3c0ac403ebb9..1d1395cf6d95fc87598d5e5d352cb8c14f810284 100644
--- a/ci-scripts/conf_files/lte-fdd-basic-sim.conf
+++ b/ci-scripts/conf_files/lte-fdd-basic-sim.conf
@@ -186,7 +186,6 @@ eNBs =
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
         ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
         ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
diff --git a/ci-scripts/conf_files/lte-tdd-basic-sim.conf b/ci-scripts/conf_files/lte-tdd-basic-sim.conf
index a7bc31eed804858d35dd99bed1d18a272b579d18..32a84fd206f3472b8580c0c8cce70f452f079e3f 100644
--- a/ci-scripts/conf_files/lte-tdd-basic-sim.conf
+++ b/ci-scripts/conf_files/lte-tdd-basic-sim.conf
@@ -145,11 +145,9 @@ eNBs =
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
         ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
-
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
         ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
         ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
diff --git a/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf
index 217991f69fce2a71ce74f48d39295ca11ddf2100..285b7eaf9f54a4f3f0f6b636936b5eaaa7efb48b 100644
--- a/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf
@@ -137,7 +137,7 @@ eNBs =
     };
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "10.0.0.2";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -147,13 +147,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "10.0.0.1/24";
-
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "10.0.0.1/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
 
diff --git a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
index 21f4f34ba90d691a6edcff936ed11945792c91d5..62e7fb48a445d0b508bf1cdcc7ff78caf0afad3d 100644
--- a/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf
@@ -137,7 +137,7 @@ eNBs =
     };
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "10.0.0.2";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -147,13 +147,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "10.0.0.1/24";
-
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "10.0.0.1/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
 
diff --git a/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf b/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf
index 2fdfa3c4e704906d3174067d2422d400341ff990..f99b701b8e1aa4770aed9ace72ad23b103a408a7 100644
--- a/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf
@@ -137,7 +137,7 @@ eNBs =
     };
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "10.0.0.2";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -147,13 +147,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "10.0.0.1/24";
-
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "10.0.0.1/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
 
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf
index 28ffc43b235bac0a2a9b085c070f2408d2ad3e9b..fc2f24b8a1e03080b54c7fd5b5eb2fa6c31e4858 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf
@@ -174,7 +174,7 @@ eNBs =
 
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.168.12.26";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -184,12 +184,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
   }
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
index 4d064ecc0e32a8457304671236615f2e026a26fe..010ef28061e795757a5016cc8cb29895c08f78a5 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf
@@ -174,7 +174,7 @@ eNBs =
 
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.168.12.26";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -184,12 +184,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
   }
diff --git a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf
index efb1e823ad66953d19685579e32c48f3c9ac8906..ddf01096cd7012e4af498fb7148616d7e49a8462 100644
--- a/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf
+++ b/ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf
@@ -174,7 +174,7 @@ eNBs =
 
 
     ////////// MME parameters:
-    mme_ip_address      = ( { ipv4       = "192.168.12.26";
+    mme_ip_address      = ( { ipv4       = "CI_MME_IP_ADDR";
                               ipv6       = "192:168:30::17";
                               active     = "yes";
                               preference = "ipv4";
@@ -184,12 +184,11 @@ eNBs =
     NETWORK_INTERFACES :
     {
         ENB_INTERFACE_NAME_FOR_S1_MME            = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "CI_ENB_IP_ADDR";
         ENB_INTERFACE_NAME_FOR_S1U               = "eth0";
-        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
-
-        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.111/24";
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "CI_ENB_IP_ADDR";
         ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
     };
   }
diff --git a/ci-scripts/createVM.sh b/ci-scripts/createVM.sh
index f972a921ac8bd85117f16d2c77377779ed7b8a1b..192008d86723d357f7a6dcb1d75674f3cf657377 100755
--- a/ci-scripts/createVM.sh
+++ b/ci-scripts/createVM.sh
@@ -20,8 +20,8 @@
 # *      contact@openairinterface.org
 # */
 
-function usage {
-    echo "OAI VM Creation script"
+function create_usage {
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
     echo "   Requirements:"
     echo "     -- uvtool uvtool-libvirt apt-cacher"
@@ -31,9 +31,9 @@ function usage {
     echo ""
     echo "Usage:"
     echo "------"
-    echo "    createVM.sh [OPTIONS]"
+    echo "    oai-ci-vm-tool create [OPTIONS]"
     echo ""
-    echo "Options:"
+    echo "Mandatory Options:"
     echo "--------"
     echo "    --job-name #### OR -jn ####"
     echo "    Specify the name of the Jenkins job."
@@ -41,12 +41,7 @@ function usage {
     echo "    --build-id #### OR -id ####"
     echo "    Specify the build ID of the Jenkins job."
     echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
+    variant_usage
     echo "    Specify the variant to build."
     echo ""
     echo "    --help OR -h"
@@ -54,144 +49,21 @@ function usage {
     echo ""
 }
 
-function variant_usage {
-    echo "OAI VM Build Check script"
-    echo "   Original Author: Raphael Defosseux"
-    echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
-    echo ""
-}
-
-if [ $# -lt 1 ] || [ $# -gt 6 ]
-then
-    echo "Syntax Error: not the correct number of arguments"
-    echo ""
-    usage
-    exit 1
-fi
-
-VM_TEMPLATE=ci-
-JOB_NAME=XX
-BUILD_ID=XX
-VM_NAME=ci-enb-usrp
-VM_MEMORY=2048
-VM_CPU=4
+function create_vm {
+    echo "############################################################"
+    echo "OAI CI VM script"
+    echo "############################################################"
+    echo "VM_NAME             = $VM_NAME"
+    echo "VM_MEMORY           = $VM_MEMORY MBytes"
+    echo "VM_CPU              = $VM_CPU"
 
-while [[ $# -gt 0 ]]
-do
-key="$1"
+    echo "############################################################"
+    echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
+    echo "############################################################"
+    uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
+    echo "Waiting for VM to be started"
+    uvt-kvm wait $VM_NAME --insecure
 
-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
-    ;;
-    -v1)
-    VM_NAME=ci-enb-usrp
-    shift
-    ;;
-    -v2)
-    VM_NAME=ci-basic-sim
-    VM_MEMORY=8192
-    shift
-    ;;
-    -v3)
-    VM_NAME=ci-phy-sim
-    shift
-    ;;
-    -v4)
-    VM_NAME=ci-cppcheck
-    VM_MEMORY=4096
-    VM_CPU=4
-    shift
-    ;;
-    -v7)
-    VM_NAME=ci-enb-ethernet
-    shift
-    ;;
-    -v8)
-    VM_NAME=ci-ue-ethernet
-    shift
-    ;;
-    --variant)
-    variant="$2"
-    case $variant in
-        enb-usrp)
-        VM_NAME=ci-enb-usrp
-        ;;
-        basic-sim)
-        VM_NAME=ci-basic-sim
-        VM_MEMORY=8192
-        ;;
-        phy-sim)
-        VM_NAME=ci-phy-sim
-        ;;
-        cppcheck)
-        VM_NAME=ci-cppcheck
-        VM_MEMORY=4096
-        VM_CPU=4
-        ;;
-        enb-ethernet)
-        VM_NAME=ci-enb-ethernet
-        ;;
-        ue-ethernet)
-        VM_NAME=ci-ue-ethernet
-        ;;
-        *)
-        echo ""
-        echo "Syntax Error: Invalid Variant option -> $variant"
-        echo ""
-        variant_usage
-        exit 1
-    esac
-    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
-
-VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
-VM_CMDS=${VM_NAME}_cmds.txt
-
-echo "VM_NAME             = $VM_NAME"
-echo "VM_MEMORY           = $VM_MEMORY MBytes"
-echo "VM_CPU              = $VM_CPU"
-
-echo "############################################################"
-echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
-echo "############################################################"
-uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
-echo "Waiting for VM to be started"
-uvt-kvm wait $VM_NAME --insecure
-
-VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
-echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
-exit 0
+    VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
+    echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
+}
diff --git a/ci-scripts/destroyAllRunningVM.sh b/ci-scripts/destroyAllRunningVM.sh
index 5e152bc59083b9c740f4a9674d3c6e78f03d8215..76a7fd0b508fd755a70be54e9c0a40f5b5a8ea84 100755
--- a/ci-scripts/destroyAllRunningVM.sh
+++ b/ci-scripts/destroyAllRunningVM.sh
@@ -20,15 +20,17 @@
 # *      contact@openairinterface.org
 # */
 
-function usage {
-    echo "OAI VM Destroy script"
+function destroy_usage {
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
+    echo "   Requirements:"
+    echo "     -- uvtool uvtool-libvirt apt-cacher"
     echo ""
     echo "Usage:"
     echo "------"
-    echo "    destroyAllRunningVM.sh [OPTIONS]"
+    echo "    oai-ci-vm-tool destroy [OPTIONS]"
     echo ""
-    echo "Options:"
+    echo "Mandatory Options:"
     echo "--------"
     echo "    --job-name #### OR -jn ####"
     echo "    Specify the name of the Jenkins job."
@@ -36,66 +38,26 @@ function usage {
     echo "    --build-id #### OR -id ####"
     echo "    Specify the build ID of the Jenkins job."
     echo ""
+    echo "Options:"
+    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
-
+function destroy_vm {
+    echo "############################################################"
+    echo "OAI CI VM script"
+    echo "############################################################"
+    echo "VM_TEMPLATE         = $VM_TEMPLATE"
+
+    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
+}
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index b54c6f3fab287b88296e62246b955186477c3302..f617d6f40a4e3502858f458ce787db7dfc581d3a 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -78,6 +78,7 @@ class SSHConnection():
 		self.eNBBranch = ''
 		self.eNB_AllowMerge = False
 		self.eNBCommitID = ''
+		self.eNBTargetBranch = ''
 		self.eNBUserName = ''
 		self.eNBPassword = ''
 		self.eNBSourceCodePath = ''
@@ -264,8 +265,12 @@ class SSHConnection():
 		# if the branch is not develop, then it is a merge request and we need to do 
 		# the potential merge. Note that merge conflicts should already been checked earlier
 		if (self.eNB_AllowMerge):
-			if (self.eNBBranch != 'develop') and (self.eNBBranch != 'origin/develop'):
-				self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+			if self.eNBTargetBranch == '':
+				if (self.eNBBranch != 'develop') and (self.eNBBranch != 'origin/develop'):
+					self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
+			else:
+				logging.debug('Merging with the target branch: ' + self.eNBTargetBranch)
+				self.command('git merge --ff origin/' + self.eNBTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
 		self.command('source oaienv', '\$', 5)
 		self.command('cd cmake_targets', '\$', 5)
 		self.command('mkdir -p log', '\$', 5)
@@ -367,10 +372,8 @@ class SSHConnection():
 			rruCheck = True
 		# Make a copy and adapt to EPC / eNB IP addresses
 		self.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
-		self.command('sed -i -e \'s/mme_ip_address.*$/mme_ip_address      = ( { ipv4       = "' + self.EPCIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
-		self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_S1_MME.*$/ENB_IPV4_ADDRESS_FOR_S1_MME              = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
-		self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_S1U.*$/ENB_IPV4_ADDRESS_FOR_S1U                 = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
-		self.command('sed -i -e \'s/ENB_IPV4_ADDRESS_FOR_X2C.*$/ENB_IPV4_ADDRESS_FOR_X2C                 = "' + self.eNBIPAddress + '";/\' ' + ci_full_config_file, '\$', 2);
+		self.command('sed -i -e \'s/CI_MME_IP_ADDR/' + self.EPCIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
+		self.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
 		# Launch eNB with the modified config file
 		self.command('source oaienv', '\$', 5)
 		self.command('cd cmake_targets', '\$', 5)
@@ -1759,7 +1762,10 @@ class SSHConnection():
 			if (SSH.eNB_AllowMerge):
 				self.htmlFile.write('     <tr>\n')
 				self.htmlFile.write('       <td bgcolor = "lightcyan" >Target Branch</td>\n')
-				self.htmlFile.write('       <td>develop</td>\n')
+				if (self.eNBTargetBranch == ''):
+					self.htmlFile.write('       <td>develop</td>\n')
+				else:
+					self.htmlFile.write('       <td>' + self.eNBTargetBranch + '</td>\n')
 				self.htmlFile.write('     </tr>\n')
 			self.htmlFile.write('  </table>\n')
 
@@ -1906,6 +1912,8 @@ def Usage():
 	print('  --eNBRepository=[eNB\'s Repository URL]')
 	print('  --eNBBranch=[eNB\'s Branch Name]')
 	print('  --eNBCommitID=[eNB\'s Commit Number]')
+	print('  --eNB_AllowMerge=[eNB\'s Allow Merge Request (with target branch)]')
+	print('  --eNBTargetBranch=[eNB\'s Target Branch in case of a Merge Request]')
 	print('  --eNBUserName=[eNB\'s Login User Name]')
 	print('  --eNBPassword=[eNB\'s Login Password]')
 	print('  --eNBSourceCodePath=[eNB\'s Source Code Path]')
@@ -2002,6 +2010,9 @@ while len(argvs) > 1:
 	elif re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
 		matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
 		SSH.eNBCommitID = matchReg.group(1)
+	elif re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
+		matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
+		SSH.eNBTargetBranch = matchReg.group(1)
 	elif re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
 		matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
 		SSH.eNBUserName = matchReg.group(1)
diff --git a/ci-scripts/oai-ci-vm-tool b/ci-scripts/oai-ci-vm-tool
new file mode 100755
index 0000000000000000000000000000000000000000..cfa18ece2e71e06c409bebc2871c09ff795aff0f
--- /dev/null
+++ b/ci-scripts/oai-ci-vm-tool
@@ -0,0 +1,537 @@
+#!/bin/bash
+#/*
+# * 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
+# */
+
+function top_usage {
+    echo "OAI CI VM script"
+    echo "   Original Author: Raphael Defosseux"
+    echo "   Requirements:"
+    echo "     -- uvtool uvtool-libvirt apt-cacher"
+    echo "     -- xenial image already synced"
+    echo ""
+    echo "Usage:"
+    echo "------"
+    echo "    oai-ci-vm-tool (-h|--help) {create,destroy,build,wait,test,report-build,report-test} ..."
+    echo ""
+}
+
+function variant_usage {
+    echo "    --variant enb-usrp     OR -v1"
+    echo "    --variant basic-sim    OR -v2"
+    echo "    --variant phy-sim      OR -v3"
+    echo "    --variant cppcheck     OR -v4"
+    echo "    --variant enb-ethernet OR -v7"
+    echo "    --variant ue-ethernet  OR -v8"
+}
+
+MY_DIR=$(dirname $(readlink -f $0))
+. $MY_DIR/createVM.sh
+. $MY_DIR/buildOnVM.sh
+. $MY_DIR/waitBuildOnVM.sh
+. $MY_DIR/destroyAllRunningVM.sh
+. $MY_DIR/runTestOnVM.sh
+. $MY_DIR/reportBuildLocally.sh
+. $MY_DIR/reportTestLocally.sh
+
+if [ $# -lt 1 ]
+then
+    echo "Syntax Error: too few arguments"
+    echo ""
+    top_usage
+    exit 1
+fi
+
+VM_TEMPLATE=ci-
+JOB_NAME=XX
+BUILD_ID=XX
+VM_NAME=ci-enb-usrp
+VM_MEMORY=2048
+VM_CPU=4
+ARCHIVES_LOC=enb_usrp
+LOG_PATTERN=.Rel14.txt
+NB_PATTERN_FILES=4
+BUILD_OPTIONS="--eNB -w USRP"
+KEEP_VM_ALIVE=0
+RUN_OPTIONS="none"
+DAEMON=0
+MR_TRIG=0
+PU_TRIG=0
+
+HELP_CMD=0
+CREATE_CMD=0
+BUILD_CMD=0
+WAIT_CMD=0
+DESTROY_CMD=0
+TEST_CMD=0
+REPORT_BUILD_CMD=0
+REPORT_TEST_CMD=0
+NBARGS=0
+
+while [[ $# -gt 0 ]]
+do
+key="$1"
+
+case $key in
+    -h|--help)
+    HELP_CMD=1
+    shift
+    ;;
+    create)
+    CREATE_CMD=1
+    # It is implied to keep the VM when creating it
+    KEEP_VM_ALIVE=1
+    shift
+    ;;
+    build)
+    BUILD_CMD=1
+    shift
+    ;;
+    wait)
+    WAIT_CMD=1
+    shift
+    ;;
+    test)
+    TEST_CMD=1
+    shift
+    ;;
+    destroy)
+    DESTROY_CMD=1
+    shift
+    ;;
+    report-build)
+    REPORT_BUILD_CMD=1
+    shift
+    ;;
+    report-test)
+    REPORT_TEST_CMD=1
+    shift
+    ;;
+    -jn|--job-name)
+    JOB_NAME="$2"
+    NBARGS=$[$NBARGS+1]
+    shift
+    shift
+    ;;
+    -id|--build-id)
+    BUILD_ID="$2"
+    NBARGS=$[$NBARGS+2]
+    shift
+    shift
+    ;;
+    -ws|--workspace)
+    JENKINS_WKSP="$2"
+    NBARGS=$[$NBARGS+4]
+    shift
+    shift
+    ;;
+    -k|--keep-vm-alive)
+    KEEP_VM_ALIVE=1
+    NBARGS=$[$NBARGS+8]
+    shift
+    ;;
+    -D|--daemon)
+    DAEMON=1
+    NBARGS=$[$NBARGS+16]
+    shift
+    ;;
+    -gu|--git-url)
+    GIT_URL="$2"
+    NBARGS=$[$NBARGS+32]
+    shift
+    shift
+    ;;
+    --trigger)
+    TRIG="$2"
+    case $TRIG in
+        merge-request)
+        MR_TRIG=1
+        ;;
+        push)
+        PU_TRIG=1
+        ;;
+        *)
+        echo ""
+        echo "Syntax Error: Invalid Trigger option -> $TRIG"
+        echo ""
+        trigger_usage
+        exit
+        ;;
+    esac
+    NBARGS=$[$NBARGS+64]
+    shift
+    shift
+    ;;
+    -mr)
+    MR_TRIG=1
+    NBARGS=$[$NBARGS+64]
+    shift
+    ;;
+    -pu)
+    PU_TRIG=1
+    NBARGS=$[$NBARGS+64]
+    shift
+    ;;
+    -sb|--src-branch)
+    SOURCE_BRANCH="$2"
+    NBARGS=$[$NBARGS+1024]
+    shift
+    shift
+    ;;
+    -sc|--src-commit)
+    SOURCE_COMMIT_ID="$2"
+    NBARGS=$[$NBARGS+2048]
+    shift
+    shift
+    ;;
+    -tb|--target-branch)
+    TARGET_BRANCH="$2"
+    NBARGS=$[$NBARGS+4096]
+    shift
+    shift
+    ;;
+    -tc|--target-commit)
+    TARGET_COMMIT_ID="$2"
+    NBARGS=$[$NBARGS+8192]
+    shift
+    shift
+    ;;
+    -br|--branch)
+    SOURCE_BRANCH="$2"
+    NBARGS=$[$NBARGS+16384]
+    shift
+    shift
+    ;;
+    -co|--commit)
+    SOURCE_COMMIT_ID="$2"
+    NBARGS=$[$NBARGS+32768]
+    shift
+    shift
+    ;;
+    -v1)
+    VM_NAME=ci-enb-usrp
+    ARCHIVES_LOC=enb_usrp
+    LOG_PATTERN=.Rel14.txt
+    NB_PATTERN_FILES=4
+    BUILD_OPTIONS="--eNB -w USRP --mu"
+    NBARGS=$[$NBARGS+256]
+    shift
+    ;;
+    -v2)
+    VM_NAME=ci-basic-sim
+    ARCHIVES_LOC=basic_sim
+    LOG_PATTERN=basic_simulator
+    NB_PATTERN_FILES=2
+    BUILD_OPTIONS="--basic-simulator"
+    VM_MEMORY=8192
+    VM_CPU=4
+    RUN_OPTIONS="complex"
+    NBARGS=$[$NBARGS+256]
+    shift
+    ;;
+    -v3)
+    VM_NAME=ci-phy-sim
+    ARCHIVES_LOC=phy_sim
+    LOG_PATTERN=.Rel14.txt
+    NB_PATTERN_FILES=3
+    BUILD_OPTIONS="--phy_simulators"
+    RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
+    NBARGS=$[$NBARGS+256]
+    shift
+    ;;
+    -v4)
+    VM_NAME=ci-cppcheck
+    VM_MEMORY=4096
+    ARCHIVES_LOC=cppcheck
+    LOG_PATTERN=cppcheck.xml
+    NB_PATTERN_FILES=1
+    BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
+    NBARGS=$[$NBARGS+256]
+    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"
+    NBARGS=$[$NBARGS+256]
+    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"
+    NBARGS=$[$NBARGS+256]
+    shift
+    ;;
+    --variant)
+    variant="$2"
+    case $variant in
+        enb-usrp)
+        VM_NAME=ci-enb-usrp
+        ARCHIVES_LOC=enb_usrp
+        LOG_PATTERN=.Rel14.txt
+        NB_PATTERN_FILES=4
+        BUILD_OPTIONS="--eNB -w USRP --mu"
+        NBARGS=$[$NBARGS+256]
+        ;;
+        basic-sim)
+        VM_NAME=ci-basic-sim
+        ARCHIVES_LOC=basic_sim
+        LOG_PATTERN=basic_simulator
+        NB_PATTERN_FILES=2
+        BUILD_OPTIONS="--basic-simulator"
+        VM_MEMORY=8192
+        VM_CPU=4
+        RUN_OPTIONS="complex"
+        NBARGS=$[$NBARGS+256]
+        ;;
+        phy-sim)
+        VM_NAME=ci-phy-sim
+        ARCHIVES_LOC=phy_sim
+        LOG_PATTERN=.Rel14.txt
+        NB_PATTERN_FILES=3
+        BUILD_OPTIONS="--phy_simulators"
+        RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
+        NBARGS=$[$NBARGS+256]
+        ;;
+        cppcheck)
+        VM_NAME=ci-cppcheck
+        VM_MEMORY=8192
+        ARCHIVES_LOC=cppcheck
+        LOG_PATTERN=cppcheck.xml
+        NB_PATTERN_FILES=1
+        BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
+        NBARGS=$[$NBARGS+256]
+        ;;
+        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"
+        NBARGS=$[$NBARGS+256]
+        ;;
+        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"
+        NBARGS=$[$NBARGS+256]
+        ;;
+        *)
+        echo ""
+        echo "Syntax Error: Invalid Variant option -> $variant"
+        echo ""
+        variant_usage
+        exit 1
+    esac
+    shift
+    shift
+    ;;
+    *)
+    echo "Syntax Error: unknown option: $key"
+    echo ""
+    top_usage
+    exit 1
+esac
+done
+
+MANY_CMDS=$[$CREATE_CMD+$BUILD_CMD+$WAIT_CMD+$DESTROY_CMD+$TEST_CMD+$REPORT_BUILD_CMD+$REPORT_TEST_CMD]
+if [ $MANY_CMDS -gt 1 ]
+then
+    echo "Syntax Error: too many commands"
+    top_usage
+    exit 1
+fi
+
+if [ $HELP_CMD -eq 1 ]
+then
+    if [ $MANY_CMDS -eq 0 ]
+    then
+        top_usage
+        exit 0
+    fi
+    if [ $CREATE_CMD -eq 1 ]
+    then
+        create_usage
+        exit 0
+    fi
+    if [ $BUILD_CMD -eq 1 ]
+    then
+        build_usage
+        exit 0
+    fi
+    if [ $WAIT_CMD -eq 1 ]
+    then
+        wait_usage
+        exit 0
+    fi
+    if [ $TEST_CMD -eq 1 ]
+    then
+        run_test_usage
+        exit 0
+    fi
+    if [ $DESTROY_CMD -eq 1 ]
+    then
+        destroy_usage
+        exit 0
+    fi
+    if [ $REPORT_BUILD_CMD -eq 1 ]
+    then
+        report_build_usage
+        exit 0
+    fi
+    if [ $REPORT_TEST_CMD -eq 1 ]
+    then
+        report_test_usage
+        exit 0
+    fi
+else
+    if [ $MANY_CMDS -eq 0 ]
+    then
+        echo "Syntax Error: no command"
+        top_usage
+        exit 1
+    fi
+    # For create, mandatory options: jn, id. Optional: variant
+    if [ $CREATE_CMD -eq 1 ] && [ $NBARGS -ne 3 ] && [ $NBARGS -ne 259 ]
+    then
+        echo "Syntax Error: unsupported option(s) for create command"
+        create_usage
+        exit 1
+    fi
+    # For build, mandatory options: jn, id, ws. Optional: variant, k, D
+    if [ $BUILD_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ] && [ $NBARGS -ne 23 ] && [ $NBARGS -ne 279 ] && [ $NBARGS -ne 31 ] && [ $NBARGS -ne 287 ]
+    then
+        echo "Syntax Error: unsupported option(s) for build command"
+        build_usage
+        exit 1
+    fi
+    # For wait, mandatory options: jn, id, ws. Optional: variant, k
+    if [ $WAIT_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ]
+    then
+        echo "Syntax Error: unsupported option(s) for wait command"
+        wait_usage
+        exit 1
+    fi
+    # For test, mandatory options: jn, id, ws. Optional: variant, k
+    if [ $TEST_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ]
+    then
+        echo "Syntax Error: unsupported option(s) for test command"
+        run_test_usage
+        exit 1
+    fi
+    # For destroy, mandatory options: jn, id.
+    if [ $DESTROY_CMD -eq 1 ] && [ $NBARGS -ne 3 ]
+    then
+        echo "Syntax Error: unsupported option(s) for destroy command"
+        destroy_usage
+        exit 1
+    fi
+    # For report-build, mandatory options: jn, id, ws, gu, pu, br,co.
+    #                                  or: jn, id, ws, gu, mr, sb, sc, tb, tc.
+    if [ $REPORT_BUILD_CMD -eq 1 ] && [ $NBARGS -ne 15463 ] && [ $NBARGS -ne 49255 ]
+    then
+        echo "Syntax Error: unsupported option(s) for report-build command"
+        report_build_usage
+        exit 1
+    fi
+    # For report-test, mandatory options: jn, id, ws, gu, pu, br,co.
+    #                                 or: jn, id, ws, gu, mr, sb, sc, tb, tc.
+    if [ $REPORT_TEST_CMD -eq 1 ] && [ $NBARGS -ne 15463 ] && [ $NBARGS -ne 49255 ]
+    then
+        echo "Syntax Error: unsupported option(s) for report-test command"
+        report_test_usage
+        exit 1
+    fi
+fi
+
+# Checking uvt-kvm is installed
+UVT_KVM_PATH=`which uvt-kvm | grep -c uvt-kvm`
+if [ $UVT_KVM_PATH -eq 0 ]
+then
+    echo "Error: uvt-kvm is not installed"
+    top_usage
+    exit 1
+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
+ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
+
+STATUS=0
+if [ $CREATE_CMD -eq 1 ]
+then
+    create_vm
+fi
+if [ $BUILD_CMD -eq 1 ]
+then
+    build_on_vm
+    if [ $DAEMON -eq 0 ] && [ $STATUS -eq 0 ]
+    then
+        check_on_vm_build
+    fi
+fi
+if [ $WAIT_CMD -eq 1 ]
+then
+    wait_on_vm_build
+    if [ $STATUS -eq 0 ]
+    then
+        check_on_vm_build
+    fi
+fi
+if [ $TEST_CMD -eq 1 ]
+then
+    ARCHIVES_LOC=${ARCHIVES_LOC}/test
+    run_test_on_vm
+fi
+if [ $DESTROY_CMD -eq 1 ]
+then
+    destroy_vm
+fi
+if [ $REPORT_BUILD_CMD -eq 1 ]
+then
+    report_build
+fi
+if [ $REPORT_TEST_CMD -eq 1 ]
+then
+    report_test
+fi
+
+# Did command pass or fail?
+if [ $STATUS -eq 0 ]
+then
+    echo "STATUS seems OK"
+else
+    echo "STATUS failed?"
+fi
+exit $STATUS
diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh
index a499fa3b66149e17d14947a6d523c14ff8a2a8a1..1b97841e6960b0a4e04f22ea6ebf3ea434da79fa 100755
--- a/ci-scripts/reportBuildLocally.sh
+++ b/ci-scripts/reportBuildLocally.sh
@@ -20,14 +20,13 @@
 # *      contact@openairinterface.org
 # */
 
-function usage {
-    echo "OAI Local Build Report script"
+function report_build_usage {
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
     echo ""
     echo "Usage:"
     echo "------"
-    echo ""
-    echo "    reportBuildLocally.sh [OPTIONS]"
+    echo "    oai-ci-vm-tool report-build [OPTIONS]"
     echo ""
     echo "Options:"
     echo "--------"
@@ -47,6 +46,9 @@ function usage {
     echo "    --build-id #### OR -id ####"
     echo "    Specify the build ID of the Jenkins job."
     echo ""
+    echo "    --workspace #### OR -ws ####"
+    echo "    Specify the workspace."
+    echo ""
     echo "    --trigger merge-request OR -mr"
     echo "    --trigger push          OR -pu"
     echo "    Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
@@ -79,7 +81,7 @@ function usage {
 }
 
 function trigger_usage {
-    echo "OAI Local Build Report script"
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
     echo ""
     echo "    --trigger merge-request OR -mr"
@@ -103,7 +105,7 @@ function details_table {
     COMPLETE_MESSAGE="start"
     for MESSAGE in $LIST_MESSAGES
     do
-        if [[ $MESSAGE == *"/home/ubuntu/tmp"* ]]
+        if [[ $MESSAGE == *"/home/ubuntu/tmp"* ]] || [[  $MESSAGE == *"/tmp/CI-eNB"* ]]
         then
             FILENAME=`echo $MESSAGE | sed -e "s#^/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" | awk -F ":" '{print $1}'`
             LINENB=`echo $MESSAGE | awk -F ":" '{print $2}'`
@@ -153,8 +155,8 @@ function summary_table_row {
     echo "        <td bgcolor = \"lightcyan\" >$1</th>" >> ./build_results.html
     if [ -f $2 ]
     then
-        STATUS=`egrep -c "$3" $2`
-        if [ $STATUS -eq 1 ]
+        BUILD_STATUS=`egrep -c "$3" $2`
+        if [ $BUILD_STATUS -eq 1 ]
         then
             echo "        <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
         else
@@ -263,342 +265,233 @@ function sca_summary_table_footer {
     echo "   <p style=\"margin-left: 30px\">Graphical Interface tool : <strong><code>cppcheck-gui -l cppcheck/cppcheck.xml</code></strong></p>" >> ./build_results.html
 }
 
-jb_checker=0
-mr_checker=0
-pu_checker=0
-MR_TRIG=0
-PU_TRIG=0
-while [[ $# -gt 0 ]]
-do
-key="$1"
-
-case $key in
-    -h|--help)
-    shift
-    usage
-    exit 0
-    ;;
-    -gu|--git-url)
-    GIT_URL="$2"
-    let "jb_checker|=0x1"
-    shift
-    shift
-    ;;
-    -jn|--job-name)
-    JOB_NAME="$2"
-    let "jb_checker|=0x2"
-    shift
-    shift
-    ;;
-    -id|--build-id)
-    BUILD_ID="$2"
-    let "jb_checker|=0x4"
-    shift
-    shift
-    ;;
-    --trigger)
-    TRIG="$2"
-    case $TRIG in
-        merge-request)
-        MR_TRIG=1
-        ;;
-        push)
-        PU_TRIG=1
-        ;;
-        *)
-        echo ""
-        echo "Syntax Error: Invalid Trigger option -> $TRIG"
-        echo ""
-        trigger_usage
-        exit
-        ;;
-    esac
-    let "jb_checker|=0x8"
-    shift
-    shift
-    ;;
-    -mr)
-    MR_TRIG=1
-    let "jb_checker|=0x8"
-    shift
-    ;;
-    -pu)
-    PU_TRIG=1
-    let "jb_checker|=0x8"
-    shift
-    ;;
-    -sb|--src-branch)
-    SOURCE_BRANCH="$2"
-    let "mr_checker|=0x1"
-    shift
-    shift
-    ;;
-    -sc|--src-commit)
-    SOURCE_COMMIT_ID="$2"
-    let "mr_checker|=0x2"
-    shift
-    shift
-    ;;
-    -tb|--target-branch)
-    TARGET_BRANCH="$2"
-    let "mr_checker|=0x4"
-    shift
-    shift
-    ;;
-    -tc|--target-commit)
-    TARGET_COMMIT_ID="$2"
-    let "mr_checker|=0x8"
-    shift
-    shift
-    ;;
-    -br|--branch)
-    SOURCE_BRANCH="$2"
-    let "pu_checker|=0x1"
-    shift
-    shift
-    ;;
-    -co|--commit)
-    SOURCE_COMMIT_ID="$2"
-    let "pu_checker|=0x2"
-    shift
-    shift
-    ;;
-    *)
-    echo "Syntax Error: unknown option: $key"
-    echo ""
-    usage
-    exit 1
-    ;;
-esac
-
-done
-
-if [ $jb_checker -ne 15 ]
-then
-    echo ""
-    echo "Syntax Error: missing job information."
-    # TODO : list missing info
-    echo ""
-    exit 1
-fi
-
-if [ $PU_TRIG -eq 1 ] && [ $MR_TRIG -eq 1 ]
-then
-    echo ""
-    echo "Syntax Error: trigger action incoherent."
-    echo ""
-    trigger_usage
-    exit 1
-fi
-
-if [ $PU_TRIG -eq 1 ]
-then
-    if [ $pu_checker -ne 3 ]
-    then
-        echo ""
-        echo "Syntax Error: missing push information."
-        # TODO : list missing info
-        echo ""
-        exit 1
-    fi
-fi
-
-if [ $MR_TRIG -eq 1 ]
-then
-    if [ $mr_checker -ne 15 ]
-    then
-        echo ""
-        echo "Syntax Error: missing merge-request information."
-        # TODO : list missing info
-        echo ""
-        exit 1
-    fi
-fi
-
-echo "<!DOCTYPE html>" > ./build_results.html
-echo "<html class=\"no-js\" lang=\"en-US\">" >> ./build_results.html
-echo "<head>" >> ./build_results.html
-echo "  <title>Build Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./build_results.html
-echo "  <base href = \"http://www.openairinterface.org/\" />" >> ./build_results.html
-echo "</head>" >> ./build_results.html
-echo "<body>" >> ./build_results.html
-echo "  <table style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
-echo "    <tr style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
-echo "      <td style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
-echo "        <a href=\"http://www.openairinterface.org/\">" >> ./build_results.html
-echo "           <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./build_results.html
-echo "           </img>" >> ./build_results.html
-echo "        </a>" >> ./build_results.html
-echo "      </td>" >> ./build_results.html
-echo "      <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./build_results.html
-echo "        <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./build_results.html
-echo "      </td>" >> ./build_results.html
-echo "    </tr>" >> ./build_results.html
-echo "  </table>" >> ./build_results.html
-echo "  <br>" >> ./build_results.html
-echo "   <table border = \"1\">" >> ./build_results.html
-echo "      <tr>" >> ./build_results.html
-echo "        <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./build_results.html
-echo "        <td>TEMPLATE_BUILD_TIME</td>" >> ./build_results.html
-echo "      </tr>" >> ./build_results.html
-echo "      <tr>" >> ./build_results.html
-echo "        <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./build_results.html
-echo "        <td>$GIT_URL</td>" >> ./build_results.html
-echo "      </tr>" >> ./build_results.html
-echo "      <tr>" >> ./build_results.html
-echo "        <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./build_results.html
-if [ $PU_TRIG -eq 1 ]; then echo "        <td>Push Event</td>" >> ./build_results.html; fi
-if [ $MR_TRIG -eq 1 ]; then echo "        <td>Merge-Request</td>" >> ./build_results.html; fi
-echo "      </tr>" >> ./build_results.html
-if [ $PU_TRIG -eq 1 ]
-then
-    echo "      <tr>" >> ./build_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Branch</td>" >> ./build_results.html
-    echo "        <td>$SOURCE_BRANCH</td>" >> ./build_results.html
-    echo "      </tr>" >> ./build_results.html
-    echo "      <tr>" >> ./build_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./build_results.html
-    echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
-    echo "      </tr>" >> ./build_results.html
-fi
-if [ $MR_TRIG -eq 1 ]
-then
-    echo "      <tr>" >> ./build_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./build_results.html
-    echo "        <td>$SOURCE_BRANCH</td>" >> ./build_results.html
-    echo "      </tr>" >> ./build_results.html
+function report_build {
+    echo "############################################################"
+    echo "OAI CI VM script"
+    echo "############################################################"
+
+    echo "JENKINS_WKSP        = $JENKINS_WKSP"
+
+    cd ${JENKINS_WKSP}
+    echo "<!DOCTYPE html>" > ./build_results.html
+    echo "<html class=\"no-js\" lang=\"en-US\">" >> ./build_results.html
+    echo "<head>" >> ./build_results.html
+    echo "  <title>Build Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./build_results.html
+    echo "  <base href = \"http://www.openairinterface.org/\" />" >> ./build_results.html
+    echo "</head>" >> ./build_results.html
+    echo "<body>" >> ./build_results.html
+    echo "  <table style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
+    echo "    <tr style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
+    echo "      <td style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
+    echo "        <a href=\"http://www.openairinterface.org/\">" >> ./build_results.html
+    echo "           <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./build_results.html
+    echo "           </img>" >> ./build_results.html
+    echo "        </a>" >> ./build_results.html
+    echo "      </td>" >> ./build_results.html
+    echo "      <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./build_results.html
+    echo "        <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./build_results.html
+    echo "      </td>" >> ./build_results.html
+    echo "    </tr>" >> ./build_results.html
+    echo "  </table>" >> ./build_results.html
+    echo "  <br>" >> ./build_results.html
+    echo "   <table border = \"1\">" >> ./build_results.html
     echo "      <tr>" >> ./build_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./build_results.html
-    echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
+    echo "        <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./build_results.html
+    echo "        <td>TEMPLATE_BUILD_TIME</td>" >> ./build_results.html
     echo "      </tr>" >> ./build_results.html
     echo "      <tr>" >> ./build_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./build_results.html
-    echo "        <td>$TARGET_BRANCH</td>" >> ./build_results.html
+    echo "        <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./build_results.html
+    echo "        <td>$GIT_URL</td>" >> ./build_results.html
     echo "      </tr>" >> ./build_results.html
     echo "      <tr>" >> ./build_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./build_results.html
-    echo "        <td>$TARGET_COMMIT_ID</td>" >> ./build_results.html
+    echo "        <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./build_results.html
+    if [ $PU_TRIG -eq 1 ]; then echo "        <td>Push Event</td>" >> ./build_results.html; fi
+    if [ $MR_TRIG -eq 1 ]; then echo "        <td>Merge-Request</td>" >> ./build_results.html; fi
     echo "      </tr>" >> ./build_results.html
-fi
-echo "   </table>" >> ./build_results.html
-echo "   <h2>Build Summary</h2>" >> ./build_results.html
-
-if [ -f ./oai_rules_result.txt ]
-then
-    echo "   <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
-    echo "   <table border = "1">" >> ./build_results.html
-    echo "      <tr>" >> ./build_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Result:</td>" >> ./build_results.html
-    NB_FILES=`cat ./oai_rules_result.txt`
-    if [ $NB_FILES = "0" ]
-    then 
-        if [ $PU_TRIG -eq 1 ]; then echo "        <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi
-        if [ $MR_TRIG -eq 1 ]; then echo "        <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi
+    if [ $PU_TRIG -eq 1 ]
+    then
+        echo "      <tr>" >> ./build_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Branch</td>" >> ./build_results.html
+        echo "        <td>$SOURCE_BRANCH</td>" >> ./build_results.html
         echo "      </tr>" >> ./build_results.html
-        echo "   </table>" >> ./build_results.html
-    else
-        if [ $PU_TRIG -eq 1 ]; then echo "        <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi
-        if [ $MR_TRIG -eq 1 ]; then echo "        <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi
+        echo "      <tr>" >> ./build_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./build_results.html
+        echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
         echo "      </tr>" >> ./build_results.html
-        if [ -f ./oai_rules_result_list.txt ]
-        then
-            awk '{print "      <tr><td></td><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
+    fi
+    if [ $MR_TRIG -eq 1 ]
+    then
+        echo "      <tr>" >> ./build_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./build_results.html
+        echo "        <td>$SOURCE_BRANCH</td>" >> ./build_results.html
+        echo "      </tr>" >> ./build_results.html
+        echo "      <tr>" >> ./build_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./build_results.html
+        echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
+        echo "      </tr>" >> ./build_results.html
+        echo "      <tr>" >> ./build_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./build_results.html
+        echo "        <td>$TARGET_BRANCH</td>" >> ./build_results.html
+        echo "      </tr>" >> ./build_results.html
+        echo "      <tr>" >> ./build_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./build_results.html
+        echo "        <td>$TARGET_COMMIT_ID</td>" >> ./build_results.html
+        echo "      </tr>" >> ./build_results.html
+    fi
+    echo "   </table>" >> ./build_results.html
+    echo "   <h2>Build Summary</h2>" >> ./build_results.html
+
+    if [ -f ./oai_rules_result.txt ]
+    then
+        echo "   <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
+        echo "   <table border = "1">" >> ./build_results.html
+        echo "      <tr>" >> ./build_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Result:</td>" >> ./build_results.html
+        NB_FILES=`cat ./oai_rules_result.txt`
+        if [ $NB_FILES = "0" ]
+        then 
+            if [ $PU_TRIG -eq 1 ]; then echo "        <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi
+            if [ $MR_TRIG -eq 1 ]; then echo "        <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi
+            echo "      </tr>" >> ./build_results.html
+            echo "   </table>" >> ./build_results.html
+        else
+            if [ $PU_TRIG -eq 1 ]; then echo "        <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi
+            if [ $MR_TRIG -eq 1 ]; then echo "        <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi
+            echo "      </tr>" >> ./build_results.html
+            if [ -f ./oai_rules_result_list.txt ]
+            then
+                awk '{print "      <tr><td></td><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
+            fi
+            echo "   </table>" >> ./build_results.html
+            echo "   <p>Please apply the following command to this(ese) file(s): </p>" >> ./build_results.html
+            echo "   <p style=\"margin-left: 30px\"><strong><code>astyle --options=ci-scripts/astyle-options.txt filename(s)</code></strong></p>" >> ./build_results.html
         fi
-        echo "   </table>" >> ./build_results.html
-        echo "   <p>Please apply the following command to this(ese) file(s): </p>" >> ./build_results.html
-        echo "   <p style=\"margin-left: 30px\"><strong><code>astyle --options=ci-scripts/astyle-options.txt filename(s)</code></strong></p>" >> ./build_results.html
     fi
-fi
-
-echo "   <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./build_results.html
-
-sca_summary_table_header "OAI Static Code Analysis with CPPCHECK"
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized variable" uninitvar
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized struct member" uninitStructMember
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory leak" memleak
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory is freed twice" doubleFree
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Resource leak" resourceLeak
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Possible null pointer dereference" nullPointer
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Array access  out of bounds" arrayIndexOutOfBounds
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Buffer is accessed out of bounds" bufferAccessOutOfBounds
-sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Expression depends on order of evaluation of side effects" unknownEvaluationOrder
-sca_summary_table_footer ./archives/cppcheck/cppcheck.xml
-
-summary_table_header "OAI Build eNB -- USRP option"
-summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
-summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
-summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
-summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html
-summary_table_footer
-
-summary_table_header "OAI Build basic simulator option"
-summary_table_row "Basic Simulator eNb - Release 14" ./archives/basic_sim/basic_simulator_enb.txt "Built target lte-softmodem" ./basic_sim_row1.html
-summary_table_row "Basic Simulator UE - Release 14" ./archives/basic_sim/basic_simulator_ue.txt "Built target lte-uesoftmodem" ./basic_sim_row2.html
-summary_table_row "Conf 2 UE data - Release 14" ./archives/basic_sim/conf2uedata.Rel14.txt "Built target conf2uedata" ./basic_sim_row3.html
-summary_table_footer
-
-summary_table_header "OAI Build Physical simulators option"
-summary_table_row "DL Simulator - Release 14" ./archives/phy_sim/dlsim.Rel14.txt "Built target dlsim" ./phy_sim_row1.html
-summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt "Built target ulsim" ./phy_sim_row2.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_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 "   <h2>Red Hat (CentOS Linux release 7.4.1708) -- Summary</h2>" >> ./build_results.html
-
-summary_table_header "Red Hat -- OAI Build eNB -- USRP option"
-summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
-summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
-summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
-summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html
-summary_table_footer
-
-echo "   <h3>Details</h3>" >> ./build_results.html
-
-for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
-do
-    cat $DETAILS_TABLE >> ./build_results.html
-done
-for DETAILS_TABLE in `ls ./basic_sim_row*.html`
-do
-    cat $DETAILS_TABLE >> ./build_results.html
-done
-for DETAILS_TABLE in `ls ./phy_sim_row*.html`
-do
-    cat $DETAILS_TABLE >> ./build_results.html
-done
-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
-for DETAILS_TABLE in `ls ./enb_usrp_rh_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 ./enb_usrp_rh_row*.html
-
-echo "</body>" >> ./build_results.html
-echo "</html>" >> ./build_results.html
-
-exit 0
+
+    echo "   <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./build_results.html
+
+    sca_summary_table_header "OAI Static Code Analysis with CPPCHECK"
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized variable" uninitvar
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized struct member" uninitStructMember
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory leak" memleak
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory is freed twice" doubleFree
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Resource leak" resourceLeak
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Possible null pointer dereference" nullPointer
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Array access  out of bounds" arrayIndexOutOfBounds
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Buffer is accessed out of bounds" bufferAccessOutOfBounds
+    sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Expression depends on order of evaluation of side effects" unknownEvaluationOrder
+    sca_summary_table_footer ./archives/cppcheck/cppcheck.xml
+
+    summary_table_header "OAI Build eNB -- USRP option"
+    summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
+    summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
+    summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
+    summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html
+    summary_table_footer
+
+    summary_table_header "OAI Build basic simulator option"
+    summary_table_row "Basic Simulator eNb - Release 14" ./archives/basic_sim/basic_simulator_enb.txt "Built target lte-softmodem" ./basic_sim_row1.html
+    summary_table_row "Basic Simulator UE - Release 14" ./archives/basic_sim/basic_simulator_ue.txt "Built target lte-uesoftmodem" ./basic_sim_row2.html
+    summary_table_row "Conf 2 UE data - Release 14" ./archives/basic_sim/conf2uedata.Rel14.txt "Built target conf2uedata" ./basic_sim_row3.html
+    summary_table_footer
+
+    summary_table_header "OAI Build Physical simulators option"
+    summary_table_row "DL Simulator - Release 14" ./archives/phy_sim/dlsim.Rel14.txt "Built target dlsim" ./phy_sim_row1.html
+    summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt "Built target ulsim" ./phy_sim_row2.html
+    summary_table_row "Coding - Release 14" ./archives/phy_sim/coding.Rel14.txt "Built target coding" ./phy_sim_row3.html
+    summary_table_footer
+
+
+    if [ -f archives/gnb_usrp/nr-softmodem.Rel14.txt ]
+    then
+        summary_table_header "OAI Build gNB -- USRP option"
+        summary_table_row "LTE SoftModem - Release 14" ./archives/gnb_usrp/nr-softmodem.Rel14.txt "Built target nr-softmodem" ./gnb_usrp_row1.html
+        summary_table_row "Coding - Release 14" ./archives/gnb_usrp/coding.Rel14.txt "Built target coding" ./gnb_usrp_row2.html
+        summary_table_row "OAI USRP device if - Release 14" ./archives/gnb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./gnb_usrp_row3.html
+        summary_table_row "Parameters Lib Config - Release 14" ./archives/gnb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./gnb_usrp_row4.html
+        summary_table_footer
+    fi
+
+    if [ -f archives/nrue_usrp/nr-uesoftmodem.Rel14.txt ]
+    then
+        summary_table_header "OAI Build 5G NR UE -- USRP option"
+        summary_table_row "UE SoftModem - Release 14" ./archives/nrue_usrp/nr-uesoftmodem.Rel14.txt "Built target nr-uesoftmodem" ./nrue_usrp_row1.html
+        summary_table_row "Coding - Release 14" ./archives/nrue_usrp/coding.Rel14.txt "Built target coding" ./nrue_usrp_row2.html
+        summary_table_row "OAI USRP device if - Release 14" ./archives/nrue_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./nrue_usrp_row3.html
+        summary_table_row "Parameters Lib Config - Release 14" ./archives/nrue_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./nrue_usrp_row4.html
+        summary_table_footer
+    fi
+
+    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
+
+    if [ -e ./archives/red_hat ]
+    then
+        echo "   <h2>Red Hat (CentOS Linux release 7.4.1708) -- Summary</h2>" >> ./build_results.html
+
+        summary_table_header "Red Hat -- OAI Build eNB -- USRP option"
+        summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
+        summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
+        summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
+        summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html
+        summary_table_footer
+    fi
+
+    echo "   <h3>Details</h3>" >> ./build_results.html
+
+    for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
+    do
+        cat $DETAILS_TABLE >> ./build_results.html
+    done
+    for DETAILS_TABLE in `ls ./basic_sim_row*.html`
+    do
+        cat $DETAILS_TABLE >> ./build_results.html
+    done
+    for DETAILS_TABLE in `ls ./phy_sim_row*.html`
+    do
+        cat $DETAILS_TABLE >> ./build_results.html
+    done
+
+    for DETAILS_TABLE in `ls ./gnb_usrp_row*.html`
+    do
+        cat $DETAILS_TABLE >> ./build_results.html
+    done
+    for DETAILS_TABLE in `ls ./nrue_usrp_row*.html`
+    do
+        cat $DETAILS_TABLE >> ./build_results.html
+    done
+    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
+    if [ -e ./archives/red_hat ]
+    then
+    for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html`
+    do
+        cat $DETAILS_TABLE >> ./build_results.html
+    done
+    fi
+    rm -f ./*_row*.html
+
+    echo "</body>" >> ./build_results.html
+    echo "</html>" >> ./build_results.html
+}
diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh
index e00956199c8f1ddd6b283e7e42b48f1a4fc1a306..7bbf52ca2b3e36b978dcfef91841db8a9ebf6198 100755
--- a/ci-scripts/reportTestLocally.sh
+++ b/ci-scripts/reportTestLocally.sh
@@ -20,14 +20,13 @@
 # *      contact@openairinterface.org
 # */
 
-function usage {
-    echo "OAI Test Report script"
+function report_test_usage {
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
     echo ""
     echo "Usage:"
     echo "------"
-    echo ""
-    echo "    reportTestLocally.sh [OPTIONS]"
+    echo "    oai-ci-vm-tool report-test [OPTIONS]"
     echo ""
     echo "Options:"
     echo "--------"
@@ -47,6 +46,9 @@ function usage {
     echo "    --build-id #### OR -id ####"
     echo "    Specify the build ID of the Jenkins job."
     echo ""
+    echo "    --workspace #### OR -ws ####"
+    echo "    Specify the workspace."
+    echo ""
     echo "    --trigger merge-request OR -mr"
     echo "    --trigger push          OR -pu"
     echo "    Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
@@ -78,513 +80,375 @@ function usage {
     echo ""
 }
 
-function trigger_usage {
-    echo "OAI Test Report script"
-    echo "   Original Author: Raphael Defosseux"
-    echo ""
-    echo "    --trigger merge-request OR -mr"
-    echo "    --trigger push          OR -pu"
-    echo "    Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
-    echo ""
-}
-
-jb_checker=0
-mr_checker=0
-pu_checker=0
-MR_TRIG=0
-PU_TRIG=0
-while [[ $# -gt 0 ]]
-do
-key="$1"
+function report_test {
+    echo "############################################################"
+    echo "OAI CI VM script"
+    echo "############################################################"
 
-case $key in
-    -h|--help)
-    shift
-    usage
-    exit 0
-    ;;
-    -gu|--git-url)
-    GIT_URL="$2"
-    let "jb_checker|=0x1"
-    shift
-    shift
-    ;;
-    -jn|--job-name)
-    JOB_NAME="$2"
-    let "jb_checker|=0x2"
-    shift
-    shift
-    ;;
-    -id|--build-id)
-    BUILD_ID="$2"
-    let "jb_checker|=0x4"
-    shift
-    shift
-    ;;
-    --trigger)
-    TRIG="$2"
-    case $TRIG in
-        merge-request)
-        MR_TRIG=1
-        ;;
-        push)
-        PU_TRIG=1
-        ;;
-        *)
-        echo ""
-        echo "Syntax Error: Invalid Trigger option -> $TRIG"
-        echo ""
-        trigger_usage
-        exit
-        ;;
-    esac
-    let "jb_checker|=0x8"
-    shift
-    shift
-    ;;
-    -mr)
-    MR_TRIG=1
-    let "jb_checker|=0x8"
-    shift
-    ;;
-    -pu)
-    PU_TRIG=1
-    let "jb_checker|=0x8"
-    shift
-    ;;
-    -sb|--src-branch)
-    SOURCE_BRANCH="$2"
-    let "mr_checker|=0x1"
-    shift
-    shift
-    ;;
-    -sc|--src-commit)
-    SOURCE_COMMIT_ID="$2"
-    let "mr_checker|=0x2"
-    shift
-    shift
-    ;;
-    -tb|--target-branch)
-    TARGET_BRANCH="$2"
-    let "mr_checker|=0x4"
-    shift
-    shift
-    ;;
-    -tc|--target-commit)
-    TARGET_COMMIT_ID="$2"
-    let "mr_checker|=0x8"
-    shift
-    shift
-    ;;
-    -br|--branch)
-    SOURCE_BRANCH="$2"
-    let "pu_checker|=0x1"
-    shift
-    shift
-    ;;
-    -co|--commit)
-    SOURCE_COMMIT_ID="$2"
-    let "pu_checker|=0x2"
-    shift
-    shift
-    ;;
-    *)
-    echo "Syntax Error: unknown option: $key"
-    echo ""
-    usage
-    exit 1
-    ;;
-esac
-
-done
-
-if [ $jb_checker -ne 15 ]
-then
-    echo ""
-    echo "Syntax Error: missing job information."
-    # TODO : list missing info
-    echo ""
-    exit 1
-fi
+    echo "JENKINS_WKSP        = $JENKINS_WKSP"
 
-if [ $PU_TRIG -eq 1 ] && [ $MR_TRIG -eq 1 ]
-then
-    echo ""
-    echo "Syntax Error: trigger action incoherent."
-    echo ""
-    trigger_usage
-    exit 1
-fi
-
-if [ $PU_TRIG -eq 1 ]
-then
-    if [ $pu_checker -ne 3 ]
-    then
-        echo ""
-        echo "Syntax Error: missing push information."
-        # TODO : list missing info
-        echo ""
-        exit 1
-    fi
-fi
+    cd ${JENKINS_WKSP}
 
-if [ $MR_TRIG -eq 1 ]
-then
-    if [ $mr_checker -ne 15 ]
-    then
-        echo ""
-        echo "Syntax Error: missing merge-request information."
-        # TODO : list missing info
-        echo ""
-        exit 1
-    fi
-fi
-
-echo "<!DOCTYPE html>" > ./test_simulator_results.html
-echo "<html class=\"no-js\" lang=\"en-US\">" >> ./test_simulator_results.html
-echo "<head>" >> ./test_simulator_results.html
-echo "  <title>Simulator Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./test_simulator_results.html
-echo "  <base href = \"http://www.openairinterface.org/\" />" >> ./test_simulator_results.html
-echo "</head>" >> ./test_simulator_results.html
-echo "<body>" >> ./test_simulator_results.html
-echo "  <table style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
-echo "    <tr style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
-echo "      <td style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
-echo "        <a href=\"http://www.openairinterface.org/\">" >> ./test_simulator_results.html
-echo "           <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./test_simulator_results.html
-echo "           </img>" >> ./test_simulator_results.html
-echo "        </a>" >> ./test_simulator_results.html
-echo "      </td>" >> ./test_simulator_results.html
-echo "      <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./test_simulator_results.html
-echo "        <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./test_simulator_results.html
-echo "      </td>" >> ./test_simulator_results.html
-echo "    </tr>" >> ./test_simulator_results.html
-echo "  </table>" >> ./test_simulator_results.html
-echo "  <br>" >> ./test_simulator_results.html
-echo "   <table border = \"1\">" >> ./test_simulator_results.html
-echo "      <tr>" >> ./test_simulator_results.html
-echo "        <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./test_simulator_results.html
-echo "        <td>TEMPLATE_BUILD_TIME</td>" >> ./test_simulator_results.html
-echo "      </tr>" >> ./test_simulator_results.html
-echo "      <tr>" >> ./test_simulator_results.html
-echo "        <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./test_simulator_results.html
-echo "        <td><a href=\"$GIT_URL\">$GIT_URL</a></td>" >> ./test_simulator_results.html
-echo "      </tr>" >> ./test_simulator_results.html
-echo "      <tr>" >> ./test_simulator_results.html
-echo "        <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./test_simulator_results.html
-if [ $PU_TRIG -eq 1 ]; then echo "        <td>Push Event</td>" >> ./test_simulator_results.html; fi
-if [ $MR_TRIG -eq 1 ]; then echo "        <td>Merge-Request</td>" >> ./test_simulator_results.html; fi
-echo "      </tr>" >> ./test_simulator_results.html
-if [ $PU_TRIG -eq 1 ]
-then
-    echo "      <tr>" >> ./test_simulator_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Branch</td>" >> ./test_simulator_results.html
-    echo "        <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
-    echo "      </tr>" >> ./test_simulator_results.html
-    echo "      <tr>" >> ./test_simulator_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./test_simulator_results.html
-    echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
-    echo "      </tr>" >> ./test_simulator_results.html
-fi
-if [ $MR_TRIG -eq 1 ]
-then
-    echo "      <tr>" >> ./test_simulator_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./test_simulator_results.html
-    echo "        <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
-    echo "      </tr>" >> ./test_simulator_results.html
+    echo "<!DOCTYPE html>" > ./test_simulator_results.html
+    echo "<html class=\"no-js\" lang=\"en-US\">" >> ./test_simulator_results.html
+    echo "<head>" >> ./test_simulator_results.html
+    echo "  <title>Simulator Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./test_simulator_results.html
+    echo "  <base href = \"http://www.openairinterface.org/\" />" >> ./test_simulator_results.html
+    echo "</head>" >> ./test_simulator_results.html
+    echo "<body>" >> ./test_simulator_results.html
+    echo "  <table style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
+    echo "    <tr style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
+    echo "      <td style=\"border-collapse: collapse; border: none;\">" >> ./test_simulator_results.html
+    echo "        <a href=\"http://www.openairinterface.org/\">" >> ./test_simulator_results.html
+    echo "           <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./test_simulator_results.html
+    echo "           </img>" >> ./test_simulator_results.html
+    echo "        </a>" >> ./test_simulator_results.html
+    echo "      </td>" >> ./test_simulator_results.html
+    echo "      <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./test_simulator_results.html
+    echo "        <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./test_simulator_results.html
+    echo "      </td>" >> ./test_simulator_results.html
+    echo "    </tr>" >> ./test_simulator_results.html
+    echo "  </table>" >> ./test_simulator_results.html
+    echo "  <br>" >> ./test_simulator_results.html
+    echo "   <table border = \"1\">" >> ./test_simulator_results.html
     echo "      <tr>" >> ./test_simulator_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./test_simulator_results.html
-    echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
+    echo "        <td bgcolor = \"lightcyan\" >Build Start Time (UTC)</td>" >> ./test_simulator_results.html
+    echo "        <td>TEMPLATE_BUILD_TIME</td>" >> ./test_simulator_results.html
     echo "      </tr>" >> ./test_simulator_results.html
     echo "      <tr>" >> ./test_simulator_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./test_simulator_results.html
-    echo "        <td>$TARGET_BRANCH</td>" >> ./test_simulator_results.html
+    echo "        <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./test_simulator_results.html
+    echo "        <td><a href=\"$GIT_URL\">$GIT_URL</a></td>" >> ./test_simulator_results.html
     echo "      </tr>" >> ./test_simulator_results.html
     echo "      <tr>" >> ./test_simulator_results.html
-    echo "        <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./test_simulator_results.html
-    echo "        <td>$TARGET_COMMIT_ID</td>" >> ./test_simulator_results.html
+    echo "        <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./test_simulator_results.html
+    if [ $PU_TRIG -eq 1 ]; then echo "        <td>Push Event</td>" >> ./test_simulator_results.html; fi
+    if [ $MR_TRIG -eq 1 ]; then echo "        <td>Merge-Request</td>" >> ./test_simulator_results.html; fi
     echo "      </tr>" >> ./test_simulator_results.html
-fi
-echo "   </table>" >> ./test_simulator_results.html
-echo "   <h2>Test Summary</h2>" >> ./test_simulator_results.html
+    if [ $PU_TRIG -eq 1 ]
+    then
+        echo "      <tr>" >> ./test_simulator_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Branch</td>" >> ./test_simulator_results.html
+        echo "        <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
+        echo "      </tr>" >> ./test_simulator_results.html
+        echo "      <tr>" >> ./test_simulator_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./test_simulator_results.html
+        echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
+        echo "      </tr>" >> ./test_simulator_results.html
+    fi
+    if [ $MR_TRIG -eq 1 ]
+    then
+        echo "      <tr>" >> ./test_simulator_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./test_simulator_results.html
+        echo "        <td>$SOURCE_BRANCH</td>" >> ./test_simulator_results.html
+        echo "      </tr>" >> ./test_simulator_results.html
+        echo "      <tr>" >> ./test_simulator_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./test_simulator_results.html
+        echo "        <td>$SOURCE_COMMIT_ID</td>" >> ./test_simulator_results.html
+        echo "      </tr>" >> ./test_simulator_results.html
+        echo "      <tr>" >> ./test_simulator_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./test_simulator_results.html
+        echo "        <td>$TARGET_BRANCH</td>" >> ./test_simulator_results.html
+        echo "      </tr>" >> ./test_simulator_results.html
+        echo "      <tr>" >> ./test_simulator_results.html
+        echo "        <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./test_simulator_results.html
+        echo "        <td>$TARGET_COMMIT_ID</td>" >> ./test_simulator_results.html
+        echo "      </tr>" >> ./test_simulator_results.html
+    fi
+    echo "   </table>" >> ./test_simulator_results.html
+    echo "   <h2>Test Summary</h2>" >> ./test_simulator_results.html
 
-ARCHIVES_LOC=archives/basic_sim/test
-if [ -d $ARCHIVES_LOC ]
-then
-    echo "   <h3>Basic Simulator Check</h3>" >> ./test_simulator_results.html
+    ARCHIVES_LOC=archives/basic_sim/test
+    if [ -d $ARCHIVES_LOC ]
+    then
+        echo "   <h3>Basic Simulator Check</h3>" >> ./test_simulator_results.html
 
-    echo "   <table border = \"1\">" >> ./test_simulator_results.html
-    echo "      <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
-    echo "        <th>Log File Name</th>" >> ./test_simulator_results.html
-    echo "        <th>Command</th>" >> ./test_simulator_results.html
-    echo "        <th>Status</th>" >> ./test_simulator_results.html
-    echo "        <th>Statistics</th>" >> ./test_simulator_results.html
-    echo "      </tr>" >> ./test_simulator_results.html
+        echo "   <table border = \"1\">" >> ./test_simulator_results.html
+        echo "      <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
+        echo "        <th>Log File Name</th>" >> ./test_simulator_results.html
+        echo "        <th>Command</th>" >> ./test_simulator_results.html
+        echo "        <th>Status</th>" >> ./test_simulator_results.html
+        echo "        <th>Statistics</th>" >> ./test_simulator_results.html
+        echo "      </tr>" >> ./test_simulator_results.html
 
-    TRANS_MODES=("fdd" "tdd")
-    BW_CASES=(05 10 20)
-    for TMODE in ${TRANS_MODES[@]}
-    do
-        for BW in ${BW_CASES[@]}
+        TRANS_MODES=("fdd" "tdd")
+        BW_CASES=(05 10 20)
+        for TMODE in ${TRANS_MODES[@]}
         do
-            ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}MHz_enb.log
-            UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"`
-            if [ -f $ENB_LOG ] && [ -f $UE_LOG ]
-            then
-                NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
-                NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
-                echo "      <tr>" >> ./test_simulator_results.html
-                echo "        <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
-                echo "        <td>N/A</td>" >> ./test_simulator_results.html
-                NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG`
-                NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG`
-                NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG`
-                if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
-                then
-                    echo "        <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
-                else
-                    echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
-                fi
-                echo "        <td><pre>" >> ./test_simulator_results.html
-                if [ $NB_ENB_GOT_SYNC -eq 1 ]
-                then
-                    echo "<font color = \"blue\">- eNB --> got sync</font>" >> ./test_simulator_results.html
-                else
-                    echo "<font color = \"red\"><b>- eNB NEVER got sync</b></font>" >> ./test_simulator_results.html
-                fi
-                if [ $NB_UE_GOT_SYNC -eq 2 ]
-                then
-                    echo "<font color = \"blue\">- UE --> got sync</font>" >> ./test_simulator_results.html
-                else
-                    echo "<font color = \"red\"><b>- UE NEVER got sync</b></font>" >> ./test_simulator_results.html
-                fi
-                if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
-                then
-                    echo "<font color = \"blue\">- UE attached to eNB</font>" >> ./test_simulator_results.html
-                else
-                    echo "<font color = \"red\"><b>- UE NEVER attached to eNB</b></font>" >> ./test_simulator_results.html
-                fi
-                NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
-                if [ $NB_SEGFAULT_ENB -ne 0 ]
-                then
-                    echo "<font color = \"red\"><b>- eNB --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
-                fi
-                NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
-                if [ $NB_SEGFAULT_UE -ne 0 ]
-                then
-                    echo "<font color = \"red\"><b>- UE --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
-                fi
-                NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
-                if [ $NB_ASSERTION_ENB -ne 0 ]
-                then
-                    echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
-                    awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
-                fi
-                NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
-                if [ $NB_ASSERTION_UE -ne 0 ]
-                then
-                    echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
-                    awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
-                fi
-                echo "        </pre></td>" >> ./test_simulator_results.html
-                echo "      </tr>" >> ./test_simulator_results.html
-            fi
-            PING_CASE=$ARCHIVES_LOC/${TMODE}_${BW}MHz_ping_ue.txt
-            if [ -f $PING_CASE ]
-            then
-                echo "      <tr>" >> ./test_simulator_results.html
-                NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"`
-                echo "        <td>$NAME</td>" >> ./test_simulator_results.html
-                CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"`
-                echo "        <td>$CMD</td>" >> ./test_simulator_results.html
-                FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE`
-                if [ $FILE_COMPLETE -eq 0 ]
+            for BW in ${BW_CASES[@]}
+            do
+                ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}MHz_enb.log
+                UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"`
+                if [ -f $ENB_LOG ] && [ -f $UE_LOG ]
                 then
-                    echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
+                    NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
+                    NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
+                    echo "      <tr>" >> ./test_simulator_results.html
+                    echo "        <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
                     echo "        <td>N/A</td>" >> ./test_simulator_results.html
-                else
-                    NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"`
-                    NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"`
-                    if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ]
+                    NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG`
+                    NB_UE_GOT_SYNC=`egrep -c "got sync" $UE_LOG`
+                    NB_ENB_SYNCED_WITH_UE=`egrep -c "got UE capabilities for UE" $ENB_LOG`
+                    if [ $NB_ENB_GOT_SYNC -eq 1 ] && [ $NB_UE_GOT_SYNC -eq 2 ] && [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
                     then
                         echo "        <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
                     else
                         echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
                     fi
-                    echo "        <td>" >> ./test_simulator_results.html
-                    echo "            <pre>" >> ./test_simulator_results.html
-                    STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
-                    echo "Packet Loss : $STATS" >> ./test_simulator_results.html
-                    RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
-                    echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
-                    RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
-                    echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
-                    RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
-                    echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
-                    echo "            </pre>" >> ./test_simulator_results.html
-                    echo "        </td>" >> ./test_simulator_results.html
-                fi
-                echo "      </tr>" >> ./test_simulator_results.html
-            fi
-    
-            if [ -f $ARCHIVES_LOC/${TMODE}_${BW}*iperf*dl*client*txt ]
-            then
-                IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}*iperf*client*txt`
-            else
-                echo "There are no iperf files"
-                IPERF_TESTS=""
-            fi
-            for IPERF_CASE in $IPERF_TESTS
-            do
-                echo "      <tr>" >> ./test_simulator_results.html
-                NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"`
-                echo "        <td>$NAME</td>" >> ./test_simulator_results.html
-                CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"`
-                echo "        <td>$CMD</td>" >> ./test_simulator_results.html
-                REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"`
-                if [[ $REQ_BITRATE =~ .*K.* ]]
-                then
-                    REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"`
-                    FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l`
-                fi
-                if [[ $REQ_BITRATE =~ .*M.* ]]
-                then
-                    REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"`
-                    FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l`
+                    echo "        <td><pre>" >> ./test_simulator_results.html
+                    if [ $NB_ENB_GOT_SYNC -eq 1 ]
+                    then
+                        echo "<font color = \"blue\">- eNB --> got sync</font>" >> ./test_simulator_results.html
+                    else
+                        echo "<font color = \"red\"><b>- eNB NEVER got sync</b></font>" >> ./test_simulator_results.html
+                    fi
+                    if [ $NB_UE_GOT_SYNC -eq 2 ]
+                    then
+                        echo "<font color = \"blue\">- UE --> got sync</font>" >> ./test_simulator_results.html
+                    else
+                        echo "<font color = \"red\"><b>- UE NEVER got sync</b></font>" >> ./test_simulator_results.html
+                    fi
+                    if [ $NB_ENB_SYNCED_WITH_UE -eq 1 ]
+                    then
+                        echo "<font color = \"blue\">- UE attached to eNB</font>" >> ./test_simulator_results.html
+                    else
+                        echo "<font color = \"red\"><b>- UE NEVER attached to eNB</b></font>" >> ./test_simulator_results.html
+                    fi
+                    NB_SEGFAULT_ENB=`egrep -i -c "Segmentation Fault" $ENB_LOG`
+                    if [ $NB_SEGFAULT_ENB -ne 0 ]
+                    then
+                        echo "<font color = \"red\"><b>- eNB --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
+                    fi
+                    NB_SEGFAULT_UE=`egrep -i -c "Segmentation Fault" $UE_LOG`
+                    if [ $NB_SEGFAULT_UE -ne 0 ]
+                    then
+                        echo "<font color = \"red\"><b>- UE --> Segmentation Fault</b></font>" >> ./test_simulator_results.html
+                    fi
+                    NB_ASSERTION_ENB=`egrep -i -c "Assertion" $ENB_LOG`
+                    if [ $NB_ASSERTION_ENB -ne 0 ]
+                    then
+                        echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
+                        awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $ENB_LOG >> ./test_simulator_results.html
+                    fi
+                    NB_ASSERTION_UE=`egrep -i -c "Assertion" $UE_LOG`
+                    if [ $NB_ASSERTION_UE -ne 0 ]
+                    then
+                        echo "<font color = \"red\"><b>- eNB --> Assertion</b></font>" >> ./test_simulator_results.html
+                        awk 'BEGIN{assertion=10}{if(assertion < 3){print "    " $0; assertion++};if ($0 ~/Assertion/){print "    " $0;assertion=1}}END{}' $UE_LOG >> ./test_simulator_results.html
+                    fi
+                    echo "        </pre></td>" >> ./test_simulator_results.html
+                    echo "      </tr>" >> ./test_simulator_results.html
                 fi
-                if [[ $REQ_BITRATE =~ .*G.* ]]
+                PING_CASE=$ARCHIVES_LOC/${TMODE}_${BW}MHz_ping_ue.txt
+                if [ -f $PING_CASE ]
                 then
-                    REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"`
-                    FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l`
+                    echo "      <tr>" >> ./test_simulator_results.html
+                    NAME=`echo $PING_CASE | sed -e "s#$ARCHIVES_LOC/##"`
+                    echo "        <td>$NAME</td>" >> ./test_simulator_results.html
+                    CMD=`egrep "COMMAND IS" $PING_CASE | sed -e "s#COMMAND IS: ##"`
+                    echo "        <td>$CMD</td>" >> ./test_simulator_results.html
+                    FILE_COMPLETE=`egrep -c "ping statistics" $PING_CASE`
+                    if [ $FILE_COMPLETE -eq 0 ]
+                    then
+                        echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
+                        echo "        <td>N/A</td>" >> ./test_simulator_results.html
+                    else
+                        NB_TR_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s# packets transmitted.*##"`
+                        NB_RC_PACKETS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*packets transmitted, ##" -e "s# received,.*##"`
+                        if [ $NB_TR_PACKETS -eq $NB_RC_PACKETS ]
+                        then
+                            echo "        <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
+                        else
+                            echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
+                        fi
+                        echo "        <td>" >> ./test_simulator_results.html
+                        echo "            <pre>" >> ./test_simulator_results.html
+                        STATS=`egrep "packets transmitted" $PING_CASE | sed -e "s#^.*received, ##" -e "s#, time.*##" -e "s# packet loss##"`
+                        echo "Packet Loss : $STATS" >> ./test_simulator_results.html
+                        RTTMIN=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[1] " " $5}'`
+                        echo "RTT Minimal : $RTTMIN" >> ./test_simulator_results.html
+                        RTTAVG=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[2] " " $5}'`
+                        echo "RTT Average : $RTTAVG" >> ./test_simulator_results.html
+                        RTTMAX=`egrep "rtt min" $PING_CASE | awk '{split($4,a,"/"); print a[3] " " $5}'`
+                        echo "RTT Maximal : $RTTMAX" >> ./test_simulator_results.html
+                        echo "            </pre>" >> ./test_simulator_results.html
+                        echo "        </td>" >> ./test_simulator_results.html
+                    fi
+                    echo "      </tr>" >> ./test_simulator_results.html
                 fi
-                FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE`
-                if [ $FILE_COMPLETE -eq 0 ]
+        
+                if [ -f $ARCHIVES_LOC/${TMODE}_${BW}*iperf*dl*client*txt ]
                 then
-                    echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
-                    SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"`
-                    FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'`
-                    EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'`
-                    PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
-                    JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'`
-                    PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'`
-                    PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"`
+                    IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}*iperf*client*txt`
                 else
-                    EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
-                    if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]]
+                    echo "There are no iperf files"
+                    IPERF_TESTS=""
+                fi
+                for IPERF_CASE in $IPERF_TESTS
+                do
+                    echo "      <tr>" >> ./test_simulator_results.html
+                    NAME=`echo $IPERF_CASE | sed -e "s#$ARCHIVES_LOC/##"`
+                    echo "        <td>$NAME</td>" >> ./test_simulator_results.html
+                    CMD=`egrep "COMMAND IS" $IPERF_CASE | sed -e "s#COMMAND IS: ##"`
+                    echo "        <td>$CMD</td>" >> ./test_simulator_results.html
+                    REQ_BITRATE=`echo $CMD | sed -e "s#^.*-b ##" -e "s#-i 1.*##"`
+                    if [[ $REQ_BITRATE =~ .*K.* ]]
                     then
-                        EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"`
-                        FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l`
+                        REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#K##"`
+                        FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000.0" | bc -l`
                     fi
-                    if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]]
+                    if [[ $REQ_BITRATE =~ .*M.* ]]
                     then
-                        EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"`
-                        FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l`
+                        REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#M##"`
+                        FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000.0" | bc -l`
                     fi
-                    if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]]
+                    if [[ $REQ_BITRATE =~ .*G.* ]]
                     then
-                        EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"`
-                        FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l`
+                        REQ_BITRATE=`echo $REQ_BITRATE | sed -e "s#G##"`
+                        FLOAT_REQ_BITRATE=`echo "$REQ_BITRATE * 1000000000.0" | bc -l`
                     fi
-                    PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
-                    PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'`
-                    if [[ $PERF_INT -lt 90 ]]
+                    FILE_COMPLETE=`egrep -c "Server Report" $IPERF_CASE`
+                    if [ $FILE_COMPLETE -eq 0 ]
                     then
                         echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
+                        SERVER_FILE=`echo $IPERF_CASE | sed -e "s#client#server#"`
+                        FLOAT_EFF_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; printf "%.0f", br}'`
+                        EFFECTIVE_BITRATE=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*Bytes *##" -e "s#sec *.*#sec#" | awk 'BEGIN{s=0;n=0}{n++;if ($2 ~/Mbits/){a = $1 * 1000000};if ($2 ~/Kbits/){a = $1 * 1000};s=s+a}END{br=s/n; if(br>1000000){printf "%.2f MBits/sec", br/1000000}}'`
+                        PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
+                        JITTER=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*/sec *##" -e "s# *ms.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{jitter=s/n; printf "%.3f ms", jitter}'`
+                        PACKETLOSS_NOSIGN=`grep --color=never sec $SERVER_FILE | sed -e "s#^.*(##" -e "s#%.*##" | awk 'BEGIN{s=0;n=0}{n++;s+=$1}END{per=s/n; printf "%.1f", per}'`
+                        PACKETLOSS=`echo "${PACKETLOSS_NOSIGN}%"`
                     else
-                        echo "        <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
+                        EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
+                        if [[ $EFFECTIVE_BITRATE =~ .*Kbits/sec.* ]]
+                        then
+                            EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Kbits/sec.*##"`
+                            FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000" | bc -l`
+                        fi
+                        if [[ $EFFECTIVE_BITRATE =~ .*Mbits/sec.* ]]
+                        then
+                            EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Mbits/sec.*##"`
+                            FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000" | bc -l`
+                        fi
+                        if [[ $EFFECTIVE_BITRATE =~ .*Gbits/sec.* ]]
+                        then
+                            EFFECTIVE_BITRATE=`echo $EFFECTIVE_BITRATE | sed -e "s# *Gbits/sec.*##"`
+                            FLOAT_EFF_BITRATE=`echo "$EFFECTIVE_BITRATE * 1000000000" | bc -l`
+                        fi
+                        PERF=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.2f", $0}'`
+                        PERF_INT=`echo "100 * $FLOAT_EFF_BITRATE / $FLOAT_REQ_BITRATE" | bc -l | awk '{printf "%.0f", $0}'`
+                        if [[ $PERF_INT -lt 90 ]]
+                        then
+                            echo "        <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
+                        else
+                            echo "        <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
+                        fi
+                        EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
+                        JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"`
+                        PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"`
                     fi
-                    EFFECTIVE_BITRATE=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*MBytes *##" -e "s#sec.*#sec#"`
-                    JITTER=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*Mbits/sec *##" -e "s#ms.*#ms#"`
-                    PACKETLOSS=`tail -n3 $IPERF_CASE | egrep "Mbits/sec" | sed -e "s#^.*(##" -e "s#).*##"`
-                fi
-                echo "        <td>" >> ./test_simulator_results.html
-                echo "            <pre>" >> ./test_simulator_results.html
-                echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
-                echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
-                echo "Jitter       : $JITTER" >> ./test_simulator_results.html
-                echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
-                echo "            </pre>" >> ./test_simulator_results.html
-                echo "        </td>" >> ./test_simulator_results.html
-                echo "      </tr>" >> ./test_simulator_results.html
+                    echo "        <td>" >> ./test_simulator_results.html
+                    echo "            <pre>" >> ./test_simulator_results.html
+                    echo "Bitrate      : $EFFECTIVE_BITRATE" >> ./test_simulator_results.html
+                    echo "Bitrate Perf : $PERF %" >> ./test_simulator_results.html
+                    echo "Jitter       : $JITTER" >> ./test_simulator_results.html
+                    echo "Packet Loss  : $PACKETLOSS" >> ./test_simulator_results.html
+                    echo "            </pre>" >> ./test_simulator_results.html
+                    echo "        </td>" >> ./test_simulator_results.html
+                    echo "      </tr>" >> ./test_simulator_results.html
+                done
             done
         done
-    done
 
-    echo "   </table>" >> ./test_simulator_results.html
-fi
-
-ARCHIVES_LOC=archives/phy_sim/test
-if [ -d $ARCHIVES_LOC ]
-then
-    echo "   <h3>Physical Simulators Check</h3>" >> ./test_simulator_results.html
-
-    echo "   <table border = \"1\">" >> ./test_simulator_results.html
-    echo "      <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
-    echo "        <th>Log File Name</th>" >> ./test_simulator_results.html
-    echo "        <th>Nb Tests</th>" >> ./test_simulator_results.html
-    echo "        <th>Nb Errors</th>" >> ./test_simulator_results.html
-    echo "        <th>Nb Failures</th>" >> ./test_simulator_results.html
-    echo "        <th>Nb Failures</th>" >> ./test_simulator_results.html
-    echo "      </tr>" >> ./test_simulator_results.html
-
-    XML_TESTS=`ls $ARCHIVES_LOC/*xml`
-    for XML_FILE in $XML_TESTS
-    do
-        echo "      <tr>" >> ./test_simulator_results.html
-        NAME=`echo $XML_FILE | sed -e "s#$ARCHIVES_LOC/##"`
-        NB_TESTS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*tests='##" -e "s#' *time=.*##"`
-        NB_ERRORS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*errors='##" -e "s#' *failures=.*##"`
-        NB_FAILURES=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*failures='##" -e "s#' *hostname=.*##"`
-        NB_SKIPPED=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*skipped='##" -e "s#' *tests=.*##"`
-        if [ $NB_ERRORS -eq 0 ] && [ $NB_FAILURES -eq 0 ]
-        then
-            echo "        <td bgcolor = \"green\" >$NAME</td>" >> ./test_simulator_results.html
-        else
-            echo "        <td bgcolor = \"red\" >$NAME</td>" >> ./test_simulator_results.html
-        fi
-        echo "        <td>$NB_TESTS</td>" >> ./test_simulator_results.html
-        echo "        <td>$NB_ERRORS</td>" >> ./test_simulator_results.html
-        echo "        <td>$NB_FAILURES</td>" >> ./test_simulator_results.html
-        echo "        <td>$NB_SKIPPED</td>" >> ./test_simulator_results.html
-        echo "      </tr>" >> ./test_simulator_results.html
-    done
+        echo "   </table>" >> ./test_simulator_results.html
+    fi
 
-    echo "   </table>" >> ./test_simulator_results.html
+    ARCHIVES_LOC=archives/phy_sim/test
+    if [ -d $ARCHIVES_LOC ]
+    then
+        echo "   <h3>Physical Simulators Check</h3>" >> ./test_simulator_results.html
 
-    echo "   <h4>Details</h4>" >> ./test_simulator_results.html
-    for XML_FILE in $XML_TESTS
-    do
         echo "   <table border = \"1\">" >> ./test_simulator_results.html
         echo "      <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
-        echo "        <th>Test Name</th>" >> ./test_simulator_results.html
-        echo "        <th>Description</th>" >> ./test_simulator_results.html
-        echo "        <th>Result</th>" >> ./test_simulator_results.html
-        echo "        <th>Time</th>" >> ./test_simulator_results.html
+        echo "        <th>Log File Name</th>" >> ./test_simulator_results.html
+        echo "        <th>Nb Tests</th>" >> ./test_simulator_results.html
+        echo "        <th>Nb Errors</th>" >> ./test_simulator_results.html
+        echo "        <th>Nb Failures</th>" >> ./test_simulator_results.html
+        echo "        <th>Nb Failures</th>" >> ./test_simulator_results.html
         echo "      </tr>" >> ./test_simulator_results.html
-        TESTCASES_LIST=`sed -e "s# #@#g" $XML_FILE | grep testcase`
-        for TESTCASE in $TESTCASES_LIST
+
+        XML_TESTS=`ls $ARCHIVES_LOC/*xml`
+        for XML_FILE in $XML_TESTS
         do
             echo "      <tr>" >> ./test_simulator_results.html
-            NAME=`echo $TESTCASE | sed -e "s#^.*name='##" -e "s#'@description=.*##" | sed -e "s#@# #g"`
-            echo "          <td>$NAME</td>" >> ./test_simulator_results.html
-            DESC=`echo $TESTCASE | sed -e "s#^.*description='##" -e "s#'@Run_result=.*##" | sed -e "s#@# #g"`
-            echo "          <td>$DESC</td>" >> ./test_simulator_results.html
-            RESULT=`echo $TESTCASE | sed -e "s#^.*RESULT='##" -e "s#'.*##" | sed -e "s#@# #g"`
-            if [[ $RESULT =~ .*PASS.* ]]
+            NAME=`echo $XML_FILE | sed -e "s#$ARCHIVES_LOC/##"`
+            NB_TESTS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*tests='##" -e "s#' *time=.*##"`
+            NB_ERRORS=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*errors='##" -e "s#' *failures=.*##"`
+            NB_FAILURES=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*failures='##" -e "s#' *hostname=.*##"`
+            NB_SKIPPED=`egrep "testsuite errors" $XML_FILE | sed -e "s#^.*skipped='##" -e "s#' *tests=.*##"`
+            if [ $NB_ERRORS -eq 0 ] && [ $NB_FAILURES -eq 0 ]
             then
-                echo "          <td bgcolor = \"green\" >$RESULT</td>" >> ./test_simulator_results.html
+                echo "        <td bgcolor = \"green\" >$NAME</td>" >> ./test_simulator_results.html
             else
-                echo "          <td bgcolor = \"red\" >$RESULT</td>" >> ./test_simulator_results.html
+                echo "        <td bgcolor = \"red\" >$NAME</td>" >> ./test_simulator_results.html
             fi
-            TIME=`echo $TESTCASE | sed -e "s#^.*time='##" -e "s#'@RESULT=.*##" | sed -e "s#@# #g"`
-            echo "          <td>$TIME</td>" >> ./test_simulator_results.html
+            echo "        <td>$NB_TESTS</td>" >> ./test_simulator_results.html
+            echo "        <td>$NB_ERRORS</td>" >> ./test_simulator_results.html
+            echo "        <td>$NB_FAILURES</td>" >> ./test_simulator_results.html
+            echo "        <td>$NB_SKIPPED</td>" >> ./test_simulator_results.html
             echo "      </tr>" >> ./test_simulator_results.html
         done
+
         echo "   </table>" >> ./test_simulator_results.html
-    done
-fi
 
-echo "</body>" >> ./test_simulator_results.html
-echo "</html>" >> ./test_simulator_results.html
+        echo "   <h4>Details</h4>" >> ./test_simulator_results.html
+        for XML_FILE in $XML_TESTS
+        do
+            echo "   <table border = \"1\">" >> ./test_simulator_results.html
+            echo "      <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
+            echo "        <th>Test Name</th>" >> ./test_simulator_results.html
+            echo "        <th>Description</th>" >> ./test_simulator_results.html
+            echo "        <th>Result</th>" >> ./test_simulator_results.html
+            echo "        <th>Time</th>" >> ./test_simulator_results.html
+            echo "      </tr>" >> ./test_simulator_results.html
+            PREV_SECTION=0
+            PREV_TIME_IN_SECS=0
+            TESTCASES_LIST=`sed -e "s# #@#g" $XML_FILE | grep testcase`
+            for TESTCASE in $TESTCASES_LIST
+            do
+                NAME=`echo $TESTCASE | sed -e "s#^.*name='##" -e "s#'@description=.*##" | sed -e "s#@# #g"`
+                SECTION=`echo $NAME | sed -e "s#\..*##"`
+                if [ $SECTION != $PREV_SECTION ]
+                then
+                    echo "      <tr bgcolor = \"#8FBC8F\" >" >> ./test_simulator_results.html
+                    echo "          <td align = \"center\" colspan = 4 >\"$SECTION\" series</td>" >> ./test_simulator_results.html
+                    echo "      </tr>" >> ./test_simulator_results.html
+                    PREV_SECTION=$SECTION
+                    PREV_TIME_IN_SECS=0
+                fi
+                DESC=`echo $TESTCASE | sed -e "s#^.*description='##" -e "s#'@Run_result=.*##" | sed -e "s#@# #g"`
+                RESULT=`echo $TESTCASE | sed -e "s#^.*RESULT='##" -e "s#'.*##" | sed -e "s#@# #g"`
+                TIME_IN_SECS=`echo $TESTCASE | sed -e "s#^.*time='##" -e "s#'@RESULT=.*##" | sed -e "s#@# #g" -e "s# s.*##"`
+                TIME=`echo "$TIME_IN_SECS - $PREV_TIME_IN_SECS" | bc -l | awk '{printf "%.2f s", $0}'`
+                PREV_TIME_IN_SECS=$TIME_IN_SECS
+                echo "      <tr>" >> ./test_simulator_results.html
+                echo "          <td>$NAME</td>" >> ./test_simulator_results.html
+                echo "          <td>$DESC</td>" >> ./test_simulator_results.html
+                if [[ $RESULT =~ .*PASS.* ]]
+                then
+                    echo "          <td bgcolor = \"green\" >$RESULT</td>" >> ./test_simulator_results.html
+                else
+                    SPLITTED_LINE=`echo -e $TESTCASE | sed -e "s#@#\n#g"`
+                    NB_RUNS=`echo -e "${SPLITTED_LINE}" | grep -v Run_result | egrep -c "Run_"`
+                    NB_FAILS=`echo -e "${SPLITTED_LINE}" | grep -v Run_result | egrep -c "=FAIL"`
+                    echo "          <td bgcolor = \"red\" >${RESULT} (${NB_FAILS}/${NB_RUNS})</td>" >> ./test_simulator_results.html
+                fi
+                echo "          <td>$TIME</td>" >> ./test_simulator_results.html
+                echo "      </tr>" >> ./test_simulator_results.html
+            done
+            echo "   </table>" >> ./test_simulator_results.html
+        done
+    fi
 
-exit 0
+    echo "</body>" >> ./test_simulator_results.html
+    echo "</html>" >> ./test_simulator_results.html
+}
diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh
index 94af2d75ef43da4941406d00c950eb38482db906..527fe48edb25655587bacbef98f669fb4c8938ab 100755
--- a/ci-scripts/runTestOnVM.sh
+++ b/ci-scripts/runTestOnVM.sh
@@ -20,15 +20,18 @@
 # *      contact@openairinterface.org
 # */
 
-function usage {
-    echo "OAI VM Test Run script"
+function run_test_usage {
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
+    echo "   Requirements:"
+    echo "     -- uvtool uvtool-libvirt apt-cacher"
+    echo "     -- xenial image already synced"
     echo "   Default:"
     echo "     -- eNB with USRP"
     echo ""
     echo "Usage:"
     echo "------"
-    echo "    runTestOnVM.sh [OPTIONS]"
+    echo "    oai-ci-vm-tool test [OPTIONS]"
     echo ""
     echo "Options:"
     echo "--------"
@@ -41,12 +44,7 @@ function usage {
     echo "    --workspace #### OR -ws ####"
     echo "    Specify the workspace."
     echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
+    variant_usage
     echo "    Specify the variant to build."
     echo ""
     echo "    --keep-vm-alive OR -k"
@@ -57,19 +55,6 @@ function usage {
     echo ""
 }
 
-function variant_usage {
-    echo "OAI VM Test Run script"
-    echo "   Original Author: Raphael Defosseux"
-    echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
-    echo ""
-}
-
 function start_basic_sim_enb {
     local LOC_VM_IP_ADDR=$2
     local LOC_EPC_IP_ADDR=$3
@@ -95,6 +80,7 @@ function start_basic_sim_enb {
     echo "echo \"ulimit -c unlimited && ./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE\" > ./my-lte-softmodem-run.sh " >> $1
     echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1
     echo "cat ./my-lte-softmodem-run.sh" >> $1
+    echo "if [ -e /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ]; then sudo sudo rm -f /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE; fi" >> $1
     echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ./my-lte-softmodem-run.sh" >> $1
 
     ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1
@@ -112,6 +98,7 @@ function start_basic_sim_ue {
     echo "echo \"./lte-uesoftmodem -C ${LOC_FREQUENCY}000000 -r $LOC_NB_RBS --ue-rxgain 140\" > ./my-lte-uesoftmodem-run.sh" >> $1
     echo "chmod 775 ./my-lte-uesoftmodem-run.sh" >> $1
     echo "cat ./my-lte-uesoftmodem-run.sh" >> $1
+    echo "if [ -e /home/ubuntu/tmp/cmake_targets/log/$LOC_UE_LOG_FILE ]; then sudo sudo rm -f /home/ubuntu/tmp/cmake_targets/log/$LOC_UE_LOG_FILE; fi" >> $1
     echo "sudo -E daemon --inherit --unsafe --name=ue_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/ue -o /home/ubuntu/tmp/cmake_targets/log/$LOC_UE_LOG_FILE ./my-lte-uesoftmodem-run.sh" >> $1
 
     ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
@@ -299,736 +286,619 @@ function terminate_ltebox_epc {
     rm $1
 }
 
-if [ $# -lt 1 ] || [ $# -gt 9 ]
-then
-    echo "Syntax Error: not the correct number of arguments"
-    echo ""
-    usage
-    exit 1
-fi
-
-VM_TEMPLATE=ci-
-JOB_NAME=XX
-BUILD_ID=XX
-VM_NAME=ci-enb-usrp
-ARCHIVES_LOC=enb_usrp/test
-KEEP_VM_ALIVE=0
-RUN_OPTIONS="none"
-STATUS=0
-
-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
-    ;;
-    -ws|--workspace)
-    JENKINS_WKSP="$2"
-    shift
-    shift
-    ;;
-    -k|--keep-vm-alive)
-    KEEP_VM_ALIVE=1
-    shift
-    ;;
-    -v1)
-    VM_NAME=ci-enb-usrp
-    shift
-    ;;
-    -v2)
-    VM_NAME=ci-basic-sim
-    RUN_OPTIONS="complex"
-    ARCHIVES_LOC=basic_sim/test
-    shift
-    ;;
-    -v3)
-    VM_NAME=ci-phy-sim
-    RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
-    ARCHIVES_LOC=phy_sim/test
-    shift
-    ;;
-    -v4)
-    VM_NAME=ci-cppcheck
-    shift
-    ;;
-    -v7)
-    VM_NAME=ci-enb-ethernet
-    shift
-    ;;
-    -v8)
-    VM_NAME=ci-ue-ethernet
-    shift
-    ;;
-    --variant)
-    variant="$2"
-    case $variant in
-        enb-usrp)
-        VM_NAME=ci-enb-usrp
-        ;;
-        basic-sim)
-        VM_NAME=ci-basic-sim
-        RUN_OPTIONS="complex"
-        ARCHIVES_LOC=basic_sim/test
-        ;;
-        phy-sim)
-        VM_NAME=ci-phy-sim
-        RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
-        ARCHIVES_LOC=phy_sim/test
-        ;;
-        cppcheck)
-        VM_NAME=ci-cppcheck
-        ;;
-        enb-ethernet)
-        VM_NAME=ci-enb-ethernet
-        ;;
-        ue-ethernet)
-        VM_NAME=ci-ue-ethernet
-        ;;
-        *)
-        echo ""
-        echo "Syntax Error: Invalid Variant option -> $variant"
-        echo ""
-        variant_usage
-        exit 1
-    esac
-    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
-
-VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
-VM_CMDS=${VM_NAME}_cmds.txt
-ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
-
-echo "VM_NAME             = $VM_NAME"
-echo "VM_CMD_FILE         = $VM_CMDS"
-echo "JENKINS_WKSP        = $JENKINS_WKSP"
-echo "ARCHIVES_LOC        = $ARCHIVES_LOC"
-
-echo "############################################################"
-echo "Waiting for VM to be started"
-echo "############################################################"
-uvt-kvm wait $VM_NAME --insecure
-
-VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
-echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
-
-if [ "$RUN_OPTIONS" == "none" ]
-then
-    echo "No run on VM testing for this variant currently"
-    exit $STATUS
-fi
-
-if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]]
-then
+function run_test_on_vm {
     echo "############################################################"
-    echo "Running test script on VM ($VM_NAME)"
+    echo "OAI CI VM script"
     echo "############################################################"
-    echo "echo \"sudo apt-get --yes --quiet install bc \"" > $VM_CMDS
-    echo "sudo apt-get update > bc-install.txt 2>&1" >> $VM_CMDS
-    echo "sudo apt-get --yes install bc >> bc-install.txt 2>&1" >> $VM_CMDS
-    echo "cd tmp" >> $VM_CMDS
-    echo "echo \"source oaienv\"" >> $VM_CMDS
-    echo "source oaienv" >> $VM_CMDS
-    echo "echo \"cd cmake_targets/autotests\"" >> $VM_CMDS
-    echo "cd cmake_targets/autotests" >> $VM_CMDS
-    echo "echo \"rm -Rf log\"" >> $VM_CMDS
-    echo "rm -Rf log" >> $VM_CMDS
-    echo "$RUN_OPTIONS" | sed -e 's@"@\\"@g' -e 's@^@echo "@' -e 's@$@"@' >> $VM_CMDS
-    echo "$RUN_OPTIONS" >> $VM_CMDS
-    echo "cp /home/ubuntu/bc-install.txt log" >> $VM_CMDS
-    echo "cd log" >> $VM_CMDS
-    echo "zip -r -qq tmp.zip *.* 0*" >> $VM_CMDS
-
-    ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
+    echo "VM_NAME             = $VM_NAME"
+    echo "VM_CMD_FILE         = $VM_CMDS"
+    echo "JENKINS_WKSP        = $JENKINS_WKSP"
+    echo "ARCHIVES_LOC        = $ARCHIVES_LOC"
 
     echo "############################################################"
-    echo "Creating a tmp folder to store results and artifacts"
+    echo "Waiting for VM to be started"
     echo "############################################################"
+    uvt-kvm wait $VM_NAME --insecure
 
-    if [ -d $ARCHIVES_LOC ]
-    then
-        rm -Rf $ARCHIVES_LOC
-    fi
-    mkdir --parents $ARCHIVES_LOC
+    VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
+    echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
 
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/autotests/log/tmp.zip $ARCHIVES_LOC
-    pushd $ARCHIVES_LOC
-    unzip -qq -DD tmp.zip
-    rm tmp.zip
-    if [ -f results_autotests.xml ]
+    if [ "$RUN_OPTIONS" == "none" ]
     then
-        FUNCTION=`echo $VM_NAME | sed -e "s@$VM_TEMPLATE@@"`
-        NEW_NAME=`echo "results_autotests.xml" | sed -e "s@results_autotests@results_autotests-$FUNCTION@"`
-        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $NEW_NAME
-        echo "<?xml-stylesheet type=\"text/xsl\" href=\"$FUNCTION.xsl\" ?>" >> $NEW_NAME
-        cat results_autotests.xml >> $NEW_NAME
-        sed -e "s@TEMPLATE@$FUNCTION@" $JENKINS_WKSP/ci-scripts/template.xsl > $FUNCTION.xsl
-        #mv results_autotests.xml $NEW_NAME
-        rm results_autotests.xml
+        echo "No run on VM testing for this variant currently"
+        exit $STATUS
     fi
-    popd
 
-    if [ $KEEP_VM_ALIVE -eq 0 ]
+    if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]]
     then
         echo "############################################################"
-        echo "Destroying VM"
+        echo "Running test script on VM ($VM_NAME)"
         echo "############################################################"
-        uvt-kvm destroy $VM_NAME
-        ssh-keygen -R $VM_IP_ADDR
-    fi
-    rm -f $VM_CMDS
-
-    echo "############################################################"
-    echo "Checking run status"
-    echo "############################################################"
-
-    LOG_FILES=`ls $ARCHIVES_LOC/results_autotests*.xml`
-    NB_FOUND_FILES=0
-    NB_RUNS=0
-    NB_FAILURES=0
-
-    for FULLFILE in $LOG_FILES
-    do
-        TESTSUITES=`egrep "testsuite errors" $FULLFILE`
-        for TESTSUITE in $TESTSUITES
-        do
-            if [[ "$TESTSUITE" == *"tests="* ]]
-            then
-                RUNS=`echo $TESTSUITE | awk 'BEGIN{FS="="}{print $2}END{}' | sed -e "s@'@@g" `
-                NB_RUNS=$((NB_RUNS + RUNS))
-            fi
-            if [[ "$TESTSUITE" == *"failures="* ]]
-            then
-                FAILS=`echo $TESTSUITE | awk 'BEGIN{FS="="}{print $2}END{}' | sed -e "s@'@@g" `
-                NB_FAILURES=$((NB_FAILURES + FAILS))
-            fi
-        done
-        NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
-    done
-
-    echo "NB_FOUND_FILES = $NB_FOUND_FILES"
-    echo "NB_RUNS        = $NB_RUNS"
-    echo "NB_FAILURES    = $NB_FAILURES"
+        echo "echo \"sudo apt-get --yes --quiet install bc \"" > $VM_CMDS
+        echo "sudo apt-get update > bc-install.txt 2>&1" >> $VM_CMDS
+        echo "sudo apt-get --yes install bc >> bc-install.txt 2>&1" >> $VM_CMDS
+        echo "cd tmp" >> $VM_CMDS
+        echo "echo \"source oaienv\"" >> $VM_CMDS
+        echo "source oaienv" >> $VM_CMDS
+        echo "echo \"cd cmake_targets/autotests\"" >> $VM_CMDS
+        echo "cd cmake_targets/autotests" >> $VM_CMDS
+        echo "echo \"rm -Rf log\"" >> $VM_CMDS
+        echo "rm -Rf log" >> $VM_CMDS
+        echo "$RUN_OPTIONS" | sed -e 's@"@\\"@g' -e 's@^@echo "@' -e 's@$@"@' >> $VM_CMDS
+        echo "$RUN_OPTIONS" >> $VM_CMDS
+        echo "cp /home/ubuntu/bc-install.txt log" >> $VM_CMDS
+        echo "cd log" >> $VM_CMDS
+        echo "zip -r -qq tmp.zip *.* 0*" >> $VM_CMDS
+
+        ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
 
-    if [ $NB_FOUND_FILES -eq 0 ]; then STATUS=-1; fi
-    if [ $NB_RUNS -eq 0 ]; then STATUS=-1; fi
-    if [ $NB_FAILURES -ne 0 ]; then STATUS=-1; fi
+        echo "############################################################"
+        echo "Creating a tmp folder to store results and artifacts"
+        echo "############################################################"
 
-fi
+        if [ -d $ARCHIVES_LOC ]
+        then
+            rm -Rf $ARCHIVES_LOC
+        fi
+        mkdir --parents $ARCHIVES_LOC
 
-if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-basic-sim.* ]]
-then
-    PING_STATUS=0
-    IPERF_STATUS=0
-    if [ -d $ARCHIVES_LOC ]
-    then
-        rm -Rf $ARCHIVES_LOC
-    fi
-    mkdir --parents $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/autotests/log/tmp.zip $ARCHIVES_LOC
+        pushd $ARCHIVES_LOC
+        unzip -qq -DD tmp.zip
+        rm tmp.zip
+        if [ -f results_autotests.xml ]
+        then
+            FUNCTION=`echo $VM_NAME | sed -e "s@$VM_TEMPLATE@@"`
+            NEW_NAME=`echo "results_autotests.xml" | sed -e "s@results_autotests@results_autotests-$FUNCTION@"`
+            echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $NEW_NAME
+            echo "<?xml-stylesheet type=\"text/xsl\" href=\"$FUNCTION.xsl\" ?>" >> $NEW_NAME
+            cat results_autotests.xml >> $NEW_NAME
+            sed -e "s@TEMPLATE@$FUNCTION@" $JENKINS_WKSP/ci-scripts/template.xsl > $FUNCTION.xsl
+            #mv results_autotests.xml $NEW_NAME
+            rm results_autotests.xml
+        fi
+        popd
 
-    EPC_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#epc#"`
-    LTEBOX=0
-    if [ -d /opt/ltebox-archives/ ]
-    then
-        # Checking if all ltebox archives are available to run ltebx epc on a brand new VM
-        if [ -f /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ] && [ -f /opt/ltebox-archives/etc-conf.zip ] && [ -f /opt/ltebox-archives/hss-sim.zip ]
+        if [ $KEEP_VM_ALIVE -eq 0 ]
         then
             echo "############################################################"
-            echo "Test EPC on VM ($EPC_VM_NAME) will be using ltebox"
+            echo "Destroying VM"
             echo "############################################################"
-            LTEBOX=1
+            uvt-kvm destroy $VM_NAME
+            ssh-keygen -R $VM_IP_ADDR
         fi
-    fi
-    # Here we could have other types of EPC detection
+        rm -f $VM_CMDS
 
-    # Do we need to start the EPC VM
-    EPC_VM_CMDS=`echo $VM_CMDS | sed -e "s#cmds#epc-cmds#"`
-    echo "EPC_VM_CMD_FILE     = $EPC_VM_CMDS"
-    IS_EPC_VM_ALIVE=`uvt-kvm list | grep -c $EPC_VM_NAME`
-    if [ $IS_EPC_VM_ALIVE -eq 0 ]
-    then
         echo "############################################################"
-        echo "Creating test EPC VM ($EPC_VM_NAME) on Ubuntu Cloud Image base"
+        echo "Checking run status"
         echo "############################################################"
-        uvt-kvm create $EPC_VM_NAME release=xenial --unsafe-caching
-    fi
 
-    uvt-kvm wait $EPC_VM_NAME --insecure
-    EPC_VM_IP_ADDR=`uvt-kvm ip $EPC_VM_NAME`
-    echo "$EPC_VM_NAME has for IP addr = $EPC_VM_IP_ADDR"
-    scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
+        LOG_FILES=`ls $ARCHIVES_LOC/results_autotests*.xml`
+        NB_FOUND_FILES=0
+        NB_RUNS=0
+        NB_FAILURES=0
 
-    # ltebox specific actions (install and start)
-    LTE_BOX_TO_INSTALL=1
-    if [ $LTEBOX -eq 1 ]
-    then
-        echo "ls -ls /opt/ltebox/tools/start_ltebox" > $EPC_VM_CMDS
-        RESPONSE=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS`
-        NB_EXES=`echo $RESPONSE | grep -c ltebox`
-        if [ $NB_EXES -eq 1 ]; then LTE_BOX_TO_INSTALL=0; fi
-    fi
+        for FULLFILE in $LOG_FILES
+        do
+            TESTSUITES=`egrep "testsuite errors" $FULLFILE`
+            for TESTSUITE in $TESTSUITES
+            do
+                if [[ "$TESTSUITE" == *"tests="* ]]
+                then
+                    RUNS=`echo $TESTSUITE | awk 'BEGIN{FS="="}{print $2}END{}' | sed -e "s@'@@g" `
+                    NB_RUNS=$((NB_RUNS + RUNS))
+                fi
+                if [[ "$TESTSUITE" == *"failures="* ]]
+                then
+                    FAILS=`echo $TESTSUITE | awk 'BEGIN{FS="="}{print $2}END{}' | sed -e "s@'@@g" `
+                    NB_FAILURES=$((NB_FAILURES + FAILS))
+                fi
+            done
+            NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
+        done
+
+        echo "NB_FOUND_FILES = $NB_FOUND_FILES"
+        echo "NB_RUNS        = $NB_RUNS"
+        echo "NB_FAILURES    = $NB_FAILURES"
+
+        if [ $NB_FOUND_FILES -eq 0 ]; then STATUS=-1; fi
+        if [ $NB_RUNS -eq 0 ]; then STATUS=-1; fi
+        if [ $NB_FAILURES -ne 0 ]; then STATUS=-1; fi
 
-    if [ $LTEBOX -eq 1 ] && [ $LTE_BOX_TO_INSTALL -eq 1 ]
-    then
-        echo "############################################################"
-        echo "Copying ltebox archives into EPC VM ($EPC_VM_NAME)" 
-        echo "############################################################"
-        scp -o StrictHostKeyChecking=no /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
-        scp -o StrictHostKeyChecking=no /opt/ltebox-archives/etc-conf.zip ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
-        scp -o StrictHostKeyChecking=no /opt/ltebox-archives/hss-sim.zip ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
-
-        echo "############################################################"
-        echo "Install EPC on EPC VM ($EPC_VM_NAME)"
-        echo "############################################################"
-        echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $EPC_VM_CMDS
-        echo "touch /home/ubuntu/.hushlogin" >> $EPC_VM_CMDS
-        echo "echo \"sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf\"" >> $EPC_VM_CMDS
-        echo "sudo apt-get update > zip-install.txt 2>&1" >> $EPC_VM_CMDS
-        echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf >> zip-install.txt 2>&1" >> $EPC_VM_CMDS
-
-        # Installing HSS
-        echo "echo \"cd /opt\"" >> $EPC_VM_CMDS
-        echo "cd /opt" >> $EPC_VM_CMDS
-        echo "echo \"sudo unzip -qq /home/ubuntu/hss-sim.zip\"" >> $EPC_VM_CMDS
-        echo "sudo unzip -qq /home/ubuntu/hss-sim.zip" >> $EPC_VM_CMDS
-        echo "echo \"cd /opt/hss_sim0609\"" >> $EPC_VM_CMDS
-        echo "cd /opt/hss_sim0609" >> $EPC_VM_CMDS
-
-        # Installing ltebox
-        echo "echo \"cd /home/ubuntu\"" >> $EPC_VM_CMDS
-        echo "cd /home/ubuntu" >> $EPC_VM_CMDS
-        echo "echo \"sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb \"" >> $EPC_VM_CMDS
-        echo "sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb >> zip-install.txt 2>&1" >> $EPC_VM_CMDS
-
-        echo "echo \"cd /opt/ltebox/etc/\"" >> $EPC_VM_CMDS
-        echo "cd /opt/ltebox/etc/" >> $EPC_VM_CMDS
-        echo "echo \"sudo unzip -qq -o /home/ubuntu/etc-conf.zip\"" >> $EPC_VM_CMDS
-        echo "sudo unzip -qq -o /home/ubuntu/etc-conf.zip" >> $EPC_VM_CMDS
-        echo "sudo sed -i  -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' gw.conf" >> $EPC_VM_CMDS
-        echo "sudo sed -i  -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' mme.conf" >> $EPC_VM_CMDS
     fi
 
-    # Starting EPC
-    if [ $LTEBOX -eq 1 ]
+    if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-basic-sim.* ]]
     then
-        echo "############################################################"
-        echo "Start EPC on EPC VM ($EPC_VM_NAME)"
-        echo "############################################################"
-        echo "echo \"cd /opt/hss_sim0609\"" >> $EPC_VM_CMDS
-        echo "cd /opt/hss_sim0609" >> $EPC_VM_CMDS
-        echo "echo \"sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real\"" >> $EPC_VM_CMDS
-        echo "sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real" >> $EPC_VM_CMDS
+        PING_STATUS=0
+        IPERF_STATUS=0
+        if [ -d $ARCHIVES_LOC ]
+        then
+            rm -Rf $ARCHIVES_LOC
+        fi
+        mkdir --parents $ARCHIVES_LOC
 
-        echo "echo \"cd /opt/ltebox/tools/\"" >> $EPC_VM_CMDS
-        echo "cd /opt/ltebox/tools/" >> $EPC_VM_CMDS
-        echo "echo \"sudo ./start_ltebox\"" >> $EPC_VM_CMDS
-        echo "nohup sudo ./start_ltebox > /home/ubuntu/ltebox.txt" >> $EPC_VM_CMDS
+        EPC_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#epc#"`
+        LTEBOX=0
+        if [ -d /opt/ltebox-archives/ ]
+        then
+            # Checking if all ltebox archives are available to run ltebx epc on a brand new VM
+            if [ -f /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ] && [ -f /opt/ltebox-archives/etc-conf.zip ] && [ -f /opt/ltebox-archives/hss-sim.zip ]
+            then
+                echo "############################################################"
+                echo "Test EPC on VM ($EPC_VM_NAME) will be using ltebox"
+                echo "############################################################"
+                LTEBOX=1
+            fi
+        fi
+        # Here we could have other types of EPC detection
 
-        ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS
-        rm -f $EPC_VM_CMDS
+        # Do we need to start the EPC VM
+        EPC_VM_CMDS=`echo $VM_CMDS | sed -e "s#cmds#epc-cmds#"`
+        echo "EPC_VM_CMD_FILE     = $EPC_VM_CMDS"
+        IS_EPC_VM_ALIVE=`uvt-kvm list | grep -c $EPC_VM_NAME`
+        if [ $IS_EPC_VM_ALIVE -eq 0 ]
+        then
+            echo "############################################################"
+            echo "Creating test EPC VM ($EPC_VM_NAME) on Ubuntu Cloud Image base"
+            echo "############################################################"
+            uvt-kvm create $EPC_VM_NAME release=xenial --unsafe-caching
+        fi
 
-        # We may have some adaptation to do
-        if [ -f /opt/ltebox-archives/adapt_ue_sim.txt ]
+        uvt-kvm wait $EPC_VM_NAME --insecure
+        EPC_VM_IP_ADDR=`uvt-kvm ip $EPC_VM_NAME`
+        echo "$EPC_VM_NAME has for IP addr = $EPC_VM_IP_ADDR"
+        scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
+
+        # ltebox specific actions (install and start)
+        LTE_BOX_TO_INSTALL=1
+        if [ $LTEBOX -eq 1 ]
+        then
+            echo "ls -ls /opt/ltebox/tools/start_ltebox" > $EPC_VM_CMDS
+            RESPONSE=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS`
+            NB_EXES=`echo $RESPONSE | grep -c ltebox`
+            if [ $NB_EXES -eq 1 ]; then LTE_BOX_TO_INSTALL=0; fi
+        fi
+
+        if [ $LTEBOX -eq 1 ] && [ $LTE_BOX_TO_INSTALL -eq 1 ]
         then
             echo "############################################################"
-            echo "Doing some adaptation on UE side"
+            echo "Copying ltebox archives into EPC VM ($EPC_VM_NAME)" 
+            echo "############################################################"
+            scp -o StrictHostKeyChecking=no /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
+            scp -o StrictHostKeyChecking=no /opt/ltebox-archives/etc-conf.zip ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
+            scp -o StrictHostKeyChecking=no /opt/ltebox-archives/hss-sim.zip ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu
+
+            echo "############################################################"
+            echo "Install EPC on EPC VM ($EPC_VM_NAME)"
             echo "############################################################"
-            ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < /opt/ltebox-archives/adapt_ue_sim.txt
+            echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $EPC_VM_CMDS
+            echo "touch /home/ubuntu/.hushlogin" >> $EPC_VM_CMDS
+            echo "echo \"sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf\"" >> $EPC_VM_CMDS
+            echo "sudo apt-get update > zip-install.txt 2>&1" >> $EPC_VM_CMDS
+            echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf >> zip-install.txt 2>&1" >> $EPC_VM_CMDS
+
+            # Installing HSS
+            echo "echo \"cd /opt\"" >> $EPC_VM_CMDS
+            echo "cd /opt" >> $EPC_VM_CMDS
+            echo "echo \"sudo unzip -qq /home/ubuntu/hss-sim.zip\"" >> $EPC_VM_CMDS
+            echo "sudo unzip -qq /home/ubuntu/hss-sim.zip" >> $EPC_VM_CMDS
+            echo "echo \"cd /opt/hss_sim0609\"" >> $EPC_VM_CMDS
+            echo "cd /opt/hss_sim0609" >> $EPC_VM_CMDS
+
+            # Installing ltebox
+            echo "echo \"cd /home/ubuntu\"" >> $EPC_VM_CMDS
+            echo "cd /home/ubuntu" >> $EPC_VM_CMDS
+            echo "echo \"sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb \"" >> $EPC_VM_CMDS
+            echo "sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb >> zip-install.txt 2>&1" >> $EPC_VM_CMDS
+
+            echo "echo \"cd /opt/ltebox/etc/\"" >> $EPC_VM_CMDS
+            echo "cd /opt/ltebox/etc/" >> $EPC_VM_CMDS
+            echo "echo \"sudo unzip -qq -o /home/ubuntu/etc-conf.zip\"" >> $EPC_VM_CMDS
+            echo "sudo unzip -qq -o /home/ubuntu/etc-conf.zip" >> $EPC_VM_CMDS
+            echo "sudo sed -i  -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' gw.conf" >> $EPC_VM_CMDS
+            echo "sudo sed -i  -e 's#EPC_VM_IP_ADDRESS#$EPC_VM_IP_ADDR#' mme.conf" >> $EPC_VM_CMDS
         fi
 
-        i="0"
-        echo "ifconfig tun5 | egrep -c \"inet addr\"" > $EPC_VM_CMDS
-        while [ $i -lt 10 ]
-        do
-            sleep 2
-            CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS`
-            if [ $CONNECTED -eq 1 ]
+        # Starting EPC
+        if [ $LTEBOX -eq 1 ]
+        then
+            echo "############################################################"
+            echo "Start EPC on EPC VM ($EPC_VM_NAME)"
+            echo "############################################################"
+            echo "echo \"cd /opt/hss_sim0609\"" >> $EPC_VM_CMDS
+            echo "cd /opt/hss_sim0609" >> $EPC_VM_CMDS
+            echo "echo \"sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real\"" >> $EPC_VM_CMDS
+            echo "sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real" >> $EPC_VM_CMDS
+
+            echo "echo \"cd /opt/ltebox/tools/\"" >> $EPC_VM_CMDS
+            echo "cd /opt/ltebox/tools/" >> $EPC_VM_CMDS
+            echo "echo \"sudo ./start_ltebox\"" >> $EPC_VM_CMDS
+            echo "nohup sudo ./start_ltebox > /home/ubuntu/ltebox.txt" >> $EPC_VM_CMDS
+
+            ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS
+            rm -f $EPC_VM_CMDS
+
+            # We may have some adaptation to do
+            if [ -f /opt/ltebox-archives/adapt_ue_sim.txt ]
             then
-                i="100"
-            else
-                i=$[$i+1]
+                echo "############################################################"
+                echo "Doing some adaptation on UE side"
+                echo "############################################################"
+                ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < /opt/ltebox-archives/adapt_ue_sim.txt
             fi
-        done
-        rm $EPC_VM_CMDS
-        if [ $i -lt 50 ]
+
+            i="0"
+            echo "ifconfig tun5 | egrep -c \"inet addr\"" > $EPC_VM_CMDS
+            while [ $i -lt 10 ]
+            do
+                sleep 2
+                CONNECTED=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS`
+                if [ $CONNECTED -eq 1 ]
+                then
+                    i="100"
+                else
+                    i=$[$i+1]
+                fi
+            done
+            rm $EPC_VM_CMDS
+            if [ $i -lt 50 ]
+            then
+                echo "Problem w/ starting ltebox EPC"
+                exit -1
+            fi
+        fi
+
+        # HERE ADD ANY INSTALL ACTIONS FOR ANOTHER EPC
+
+        # Retrieve EPC real IP address
+        if [ $LTEBOX -eq 1 ]
         then
-            echo "Problem w/ starting ltebox EPC"
+            # in our configuration file, we are using pool 5
+            echo "ifconfig tun5 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's#  P-t-P:.*\$##'" > $EPC_VM_CMDS
+            REAL_EPC_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS`
+            echo "EPC IP Address     is : $REAL_EPC_IP_ADDR"
+            rm $EPC_VM_CMDS
+        fi
+
+        echo "############################################################"
+        echo "Starting the eNB in FDD-5MHz mode"
+        echo "############################################################"
+        CURRENT_ENB_LOG_FILE=fdd_05MHz_enb.log
+        start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-fdd-basic-sim.conf
+
+        echo "############################################################"
+        echo "Starting the UE in FDD-5MHz mode"
+        echo "############################################################"
+        CURRENT_UE_LOG_FILE=fdd_05MHz_ue.log
+        start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2680
+        if [ $UE_SYNC -eq 0 ]
+        then
+            echo "Problem w/ eNB and UE not syncing"
+            terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
+            recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
             exit -1
         fi
-    fi
+        get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
 
-    # HERE ADD ANY INSTALL ACTIONS FOR ANOTHER EPC
+        echo "############################################################"
+        echo "Pinging the UE"
+        echo "############################################################"
+        PING_LOG_FILE=fdd_05MHz_ping_ue.txt
+        ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
+        check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
 
-    # Retrieve EPC real IP address
-    if [ $LTEBOX -eq 1 ]
-    then
-        # in our configuration file, we are using pool 5
-        echo "ifconfig tun5 | egrep \"inet addr\" | sed -e 's#^.*inet addr:##' -e 's#  P-t-P:.*\$##'" > $EPC_VM_CMDS
-        REAL_EPC_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR < $EPC_VM_CMDS`
-        echo "EPC IP Address     is : $REAL_EPC_IP_ADDR"
-        rm $EPC_VM_CMDS
-    fi
+        echo "############################################################"
+        echo "Iperf DL"
+        echo "############################################################"
+        CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_dl
+        iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
 
-    echo "############################################################"
-    echo "Starting the eNB in FDD-5MHz mode"
-    echo "############################################################"
-    CURRENT_ENB_LOG_FILE=fdd_05MHz_enb.log
-    start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-fdd-basic-sim.conf
+        echo "############################################################"
+        echo "Iperf UL"
+        echo "############################################################"
+        CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_ul
+        iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2
 
-    echo "############################################################"
-    echo "Starting the UE in FDD-5MHz mode"
-    echo "############################################################"
-    CURRENT_UE_LOG_FILE=fdd_05MHz_ue.log
-    start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2680
-    if [ $UE_SYNC -eq 0 ]
-    then
-        echo "Problem w/ eNB and UE not syncing"
+        echo "############################################################"
+        echo "Terminate enb/ue simulators"
+        echo "############################################################"
         terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
         recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-        terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
-        exit -1
-    fi
-    get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
+        sleep 10
 
-    echo "############################################################"
-    echo "Pinging the UE"
-    echo "############################################################"
-    PING_LOG_FILE=fdd_05MHz_ping_ue.txt
-    ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
-    check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
+        echo "############################################################"
+        echo "Starting the eNB in FDD-10MHz mode"
+        echo "############################################################"
+        CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log
+        start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf
 
-    echo "############################################################"
-    echo "Iperf DL"
-    echo "############################################################"
-    CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_dl
-    iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
+        echo "############################################################"
+        echo "Starting the UE in FDD-10MHz mode"
+        echo "############################################################"
+        CURRENT_UE_LOG_FILE=fdd_10MHz_ue.log
+        start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2680
+        if [ $UE_SYNC -eq 0 ]
+        then
+            echo "Problem w/ eNB and UE not syncing"
+            terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
+            recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
+            exit -1
+        fi
+        get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
 
-    echo "############################################################"
-    echo "Iperf UL"
-    echo "############################################################"
-    CURR_IPERF_LOG_BASE=fdd_05MHz_iperf_ul
-    iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2
+        echo "############################################################"
+        echo "Pinging the UE"
+        echo "############################################################"
+        PING_LOG_FILE=fdd_10MHz_ping_ue.txt
+        ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
+        check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
 
-    echo "############################################################"
-    echo "Terminate enb/ue simulators"
-    echo "############################################################"
-    terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
-    recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+        echo "############################################################"
+        echo "Iperf DL"
+        echo "############################################################"
+        CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl
+        iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
 
-    echo "############################################################"
-    echo "Starting the eNB in FDD-10MHz mode"
-    echo "############################################################"
-    CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log
-    start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf
+        echo "############################################################"
+        echo "Iperf UL"
+        echo "############################################################"
+        CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_ul
+        iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2
 
-    echo "############################################################"
-    echo "Starting the UE in FDD-10MHz mode"
-    echo "############################################################"
-    CURRENT_UE_LOG_FILE=fdd_10MHz_ue.log
-    start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2680
-    if [ $UE_SYNC -eq 0 ]
-    then
-        echo "Problem w/ eNB and UE not syncing"
+        echo "############################################################"
+        echo "Terminate enb/ue simulators"
+        echo "############################################################"
         terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
         recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-        terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
-        exit -1
-    fi
-    get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
-
-    echo "############################################################"
-    echo "Pinging the UE"
-    echo "############################################################"
-    PING_LOG_FILE=fdd_10MHz_ping_ue.txt
-    ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
-    check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
+        sleep 10
 
-    echo "############################################################"
-    echo "Iperf DL"
-    echo "############################################################"
-    CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_dl
-    iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
+        echo "############################################################"
+        echo "Starting the eNB in FDD-20MHz mode"
+        echo "############################################################"
+        CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log
+        start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf
 
-    echo "############################################################"
-    echo "Iperf UL"
-    echo "############################################################"
-    CURR_IPERF_LOG_BASE=fdd_10MHz_iperf_ul
-    iperf_ul $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 2 $CURR_IPERF_LOG_BASE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 2
+        echo "############################################################"
+        echo "Starting the UE in FDD-20MHz mode"
+        echo "############################################################"
+        CURRENT_UE_LOG_FILE=fdd_20MHz_ue.log
+        start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2680
+        if [ $UE_SYNC -eq 0 ]
+        then
+            echo "Problem w/ eNB and UE not syncing"
+            terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
+            recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
+            exit -1
+        fi
+        get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
 
-    echo "############################################################"
-    echo "Terminate enb/ue simulators"
-    echo "############################################################"
-    terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
-    recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+        echo "############################################################"
+        echo "Pinging the UE"
+        echo "############################################################"
+        PING_LOG_FILE=fdd_20MHz_ping_ue.txt
+        ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
+        check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
 
-    echo "############################################################"
-    echo "Starting the eNB in FDD-20MHz mode"
-    echo "############################################################"
-    CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log
-    start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf
+        echo "############################################################"
+        echo "Iperf DL"
+        echo "############################################################"
+        CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl
+        iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
 
-    echo "############################################################"
-    echo "Starting the UE in FDD-20MHz mode"
-    echo "############################################################"
-    CURRENT_UE_LOG_FILE=fdd_20MHz_ue.log
-    start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2680
-    if [ $UE_SYNC -eq 0 ]
-    then
-        echo "Problem w/ eNB and UE not syncing"
+        echo "############################################################"
+        echo "Terminate enb/ue simulators"
+        echo "############################################################"
         terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
         recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-        terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
-        exit -1
-    fi
-    get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
-
-    echo "############################################################"
-    echo "Pinging the UE"
-    echo "############################################################"
-    PING_LOG_FILE=fdd_20MHz_ping_ue.txt
-    ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
-    check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
+        sleep 10
 
-    echo "############################################################"
-    echo "Iperf DL"
-    echo "############################################################"
-    CURR_IPERF_LOG_BASE=fdd_20MHz_iperf_dl
-    iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 15 $CURR_IPERF_LOG_BASE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 15
+        echo "############################################################"
+        echo "Starting the eNB in TDD-5MHz mode"
+        echo "############################################################"
+        CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log
+        start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf
 
-    echo "############################################################"
-    echo "Terminate enb/ue simulators"
-    echo "############################################################"
-    terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
-    recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+        echo "############################################################"
+        echo "Starting the UE in TDD-5MHz mode"
+        echo "############################################################"
+        CURRENT_UE_LOG_FILE=tdd_05MHz_ue.log
+        start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2350
+        if [ $UE_SYNC -eq 0 ]
+        then
+            echo "Problem w/ eNB and UE not syncing"
+            terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
+            recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
+            exit -1
+        fi
+        get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
 
-    echo "############################################################"
-    echo "Starting the eNB in TDD-5MHz mode"
-    echo "############################################################"
-    CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log
-    start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf
+        echo "############################################################"
+        echo "Pinging the UE"
+        echo "############################################################"
+        PING_LOG_FILE=tdd_05MHz_ping_ue.txt
+        ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
+        check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
+
+#        Bug in TDD 5Mhz --- not running it
+#        echo "############################################################"
+#        echo "Iperf DL"
+#        echo "############################################################"
+#        CURR_IPERF_LOG_BASE=tdd_05MHz_iperf_dl
+#        iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
+#        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+#        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+#        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
 
-    echo "############################################################"
-    echo "Starting the UE in TDD-5MHz mode"
-    echo "############################################################"
-    CURRENT_UE_LOG_FILE=tdd_05MHz_ue.log
-    start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2350
-    if [ $UE_SYNC -eq 0 ]
-    then
-        echo "Problem w/ eNB and UE not syncing"
+        echo "############################################################"
+        echo "Terminate enb/ue simulators"
+        echo "############################################################"
         terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
         recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-        terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
-        exit -1
-    fi
-    get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
+        sleep 10
 
-    echo "############################################################"
-    echo "Pinging the UE"
-    echo "############################################################"
-    PING_LOG_FILE=tdd_05MHz_ping_ue.txt
-    ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
-    check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
-
-# Bug in TDD 5Mhz --- not running it
-#    echo "############################################################"
-#    echo "Iperf DL"
-#    echo "############################################################"
-#    CURR_IPERF_LOG_BASE=tdd_05MHz_iperf_dl
-#    iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
-#    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-#    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-#    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
+        echo "############################################################"
+        echo "Starting the eNB in TDD-10MHz mode"
+        echo "############################################################"
+        CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log
+        start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf
 
-    echo "############################################################"
-    echo "Terminate enb/ue simulators"
-    echo "############################################################"
-    terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
-    recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+        echo "############################################################"
+        echo "Starting the UE in TDD-10MHz mode"
+        echo "############################################################"
+        CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log
+        start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350
+        if [ $UE_SYNC -eq 0 ]
+        then
+            echo "Problem w/ eNB and UE not syncing"
+            terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
+            recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
+            exit -1
+        fi
+        get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
 
-    echo "############################################################"
-    echo "Starting the eNB in TDD-10MHz mode"
-    echo "############################################################"
-    CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log
-    start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf
+        echo "############################################################"
+        echo "Pinging the UE"
+        echo "############################################################"
+        PING_LOG_FILE=tdd_10MHz_ping_ue.txt
+        ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
+        check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
 
-    echo "############################################################"
-    echo "Starting the UE in TDD-10MHz mode"
-    echo "############################################################"
-    CURRENT_UE_LOG_FILE=tdd_10MHz_ue.log
-    start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 50 2350
-    if [ $UE_SYNC -eq 0 ]
-    then
-        echo "Problem w/ eNB and UE not syncing"
+        echo "############################################################"
+        echo "Iperf DL"
+        echo "############################################################"
+        CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl
+        iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
+
+        echo "############################################################"
+        echo "Terminate enb/ue simulators"
+        echo "############################################################"
         terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
         scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
         recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-        terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
-        exit -1
-    fi
-    get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
+        sleep 10
 
-    echo "############################################################"
-    echo "Pinging the UE"
-    echo "############################################################"
-    PING_LOG_FILE=tdd_10MHz_ping_ue.txt
-    ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
-    check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
+        echo "############################################################"
+        echo "Starting the eNB in TDD-20MHz mode"
+        echo "############################################################"
+        CURRENT_ENB_LOG_FILE=tdd_20MHz_enb.log
+        start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-tdd-basic-sim.conf
 
-    echo "############################################################"
-    echo "Iperf DL"
-    echo "############################################################"
-    CURR_IPERF_LOG_BASE=tdd_10MHz_iperf_dl
-    iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
-    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
+        echo "############################################################"
+        echo "Starting the UE in TDD-20MHz mode"
+        echo "############################################################"
+        CURRENT_UE_LOG_FILE=tdd_20MHz_ue.log
+        start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2350
+        if [ $UE_SYNC -eq 0 ]
+        then
+            echo "Problem w/ eNB and UE not syncing"
+            terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
+            recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+            terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
+            exit -1
+        fi
+        get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
 
-    echo "############################################################"
-    echo "Terminate enb/ue simulators"
-    echo "############################################################"
-    terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
-    recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-
-# Disabling TDD-20MHz test since it is very unstable
-#
-#    echo "############################################################"
-#    echo "Starting the eNB in TDD-20MHz mode"
-#    echo "############################################################"
-#    CURRENT_ENB_LOG_FILE=tdd_20MHz_enb.log
-#    start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-tdd-basic-sim.conf
-#
-#    echo "############################################################"
-#    echo "Starting the UE in TDD-20MHz mode"
-#    echo "############################################################"
-#    CURRENT_UE_LOG_FILE=tdd_20MHz_ue.log
-#    start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 100 2350
-#    if [ $UE_SYNC -eq 0 ]
-#    then
-#        echo "Problem w/ eNB and UE not syncing"
-#        terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
-#        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-#        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
-#        recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-#        terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
-#        exit -1
-#    fi
-#    get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
-#
-#    echo "############################################################"
-#    echo "Pinging the UE"
-#    echo "############################################################"
-#    PING_LOG_FILE=tdd_20MHz_ping_ue.txt
-#    ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
-#    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
-#    check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
-#
-#    echo "############################################################"
-#    echo "Iperf DL"
-#    echo "############################################################"
-#    CURR_IPERF_LOG_BASE=tdd_20MHz_iperf_dl
-#    iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
-#    scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
-#    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
-#    check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
-#
-#    echo "############################################################"
-#    echo "Terminate enb/ue simulators"
-#    echo "############################################################"
-#    terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
-#    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
-#    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
-#    recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+        echo "############################################################"
+        echo "Pinging the UE"
+        echo "############################################################"
+        PING_LOG_FILE=tdd_20MHz_ping_ue.txt
+        ping_ue_ip_addr $EPC_VM_CMDS $EPC_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
+        check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
 
-    echo "############################################################"
-    echo "Terminate EPC"
-    echo "############################################################"
+        echo "############################################################"
+        echo "Iperf DL"
+        echo "############################################################"
+        CURR_IPERF_LOG_BASE=tdd_20MHz_iperf_dl
+        iperf_dl $VM_CMDS $VM_IP_ADDR $EPC_VM_CMDS $EPC_VM_IP_ADDR 6 $CURR_IPERF_LOG_BASE
+        scp -o StrictHostKeyChecking=no ubuntu@$EPC_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
+        check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE 6
 
-    if [ $LTEBOX -eq 1 ]
-    then
-        terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
-    fi
+        echo "############################################################"
+        echo "Terminate enb/ue simulators"
+        echo "############################################################"
+        terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
+        recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
+        sleep 10
 
-    echo "############################################################"
-    echo "Checking run status"
-    echo "############################################################"
+        echo "############################################################"
+        echo "Terminate EPC"
+        echo "############################################################"
 
-    if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi
-    if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi
+        if [ $LTEBOX -eq 1 ]
+        then
+            terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
+        fi
 
-fi
+        if [ $KEEP_VM_ALIVE -eq 0 ]
+        then
+            echo "############################################################"
+            echo "Destroying VMs"
+            echo "############################################################"
+            uvt-kvm destroy $VM_NAME
+            ssh-keygen -R $VM_IP_ADDR
+            uvt-kvm destroy $EPC_VM_NAME
+            ssh-keygen -R $EPC_VM_IP_ADDR
+        fi
 
-if [ $STATUS -eq 0 ]
-then
-    echo "STATUS seems OK"
-else
-    echo "STATUS failed?"
-fi
+        echo "############################################################"
+        echo "Checking run status"
+        echo "############################################################"
 
-exit $STATUS
+        if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi
+        if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi
+
+    fi
+}
diff --git a/ci-scripts/waitBuildOnVM.sh b/ci-scripts/waitBuildOnVM.sh
index 48429cb7e228cc053808c5b2b99ab86d1bc40be7..bee11f282008590620c1bcd1e7c79bd1b6ecee00 100755
--- a/ci-scripts/waitBuildOnVM.sh
+++ b/ci-scripts/waitBuildOnVM.sh
@@ -20,8 +20,8 @@
 # *      contact@openairinterface.org
 # */
 
-function usage {
-    echo "OAI VM Build Check script"
+function wait_usage {
+    echo "OAI CI VM script"
     echo "   Original Author: Raphael Defosseux"
     echo "   Requirements:"
     echo "     -- uvtool uvtool-libvirt apt-cacher"
@@ -31,9 +31,9 @@ function usage {
     echo ""
     echo "Usage:"
     echo "------"
-    echo "    waitBuildOnVM.sh [OPTIONS]"
+    echo "    oai-ci-vm-tool wait [OPTIONS]"
     echo ""
-    echo "Options:"
+    echo "Mandatory Options:"
     echo "--------"
     echo "    --job-name #### OR -jn ####"
     echo "    Specify the name of the Jenkins job."
@@ -44,14 +44,11 @@ function usage {
     echo "    --workspace #### OR -ws ####"
     echo "    Specify the workspace."
     echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
+    variant_usage
     echo "    Specify the variant to build."
     echo ""
+    echo "Options:"
+    echo "--------"
     echo "    --keep-vm-alive OR -k"
     echo "    Keep the VM alive after the build."
     echo ""
@@ -60,313 +57,114 @@ function usage {
     echo ""
 }
 
-function variant_usage {
-    echo "OAI VM Build Check script"
-    echo "   Original Author: Raphael Defosseux"
-    echo ""
-    echo "    --variant enb-usrp     OR -v1"
-    echo "    --variant basic-sim    OR -v2"
-    echo "    --variant phy-sim      OR -v3"
-    echo "    --variant cppcheck     OR -v4"
-    echo "    --variant enb-ethernet OR -v7"
-    echo "    --variant ue-ethernet  OR -v8"
-    echo ""
-}
-
-if [ $# -lt 1 ] || [ $# -gt 9 ]
-then
-    echo "Syntax Error: not the correct number of arguments"
-    echo ""
-    usage
-    exit 1
-fi
-
-VM_TEMPLATE=ci-
-JOB_NAME=XX
-BUILD_ID=XX
-VM_NAME=ci-enb-usrp
-VM_MEMORY=2048
-VM_CPU=4
-ARCHIVES_LOC=enb_usrp
-LOG_PATTERN=.Rel14.txt
-NB_PATTERN_FILES=4
-BUILD_OPTIONS="--eNB -w USRP"
-KEEP_VM_ALIVE=0
-
-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
-    ;;
-    -ws|--workspace)
-    JENKINS_WKSP="$2"
-    shift
-    shift
-    ;;
-    -k|--keep-vm-alive)
-    KEEP_VM_ALIVE=1
-    shift
-    ;;
-    -v1)
-    VM_NAME=ci-enb-usrp
-    ARCHIVES_LOC=enb_usrp
-    LOG_PATTERN=.Rel14.txt
-    NB_PATTERN_FILES=4
-    BUILD_OPTIONS="--eNB -w USRP --mu"
-    shift
-    ;;
-    -v2)
-    VM_NAME=ci-basic-sim
-    ARCHIVES_LOC=basic_sim
-    LOG_PATTERN=basic_simulator
-    NB_PATTERN_FILES=2
-    BUILD_OPTIONS="--basic-simulator"
-    VM_MEMORY=8192
-    VM_CPU=4
-    shift
-    ;;
-    -v3)
-    VM_NAME=ci-phy-sim
-    ARCHIVES_LOC=phy_sim
-    LOG_PATTERN=.Rel14.txt
-    NB_PATTERN_FILES=3
-    BUILD_OPTIONS="--phy_simulators"
-    shift
-    ;;
-    -v4)
-    VM_NAME=ci-cppcheck
-    VM_MEMORY=4096
-    ARCHIVES_LOC=cppcheck
-    LOG_PATTERN=cppcheck.xml
-    NB_PATTERN_FILES=1
-    BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
-    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="$2"
-    case $variant in
-        enb-usrp)
-        VM_NAME=ci-enb-usrp
-        ARCHIVES_LOC=enb_usrp
-        LOG_PATTERN=.Rel14.txt
-        NB_PATTERN_FILES=4
-        BUILD_OPTIONS="--eNB -w USRP --mu"
-        ;;
-        basic-sim)
-        VM_NAME=ci-basic-sim
-        ARCHIVES_LOC=basic_sim
-        LOG_PATTERN=basic_simulator
-        NB_PATTERN_FILES=2
-        BUILD_OPTIONS="--basic-simulator"
-        VM_MEMORY=8192
-        VM_CPU=4
-        ;;
-        phy-sim)
-        VM_NAME=ci-phy-sim
-        ARCHIVES_LOC=phy_sim
-        LOG_PATTERN=.Rel14.txt
-        NB_PATTERN_FILES=3
-        BUILD_OPTIONS="--phy_simulators"
-        ;;
-        cppcheck)
-        VM_NAME=ci-cppcheck
-        VM_MEMORY=4096
-        ARCHIVES_LOC=cppcheck
-        LOG_PATTERN=cppcheck.xml
-        NB_PATTERN_FILES=1
-        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 "Syntax Error: Invalid Variant option -> $variant"
-        echo ""
-        variant_usage
-        exit 1
-    esac
-    shift
-    shift
-    ;;
-    *)
-    echo "Syntax Error: unknown option: $key"
-    echo ""
-    usage
-    exit 1
-esac
-done
+function wait_on_vm_build {
+    echo "############################################################"
+    echo "OAI CI VM script"
+    echo "############################################################"
 
-if [ ! -f $JENKINS_WKSP/localZip.zip ]
-then
-    echo "Missing localZip.zip file!"
-    exit 1
-fi
-if [ ! -f /etc/apt/apt.conf.d/01proxy ]
-then
-    echo "Missing /etc/apt/apt.conf.d/01proxy file!"
-    echo "Is apt-cacher installed and configured?"
-    exit 1
-fi
+    echo "VM_NAME             = $VM_NAME"
+    echo "VM_CMD_FILE         = $VM_CMDS"
+    echo "JENKINS_WKSP        = $JENKINS_WKSP"
+    echo "ARCHIVES_LOC        = $ARCHIVES_LOC"
+    echo "BUILD_OPTIONS       = $BUILD_OPTIONS"
 
-if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
-then
-    VM_TEMPLATE=ci-
-else
-    VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
-fi
+    IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
 
-VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
-VM_CMDS=${VM_NAME}_cmds.txt
-ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
+    if [ $IS_VM_ALIVE -eq 0 ]
+    then
+        echo "############################################################"
+        echo "You should have created the VM before doing anything"
+        echo "############################################################"
+        STATUS=1
+        return
+    fi
 
-echo "VM_NAME             = $VM_NAME"
-echo "VM_CMD_FILE         = $VM_CMDS"
-echo "JENKINS_WKSP        = $JENKINS_WKSP"
-echo "ARCHIVES_LOC        = $ARCHIVES_LOC"
-echo "BUILD_OPTIONS       = $BUILD_OPTIONS"
+    echo "Waiting for VM to be started"
+    uvt-kvm wait $VM_NAME --insecure
 
-IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
+    VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
+    echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
 
-if [ $IS_VM_ALIVE -eq 0 ]
-then
     echo "############################################################"
-    echo "You should have created the VM before doing anything"
+    echo "Waiting build process to end on VM ($VM_NAME)"
     echo "############################################################"
-    exit 1
-fi
-
-echo "Waiting for VM to be started"
-uvt-kvm wait $VM_NAME --insecure
 
-VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
-echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
-
-echo "############################################################"
-echo "Waiting build process to end on VM ($VM_NAME)"
-echo "############################################################"
+    if [[ "$VM_NAME" == *"-cppcheck"* ]]
+    then
+        echo "echo \"ps -aux | grep cppcheck \"" >> $VM_CMDS
+        echo "while [ \$(ps -aux | grep --color=never cppcheck | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
+    else
+        echo "echo \"ps -aux | grep build \"" >> $VM_CMDS
+        echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
+    fi
 
-if [[ "$VM_NAME" == *"-cppcheck"* ]]
-then
-    echo "echo \"ps -aux | grep cppcheck \"" >> $VM_CMDS
-    echo "while [ \$(ps -aux | grep --color=never cppcheck | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
-else
-    echo "echo \"ps -aux | grep build \"" >> $VM_CMDS
-    echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
-fi
+    ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
+    rm -f $VM_CMDS
+}
 
-ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
+function check_on_vm_build {
+    echo "############################################################"
+    echo "Creating a tmp folder to store results and artifacts"
+    echo "############################################################"
+    if [ ! -d $JENKINS_WKSP/archives ]
+    then
+        mkdir $JENKINS_WKSP/archives
+    fi
 
-echo "############################################################"
-echo "Creating a tmp folder to store results and artifacts"
-echo "############################################################"
-if [ ! -d $JENKINS_WKSP/archives ]
-then
-    mkdir $JENKINS_WKSP/archives
-fi
+    if [ ! -d $ARCHIVES_LOC ]
+    then
+        mkdir $ARCHIVES_LOC
+    fi
 
-if [ ! -d $ARCHIVES_LOC ]
-then
-    mkdir $ARCHIVES_LOC
-fi
+    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
+    if [[ "$VM_NAME" == *"-cppcheck"* ]]
+    then
+        scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
+    fi
 
-scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
-if [[ "$VM_NAME" == *"-cppcheck"* ]]
-then
-    scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
-fi
+    if [ $KEEP_VM_ALIVE -eq 0 ]
+    then
+        echo "############################################################"
+        echo "Destroying VM"
+        echo "############################################################"
+        uvt-kvm destroy $VM_NAME
+        ssh-keygen -R $VM_IP_ADDR
+    fi
+    rm -f $VM_CMDS
 
-if [ $KEEP_VM_ALIVE -eq 0 ]
-then
     echo "############################################################"
-    echo "Destroying VM"
+    echo "Checking build status" 
     echo "############################################################"
-    uvt-kvm destroy $VM_NAME
-    ssh-keygen -R $VM_IP_ADDR
-fi
-rm -f $VM_CMDS
-
-echo "############################################################"
-echo "Checking build status" 
-echo "############################################################"
 
-LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
-STATUS=0
-NB_FOUND_FILES=0
+    LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
+    STATUS=0
+    NB_FOUND_FILES=0
 
-for FULLFILE in $LOG_FILES 
-do
-    if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
-    then
-        filename=$(basename -- "$FULLFILE")
-        if [ "$LOG_PATTERN" == ".Rel14.txt" ]
-        then
-            PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
-        fi
-        if [ "$LOG_PATTERN" == "basic_simulator" ]
-        then
-            PASS_PATTERN="lte-"
-        fi
-        if [ "$LOG_PATTERN" == "cppcheck.xml" ]
+    for FULLFILE in $LOG_FILES 
+    do
+        if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
         then
-            PASS_PATTERN="results version"
-            LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE`
-        else
-            LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
+            filename=$(basename -- "$FULLFILE")
+            if [ "$LOG_PATTERN" == ".Rel14.txt" ]
+            then
+                PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
+            fi
+            if [ "$LOG_PATTERN" == "basic_simulator" ]
+            then
+                PASS_PATTERN="lte-"
+            fi
+            if [ "$LOG_PATTERN" == "cppcheck.xml" ]
+            then
+                PASS_PATTERN="results version"
+                LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE`
+            else
+                LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
+            fi
+            if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
+            NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
         fi
-        if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
-        NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
-    fi
-done
+    done
 
-if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
+    if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
 
-if [ $STATUS -eq 0 ]
-then
-    echo "STATUS seems OK"
-else
-    echo "STATUS failed?"
-fi
-exit $STATUS
+}
diff --git a/common/config/DOC/config.md b/common/config/DOC/config.md
new file mode 100644
index 0000000000000000000000000000000000000000..580ac5476fe93675e79aa4ad9c76ca3cb873c279
--- /dev/null
+++ b/common/config/DOC/config.md
@@ -0,0 +1,11 @@
+# OAI configuration module
+
+The configuration module provides an api that other oai components can use to get parameters at init time. It defines a parameter structure, used to describe parameters attributes (for example name and  type). The same structure includes a pointer to the variable where the configuration module writes the parameter value, at run time, when calling config_get or config_getlist functions. For each parameter a function to check the value can be specified and pre-defined functions  are provided for some common parameter validations (integer in a range or in a list, string in a list).  The module also include a mechanism to check that no unknown options have been entered on the command line
+
+## Documentation
+
+* [runtime usage](config/rtusage.md)
+* [developer usage](config/devusage.md)
+* [module architecture](config/arch.md)
+
+[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
diff --git a/common/config/DOC/config/arch.md b/common/config/DOC/config/arch.md
new file mode 100644
index 0000000000000000000000000000000000000000..170241500b3672984105ad7eb9f43cafcfcb11f4
--- /dev/null
+++ b/common/config/DOC/config/arch.md
@@ -0,0 +1,7 @@
+# config module source files
+![configmodule_srcdir](/uploads/fdc3e96011fd5592440900dfa05b4701/configmodule_srcdir.png)  
+# config module components
+![configmodule_components](/uploads/54f8a3953d5ee53717cd9a3b71f85c68/configmodule_components.png)
+
+
+[Configuration module home](../config.md)
\ No newline at end of file
diff --git a/common/config/DOC/config/devusage.md b/common/config/DOC/config/devusage.md
new file mode 100644
index 0000000000000000000000000000000000000000..bfc1180ab8b90b1af108da3a4e0acbbbb926a6f6
--- /dev/null
+++ b/common/config/DOC/config/devusage.md
@@ -0,0 +1,20 @@
+The configuration module objectives are 
+1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem.
+1. Use a common configuration API in all oai modules
+1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.  
+
+As a developer you may need to look at these sections:
+
+* [add parameters in an existing section](devusage/addaparam.md)
+* [add a parameter set, in a new section](devusage/addparamset.md)
+* [configuration module API](devusage/api.md) 
+* [configuration module public structures](devusage/struct.md)  
+
+Whatever your need is, configuration module usage examples can be found in oai sources:  
+*  complex example, using all the configuration module functionalities, including parameter checking: 
+[NB-IoT configuration code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_config.c) and [NB-IoT configuration include file](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_paramdef.h)
+*  very simple example, just reading a parameter set corresponding to a dedicated section:  the telnetsrv_autoinit function in [common/utils/telnetsrv/telnetsrv.c, around line 726](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/telnetsrv/telnetsrv.c#L726)
+*  an example with run-time definition of parameters, in the logging sub-system: the log_getconfig function at the top of [openair2/UTIL/LOG/log.c](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/UTIL/LOG/log.c)
+
+
+[Configuration module home](../config.md)
diff --git a/common/config/DOC/config/devusage/addaparam.md b/common/config/DOC/config/devusage/addaparam.md
new file mode 100644
index 0000000000000000000000000000000000000000..b7bb8a73b90df5f1e7f17a61d47266b68bc1982c
--- /dev/null
+++ b/common/config/DOC/config/devusage/addaparam.md
@@ -0,0 +1,86 @@
+To add a new parameter in an existing section you  insert an item in a `paramdef_t` array, which describes the parameters to be read in the existing `config_get` call. You also need to increment the numparams argument.  
+
+existing code:  
+```c
+unsigned int varopt1;
+paramdef_t someoptions[] = {
+/*---------------------------------------------------------------------------------*/
+/*                  configuration parameters for some module                       */
+/* optname     helpstr     paramflags    XXXptr      defXXXval      type    numelt */
+/*---------------------------------------------------------------------------------*/
+   {"opt1",  "<help opt1>",   0,      uptr:&varopt1, defuintval:0, TYPE_UINT,  0 },
+};
+
+config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection"); 
+
+```
+new code:  
+```c
+unsigned int varopt1;
+
+
+/* varopt2 will be allocated by the config module and free at end_configmodule call
+   except if PARAMFLAG_NOFREE bit is set in paramflags field*/
+char *varopt2;
+paramdef_t someoptions[] = {
+/*---------------------------------------------------------------------------------*/
+/*                  configuration parameters for some module                       */
+/* optname     helpstr     paramflags    XXXptr      defXXXval      type    numelt */
+/*---------------------------------------------------------------------------------*/
+   {"opt1",  "<help opt1>",   0,      uptr:&varopt1,  defuintval:0,TYPE_UINT,  0   },
+   {"opt2",  "<help opt2>",   0,      strptr:&varopt2,defstrval:"",TYPE_STRING,0   },
+};
+
+config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection"); 
+
+```
+
+The corresponding configuration file may now include opt2 parameter in the somesection section:
+
+```c
+somesection =
+{
+opt1 = 3;
+opt2 = "abcd";
+};
+```
+
+In these examples the variables used to retrieve the parameters values are pointed by the `uptr` or `strptr` fields of the `paramdef_t` structure. After the `config_get` call `varopt1` and `varopt2` have been set to the value specified in the config file. It is also possible to specify a `NULL` value to the `< XXX >ptr` fields, which are then allocated by the config module and possibly free when calling `config_end()`, if the `PARAMFLAG_NOFREE` bit has not been set in the `paramflags` field.
+
+The configuration module provides a mechanism to check the parameter value read from the configuration source. The following functions are implemented:
+1.  Check an integer parameter against a list of authorized values
+1.  Check an integer parameter against a list of authorized values and set the parameter to a new value
+1.  Check an integer parameter against a range
+1.  Check a C string parameter against a list of authorized values
+1. Check a C string parameter against a list of authorized values and set the parameter to a new integer value
+
+ A `checkedparam_t` structure array provides the parameter verification procedures:
+
+```c
+/* 
+   definition of the verification to be done on param opt1 and opt2.
+   opt1 is an integer option we must be set to 0,2,3,4 or 7 in the
+   config source.  
+   if opt1 is set to 0 in the config file, it will be set to 1, etc
+   opt2 is C string option with the authorize values "zero","oneThird","twoThird","one"
+ */
+#define OPT1_OKVALUES {0,2,3,4,7}
+#define OPT1_NEWVALUES {1,1,0,6,9}
+#define OPT2_OKVALUES {"zero","oneThird","twoThird","one"}
+
+#define OPT_CHECK_DESC { \
+             { .s1a= { config_check_modify_integer, OPT1_OKVALUE, OPT1_NEWVALUES ,5 }}, \
+             { .s3=  { config_check_strval, OPT2_OKVALUES,4 }}, \
+}
+checkedparam_t checkopt[] = OPT_CHECK_DESC;
+.....
+/* assign the verification procedures to the parameters definitions */
+for(int i=0 ; i < sizeof(someoptions)/sizeof(paramdesc_t) ; i ++) {
+    someoptions[i].chkPptr = &(checkopt[i]);
+}
+....
+```
+When you need a specific verification algorithm, you can provide your own verification function and use it in place of the available ones, in the `checkedparam_t` union. If no existing structure definition match your need, you can enhance the configuration module. You then have to add a new verification function in https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_userapi.c and add a new structure definition in the `checkedparam_t` type defined in https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h
+
+[Configuration module developer main page](../../config/devusage.md)  
+[Configuration module home](../../config.md)
diff --git a/common/config/DOC/config/devusage/addparamset.md b/common/config/DOC/config/devusage/addparamset.md
new file mode 100644
index 0000000000000000000000000000000000000000..130a7eda749033beb1492332c9367df5311f4447
--- /dev/null
+++ b/common/config/DOC/config/devusage/addparamset.md
@@ -0,0 +1,131 @@
+The configuration module maps a configuration file section to a `paramdef_t` structure array. One `config_get` call can be used to return the values of all the parameters described in the `paramdef_t` array.
+Retrieving a single occurence of a parameter set ( a group in the libconfig terminology) is just a two steps task:
+1.  describe the parameters in a `paramdef_t` array
+1.  call the `config_get` function  
+
+
+[config_get example](../../config/devusage/addaparam.md)
+
+
+In oai some parameters set may be instantiated a variable number of occurrences. In a configuration file this is mapped to lists of group of parameters, with this syntax:
+```c
+NB-IoT_MACRLCs =
+/* start list element 1 */
+(
+  /* start a group of parameters */
+  {
+  num_cc = 2;
+  .....
+  remote_s_portd = 55001;
+  }
+),
+/* start list element 2 */
+(
+  /* start a group of parameters */
+  {
+  num_cc = 1;
+  ......
+  remote_s_portd = 65001;
+  }
+);
+
+```
+The configuration module provides the `config_getlist` call to support lists of group of parameters. Below is a commented code example, using the config_getlist call.  
+
+```c
+/* name of section containing the list */
+#define NBIOT_MACRLCLIST_CONFIG_STRING      "NB-IoT_MACRLCs"
+
+/* 
+The following macro define the parameters names, as used in the
+configuration file
+*/   
+#define CONFIG_STRING_MACRLC_CC             "num_cc" 
+.....
+#define CONFIG_MACRLC_S_PORTD               "remote_s_portd" 
+
+/*
+   now define a macro which will be used to initialize the NbIoT_MacRLC_Params
+   variable. NbIoT_MacRLC_Params is an array of paramdef_t structure, each item
+   describing a parameter. When using the config_getlist call you must let the config
+   module allocate the memory for the parameters values.
+*/
+/*------------------------------------------------------------------------------------------------------------*/
+/*   optname               helpstr   paramflags    XXXptr              defXXXval                  type           numelt     */ 
+/*------------------------------------------------------------------------------------------------------------*/
+
+#define MACRLCPARAMS_DESC { \
+{CONFIG_STRING_MACRLC_CC, NULL,     0,          uptr:NULL,           defintval:1,           TYPE_UINT,     0}, \
+.............  \
+{CONFIG_MACRLC_S_PORTD,   NULL,     0,          uptr:NULL,           defintval:50021,           TYPE_UINT,     0}, \
+}  
+
+/* 
+the following macros define the indexes used to access the NbIoT_MacRLC_Params array
+items. They must be maintained consistent with the previous  MACRLCPARAMS_DESC macro
+which is used to initialize the NbIoT_MacRLC_Params variable
+*/
+#define MACRLC_CC_IDX                                          0
+.........
+#define MACRLC_REMOTE_S_PORTD_IDX                              16
+
+
+
+void RCconfig_NbIoTmacrlc(void) {
+ 
+
+/*
+   define and initialize the array of paramdef_t structures describing the groups of
+   parameters we want to read. It will be passed as the second argument of the 
+   config_getlist call, which will use it as an input only argument.
+*/
+  paramdef_t NbIoT_MacRLC_Params[] = MACRLCPARAMS_DESC;
+
+/* 
+      now define and initialize a paramlist_def_t structure which will be passed
+   to the config_getlist call. The first field is the only one to be initialized
+   it contains the name of the section to be read. 
+   that section contains the list of group of parameters.
+      The two other fields are output parameters used to return respectively
+   a pointer to a two dimensional array of paramdef_t structures pointers, and the 
+   number  of items in the list of groups (size of first dimension, the second one
+   being the number of parameters in each group.
+*/ 
+  paramlist_def_t NbIoT_MacRLC_ParamList = {NBIOT_MACRLCLIST_CONFIG_STRING,NULL,0};
+
+
+ /* 
+   the config_getlist will allocate the second field of the paramlist_def_t structure, a 
+two dimensional array of paramdef_t pointers. In each param_def item it will allocate 
+the value pointer and set the value to what it will get from the config source. The
+numelt field of the paramlist_def_t structure will be set to the number of groups of
+parameters in the list.
+    in this example the last argument of config_getlist is unused, it may contain a
+character string, used as a prefix for the section name. It has to be specified when the
+list to be read is under another section.
+*/  
+  config_getlist( &NbIoT_MacRLC_ParamList,NbIoT_MacRLC_Params,
+                  sizeof(NbIoT_MacRLC_Params)/sizeof(paramdef_t), 
+                  NULL);
+  
+/* 
+  start a loop in the nuber of groups in the list, the numelt field of the
+  paramlist_def_t structure has been set in the config_getlist call
+*/
+  for (j=0 ; j<NbIoT_MacRLC_ParamList.numelt ; j++) {
+
+..........
+ 
+/* access the MACRLC_REMOTE_S_PORTD parameter in the j ieme group of the list */
+	RC.nb_iot_mac[j]->eth_params_s.remote_portd = 
+               *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
+............
+	
+  } // MacRLC_ParamList.numelt > 0
+}
+
+
+```  
+
+[Configuration module developer main page](../../config/devusage.md)  
+[Configuration module home](../../config.md)
diff --git a/common/config/DOC/config/devusage/api.md b/common/config/DOC/config/devusage/api.md
new file mode 100644
index 0000000000000000000000000000000000000000..56b444a4471acefd0518b6024e857c70b89a8323
--- /dev/null
+++ b/common/config/DOC/config/devusage/api.md
@@ -0,0 +1,48 @@
+```c
+configmodule_interface_t *load_configmodule(int argc, char **argv)
+```
+* Parses the command line options, looking for the –O argument
+* Loads the `libparams_<configsource>.so` (today `libparams_libconfig.so`)  shared library
+* Looks for `config_<config source>_init` symbol and calls it , passing it an array of string corresponding to the « : » separated strings used in the –O option
+* Looks for `config_<config source>_get`, `config_<config source>_getlist` and  `config_<config source>_end` symbols which are the three functions a configuration library should implement. Get and getlist are mandatory, end is optional.
+* Stores all the necessary information in a `configmodule_interface_t structure`, which is of no use for caller as long as we only use one configuration source.  
+
+```c
+void End_configmodule(void)
+```
+* Free memory which has been allocated by the configuration module since its initialization.
+* Possibly calls the `config_<config source>_end` function
+
+```c
+int config_get(paramdef_t *params,int numparams, char *prefix)
+```
+* Reads as many parameters as described in params, they must all be in the same configuration file section
+* Calls the `config_<config source>_get` function
+* Calls the `config_process_cmdline` function
+* `params` points to an array of `paramdef_t` structures which describes the parameters to be read, possibly including a pointer to a checking function. The following bits can possibly be set in the `paramflags` mask before calling
+ - `PARAMFLAG_MANDATORY`: -1 is returned if the parameter is not explicitly defined in the config source.
+ - `PARAMFLAG_DISABLECMDLINE`: parameter cannot be modified via the command line
+ - `PARAMFLAG_DONOTREAD`: ignore the parameter, can be used at run-time, to alter a pre-defined `paramdef_t` array which is used in several `config_get` or/and `config_getlist` calls.
+ - `PARAMFLAG_NOFREE`: do not free the memory possibly allocated by the config module to store the value of the parameter. Default behavior is for the config module to free the memory it has allocated when the `config_end` function is called.
+ - `PARAMFLAG_BOOL`: Only relevant for integer types. tell the config module that when processing the command line, the corresponding option can be specified without any arggument and that in this case it must set the value to 1.  
+
+* `params` is also used as an output parameter, `< XXX >ptr >` field  is used by the config module to store the value it has read. The following bits can possibly be set in the `paramflags` mask after the call:
+  - `PARAMFLAG_MALLOCINCONFIG`: memory has been allocated for the ` < XXX >ptr > ` field
+  - `PARAMFLAG_PARAMSET`: parameter has been found in the config source, it is not set to default value.
+  - `PARAMFLAG_PARAMSET`: parameter has been set to its default value
+* `numparams` is the number of entries in the params array
+* `prefix` is a character string to be appended to the parameters name, it defines the parameters position in the configuration file hierarchy (the section name in libconfig terminology). 
+* The returned value is the number of parameters which have been assigned a value or -1 if a severe error occured
+
+```c
+int config_libconfig_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix)
+```
+* Reads multiple occurrences of a parameters array
+* Calls the `config_<config source>_get` function for each list occurrence
+* `params` points to an array of `paramdef_t` structures which describes the parameters in each occurrence of the list
+* `ParamList`  points to a structure, where `paramarray` field points to an array of `paramdef_t` structure, allocated by the function. It is used to return the values of the parameters.
+* The returned value is the number of occurrences in the list or -1 in case of severe error  
+
+
+[Configuration module developer main page](../../config/devusage.md)  
+[Configuration module home](../../config.md)
diff --git a/common/config/DOC/config/devusage/struct.md b/common/config/DOC/config/devusage/struct.md
new file mode 100644
index 0000000000000000000000000000000000000000..236c1b4e0387f50add8ee03085ead2c568169c4a
--- /dev/null
+++ b/common/config/DOC/config/devusage/struct.md
@@ -0,0 +1,85 @@
+# `paramdef_t`structure
+It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L103). This structure is used by developers to describe parameters and by the configuration module to return parameters value. A pointer to a `paramdef_t` array is passed to `config_get` and `config_getlist` calls to instruct the configuration module what parameters it should read.
+
+| Fields     | Description                                                       | I/O |
+|:-----------|:------------------------------------------------------------------|----:|
+| `optname`    | parameter name, as used when looking for it in the config source, 63 bytes max (64 with trailing \0) | I |
+| `helstr`     | pointer to a C string printed when using --help on the command line | I |
+| `strptr` `strlistptr` `u8ptr` `i8ptr` `u16ptr` `i16ptr` `uptr` `iptr` `u64ptr` `i64ptr` `dblptr` `voidptr` | a pointer to a variable where the parameter value(s) will be returned. This field is an anonymous union, the supported pointer types have been built to avoid type mismatch warnings at compile time. | O |
+| `defstrval` `defstrlistval` `defuintval` `defintval` `defint64val` `defintarrayval` `defdblval` | this field is an anonymous union, it can be used to define the default value for the parameter. It is ignored if `PARAMFLAG_MANDATORY` is set in the `paramflags` field.| I |
+| `type` | Supported parameter types are defined as integer macros. Supported simple types are `TYPE_STRING`, parameter value is returned in `strptr` field,  `TYPE_INT8` `TYPE_UINT8` `TYPE_INT16` `TYPE_UINT16` `TYPE_INT32` `TYPE_UINT32` `TYPE_INT64` `TYPE_UINT64`, parameter value is returned in the corresponding uXptr or iXptr, `TYPE_MASK`, value is returned in `u32ptr`, `TYPE_DOUBLE` value is returned in `dblptr`, `TYPE_IPV4ADDR` value is returned in binary, network bytes order in `u32ptr` field. `TYPE_STRINGLIST`, `TYPE_INTARRAY` and `TYPE_UINTARRAY` are multiple values types. Multiple values are returned in respectively, `strlistptr`, `iptr` and `uptr` fields which then point to arrays. The  `numelt` field gives the number of item in the array. | I |
+| `numelt` | For `TYPE_STRING` where `strptr` points to a preallocated string, this field must contain the size in bytes of the available memory. For all multiple values types, this field contains the number of values in the value field.| I/O |
+| `chkPptr` | possible pointer to the structure containing the info used to check parameter values | I |
+| `processedvalue` | When `chkPptr` is not `ǸULL`, is used to return a value, computed from the original parameter, as read from the configuration source. | O |  
+  
+# `paramlist_def_t`structure
+It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L160). 
+It is used as an argument to `config_getlist` calls, to get values of multiple occurrences of group of parameters.  
+
+| Fields     | Description                                                       | I/O |
+|:-----------|:------------------------------------------------------------------|----:|
+| `listname`    | Name of the section containing the list,  63 bytes max (64 with trailing \0). It is used to prefix each paramater name when looking for its value. In the libconfig syntax, the parameter name full path build by the configuration module is: listname.[occurence index].optname. | I |
+| `paramarray`    | Pointer to an array of `ǹumelt` `paramdef_t` pointers. It is allocated by the configuration module and is used to return the parameters values. All input fields of each `paramdef_t` occurence are a copy of the `paramdef_t` argument passed to the `config_getlist` call. | O |
+| `numelt` | Number of items in the `paramarray` field | O |
+
+# `checkedparam_t` union
+It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L62). 
+This union of structures is used to provide a parameter checking mechanism. Each `paramdef_t` instance may include a pointer to a `checkedparam_t`structure which is then used by the configuration module to check the value it got from the config source.
+Each structure in the union provides one parameter verification method, which returns `-1` when the verification fails. Currently the following structures  are defined in the `checkedparam_t` union:
+
+| structure name    | Description                                                     | 
+|:-----------|:------------------------------------------------------------------|----:|
+| `s1` | check an integer against a list of authorized values |
+| `s1a` | check an integer against a list of authorized values and set the parameter value to another integer depending on the read value|
+| `s2` | check an integer against an authorized range, defined by its min and max value|
+| `s3` | check a string against a list of authorized values |
+| `s3a` | check a string against a list of authorized values and set the parameter value to an integer depending on the read value|
+| `s4` | generic structure, to be used to provide a specific, not defined in the configuration module, verification algorithm |
+
+each of these structures provide the required fields to perform the specified parameter check. The first field is a pointer to a function, taking one argument, the `paramdef_t` structure describing the parameter to be checked. This function is called by the configuration module, in the `config_get` call , after the parameter value has been set, it then uses the other fields of the structure to perform the check.
+The configuration module provides an implementation of the functions to be used to check parameters, qs described below.
+
+## `s1` structure
+| field    | Description                                                     | 
+|:-----------|:------------------------------------------------------------------|
+| `f1` | pointer to the checking function. Initialize to `config_check_intval` to use the config module implementation |
+| `okintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the authorized values |
+| `num_okintval` | number of used values in `okintval` |
+
+## `s1a` structure
+| field    | Description                                                     | 
+|:-----------|:------------------------------------------------------------------|
+| `f1a` | pointer to the checking function. Initialize to `config_check_modify_integer` to use the config module implementation |
+| `okintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the authorized values |
+| `setintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the values to be used for the parameter. The configuration module implementation set the parameter value to `setintval[i]` when the configured value is `okintval[i]` |
+| `num_okintval` | number of used values in `okintval` and `setintval` |
+
+## `s2` structure
+| field    | Description                                                     | 
+|:-----------|:------------------------------------------------------------------|
+| `f2` | pointer to the checking function. Initialize to `config_check_intrange` to use the config module implementation |
+| `okintrange` | array of 2 integers containing the min and max values for the parameter |
+
+## `s3` structure
+| field    | Description                                                     | 
+|:-----------|:------------------------------------------------------------------|
+| `f3` | pointer to the checking function. Initialize to `config_check_strval` to use the config module implementation |
+| `okstrval` | array of `CONFIG_MAX_NUMCHECKVAL` C string pointers containing the authorized values |
+| `num_okstrval` | number of used values in `okstrtval` |
+
+
+## `s3a` structure
+| field    | Description                                                     | 
+|:-----------|:------------------------------------------------------------------|
+| `f3a` | pointer to the checking function. Initialize to `config_checkstr_assign_integer` to use the config module implementation |
+| `okstrval` | array of `CONFIG_MAX_NUMCHECKVAL` C string pointers containing the authorized values |
+| `setintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the values to be used for the parameter. The configuration module implementation set the parameter value to `setintval[i]` when the configured value is `okstrval[i]` |
+| `num_okstrval` | number of used values in `okintval` and `setintval` |
+
+## `s4` and `s5` structures
+| field    | Description                                                     | 
+|:-----------|:------------------------------------------------------------------|
+| `f4`  or `f5` | pointer to the checking function. they are generic structures to be used  when no existing structure provides the required parameter verification. `f4` takes one argument, the `paramdef_t` structure corresponding to the parameter to be checked (`int  (*f4)(paramdef_t *param)`), `f5` taxes no argument (`void (*checkfunc)(void)`) |
+
+[Configuration module developer main page](../../config/devusage.md)  
+[Configuration module home](../../config.md)
diff --git a/common/config/DOC/config/rtusage.md b/common/config/DOC/config/rtusage.md
new file mode 100644
index 0000000000000000000000000000000000000000..19519ef0584e1706b2552fde62e1b9307b9b41f2
--- /dev/null
+++ b/common/config/DOC/config/rtusage.md
@@ -0,0 +1,52 @@
+ 
+   -O  is the only mandatory command line option to start the eNodeb softmodem (lte-softmodem executable), it is used to specify the configuration source with the associated parameters:  
+```bash
+$ ./lte-softmodem -O <configsource>:<parameter1>:<parameter2>:...
+```
+  The configuration module can also be used without a configuration source, ie to only parse the command line. In this case the -O switch is optional. This mode is used in the ue-softmodem executable and by the phy_simulators executables (ulsim, dlsim)  
+
+Currently the available config sources are:
+
+- **libconfig**: libconfig file. [libconfig file format](http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files) Parameter1 is the file path and parameter 2 can be used to specify the level of console messages printed by the configuration module.  
+```bash
+$ ./lte-softmodem -O libconfig:<config>:dbgl<debuglevel>
+```
+- **cmdlineonly**: command line only, the default mode for lte-uesoftmodem and the phy simiulators. In this case -O may be used to specify the config module debug level.
+
+The debug level is a mask:  
+*  bit 1: print parameters values 
+*  bit 2: print memory allocation/free performed by the config module
+*  bit 3: print command line processing messages
+*  bit 4: disable execution abort when parameters checking fails
+
+As a oai user, you may have to use bit 1 (dbgl1) , to check your configuration and get the full name of a parameter you would like to modify on the command line. Other bits are for developers usage, (dbgl7 will print all debug messages).  
+
+```bash
+$ ./lte-softmodem -O libconfig:<config>:dbgl1  
+```
+```bash
+$ ./lte-uesoftmodem -O cmdlineonly:dbgl1
+```
+For the lte-softmodem (the eNodeB) The config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level.  
+
+```bash
+$ ./lte-softmodem -O <config>
+```
+
+Configuration file parameters, except for the configuration file path,  can be specified in a **config** section in the configuration file:  
+
+```
+config:
+{
+    debugflags = 1;
+}
+```
+Configuration files examples can be found in the targets/PROJECTS/GENERIC-LTE-EPC/CONF sub-directory of the oai source tree. To minimize the number of configuration file to maintain, any parameter can also be specified on the command line. For example to modify the lte bandwidth to 20 MHz where the configuration file specifies 10MHz you can enter:
+
+```bash
+$ ./lte-softmodem -O <config> --eNBs.[0].component_carriers.[0].N_RB_DL 100
+```  
+
+As specified earlier, use the dbgl1 debug level to get the full name of a parameter you would like to modify on the command line.
+
+[Configuration module home](../config.md)
\ No newline at end of file
diff --git a/common/utils/DOC/loader.md b/common/utils/DOC/loader.md
new file mode 100644
index 0000000000000000000000000000000000000000..91ff0c02f0c3f9e4457f7b16a36169d2745109fc
--- /dev/null
+++ b/common/utils/DOC/loader.md
@@ -0,0 +1,17 @@
+# OAI shared library loader
+
+Shared libraries usage is modularization mechanism which provides the following advantages:
+1. Prevents including in the main executable code which is not used in a given configuration
+1. Provides flexibility, several implementation of a given functionality can be chosen at run-time, without any compilation step. For example you can build several devices (USRP, BladeFR, LimeSDR)  and choose which one you want to use on the command line or via the configuration.
+1.  Makes code evolution easier: as soon as the shared library interface is clearly defined, you can work on the functionality implemented in a shared library while regularly updating the other components of the code. You can decide to develop your own version of a functionality, decide to deliver it or not,  letting the user decide wwhat version he wants to use.
+
+The main drawback is a performance cost at init time, when loading libraries.
+
+
+## Documentation
+
+* [runtime usage](loader/rtusage.md)
+* [developer usage](loader/devusage.md)
+* [module architecture](loader/arch.md)
+
+[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
\ No newline at end of file
diff --git a/common/utils/DOC/loader/arch.md b/common/utils/DOC/loader/arch.md
new file mode 100644
index 0000000000000000000000000000000000000000..6fd1f47e7b94ec7faa8605aacaa4ec9191589bde
--- /dev/null
+++ b/common/utils/DOC/loader/arch.md
@@ -0,0 +1,7 @@
+# loader source files
+
+The oai shared library loader is implemented in two source files, located in [common/utils](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils)
+1. [load_module_shlib.c](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/load_module_shlib.c) contains the loader implementation
+1.  [load_module_shlib.h](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/load_module_shlib.h) is the loader include file containing both private and public data type definitions. It also contain API prototypes.  
+
+[loader home page](../loader.md)
\ No newline at end of file
diff --git a/common/utils/DOC/loader/devusage.md b/common/utils/DOC/loader/devusage.md
new file mode 100644
index 0000000000000000000000000000000000000000..4b82e18362153f7c62c1a90afc4cfaf4da94bef3
--- /dev/null
+++ b/common/utils/DOC/loader/devusage.md
@@ -0,0 +1,17 @@
+The configuration module objectives are 
+1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem.
+1. Use a common configuration API in all oai modules
+1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.  
+
+As a developer you may need to look at these sections:
+
+* [loading a shared library](devusage/loading.md)
+* [loader API](devusage/api.md) 
+* [loader public structures](devusage/struct.md)  
+
+Loader usage examples can be found in oai sources:  
+
+*  device and transport initialization code: [function `load_lib` in *targets/ARCH/COMMON/__common_lib.c__* ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/targets/ARCH/COMMON/common_lib.c#L91) 
+*  turbo encoder and decoder initialization: [function `load_codinglib`in *openair1/PHY/CODING/__coding_load.c__*](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/CODING/coding_load.c#L113)
+
+[loader home page](../loader.md)
diff --git a/common/utils/DOC/loader/devusage/api.md b/common/utils/DOC/loader/devusage/api.md
new file mode 100644
index 0000000000000000000000000000000000000000..21c2a1d25372e848f0723db766aafa4188edc24a
--- /dev/null
+++ b/common/utils/DOC/loader/devusage/api.md
@@ -0,0 +1,20 @@
+ Loader API is defined in the [common/utils/load_module_shlib.h](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/load_module_shlib.h) include file. 
+```c
+int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf)
+```
+* possibly initializes the loader, if it has not been already initialized 
+* Formats the full shared library path, using the `modname` argument and the loader `shlibpath` and `shlibversion`configuration parameters. 
+* loads the shared library, using the dlopen system call
+* looks for `< modname >_autoinit` symbol, using the `dlsym` system call and possibly call the corresponding function.
+* looks for `< modname >_checkbuildver` symbol, using the `dlsym` system call and possibly calls the corresponding function. If the return value of this call is `-1`, program execution is stopped. It is the responsibility of the shared library developer to implement or not a `< modname >_checkbuildver` function and to decide if a version mismatch is a fatal condition. The `< modname >_checkbuildver` function must match the `checkverfunc_t` function type. The first argument is the main executable version, as set  in the `PACKAGE_VERSION` macro defined in the [oai CMakeLists](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/cmake_targets/CMakeLists.txt#L218), around line 218. The second argument points to the shared library version which should be set  by the `< modname >_checkbuildver` function. 
+* If the farray pointer is null,  looks for `< modname >_getfarray` symbol, calls the corresponding function when the symbol is found. `< modname >_getfarray` takes one argument, a pointer to a  `loader_shlibfunc_t` array, and returns the number of items in this array, as defined by the `getfarrayfunc_t` type. The `loader_shlibfunc_t` array returned by the shared library must be fully filled (both `fname` and `fptr` fields).
+* looks for the `numf` function symbols listed in the `farray[i].fname` arguments and set the corresponding `farray[i].fptr`function pointers
+
+
+```c
+void * get_shlibmodule_fptr(char *modname, char *fname)
+```
+Returns a pointer to the symbol `fname`, defined in module `modname`, or `NULL` if the symbol is not found. 
+
+[loader home page](../../loader.md)  
+[loader developer home page](../devusage.md)
\ No newline at end of file
diff --git a/common/utils/DOC/loader/devusage/loading.md b/common/utils/DOC/loader/devusage/loading.md
new file mode 100644
index 0000000000000000000000000000000000000000..766bf854620779b9c20d688feb044273850b7b16
--- /dev/null
+++ b/common/utils/DOC/loader/devusage/loading.md
@@ -0,0 +1,56 @@
+Implementing a shared library dynamic load using the oai loader  is a two steps task:
+1.  define the `loader_shlibfunc_t` array, describing the list of externally available functions implemented in the library. This is the interface of the module.
+1.  Call the `load_module_shlib` function, passing it the previously defined array and the number of items in this array. The first argument to `load_module_shlib` is the name identifying the module, which is also used to format the corresponding library name, as described [here](loader/rtusage#shared-library-names)
+
+After a successful `load__module_shlib` call, the function pointer of each `loader_shlibfunc_t` array item has been set and can be used to call the corresponding function.
+
+Typical loader usage looks like:
+
+```c
+/* shared library loader include file */
+#include "common/utils/load_module_shlib.h"
+.............
+/* 
+  define and initialize the array, describing the list of functions 
+  implemented in "mymodule"
+*/
+  loader_shlibfunc_t mymodule_fdesc[2];
+  mymodule_fdesc[0].fname="mymodule_f1"; 
+  mymodule_fdesc[1].fname="mymodule_f2"; 
+
+/*
+ load the library, it's name must be libmymod.so. Configuration can be 
+ used to specify a specific path to look for libmymod.so. Configuration
+ can also specify a version, for example "V1", in this case the loader
+ will look for libmymodV1.so
+*/
+  ret=load_module_shlib("mymod",mymodule_fdesc, sizeof(mymodule_fdesc)/sizeof(loader_shlibfunc_t));
+  if (ret < 0) {
+       fprintf(stderr,"Library couldn't be loaded\n");
+  } else {
+/* 
+library has been loaded, we probably want to call some functions...
+*/
+  ret=((funcf1_t)mymodule_fdesc[0].fptr)();
+
+..................
+/* 
+later and/or somewhere else in the code you may want to call function "mymodule_f2"
+You can use the loader get_shlibmodule_fptr(char *modname, char *fname) function
+to retrieve the pointer to that function
+*/
+funcf2_t *f2;
+int ret;
+int intarg1;
+char *strarg;
+........................
+f2 = (funcf2_t)get_shlibmodule_fptr("mymodule", "mymodule_f2")
+if (f2 != NULL) {
+  ret = f2(intarg1,strarg);
+}
+...............
+```
+When loading a shared library the loader looks for a symbol named `< module name > _autoinit` and, if it finds it, calls it. The `autoinit` function is called without any argument and the returned value, if any, is not tested. 
+
+[loader home page](../loader.md)  
+[loader developer home page](../../loader/devusage.md)
\ No newline at end of file
diff --git a/common/utils/DOC/loader/devusage/struct.md b/common/utils/DOC/loader/devusage/struct.md
new file mode 100644
index 0000000000000000000000000000000000000000..17504f3866fd8ebef73454c9d9c7b21841084fe2
--- /dev/null
+++ b/common/utils/DOC/loader/devusage/struct.md
@@ -0,0 +1,10 @@
+# `loader_shlibfunc_t`structure
+It is defined in include file [ common/util/load_module_shlib.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/load_module_shlib.h#L38). This structure is used  to list the symbols that should be searched by the loader when calling the `load_module_shlib` function.
+
+| Fields     | Description                                                       | I/O |
+|:-----------|:------------------------------------------------------------------|----:|
+| `fname`    | symbol name, is passed to the [`dlsym`](http://man7.org/linux/man-pages/man3/dlsym.3.html) system call performed by the loader to get a pointer to the symbol | I |
+| `fptr`     | pointer to the symbol name, set by the loader. `fptr` is defined as a `int (*fptr)(void)` function type | O |
+
+[loader home page](../../loader.md)  
+[loader developer home page](../devusage.md)
\ No newline at end of file
diff --git a/common/utils/DOC/loader/rtusage.md b/common/utils/DOC/loader/rtusage.md
new file mode 100644
index 0000000000000000000000000000000000000000..bf87316e13483fc7d42f47b16ed2f165878a2a34
--- /dev/null
+++ b/common/utils/DOC/loader/rtusage.md
@@ -0,0 +1,50 @@
+## shared library names
+Shared library full names are built by the loader using the format:
+>  < *path* >/lib< *module name* >< *module version* >.so
+
+1.  the < *module name* > is defined at development time, it comes from the `modname`  argument of the `load_module_shlib` call.
+1.  the < *module version* > and < *path* > optional  parameters, are defined at run-time, depending on the configuration.
+
+## loader parameters
+The loader is using the [configuration module](../../../config/DOC/config.md), and defines global and per library parameters. Global parameters must be specified under the **loader** section and library specific parameters under a **loader.<*module name*>** section. Module specific parameters override the global parameters. 
+### Global loader parameters
+| name | type | default | description |
+|:---:|:---:|:---:|:----|
+| `shlibpath` | `string of char` | `""` | directory path used to look for shared libraries, may be superseded by the library specific `shlibpath`.|
+| `maxshlibs` | `integer` | 10 | Maximum number of shared libraries the loader can  manage. |
+
+### library specific loader parameters
+| name | type | default | description |
+|:---:|:---:|:---:|:----|
+| `shlibpath` | `string of char` | `""` | directory path used to look for this shared library.|
+| `shlibversion` | `string of char` | `""` | version to be used to load this shared library.|
+
+### loader configuration examples
+
+The following configuration file example just reproduce the default loader parameters:
+```c
+loader :
+{
+   shlibpath = "./";
+   maxshlibs = 10;
+   liboai_device :
+      {
+      shlibpath = "./";
+      shlibversion = "";
+      }
+};
+```
+If you want to load a device called *liboai_device_USRP.so* without writting a specific configuration, you can start the softmodem using the following command:
+> ./lte-softmodem -O libconfig:/usr/local/oai/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf:dbgl5  --loader.oai_device.shlibversion _USRP
+
+With this latest example, nn the softmodem logs, you can check that the right device library has been loaded:
+```bash
+[LIBCONFIG] loader.oai_device.shlibpath not found in /usr/local/oai/develop-nb-iot-merge/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf 
+[LIBCONFIG] loader.oai_device.shlibversion set to default value ""
+[LIBCONFIG] loader.oai_device: 1/2 parameters successfully set, (1 to default value)
+[CONFIG] shlibversion set to  _USRP from command line
+[CONFIG] loader.oai_device 1 options set from command line
+
+```
+
+[loader home page](../loader.md)
\ No newline at end of file
diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c
index d6dd97e34fc13e3dc1e807a67afdaf82971d3791..4f0f379f12b4f670d2636ec29702603378fda218 100644
--- a/common/utils/LOG/log.c
+++ b/common/utils/LOG/log.c
@@ -39,10 +39,6 @@
 #include "vcd_signal_dumper.h"
 #include "assertions.h"
 
-#if defined(ENABLE_ITTI)
-# include "intertask_interface.h"
-#endif
-
 # include <pthread.h>
 # include <string.h>
 #include  <linux/prctl.h>
diff --git a/common/utils/T/tracer/macpdu2wireshark.c b/common/utils/T/tracer/macpdu2wireshark.c
index f65fdf34c328609487946693de81efb1a41fe104..d9bcb8b7f5f255cca66ba4a36ffa561687aa0baf 100644
--- a/common/utils/T/tracer/macpdu2wireshark.c
+++ b/common/utils/T/tracer/macpdu2wireshark.c
@@ -14,10 +14,10 @@
 #define DEFAULT_IP   "127.0.0.1"
 #define DEFAULT_PORT 9999
 
-#define NO_PREAMBLE -1
+#define DEFAULT_LIVE_IP   "127.0.0.1"
+#define DEFAULT_LIVE_PORT 2021
 
-int no_sib = 0;
-int no_mib = 0;
+#define NO_PREAMBLE -1
 
 typedef struct {
   int socket;
@@ -46,6 +46,15 @@ typedef struct {
   int rar_frame;
   int rar_subframe;
   int rar_data;
+  /* config */
+  int no_mib;
+  int no_sib;
+  int max_mib;
+  int max_sib;
+  int live;
+  /* runtime vars */
+  int cur_mib;
+  int cur_sib;
 } ev_data;
 
 void trace(ev_data *d, int direction, int rnti_type, int rnti,
@@ -104,7 +113,11 @@ void dl(void *_d, event e)
 {
   ev_data *d = _d;
 
-  if (e.e[d->dl_rnti].i == 0xffff && no_sib) return;
+  if (e.e[d->dl_rnti].i == 0xffff) {
+    if (d->no_sib) return;
+    if (d->max_sib && d->cur_sib == d->max_sib) return;
+    d->cur_sib++;
+  }
 
   trace(d, DIRECTION_DOWNLINK,
         e.e[d->dl_rnti].i != 0xffff ? C_RNTI : SI_RNTI, e.e[d->dl_rnti].i,
@@ -117,7 +130,9 @@ void mib(void *_d, event e)
 {
   ev_data *d = _d;
 
-  if (no_mib) return;
+  if (d->no_mib) return;
+  if (d->max_mib && d->cur_mib == d->max_mib) return;
+  d->cur_mib++;
 
   trace(d, DIRECTION_DOWNLINK, NO_RNTI, 0,
         e.e[d->mib_frame].i, e.e[d->mib_subframe].i,
@@ -269,9 +284,18 @@ void usage(void)
 "    -ip <IP address>          send packets to this IP address (default %s)\n"
 "    -p <port>                 send packets to this port (default %d)\n"
 "    -no-mib                   do not report MIB\n"
-"    -no-sib                   do not report SIBs\n",
+"    -no-sib                   do not report SIBs\n"
+"    -max-mib <n>              report at maximum n MIB\n"
+"    -max-sib <n>              report at maximum n SIBs\n"
+"    -live                     run live\n"
+"    -live-ip <IP address>     tracee's IP address (default %p)\n"
+"    -live-port <por>          tracee's port (default %d)\n"
+"-i and -live are mutually exclusive options. One of them must be provided\n"
+"but not both.\n",
   DEFAULT_IP,
-  DEFAULT_PORT
+  DEFAULT_PORT,
+  DEFAULT_LIVE_IP,
+  DEFAULT_LIVE_PORT
   );
   exit(1);
 }
@@ -288,6 +312,9 @@ int main(int n, char **v)
   ev_data d;
   char *ip = DEFAULT_IP;
   int port = DEFAULT_PORT;
+  char *live_ip = DEFAULT_LIVE_IP;
+  int live_port = DEFAULT_LIVE_PORT;
+  int live = 0;
 
   memset(&d, 0, sizeof(ev_data));
 
@@ -299,8 +326,17 @@ int main(int n, char **v)
       { if (i > n-2) usage(); input_filename = v[++i]; continue; }
     if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
     if (!strcmp(v[i], "-p")) {if(i>n-2)usage(); port=atoi(v[++i]); continue; }
-    if (!strcmp(v[i], "-no-mib")) { no_mib = 1; continue; }
-    if (!strcmp(v[i], "-no-sib")) { no_sib = 1; continue; }
+    if (!strcmp(v[i], "-no-mib")) { d.no_mib = 1; continue; }
+    if (!strcmp(v[i], "-no-sib")) { d.no_sib = 1; continue; }
+    if (!strcmp(v[i], "-max-mib"))
+      { if (i > n-2) usage(); d.max_mib = atoi(v[++i]); continue; }
+    if (!strcmp(v[i], "-max-sib"))
+      { if (i > n-2) usage(); d.max_sib = atoi(v[++i]); continue; }
+    if (!strcmp(v[i], "-live")) { live = 1; continue; }
+    if (!strcmp(v[i], "-live-ip"))
+      { if (i > n-2) usage(); live_ip = v[++i]; continue; }
+    if (!strcmp(v[i], "-live-port"))
+      { if (i > n-2) usage(); live_port = atoi(v[++i]); continue; }
     usage();
   }
 
@@ -309,19 +345,47 @@ int main(int n, char **v)
     exit(1);
   }
 
-  if (input_filename == NULL) {
-    printf("ERROR: provide an input file (-i)\n");
+  if (input_filename == NULL && live == 0) {
+    printf("ERROR: provide an input file (-i) or run live (-live)\n");
+    exit(1);
+  }
+
+  if (input_filename != NULL && live != 0) {
+    printf("ERROR: cannot use both -i and -live\n");
     exit(1);
   }
 
-  in = open(input_filename, O_RDONLY);
-  if (in == -1) { perror(input_filename); return 1; }
+  if (live == 0) {
+    in = open(input_filename, O_RDONLY);
+    if (in == -1) { perror(input_filename); return 1; }
+  } else
+    in = connect_to(live_ip, live_port);
 
   database = parse_database(database_filename);
   load_config_file(database_filename);
 
   h = new_handler(database);
 
+  if (live) {
+    char mt = 1;
+    int  number_of_events = number_of_ids(database);
+    int *is_on = calloc(number_of_events, sizeof(int));
+    if (is_on == NULL) { printf("ERROR: out of memory\n"); exit(1); }
+    on_off(database, "ENB_MAC_UE_UL_PDU_WITH_DATA", is_on, 1);
+    on_off(database, "ENB_MAC_UE_DL_PDU_WITH_DATA", is_on, 1);
+    on_off(database, "ENB_PHY_MIB", is_on, 1);
+    on_off(database, "ENB_PHY_INITIATE_RA_PROCEDURE", is_on, 1);
+    on_off(database, "ENB_MAC_UE_DL_RAR_PDU_WITH_DATA", is_on, 1);
+    /* activate selected traces */
+    if (socket_send(in, &mt, 1) == -1 ||
+        socket_send(in, &number_of_events, sizeof(int)) == -1 ||
+        socket_send(in, is_on, number_of_events * sizeof(int)) == -1) {
+      printf("ERROR: socket_send failed\n");
+      exit(1);
+    }
+    free(is_on);
+  }
+
   ul_id = event_id_from_name(database, "ENB_MAC_UE_UL_PDU_WITH_DATA");
   dl_id = event_id_from_name(database, "ENB_MAC_UE_DL_PDU_WITH_DATA");
   mib_id = event_id_from_name(database, "ENB_PHY_MIB");
diff --git a/common/utils/telnetsrv/DOC/telnetaddcmd.md b/common/utils/telnetsrv/DOC/telnetaddcmd.md
new file mode 100644
index 0000000000000000000000000000000000000000..ef5af3fb7ee34219d9d2d44c197cbcfe0a263824
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetaddcmd.md
@@ -0,0 +1,116 @@
+# code example of adding a command to the telnet server
+
+The following example is extracted from [the oai `openair1/PHY/CODING/coding_load.c` file](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/CODING/coding_load.c).
+
+```c
+/* 
+include the telnet server data structures and API definitions
+*/
+#include "common/utils/telnetsrv/telnetsrv.h" 
+
+
+/*
+define the null terminated array of telnetshell_cmddef_t structures
+which map each sub-command string to a function implementing it. 
+you may also provide a help string which will be printed when
+the global help command is used. The prototype for the function
+implementing sub commands must match the `cmdfunc_t` type defined
+in `telnetsrv.h`
+*/
+static int coding_setmod_cmd(char *buff, int debug, telnet_printfunc_t prnt);
+static telnetshell_cmddef_t coding_cmdarray[] = {
+   {"mode","[sse,avx2,stdc,none]",coding_setmod_cmd},
+   {"","",NULL},
+};
+
+/*
+define the null terminated list of telnetshell_vardef_t structures defining the
+variables that can be set and get using the pre-defined get and set command 
+of the telnet server
+*/
+telnetshell_vardef_t coding_vardef[] = {
+{"maxiter",TELNET_VARTYPE_INT32,&max_turbo_iterations},
+{"",0,NULL}
+};
+.................
+/*
+ look for telnet server, if it is loaded, add the coding commands to it 
+ we use the shared library loader API to check the telnet server availibility
+The telnet server TELNET_ADDCMD_FNAME function takes three arguments:
+1.  The name of the telnet command to be added, here "coding"
+1.  The `coding_cmdarray` list of "coding" sub-commands we defined earlier
+1.  The `coding_varde f`list of variables we defined earlier
+*/
+     add_telnetcmd_func_t addcmd = (add_telnetcmd_func_t)get_shlibmodule_fptr("telnetsrv", TELNET_ADDCMD_FNAME);
+     if (addcmd != NULL) {
+         addcmd("coding",coding_vardef,coding_cmdarray); 
+.......
+/* 
+  functions implementing the "coding mode" sub command, as defined in
+  the `coding_cmdarray` passed earlier to the TELNET_ADDCMD_FNAME function.
+  This function will be called by the telnet server, when the `coding_cmdarray`
+  command is received from the telnet client
+*/
+int coding_setmod_cmd(char *buff, int debug, telnet_printfunc_t prnt)
+{
+  /* 
+  1. buff argument is an input argument, pointer to the string received
+  from the telnet client, the command and sub-command parts are removed
+  In this case it points after "coding setmod" and is of no use as
+  we don't have second level sub-commands.  
+  1. debug argument is an input argument set by the telnet server
+  1. prnt arguments is also an input argument, a function pointer, to be used 
+  in place of printf to print messages on the telnet client interface. As this function
+  is called by the telnet server stdout points to the main executable console,  
+  */
+   if (debug > 0)
+       prnt( "coding_setmod_cmd received %s\n",buff);
+
+      if (strcasestr(buff,"sse") != NULL) {
+         decoding_setmode(MODE_DECODE_SSE);
+      } else if (strcasestr(buff,"avx2") != NULL) {
+         decoding_setmode(MODE_DECODE_AVX2);
+      } else if (strcasestr(buff,"stdc") != NULL) {
+         decoding_setmode(MODE_DECODE_C);
+      } else if (strcasestr(buff,"none") != NULL) {
+         decoding_setmode(MODE_DECODE_NONE);
+      } else {
+          prnt("%s: wrong setmod parameter...\n",buff);
+      }
+   prnt("Coding and decoding current mode: %s\n",modedesc[curmode]);
+   return 0;
+}
+
+..............
+
+```
+# telnet server API
+
+```c
+int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd)
+```
+Add a command and the `cmd` list of sub-commands to the telnet server. After a successful call to `add_telnetcmd` function, the telnet server calls the function defined for each sub-commands in the null terminated `cmd` array, when the character string received from the telnet client matches the command and sub-command strings.  
+Also adds the list of variables described in the `var` array to the list of variable which can be set and read.  
+The function returns -1 if one argument is NULL.  
+The telnet server is dynamically loaded, to use  the `add_telnetcmd` function, the shared library loader API should be used to check the availability of the telnet server and retrieve it's address, as shown in [the example at the top of this page](telnetaddcmd.md#code-example-of-adding-a-command-to-the-telnet-server).  
+
+# telnet server public data types
+## `telnetshell_vardef_t`structure  
+ This structure is used by developers to describe the variables that can be set or read using the get,set and getall sub-commands.
+
+| Fields     | type |Description                                                       | 
+|:-----------|:------:|:-----------------------|
+| `varname`    | `char[TELNET_CMD_MAXSIZE]`  | variable name, as specified when using the get and set commands. |
+| `vartype`     | `char` |  Defines the type of the variable pointed by the `varvalptr`field. Supported values: TELNET_VARTYPE_INT32  TELNET_VARTYPE_INT16 TELNET_VARTYPE_INT64  TELNET_VARTYPE_STRING   TELNET_VARTYPE_DOUBLE |
+| `varvalptr`     | `void*` |  Defines the type of the variable pointed by the `varvalptr`field |
+
+## `telnetshell_cmddef_t`structure  
+ This structure is used by developers to describe the first level sub-commands to be added to the telnet server.
+
+| Fields     | type |Description                                                       | 
+|:-----------|:------:|:-----------------------|
+| `cmdname`    | `char[TELNET_CMD_MAXSIZE]`  | command name, as tested by the telnet server to check it should call the `cmdfunc` function  |
+| `helpstr`     | `char[TELNET_HELPSTR_SIZE]` |  character string to print when the elp`command is received from the telnet client |
+| `cmdfunc`     | `cmdfunc_t` |  pointer to the function implementing the `cmdname` sub command. |
+
+[oai telnet server home](telnetsrv.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnetarch.md b/common/utils/telnetsrv/DOC/telnetarch.md
new file mode 100644
index 0000000000000000000000000000000000000000..f31a51b352b06bf98961d96fc97b0edf446fd3a5
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetarch.md
@@ -0,0 +1,21 @@
+# telnet server principles
+
+The oai telnet server is implemented in a shared library to be loaded by the [oai shared library loader](loader). The implementation includes a `telnetsrv_autoinit` function which is automatically called at load time, starts the telnet server and registers a first set of commands, which are delivered with the server (telnet, softmodem, loader).
+
+Currently the telnet server only supports one user connection. The same dedicated thread is used to wait for a user connection and process the input received from this connection.
+
+The telnet server provides an API which can be used by any oai component to add new CLI commands to the server. A pre-defined  command can be used to get or set a list of variables. 
+
+
+ 
+# telnet server source files
+
+telnet server source files are located in [common/utils/telnetsrv](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/telnetsrv)
+
+1. [telnetsrv.c](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/telnetsrv/telnetsrv.c) contains the telnet server implementation, including the implementation of the telnet CLI command. 
+1.  [telnetsrv.h](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/telnetsrv/telnetsrv.h) is the telnet server include file containing both private and public data type definitions. It also contains API prototypes for functions that are used to register a new command in the server.
+1.  `telnetsrv\_\<XXX\>.c`: implementation of \<XXX\> CLI command which are delivered with the telnet server.
+1.  `telnetsrv\_\<XXX\>.h`: include file for the implementation of XXX CLI command. Usually included only in the corresponding `.c`file
+1.  [telnetsrv_CMakeLists.txt](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/telnetsrv/telnetsrv_CMakeLists.txt): CMakelists file containing the cmake instructions to build the telnet server. this file is included in the [global oai CMakelists](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/cmake_targets/CMakeLists.txt).
+
+[oai telnet server home](telnetsrv.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnetgetset.md b/common/utils/telnetsrv/DOC/telnetgetset.md
new file mode 100644
index 0000000000000000000000000000000000000000..e0b2c90d79cd787f3316611d2c7bc7d250b4e59b
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetgetset.md
@@ -0,0 +1,21 @@
+getall command can be used to get the list of variables that can bet set or get from the telnet shell. Knowing the names of the variables they can then be set or read. Setting a variable is not always relevant, the telnet server doesn't provide a mechanism to restrict the set command.
+
+```bash
+softmodem> telnet getall
+telnet, debug = 0
+telnet, prio = 0
+telnet, loopc = 10
+telnet, loopd = 5000
+telnet, phypb = 65000
+telnet, hsize = 50
+telnet, hfile = "oaitelnet.history"
+softmodem> telnet set loopc 100
+telnet, loopc set to 
+100
+softmodem> telnet get loopc
+telnet, loopc = 100
+softmodem> 
+
+```
+[oai telnetserver home](telnetsrv.md)  
+[oai telnetserver usage home](telnetusage.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnethelp.md b/common/utils/telnetsrv/DOC/telnethelp.md
new file mode 100644
index 0000000000000000000000000000000000000000..63183fb61189430149b6e4faac78f303090abd48
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnethelp.md
@@ -0,0 +1,57 @@
+# oai telnet server global help
+
+``` bash
+alblf@at8020-a:~$ telnet 10.133.10.77 9090
+Trying 10.133.10.77...
+Connected to 10.133.10.77.
+Escape character is '^]'.
+
+softmodem> help
+   module 0 = telnet:
+      telnet [get set] debug <value>
+      telnet [get set] prio <value>
+      telnet [get set] loopc <value>
+      telnet [get set] loopd <value>
+      telnet [get set] phypb <value>
+      telnet [get set] hsize <value>
+      telnet [get set] hfile <value>
+      telnet redirlog [here,file,off]
+      telnet param [prio]
+      telnet history [list,reset]
+   module 1 = softmodem:
+      softmodem show loglvl|thread|config
+      softmodem log (enter help for details)
+      softmodem thread (enter help for details)
+      softmodem exit 
+   module 2 = phy:
+      phy disp [phycnt,uedump,uestat UE<x>]
+   module 3 = loader:
+      loader [get set] mainversion <value>
+      loader [get set] defpath <value>
+      loader [get set] maxshlibs <value>
+      loader [get set] numshlibs <value>
+      loader show [params,modules]
+   module 4 = coding:
+      coding [get set] maxiter <value>
+      coding mode [sse,avx2,stdc,none]
+softmodem> 
+```  
+
+# oai telnet server, specific commands help  
+
+``` bash
+softmodem> softmodem log help
+ log sub commands: 
+ show:  		     display current log configuration 
+ online, noonline:	     enable or disable console logs 
+ enable, disable id1-id2:    enable or disable logs for components index id1 to id2 
+ level_<level> id1-id2:      set log level to <level> for components index id1 to id2 
+ level_<verbosity> id1-id2:  set log verbosity to <verbosity> for components index id1 to id2 
+use the show command to get the values for <level>, <verbosity> and the list of component indexes that can be used for id1 and id2 
+softmodem>
+
+
+```
+
+[oai telnetserver home](telnetsrv.md)  
+[oai telnetserver usage home](telnetusage.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnethist.md b/common/utils/telnetsrv/DOC/telnethist.md
new file mode 100644
index 0000000000000000000000000000000000000000..d938435a2405c474fc29ee6b2459f5843b7e5086
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnethist.md
@@ -0,0 +1,44 @@
+The telnet server implements a simple history system
+```bash
+softmodem> telnet history list
+1: telnet history list
+2: telnet history list
+3: help
+4: loader show modules
+5: softmodem show loglvl
+6: help
+7: telnet history
+8: help
+9: telnet history list
+10: help
+11: loader show modules
+12: softmodem show loglvl
+13: softmodem log help
+14: softmodem log disable 0-35
+15: softmodem log show
+16: help
+17: telnet history list
+18: loader show modules
+19: softmodem thread show
+20: help
+21: softmodem thread help
+22: softmodem log show
+23: softmodem log help
+24: softmodem log level_error 0-4
+25: loader show modules
+26: loader show config
+27: help
+28: loader show params
+29: loader show modules
+softmodem> !28
+softmodem>  loader show params
+loader parameters:
+   Main executable build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
+   Default shared lib path: ""
+   Max number of shared lib : 10
+softmodem>
+
+```
+
+[oai telnetserver home](telnetsrv.md)  
+[oai telnetserver usage home](telnetusage.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnetloader.md b/common/utils/telnetsrv/DOC/telnetloader.md
new file mode 100644
index 0000000000000000000000000000000000000000..9250524989a67da5ea8a22108b3aeb7f86cd77a6
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetloader.md
@@ -0,0 +1,47 @@
+loader command can be used to check loader configuration parameters and the list of loaded shared libraries and for each library the list of available functions.
+
+```bash
+softmodem> loader show params
+loader parameters:
+   Main executable build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
+   Default shared lib path: ""
+   Max number of shared lib : 10
+softmodem> loader show modules
+4 shared lib have been dynamicaly loaded by the oai loader
+   Module 0: telnetsrv
+       Shared library build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
+       Shared library path: "libtelnetsrv.so"
+       1 function pointers registered:
+          function 0 add_telnetcmd at 0x7ff8b772a2b0
+   Module 1: NB_IoT
+       Shared library build version: ""
+       Shared library path: "libNB_IoT.so"
+       1 function pointers registered:
+          function 0 RCConfig_NbIoT at 0x7ff8b6b1b390
+   Module 2: coding
+       Shared library build version: "Branch: develop-telnet-loader-fixes Abrev. Hash: e56ae69 Date: Fri Mar 9 16:47:08 2018 +0100"
+       Shared library path: "libcoding.so"
+       13 function pointers registered:
+          function 0 init_td8 at 0x7ff8adde63a0
+          function 1 init_td16 at 0x7ff8adde9760
+          function 2 init_td16avx2 at 0x7ff8addec050
+          function 3 phy_threegpplte_turbo_decoder8 at 0x7ff8adde6780
+          function 4 phy_threegpplte_turbo_decoder16 at 0x7ff8adde9a90
+          function 5 phy_threegpplte_turbo_decoder_scalar at 0x7ff8addef4a0
+          function 6 phy_threegpplte_turbo_decoder16avx2 at 0x7ff8addec530
+          function 7 free_td8 at 0x7ff8adde61d0
+          function 8 free_td16 at 0x7ff8adde9590
+          function 9 free_td16avx2 at 0x7ff8addebe80
+          function 10 threegpplte_turbo_encoder_sse at 0x7ff8adde45b0
+          function 11 threegpplte_turbo_encoder at 0x7ff8adde4a30
+          function 12 init_encoder_sse at 0x7ff8adde49d0
+   Module 3: oai_device
+       Shared library build version: ""
+       Shared library path: "liboai_device_usrp.so"
+       1 function pointers registered:
+          function 0 device_init at 0x7ff8ac16a7a0
+softmodem>
+```
+
+[oai telnetserver home](telnetsrv.md)  
+[oai telnetserver usage home](telnetusage.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnetlog.md b/common/utils/telnetsrv/DOC/telnetlog.md
new file mode 100644
index 0000000000000000000000000000000000000000..7c1d4f03840a772062aea56eb4f3ca6cfeab1736
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetlog.md
@@ -0,0 +1,95 @@
+The log command can be used to get the status of the log parameters and to dynamically modify these parameters. The log command has its own [help](telnethelp.md#oai-telnet-server-specific-commands-help)
+```bash
+softmodem>  softmodem log disable 0-35
+log level/verbosity  comp 0 PHY set to info / medium (disabled)
+log level/verbosity  comp 1 MAC set to info / medium (disabled)
+log level/verbosity  comp 2 EMU set to info / medium (disabled)
+log level/verbosity  comp 3 OCG set to info / medium (disabled)
+log level/verbosity  comp 4 OMG set to info / medium (disabled)
+log level/verbosity  comp 5 OPT set to info / medium (disabled)
+log level/verbosity  comp 6 OTG set to info / medium (disabled)
+log level/verbosity  comp 7 OTG_LATENCY set to info / medium (disabled)
+log level/verbosity  comp 8 OTG_LATENCY_BG set to info / medium (disabled)
+log level/verbosity  comp 9 OTG_GP set to info / medium (disabled)
+log level/verbosity  comp 10 OTG_GP_BG set to info / medium (disabled)
+log level/verbosity  comp 11 OTG_JITTER set to info / medium (disabled)
+log level/verbosity  comp 12 RLC set to info / medium (disabled)
+log level/verbosity  comp 13 PDCP set to info / medium (disabled)
+log level/verbosity  comp 14 RRC set to info / medium (disabled)
+log level/verbosity  comp 15 NAS set to info / medium (disabled)
+log level/verbosity  comp 16 PERF set to info / medium (disabled)
+log level/verbosity  comp 17 OIP set to info / medium (disabled)
+log level/verbosity  comp 18 CLI set to info / medium (disabled)
+log level/verbosity  comp 19 MSC set to info / medium (disabled)
+log level/verbosity  comp 20 OCM set to info / medium (disabled)
+log level/verbosity  comp 21 UDP set to info / medium (disabled)
+log level/verbosity  comp 22 GTPV1U set to info / medium (disabled)
+log level/verbosity  comp 23 comp23? set to info / medium (disabled)
+log level/verbosity  comp 24 S1AP set to info / medium (disabled)
+log level/verbosity  comp 25 SCTP set to info / medium (disabled)
+log level/verbosity  comp 26 HW set to info / medium (disabled)
+log level/verbosity  comp 27 OSA set to info / medium (disabled)
+log level/verbosity  comp 28 eRAL set to info / medium (disabled)
+log level/verbosity  comp 29 mRAL set to info / medium (disabled)
+log level/verbosity  comp 30 ENB_APP set to info / medium (disabled)
+log level/verbosity  comp 31 FLEXRAN_AGENT set to info / medium (disabled)
+log level/verbosity  comp 32 TMR set to info / medium (disabled)
+log level/verbosity  comp 33 USIM set to info / medium (disabled)
+log level/verbosity  comp 34 LOCALIZE set to info / medium (disabled)
+log level/verbosity  comp 35 RRH set to info / medium (disabled)
+softmodem> softmodem log show
+Available log levels: 
+   emerg alert crit error warn notice info debug file trace 
+Available verbosity: 
+   none low medium high full 
+component                 verbosity  level  enabled
+00               PHY:    medium      info  N
+01               MAC:    medium      info  N
+02               EMU:    medium      info  N
+03               OCG:    medium      info  N
+04               OMG:    medium      info  N
+05               OPT:    medium      info  N
+06               OTG:    medium      info  N
+07       OTG_LATENCY:    medium      info  N
+08    OTG_LATENCY_BG:    medium      info  N
+09            OTG_GP:    medium      info  N
+10         OTG_GP_BG:    medium      info  N
+11        OTG_JITTER:    medium      info  N
+12               RLC:    medium      info  N
+13              PDCP:    medium      info  N
+14               RRC:    medium      info  N
+15               NAS:    medium      info  N
+16              PERF:    medium      info  N
+17               OIP:    medium      info  N
+18               CLI:    medium      info  N
+19               MSC:    medium      info  N
+20               OCM:    medium      info  N
+21               UDP:    medium      info  N
+22            GTPV1U:    medium      info  N
+23           comp23?:    medium      info  N
+24              S1AP:    medium      info  N
+25              SCTP:    medium      info  N
+26                HW:    medium      info  N
+27               OSA:    medium      info  N
+28              eRAL:    medium      info  N
+29              mRAL:    medium      info  N
+30           ENB_APP:    medium      info  N
+31     FLEXRAN_AGENT:    medium      info  N
+32               TMR:    medium      info  N
+33              USIM:    medium      info  N
+34          LOCALIZE:    medium      info  N
+35               RRH:    medium      info  N
+36           comp36?:    medium      info  Y
+37            LOADER:    medium     alert  Y
+softmodem> softmodem log level_error 0-4
+log level/verbosity  comp 0 PHY set to error / medium (enabled)
+log level/verbosity  comp 1 MAC set to error / medium (enabled)
+log level/verbosity  comp 2 EMU set to error / medium (enabled)
+log level/verbosity  comp 3 OCG set to error / medium (enabled)
+log level/verbosity  comp 4 OMG set to error / medium (enabled)
+softmodem> exit
+Connection closed by foreign host.
+```  
+
+[oai telnetserver home](telnetsrv.md)  
+[oai telnetserver usage home](telnetusage.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnetloop.md b/common/utils/telnetsrv/DOC/telnetloop.md
new file mode 100644
index 0000000000000000000000000000000000000000..f045e8a7161d150edad0b58f798f64e1ff2cf176
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetloop.md
@@ -0,0 +1,40 @@
+The telnet server includes a **_loop_** command that can be used to iterate a given command. The number of iterations and the delay, in ms between two iterations can be modified, as shown in the following example:  
+
+```bash
+softmodem> telnet get loopc
+telnet, loopc = 10
+softmodem> telnet get loopd
+telnet, loopd = 2000
+softmodem> telnet set loopd 1000
+telnet, loopd set to 
+1000
+softmodem> loop softmodem show thread
+                  2018-03-27 17:58:49.000 2/10
+  id          name            state   USRmod    KRNmod  prio nice   vsize   proc pol 
+
+     3946        lte-softmodem   S       20005      9440  20   0 236560384   2    0 other 
+
+     3946        lte-softmodem   S           7        95  20   0 236560384   2    0 other 
+     3948               telnet   R           0         0  20   0 236560384   2    0 other 
+     3949        ITTI acceptor   S           2         9  20   0 236560384   2    0 other 
+     3951              ITTI 12   S           2         2  20   0 236560384   7    0 other 
+     3952              ITTI 11   S           0         0  20   0 236560384   0    0 other 
+     3953               ITTI 9   S           0         0  20   0 236560384   1    0 other 
+     3954               ITTI 7   S           0         0  20   0 236560384   7    0 other 
+     3955               ITTI 8   S           0         0  20   0 236560384   7    0 other 
+     3956               ITTI 4   S          35         0  20   0 236560384   2    0 other 
+     3957            ru_thread   S       15366      3072 -10   0 236560384   0    2 rt: rr 
+     3958      ru_thread_prach   S           0         0 -10   0 236560384   7    1 rt: fifo 
+     3959           fep_thread   S        1874       123 -10   0 236560384   5    1 rt: fifo 
+     3960         feptx_thread   S        1554       101 -10   0 236560384   7    1 rt: fifo 
+     3969            ru_thread   S           0         0 -10   0 236560384   0    2 rt: rr 
+     3970            ru_thread   S        1313      5522 -10   0 236560384   5    2 rt: rr 
+     3971            ru_thread   S           4         6 -10   0 236560384   1    2 rt: rr 
+     3972        lte-softmodem   S         318         9 -10   0 236560384   7    1 rt: fifo 
+     3973        lte-softmodem   S           6        13 -10   0 236560384   4    1 rt: fifo 
+
+```  
+A **_loop_** command can be interrupted by pressing the  **_enter_** key till getting the  prompt. 
+
+[oai telnetserver home](telnetsrv.md)  
+[oai telnetserver usage home](telnetusage.md)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnetsrv.md b/common/utils/telnetsrv/DOC/telnetsrv.md
new file mode 100644
index 0000000000000000000000000000000000000000..e8909595d9e4c9770690958a119cbbd7de7cc662
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetsrv.md
@@ -0,0 +1,7 @@
+The oai embedded telnet server is an optional monitoring and debugging tool. It provides a simple Command Line Interface to the oai softmem. New commands can easily be added by developers to the telnet server.
+
+* [Using the telnet server](telnetusage.md)
+* [Adding commands to the oai telnet server](telnetaddcmd.md)
+* [telnet server architecture ](telnetarch.md)
+ 
+[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
\ No newline at end of file
diff --git a/common/utils/telnetsrv/DOC/telnetusage.md b/common/utils/telnetsrv/DOC/telnetusage.md
new file mode 100644
index 0000000000000000000000000000000000000000..f8319d5ef28911bb18f89545e2d3ac6c10a04421
--- /dev/null
+++ b/common/utils/telnetsrv/DOC/telnetusage.md
@@ -0,0 +1,39 @@
+# starting the softmodem with the telnet server  
+By default the embedded telnet server, which is implemented in a shared library, is not built. It can be built after compiling the softmodem executable using the `build_oai` script:
+
+```bash
+ cd \<oai repository\>/openairinterface5g  
+ source oaienv  
+ cd cmake_targets  
+ ./build_oai  --build-telnetsrv  
+```
+
+This will create the `libtelnetsrv.so` file in the `targets/bin` and `cmake_targets/lte_build_oai/build` sub directories of the oai repository.
+
+When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader).
+
+# using the Command Line Interface  
+By default the telnet server listen on all the ip addresses configured on the system and on port 9090.  This behavior can be changed using the `listenaddr` and `listenport` parameters. 
+The telnet server includes a basic help, listing available commands and some commands also provide a specific detailed help sub-command.
+Below are  examples of telnet sessions:  
+
+*  [getting help](telnethelp.md)
+*  [using the history](telnethist.md)
+*  [using the get and set commands](telnetgetset.md)
+*  [using the loop command](telnetloop.md)
+*  [loader command](telnetloader.md)
+*  [log command](telnetlog.md)  
+
+# telnet server parameters
+The telnet server is using the [oai configuration module](Config/Rtusage). Telnet parameters must be specified in the `telnetsrv` section. Some parameters can be modified via the telnet telnet server command, as specified in the last column of the following table.
+
+| name | type | default | description | dynamic |
+|:---:|:---:|:---:|:----|:----:|
+| `listenaddr` | `ipV4 address, ascii format` | "0.0.0.0" | local address the server is listening on| N |
+| `listenport` | `integer` | 9090 | port number the server is listening on | N |
+| `loopcount` | `integer` | 10 | number of iterations for the loop command  | Y |
+| `loopdelay` | `integer` | 5000 | delay (in ms) between 2 loop command iterations  | Y |
+| `histfile` | `character string` | "oaitelnet.history" | file used for command history persistency | Y |
+| `histfsize` | `integer` | 50 | maximum number of commands saved in the history | Y |
+
+[oai telnet server home](telnetsrv.md)
\ No newline at end of file
diff --git a/configuration/bladeRF/enb-band7-5mhz.conf b/configuration/bladeRF/enb-band7-5mhz.conf
new file mode 100644
index 0000000000000000000000000000000000000000..6e07b8d9499e8cfb2ca60f0d3da91d3dbb92348a
--- /dev/null
+++ b/configuration/bladeRF/enb-band7-5mhz.conf
@@ -0,0 +1,274 @@
+Active_eNBs = ( "eNB-Eurecom-LTEBox");
+# Asn1_verbosity, choice in: none, info, annoying
+Asn1_verbosity = "none";
+
+eNBs =
+(
+ {
+    # real_time choice in {hard, rt-preempt, no}
+    real_time       =  "no";
+    ////////// Identification parameters:
+    eNB_ID    =  0xe00;
+    
+    cell_type =  "CELL_MACRO_ENB";
+    
+    eNB_name  =  "eNB-Eurecom-LTEBox";
+    
+    // Tracking area code, 0x0000 and 0xfffe are reserved values
+    tracking_area_code  =  1;
+    plmn_list = (
+      { mcc = 208; mnc = 92; mnc_length = 2; }
+    );
+    
+    tr_s_preference     = "local_mac"
+
+       ////////// Physical parameters:
+  
+    component_carriers = (
+    		       	 {
+                           node_function = "eNodeB_3GPP";
+                           node_timing = "synch_to_ext_device";
+                           node_synch_ref = 0;
+                           nb_antenna_ports = 1;
+                           ue_TransmissionMode = 1;
+  			   frame_type					      = "FDD";	
+                           tdd_config 					      = 3;
+                           tdd_config_s            			      = 0;
+ 			   prefix_type             			      = "NORMAL";
+  			   eutra_band              			      = 7;
+                           downlink_frequency      			      = 2680000000L;
+                           uplink_frequency_offset 			      = -120000000;
+  
+  			   Nid_cell					      = 0;
+                           N_RB_DL                 			      = 25;
+                           Nid_cell_mbsfn          			      = 0;
+                           nb_antennas_tx          			      = 1;
+                           nb_antennas_rx          			      = 1; 
+                           prach_root              			      = 0;
+			   tx_gain                                            = 90;
+			   rx_gain                                            = 115;
+                           pbch_repetition                                    = "FALSE";
+                           prach_config_index      			      = 0;
+                           prach_high_speed        			      = "DISABLE";
+  	                   prach_zero_correlation  			      = 1;
+                           prach_freq_offset       			      = 2;
+			   pucch_delta_shift       			      = 1;
+                           pucch_nRB_CQI           			      = 0;
+                           pucch_nCS_AN            			      = 0;
+                           pucch_n1_AN             			      = 0;
+                           pdsch_referenceSignalPower 			      = -29;
+                           pdsch_p_b                  			      = 0;
+                           pusch_n_SB                 			      = 1; 
+                           pusch_enable64QAM          			      = "DISABLE";
+			   pusch_hoppingMode                                  = "interSubFrame";
+			   pusch_hoppingOffset                                = 0;
+     	                   pusch_groupHoppingEnabled  			      = "ENABLE";
+	                   pusch_groupAssignment      			      = 0;
+	                   pusch_sequenceHoppingEnabled		   	      = "DISABLE";
+	                   pusch_nDMRS1                                       = 1;
+	                   phich_duration                                     = "NORMAL";
+	                   phich_resource                                     = "ONESIXTH";
+	                   srs_enable                                         = "DISABLE";
+	               /*  srs_BandwidthConfig                                =;
+	                   srs_SubframeConfig                                 =;
+	                   srs_ackNackST                                      =;
+	                   srs_MaxUpPts                                       =;*/  
+
+	                   pusch_p0_Nominal                                   = -96;
+	                   pusch_alpha                                        = "AL1";
+	                   pucch_p0_Nominal                                   = -108;
+	                   msg3_delta_Preamble                                = 6;
+	                   pucch_deltaF_Format1                               = "deltaF2";
+	                   pucch_deltaF_Format1b                              = "deltaF3";
+	                   pucch_deltaF_Format2                               = "deltaF0";
+	                   pucch_deltaF_Format2a                              = "deltaF0";
+  	                   pucch_deltaF_Format2b		    	      = "deltaF0";
+	
+                           rach_numberOfRA_Preambles                          = 64;
+                           rach_preamblesGroupAConfig                         = "DISABLE";
+/*
+                           rach_sizeOfRA_PreamblesGroupA                      = ;
+                           rach_messageSizeGroupA                             = ;
+                           rach_messagePowerOffsetGroupB                      = ; 
+*/
+                           rach_powerRampingStep                              = 4;
+	                   rach_preambleInitialReceivedTargetPower            = -108;
+                           rach_preambleTransMax                              = 10;
+	                   rach_raResponseWindowSize                          = 10;
+	                   rach_macContentionResolutionTimer                  = 48;
+	                   rach_maxHARQ_Msg3Tx                                = 4;
+
+			   pcch_default_PagingCycle                           = 128;
+			   pcch_nB                                            = "oneT";
+			   bcch_modificationPeriodCoeff			      = 2;
+			   ue_TimersAndConstants_t300			      = 1000;
+			   ue_TimersAndConstants_t301			      = 1000;
+			   ue_TimersAndConstants_t310			      = 1000;
+			   ue_TimersAndConstants_t311			      = 10000;
+			   ue_TimersAndConstants_n310			      = 20;
+			   ue_TimersAndConstants_n311			      = 1;
+
+      //Parameters for SIB18
+      rxPool_sc_CP_Len                                       = "normal"; 
+      rxPool_sc_Period                                       = "sf40";  
+      rxPool_data_CP_Len                                     = "normal";  
+      rxPool_ResourceConfig_prb_Num                          = 20;
+      rxPool_ResourceConfig_prb_Start                        = 5;
+      rxPool_ResourceConfig_prb_End                          = 44;
+      rxPool_ResourceConfig_offsetIndicator_present          = "prSmall";
+      rxPool_ResourceConfig_offsetIndicator_choice           = 0;      
+      rxPool_ResourceConfig_subframeBitmap_present           = "prBs40";
+      rxPool_ResourceConfig_subframeBitmap_choice_bs_buf              = "00000000000000000000";
+      rxPool_ResourceConfig_subframeBitmap_choice_bs_size             = 5;
+      rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused      = 0;
+/*    rxPool_dataHoppingConfig_hoppingParameter                       = 0;
+      rxPool_dataHoppingConfig_numSubbands                            = "ns1";
+      rxPool_dataHoppingConfig_rbOffset                               = 0;
+      rxPool_commTxResourceUC-ReqAllowed                              = "TRUE";
+*/    
+      // Parameters for SIB19
+      discRxPool_cp_Len                                               = "normal"
+      discRxPool_discPeriod                                           = "rf32"
+      discRxPool_numRetx                                              = 1;   
+      discRxPool_numRepetition                                        = 2;
+      discRxPool_ResourceConfig_prb_Num                               = 5;  
+      discRxPool_ResourceConfig_prb_Start                             = 3;
+      discRxPool_ResourceConfig_prb_End                               = 21;
+      discRxPool_ResourceConfig_offsetIndicator_present               = "prSmall";
+      discRxPool_ResourceConfig_offsetIndicator_choice                = 0;      
+      discRxPool_ResourceConfig_subframeBitmap_present                = "prBs40";
+      discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf          = "f0ffffffff";
+      discRxPool_ResourceConfig_subframeBitmap_choice_bs_size         = 5;
+      discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused  = 0;
+
+			 }
+			 );
+
+    srb1_parameters :
+    {
+        # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
+        timer_poll_retransmit    = 80;
+
+        # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
+        timer_reordering         = 35;
+
+        # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
+        timer_status_prohibit    = 0;
+
+        # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
+        poll_pdu                 =  4;
+
+        # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
+        poll_byte                =  99999;
+
+        # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
+        max_retx_threshold       =  4;
+    }
+
+    # ------- SCTP definitions
+    SCTP :
+    {
+        # Number of streams to use in input/output
+        SCTP_INSTREAMS  = 2;
+        SCTP_OUTSTREAMS = 2;
+    };
+
+    ////////// MME parameters:
+    mme_ip_address      = ( { ipv4       = "192.168.12.148";
+                              ipv6       = "192:168:30::17";
+                              active     = "yes";
+                              preference = "ipv4";
+                            }
+                          );
+
+    NETWORK_INTERFACES : 
+    {
+        ENB_INTERFACE_NAME_FOR_S1_MME            = "eth1";
+        ENB_IPV4_ADDRESS_FOR_S1_MME              = "192.168.12.196/24";
+
+        ENB_INTERFACE_NAME_FOR_S1U               = "eth1";
+        ENB_IPV4_ADDRESS_FOR_S1U                 = "192.168.12.196/24";
+        ENB_PORT_FOR_S1U                         = 2152; # Spec 2152
+
+        ENB_IPV4_ADDRESS_FOR_X2C                 = "192.168.12.196/24";
+        ENB_PORT_FOR_X2C                         = 36422; # Spec 36422
+    };
+    
+    log_config : 
+    {
+	global_log_level                      ="info"; 
+    	global_log_verbosity                  ="high";
+	hw_log_level                          ="info"; 
+    	hw_log_verbosity                      ="medium";
+	phy_log_level                         ="info"; 
+    	phy_log_verbosity                     ="medium";
+	mac_log_level                         ="info"; 
+    	mac_log_verbosity                     ="high";
+	rlc_log_level                         ="debug"; 
+    	rlc_log_verbosity                     ="high";
+	pdcp_log_level                        ="info"; 
+    	pdcp_log_verbosity                    ="high";
+	rrc_log_level                         ="info"; 
+    	rrc_log_verbosity                     ="medium";
+   };	
+   
+  }
+);
+
+MACRLCs = (
+        {
+        num_cc = 1;
+        tr_s_preference = "local_L1";
+        tr_n_preference = "local_RRC";
+        phy_test_mode = 0;
+        puSch10xSnr     =  210;
+        puCch10xSnr     =  210;
+        }  
+);
+
+THREAD_STRUCT = (
+  {
+    parallel_config = "PARALLEL_RU_L1_TRX_SPLITaaaaaa";
+    worker_config = "ENABLE";
+  }
+);
+
+L1s = (
+        {
+        num_cc = 1;
+        tr_n_preference = "local_mac";
+        }  
+);
+
+RUs = (
+    {             
+       local_rf       = "yes"
+         nb_tx          = 1
+         nb_rx          = 1
+         att_tx         = 73
+         att_rx         = 0;
+         bands          = [7];
+         max_pdschReferenceSignalPower = -28;
+         max_rxgain                    = 96;
+         eNB_instances  = [0];
+
+    }
+);  
+
+    log_config : 
+    {
+	global_log_level                      ="info"; 
+    	global_log_verbosity                  ="high";
+	hw_log_level                          ="info"; 
+    	hw_log_verbosity                      ="medium";
+	phy_log_level                         ="info"; 
+    	phy_log_verbosity                     ="medium";
+	mac_log_level                         ="info"; 
+    	mac_log_verbosity                     ="high";
+	rlc_log_level                         ="info"; 
+    	rlc_log_verbosity                     ="high";
+	pdcp_log_level                        ="info"; 
+    	pdcp_log_verbosity                    ="high";
+	rrc_log_level                         ="info"; 
+    	rrc_log_verbosity                     ="medium";
+   };	
diff --git a/doc/FEATURE_SET.md b/doc/FEATURE_SET.md
new file mode 100644
index 0000000000000000000000000000000000000000..103f132728c4d0025cf2035c71c66acea28f35b8
--- /dev/null
+++ b/doc/FEATURE_SET.md
@@ -0,0 +1,171 @@
+**Table of Contents**
+
+1. [OpenAirInterface eNB Feature Set](#openairinterface-enb-feature-set)
+   1. [eNB PHY Layer](#enb-phy-layer)
+   2. [eNB MAC Layer](#enb-mac-layer)
+   3. [eNB RLC Layer](#enb-rlc-layer)
+   4. [eNB PDCP Layer](#enb-pdcp-layer)
+   5. [eNB RRC Layer](#enb-rrc-layer)
+   6. [eNB X2AP](#enb-x2ap)
+   7. [eNB Advanced Features](#enb-advanced-features)
+2. [OpenAirInterface UE Feature Set](#openairinterface-ue-feature-set)
+   1.  [LTE UE PHY Layer](#lte-ue-phy-layer)
+   2.  [LTE UE MAC Layer](#lte-ue-mac-layer)
+   3.  [LTE UE RLC Layer](#lte-ue-rlc-layer)
+   4.  [LTE UE PDCP Layer](#lte-ue-pdcp-layer)
+   5.  [LTE UE RRC Layer](#lte-ue-rrc-layer)
+
+# OpenAirInterface Block diagram #
+
+![Block Diagram](./oai_enb_block_diagram.png)
+
+# OpenAirInterface eNB Feature Set #
+
+## eNB PHY Layer ##
+
+The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provides the following features:
+
+- LTE release 8.6 compliant, and implements a subset of release 10
+- FDD and TDD configurations: 1 (experimental) and 3
+- Bandwidth: 5, 10, and 20 MHz
+- Transmission modes: 1, 2 (stable), 3, 4, 5, 6, 7 (experimental)
+- Max number of antennas: 2
+- CQI/PMI reporting: aperiodic, feedback mode 3 - 0 and 3 - 1
+- PRACH preamble format 0
+- All downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH
+- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
+- HARQ support (UL and DL)
+- Highly optimized base band processing (including turbo decoder)
+
+### Performances ###
+
+**Transmission Mode, Bandwidth** | **Expected Throughput** | **Measured Throughput** | **Measurement Conditions**
+-------------------------------- | ----------------------- | ------------------------| ----------------:
+FDD DL: 5 MHz, 25 PRBS/ MCS 28   | 16 - 17 Mbit/s          | TM1: 17.0 Mbits/s       | COTS-UE Cat 4 (150/50 Mbps)
+FDD DL: 10 MHz, 50 PRBS/ MCS 28  | 34 - 35 Mbit/s          | TM1: 32.8 Mbits/s       | COTS-UE Cat 4 (150/50 Mbps)
+FDD DL: 20 MHz, 100 PRBS/ MCS 28 | 70 Mbit/s               | TM1: 69.9 Mbits/s       | COTS-UE Cat 4 (150/50 Mbps)
+ |  |  | 
+FDD UL: 5 MHz, 25 PRBS/ MCS 20   | 9 Mbit/s                | TM1: 8.28 Mbits/s       | COTS-UE Cat 4 (150/50 Mbps)
+FDD UL: 10 MHz, 50 PRBS/ MCS 20  | 17 Mbit/s               | TM1: 15.2 Mbits/s       | COTS-UE Cat 4 (150/50 Mbps)
+FDD UL: 20 MHz, 100 PRBS/ MCS 20 | 35 Mbit/s               | TM1: 18.6 Mbits/s       | COTS-UE Cat 4 (150/50 Mbps)
+ |  | 
+TDD DL: 5 MHz, 25 PRBS/ MCS **XX**   | **TBC** Mbit/s | 3.33 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
+TDD DL: 10 MHz, 50 PRBS/ MCS **XX**  | **TBC** Mbit/s | 8.90 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
+TDD DL: 20 MHz, 100 PRBS/ MCS **XX** | **TBC** Mbit/s | N/A | COTS-UE Cat 4 (150/50 Mbps)
+ |  | | 
+TDD UL: 5 MHz, 25 PRBS/ MCS **XX**   | **TBC** Mbit/s | 1.66 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
+TDD UL: 10 MHz, 50 PRBS/ MCS **XX**  | **TBC** Mbit/s | 1.89 Mbits/s | COTS-UE Cat 4 (150/50 Mbps)
+TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | **TBC** Mbit/s | N/A | COTS-UE Cat 4 (150/50 Mbps)
+
+- Number of supported UEs: **To Be Completed**
+
+## eNB MAC Layer ##
+
+The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels. 
+
+- RRC interface for CCCH, DCCH, and DTCH
+- Proportional fair scheduler (round robin scheduler soon)
+- DCI generation
+- HARQ Support
+- RA procedures and RNTI management
+- RLC interface (AM, UM)
+- UL power control
+- Link adaptation
+
+## eNB RLC Layer ##
+
+The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
+
+- RLC TM (mainly used for BCCH and CCCH) 
+  * Neither segment nor concatenate RLC SDUs
+  * Do not include a RLC header in the RLC PDU
+  * Delivery of received RLC PDUs to upper layers
+- RLC UM (mainly used for DTCH) 
+  * Segment or concatenate RLC SDUs according to the TB size selected by MAC
+  * Include a RLC header in the RLC PDU
+  * Duplication detection
+  * PDU reordering and reassembly
+- RLC AM, compatible with 9.3 
+  * Segmentation, re-segmentation, concatenation, and reassembly
+  * Padding
+  * Data transfer to the user
+  * RLC PDU retransmission in support of error control and correction
+  * Generation of data/control PDUs
+
+## eNB PDCP Layer ##
+
+The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0 and implements the following functions:
+
+- User and control data transfer
+- Sequence number management
+- RB association with PDCP entity
+- PDCP entity association with one or two RLC entities
+- Integrity check and encryption using the AES and Snow3G algorithms
+
+## eNB RRC Layer ##
+
+The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following functions:
+
+- System Information broadcast (SIB 1, 2, 3, and 13)
+  * SIB1: Up to 6 PLMN IDs broadcast
+- RRC connection establishment
+- RRC connection reconfiguration (addition and removal of radio bearers, connection release)
+- RRC connection release
+- RRC connection re-establishment
+- Inter-frequency measurement collection and reporting (experimental)
+- eMBMS for multicast and broadcast (experimental)
+- Handover (experimental)
+- Paging (soon)
+
+## eNB X2AP ##
+
+The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following functions:
+
+ - X2 Setup Request
+ - X2 Setup Response 
+
+## eNB Advanced Features ##
+
+**To be completed**
+
+# OpenAirInterface UE Feature Set #
+
+## LTE UE PHY Layer ##
+
+The Physical layer implements **3GPP 36.211**, **36.212**, **36.213** and provides the following features:
+
+- LTE release 8.6 compliant, and implements a subset of release 10
+- FDD and TDD configurations: 1 (experimental) and 3
+- Bandwidth: 5, 10, and 20 MHz
+- Transmission modes: 1, 2 (stable)
+- Max number of antennas: 2
+- CQI/PMI reporting: aperiodic, feedback mode 3 - 0 and 3 - 1
+- PRACH preamble format 0
+- All downlink (DL) channels are supported: PSS, SSS, PBCH, PCFICH, PHICH, PDCCH, PDSCH, PMCH
+- All uplink (UL) channels are supported: PRACH, PUSCH, PUCCH (format 1/1a/1b), SRS, DRS
+
+## LTE UE MAC Layer ##
+
+The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels. 
+
+- RRC interface for CCCH, DCCH, and DTCH
+- HARQ Support
+- RA procedures and RNTI management
+- RLC interface (AM, UM)
+- UL power control
+- Link adaptation
+
+## LTE UE RLC Layer ##
+
+The RLC layer implements a full specification of the 3GPP 36.322 release v9.3.
+
+## LTE UE PDCP Layer ##
+
+The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0.
+
+## LTE UE RRC Layer ##
+
+The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following functions:
+
+- System Information decoding
+- RRC connection establishment
diff --git a/doc/oai_enb_block_diagram.png b/doc/oai_enb_block_diagram.png
new file mode 100644
index 0000000000000000000000000000000000000000..58c8eb9e959fae8616de03cc9f56fcfe2cc0f0e7
Binary files /dev/null and b/doc/oai_enb_block_diagram.png differ
diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c
index 51ff501666be149a79a4a4454179b93e42d047ac..a8e5d665f6640f4daa03c2224b5b4cc121f3e000 100644
--- a/nfapi/oai_integration/nfapi_vnf.c
+++ b/nfapi/oai_integration/nfapi_vnf.c
@@ -196,14 +196,12 @@ void oai_create_enb(void) {
   int bodge_counter=0;
   PHY_VARS_eNB *eNB = RC.eNB[0][0];
 
-  printf("[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d td:%p te:%p if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag, eNB->single_thread_flag, eNB->td, eNB->te, eNB->if_inst);
+  printf("[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag, eNB->single_thread_flag, eNB->if_inst);
 
   eNB->Mod_id  = bodge_counter;
   eNB->CC_id   = bodge_counter;
   eNB->abstraction_flag   = 0;
   eNB->single_thread_flag = 0;//single_thread_flag;
-  eNB->td                   = ulsch_decoding_data_all;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
-  eNB->te                   = dlsch_encoding_all;//(single_thread_flag==1) ? dlsch_encoding_2threads : dlsch_encoding;
 
   RC.nb_CC[bodge_counter] = 1;
 
diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
index 3264b76a1acbd9ea785e8493bcaaa1859e2e217c..7c6fc9bdcf60d3bfd9997e0d485366c5a4b1161a 100644
--- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
@@ -1505,7 +1505,7 @@ unsigned int  ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
 
   // Do ULSCH Decoding for data portion
 
-  ret = eNB->td(eNB,UE_id,harq_pid,llr8_flag);
+  ret = ulsch_decoding_data_all(eNB,UE_id,harq_pid,llr8_flag);
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,0);
 
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
index e8f20c85de6a682ce3cf947ee23aa4447c0eb776..89b15ece93761e9f88ede5b2b3ae7d2b5d5f203d 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
@@ -1298,7 +1298,7 @@ void dlsch_channel_compensation(int **rxdataF_ext,
   unsigned short rb;
   unsigned char aatx,aarx,symbol_mod,pilots=0;
   __m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
-  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
+  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
 
   symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
 
@@ -1311,9 +1311,9 @@ void dlsch_channel_compensation(int **rxdataF_ext,
   }
 
   for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
+    __m128i QAM_amp128b = _mm_setzero_si128();
     if (mod_order == 4) {
       QAM_amp128 = _mm_set1_epi16(QAM16_n1);  // 2/sqrt(10)
-      QAM_amp128b = _mm_setzero_si128();
     } else if (mod_order == 6) {
       QAM_amp128  = _mm_set1_epi16(QAM64_n1); //
       QAM_amp128b = _mm_set1_epi16(QAM64_n2);
@@ -1766,11 +1766,11 @@ void dlsch_channel_compensation_core(int **rxdataF_ext,
   int length_mod8 = 0;
   int length2;
   __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128;
-  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
+  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
   int aatx = 0, aarx = 0;
 
   for (aatx=0; aatx<n_tx; aatx++) {
-
+    __m128i QAM_amp128b;
     if (mod_order == 4) {
       QAM_amp128 = _mm_set1_epi16(QAM16_n1);  // 2/sqrt(10)
       QAM_amp128b = _mm_setzero_si128();
@@ -2158,7 +2158,7 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
   __m128i *dl_ch0_128,*dl_ch1_128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
   unsigned char aarx=0,symbol_mod,pilots=0;
   int precoded_signal_strength=0;
-  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
+  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
 
   symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
 
@@ -2167,10 +2167,9 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
 
 
   //printf("comp prec: symbol %d, pilots %d\n",symbol, pilots);
-
+  __m128i QAM_amp128b = _mm_setzero_si128();
   if (mod_order == 4) {
     QAM_amp128 = _mm_set1_epi16(QAM16_n1);
-    QAM_amp128b = _mm_setzero_si128();
   } else if (mod_order == 6) {
     QAM_amp128  = _mm_set1_epi16(QAM64_n1);
     QAM_amp128b = _mm_set1_epi16(QAM64_n2);
@@ -2621,7 +2620,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
   int **rxdataF_comp0         = pdsch_vars->rxdataF_comp0;
   int **rxdataF_comp1         = pdsch_vars->rxdataF_comp1[harq_pid][round];
   unsigned char *pmi_ext      = pdsch_vars->pmi_ext;
-  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp0_128b,QAM_amp1_128,QAM_amp1_128b;
+  __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp1_128;
 
   symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
 
@@ -2632,17 +2631,17 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
 
  // printf("comp prec: symbol %d, pilots %d\n",symbol, pilots);
 
+  __m128i  QAM_amp0_128b = _mm_setzero_si128();
   if (mod_order0 == 4) {
     QAM_amp0_128  = _mm_set1_epi16(QAM16_n1);
-    QAM_amp0_128b = _mm_setzero_si128();
   } else if (mod_order0 == 6) {
     QAM_amp0_128  = _mm_set1_epi16(QAM64_n1);
     QAM_amp0_128b = _mm_set1_epi16(QAM64_n2);
   }
 
+  __m128i  QAM_amp1_128b = _mm_setzero_si128();
   if (mod_order1 == 4) {
     QAM_amp1_128  = _mm_set1_epi16(QAM16_n1);
-    QAM_amp1_128b = _mm_setzero_si128();
   } else if (mod_order1 == 6) {
     QAM_amp1_128  = _mm_set1_epi16(QAM64_n1);
     QAM_amp1_128b = _mm_set1_epi16(QAM64_n2);
diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h
index ae0168b53c638ef179e3d1494b7170359425270d..9f4a196a9b21648590b62cec8899e0f46fe9cf88 100644
--- a/openair1/PHY/defs_common.h
+++ b/openair1/PHY/defs_common.h
@@ -58,6 +58,7 @@
 #include <math.h>
 #include "common_lib.h"
 #include "msc.h"
+#include <common/utils/LOG/log.h>
 
 
 //#include <complex.h>
@@ -862,22 +863,60 @@ typedef enum {
   RESYNCH=4
 } UE_MODE_t;
 
-/// Threading Parameter
+#define FOREACH_PARALLEL(GEN)			\
+  GEN(PARALLEL_SINGLE_THREAD)			\
+  GEN(PARALLEL_RU_L1_SPLIT)			\
+  GEN(PARALLEL_RU_L1_TRX_SPLIT)
+
+#define GENERATE_ENUM(N) N,
+#define GENERATE_ENUMTXT(N) {(char*)#N, N},
+
 typedef enum {
-  PARALLEL_SINGLE_THREAD    =0,
-  PARALLEL_RU_L1_SPLIT      =1,
-  PARALLEL_RU_L1_TRX_SPLIT  =2
-}PARALLEL_CONF_t;
+  FOREACH_PARALLEL(GENERATE_ENUM)
+} PARALLEL_CONF_t;
 
+#define FOREACH_WORKER(GEN) GEN(WORKER_DISABLE) GEN(WORKER_ENABLE)
 typedef enum {
-  WORKER_DISABLE            =0,
-  WORKER_ENABLE             =1
+  FOREACH_WORKER(GENERATE_ENUM)
 }WORKER_CONF_t;
 
 typedef struct THREAD_STRUCT_s {
   PARALLEL_CONF_t  parallel_conf;
   WORKER_CONF_t    worker_conf;
 } THREAD_STRUCT;
+extern THREAD_STRUCT  thread_struct;
+
+static inline void set_parallel_conf(char *parallel_conf) {
+  mapping config[]= {
+    FOREACH_PARALLEL(GENERATE_ENUMTXT)
+    {NULL,-1}
+  };
+  thread_struct.parallel_conf = (PARALLEL_CONF_t)map_str_to_int(config, parallel_conf);
+  if (thread_struct.parallel_conf == -1 ) {
+    LOG_E(ENB_APP,"Impossible value: %s\n", parallel_conf);
+    thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
+  }
+}
+
+static inline void set_worker_conf(char *worker_conf) {
+  mapping config[]={
+    FOREACH_WORKER(GENERATE_ENUMTXT)
+    {NULL, -1}
+  };
+  thread_struct.worker_conf =  (WORKER_CONF_t)map_str_to_int(config, worker_conf);
+  if (thread_struct.worker_conf == -1 ) {
+    LOG_E(ENB_APP,"Impossible value: %s\n", worker_conf);
+    thread_struct.worker_conf = WORKER_DISABLE ;
+  }
+}
+
+static inline PARALLEL_CONF_t get_thread_parallel_conf(void) {
+  return thread_struct.parallel_conf;
+}
+
+static inline WORKER_CONF_t get_thread_worker_conf(void) {
+  return thread_struct.worker_conf;
+}
 
 typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t;
 
diff --git a/openair1/PHY/defs_eNB.h b/openair1/PHY/defs_eNB.h
index 065d3131fca1242be36576d381d2ab4d7ba73e14..4de830507504591dcf11cdad49d1ffde86272286 100644
--- a/openair1/PHY/defs_eNB.h
+++ b/openair1/PHY/defs_eNB.h
@@ -908,8 +908,6 @@ typedef struct PHY_VARS_eNB_s {
   /// Ethernet parameters for fronthaul interface
   eth_params_t         eth_params;
   int                  rx_total_gain_dB;
-  int                  (*td)(struct PHY_VARS_eNB_s *eNB,int UE_id,int harq_pid,int llr8_flag);
-  int                  (*te)(struct PHY_VARS_eNB_s *,uint8_t *,uint8_t,LTE_eNB_DLSCH_t *,int,uint8_t,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *);
   int                  (*start_if)(struct RU_t_s *ru,struct PHY_VARS_eNB_s *eNB);
   uint8_t              local_flag;
   LTE_DL_FRAME_PARMS   frame_parms;
@@ -1084,6 +1082,7 @@ typedef struct PHY_VARS_eNB_s {
 
   time_stats_t ofdm_mod_stats;
   time_stats_t dlsch_common_and_dci;
+  time_stats_t dlsch_ue_specific;
   time_stats_t dlsch_encoding_stats;
   time_stats_t dlsch_modulation_stats;
   time_stats_t dlsch_scrambling_stats;
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index a047111e0a137ad557e21252d5aaba5086d05eab..0997f9c552e5a93199cae2da298d46505b19c7db 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -400,7 +400,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
 
     start_meas(&eNB->dlsch_encoding_stats);
 
-    eNB->te(eNB,
+    dlsch_encoding_all(eNB,
 	  dlsch_harq->pdu,
 	  dlsch_harq->pdsch_start,
 	  dlsch,
@@ -582,6 +582,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
   }
 
   if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
+  if (do_meas==1) start_meas(&eNB->dlsch_ue_specific);
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
 
@@ -649,6 +650,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PHICH,0);
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),0);
+  if (do_meas==1) stop_meas(&eNB->dlsch_ue_specific);
   if (do_meas==1) stop_meas(&eNB->phy_proc_tx);
   
 }
diff --git a/openair1/SIMULATION/LTE_PHY/common_sim.h b/openair1/SIMULATION/LTE_PHY/common_sim.h
index 46f4cdf1611de6aecebbbcaeaa09d9ba01e5956d..e9ad4dc888f8573874d8aa1f8d4bf271978d8196 100644
--- a/openair1/SIMULATION/LTE_PHY/common_sim.h
+++ b/openair1/SIMULATION/LTE_PHY/common_sim.h
@@ -49,38 +49,46 @@ void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastAc
 	res->p_time=src[lastActive][last].p_time;
 }
 
-void printStatIndent(time_stats_t *ptr, char *txt) {
-  printf("|__ %-50s %.2f us (%d trials)\n",
+double squareRoot(time_stats_t *ptr) {
+  double timeBase=1/(1000*cpu_freq_GHz);
+  return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
+              pow((double)ptr->diff/ptr->trials*timeBase,2));
+}
+
+void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
+  double timeBase=1/(1000*cpu_freq_GHz);
+  printf("%-43s %6.2f us (%d trials)\n",
          txt,
-         ptr->trials?inMicroS(ptr->diff/ptr->trials):0,
+         (double)ptr->diff/ptr->trials*timeBase,
          ptr->trials);
+  printf(" Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
+         squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
 }
 
-void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) {
-  double timeBase=1/(1000*cpu_freq_GHz);
-  printf("    |__ %-45s %.2f us (cycles/block %ld, %5d trials)\n",
+void printStatIndent(time_stats_t *ptr, char *txt) {
+  printf("|__ %-38s %6.2f us (%3d trials)\n",
          txt,
-         ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
-         turbo_iter?(uint64_t)round(((double)ptr->diff)/turbo_iter):0,
+         ptr->trials?inMicroS(ptr->diff/ptr->trials):0,
          ptr->trials);
 }
 
-double squareRoot(time_stats_t *ptr) {
+void printStatIndent2(time_stats_t *ptr, char *txt) {
   double timeBase=1/(1000*cpu_freq_GHz);
-  return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
-              pow((double)ptr->diff/ptr->trials*timeBase,2));
+  printf("    |__ %-34s %6.2f us (%3d trials)\n",
+         txt,
+         ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
+	 ptr->trials);
 }
 
-void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
+void printStatIndent3(time_stats_t *ptr, char *txt) {
   double timeBase=1/(1000*cpu_freq_GHz);
-  printf("%-50s             :%.2f us (%d trials)\n",
+  printf("        |__ %-30s %6.2f us (%3d trials)\n",
          txt,
-         (double)ptr->diff/ptr->trials*timeBase,
-         ptr->trials);
-  printf("|__ Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
-         squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
+         ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
+	 ptr->trials);
 }
 
+
 void logDistribution(FILE* fd, time_stats_t *ptr, varArray_t *sortedList, int dropped) {
   fprintf(fd,"%f;%f;%f;%f;%f;%f;%d;",
 	  squareRoot(ptr),
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index 8fe8ba277e22381c9ad615c089ea9c727d8cb2c6..bcc07ddfa0763755b735616e79059a64e739ed07 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -85,30 +85,7 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */
 int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
 int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
 
-char *parallel_config = NULL;
-char *worker_config = NULL;
-static THREAD_STRUCT thread_struct;
-void set_parallel_conf(char *parallel_conf)
-{
-  if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0)           thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0)        thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0)    thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
-  printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf);
-} 
-void set_worker_conf(char *worker_conf)
-{
-  if(strcmp(worker_conf,"WORKER_DISABLE")==0)                     thread_struct.worker_conf = WORKER_DISABLE;
-  else if(strcmp(worker_conf,"WORKER_ENABLE")==0)                 thread_struct.worker_conf = WORKER_ENABLE;
-  printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf);
-} 
-PARALLEL_CONF_t get_thread_parallel_conf(void)
-{
-  return thread_struct.parallel_conf;
-} 
-WORKER_CONF_t get_thread_worker_conf(void)
-{
-  return thread_struct.worker_conf;
-} 
+THREAD_STRUCT thread_struct;
 
 int emulate_rf = 0;
 
@@ -715,7 +692,7 @@ int main(int argc, char **argv)
 
   DL_req.dl_config_request_body.dl_config_pdu_list = dl_config_pdu_list;
   TX_req.tx_request_body.tx_pdu_list = tx_pdu_list;
-
+  set_parallel_conf("PARALLEL_SINGLE_THREAD");
   cpuf = cpu_freq_GHz;
 
   //signal(SIGSEGV, handler);
@@ -758,6 +735,7 @@ int main(int argc, char **argv)
     { "Subframe", "subframe ",0, iptr:&subframe,  defintval:7, TYPE_INT, 0 },
     { "Trnti", "rnti",0, u16ptr:&n_rnti,  defuintval:0x1234, TYPE_UINT16, 0 },
     { "vi_mod", "i_mod",0, iptr:NULL,  defintval:0, TYPE_INT, 0 },
+    { "Qparallel", "Enable parallel execution",0, strptr:NULL,  defstrval:NULL, TYPE_STRING,  0 },
     { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL,  iptr:&print_perf,  defintval:0, TYPE_INT, 0 },
     { "q_tx_port", "Number of TX antennas ports used in eNB",0, iptr:NULL,  defintval:0, TYPE_INT, 0 },
     { "uEdual", "Enables the Interference Aware Receiver for TM5 (default is normal receiver)",0, iptr:NULL,  defintval:0, TYPE_INT, 0 },
@@ -965,6 +943,10 @@ int main(int argc, char **argv)
 
       break;
 
+    case 'Q':
+      set_parallel_conf(optarg);
+      break;
+      
     default:
       printf("Wrong option: %s\n",long_options[option_index].name);
       exit(1);
@@ -982,8 +964,8 @@ int main(int argc, char **argv)
   if (help)
     exit(0);
   
-  set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
-  set_worker_conf("WORKER_ENABLE");
+  if (thread_struct.parallel_conf != PARALLEL_SINGLE_THREAD)
+    set_worker_conf("WORKER_ENABLE");
 
   if (transmission_mode>1) pa=dBm3;
   printf("dlsim: tmode %d, pa %d\n",transmission_mode,pa);
@@ -1079,11 +1061,7 @@ int main(int argc, char **argv)
      ru->do_precoding=1;
 
   eNB->mac_enabled=1;
-  if (two_thread_flag == 0) {
-    eNB->te = dlsch_encoding;
-  }
-  else {
-    eNB->te = dlsch_encoding_2threads;
+  if(get_thread_worker_conf() == WORKER_ENABLE) {
     extern void init_td_thread(PHY_VARS_eNB *);
     extern void init_te_thread(PHY_VARS_eNB *);
     init_td_thread(eNB);
@@ -1442,6 +1420,8 @@ int main(int argc, char **argv)
       reset_meas(&eNB->dlsch_interleaving_stats);
       reset_meas(&eNB->dlsch_rate_matching_stats);
       reset_meas(&eNB->dlsch_turbo_encoding_stats);
+      reset_meas(&eNB->dlsch_common_and_dci);
+      reset_meas(&eNB->dlsch_ue_specific);
       for (int i=0; i<RX_NB_TH; i++) {
 	reset_meas(&UE->phy_proc_rx[i]); // total UE rx
 	reset_meas(&UE->ue_front_end_stat[i]);
@@ -1783,9 +1763,6 @@ int main(int argc, char **argv)
 
 	  }
 
-
-
-
           if (UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->harq_ack[subframe].ack == 1) {
 
             avg_iter += UE->dlsch[UE->current_thread_id[subframe]][eNB_id][0]->last_iteration_cnt;
@@ -2011,21 +1988,22 @@ int main(int argc, char **argv)
         printf("\neNB TX function statistics (per 1ms subframe)\n");
 	printDistribution(&eNB->phy_proc_tx,table_tx,"PHY proc tx");
 	printStatIndent(&eNB->dlsch_common_and_dci,"DL common channels and dci time");
-	printStatIndent(&eNB->dlsch_encoding_stats,"DLSCH encoding time");
-	printStatIndent2(&eNB->dlsch_rate_matching_stats,"DLSCH rate matching time",eNB->dlsch_rate_matching_stats.trials);
-	printStatIndent2(&eNB->dlsch_turbo_encoding_stats,"DLSCH turbo encoding time", eNB->dlsch_turbo_encoding_stats.trials);
-	printStatIndent2(&eNB->dlsch_interleaving_stats,"DLSCH interleaving time", eNB->dlsch_interleaving_stats.trials);
-	printStatIndent(&eNB->dlsch_scrambling_stats,  "DLSCH scrambling time");
-	printStatIndent(&eNB->dlsch_modulation_stats, "DLSCH modulation time");
+	printStatIndent(&eNB->dlsch_ue_specific,"DL per ue part time");
+	printStatIndent2(&eNB->dlsch_encoding_stats,"DLSCH encoding time");
+	printStatIndent3(&eNB->dlsch_rate_matching_stats,"DLSCH rate matching time");
+	printStatIndent3(&eNB->dlsch_turbo_encoding_stats,"DLSCH turbo encoding time");
+	printStatIndent3(&eNB->dlsch_interleaving_stats,"DLSCH interleaving time");
+	printStatIndent2(&eNB->dlsch_scrambling_stats,  "DLSCH scrambling time");
+	printStatIndent2(&eNB->dlsch_modulation_stats, "DLSCH modulation time");
 	printDistribution(&eNB->ofdm_mod_stats,table_tx_ifft,"OFDM_mod (idft) time");
 
         printf("\nUE RX function statistics (per 1ms subframe)\n");
 	printDistribution(&phy_proc_rx_tot, table_rx,"Total PHY proc rx");
 	printStatIndent(&ue_front_end_tot,"Front end processing");
 	printStatIndent(&dlsch_llr_tot,"rx_pdsch processing");
-	printStatIndent2(&pdsch_procedures_tot,"pdsch processing", pdsch_procedures_tot.trials);
-	printStatIndent2(&dlsch_procedures_tot,"dlsch processing", dlsch_procedures_tot.trials);
-	printStatIndent2(&UE->crnti_procedures_stats,"C-RNTI processing", UE->crnti_procedures_stats.trials);
+	printStatIndent2(&pdsch_procedures_tot,"pdsch processing");
+	printStatIndent2(&dlsch_procedures_tot,"dlsch processing");
+	printStatIndent2(&UE->crnti_procedures_stats,"C-RNTI processing");
 	printStatIndent(&UE->ofdm_demod_stats,"ofdm demodulation");
 	printStatIndent(&UE->dlsch_channel_estimation_stats,"DLSCH channel estimation time");
 	printStatIndent(&UE->dlsch_freq_offset_estimation_stats,"DLSCH frequency offset estimation time");
@@ -2041,13 +2019,13 @@ int main(int argc, char **argv)
                (double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials*timeBase,
                (int)((double)UE->dlsch_turbo_decoding_stats.diff/UE->dlsch_turbo_decoding_stats.trials),
                UE->dlsch_turbo_decoding_stats.trials);
-        printStatIndent2(&UE->dlsch_tc_init_stats,"init", UE->dlsch_tc_init_stats.trials);
-        printStatIndent2(&UE->dlsch_tc_alpha_stats,"alpha", UE->dlsch_tc_init_stats.trials);
-        printStatIndent2(&UE->dlsch_tc_beta_stats,"beta", UE->dlsch_tc_init_stats.trials);
-        printStatIndent2(&UE->dlsch_tc_gamma_stats,"gamma", UE->dlsch_tc_init_stats.trials);
-        printStatIndent2(&UE->dlsch_tc_ext_stats,"ext", UE->dlsch_tc_init_stats.trials);
-        printStatIndent2(&UE->dlsch_tc_intl1_stats,"turbo internal interleaver", UE->dlsch_tc_init_stats.trials);
-        printStatIndent2(&UE->dlsch_tc_intl2_stats,"intl2+HardDecode+CRC", UE->dlsch_tc_init_stats.trials);
+        printStatIndent2(&UE->dlsch_tc_init_stats,"init");
+        printStatIndent2(&UE->dlsch_tc_alpha_stats,"alpha");
+        printStatIndent2(&UE->dlsch_tc_beta_stats,"beta");
+        printStatIndent2(&UE->dlsch_tc_gamma_stats,"gamma");
+        printStatIndent2(&UE->dlsch_tc_ext_stats,"ext");
+        printStatIndent2(&UE->dlsch_tc_intl1_stats,"turbo internal interleaver");
+        printStatIndent2(&UE->dlsch_tc_intl2_stats,"intl2+HardDecode+CRC");
 	
       }
 
diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index f246c0cdad1ab5c4fb725159813d7249324c5102..fad22832c54cdf1ba86f29e5094e0af0722bc339 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -96,30 +96,7 @@ nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
 nfapi_tx_request_t TX_req;
 Sched_Rsp_t sched_resp;
 
-char *parallel_config = NULL;
-char *worker_config = NULL;
-static THREAD_STRUCT thread_struct;
-void set_parallel_conf(char *parallel_conf)
-{
-  if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0)           thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0)        thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0)    thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
-  printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf);
-} 
-void set_worker_conf(char *worker_conf)
-{
-  if(strcmp(worker_conf,"WORKER_DISABLE")==0)                     thread_struct.worker_conf = WORKER_DISABLE;
-  else if(strcmp(worker_conf,"WORKER_ENABLE")==0)                 thread_struct.worker_conf = WORKER_ENABLE;
-  printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf);
-} 
-PARALLEL_CONF_t get_thread_parallel_conf(void)
-{
-  return thread_struct.parallel_conf;
-} 
-WORKER_CONF_t get_thread_worker_conf(void)
-{
-  return thread_struct.worker_conf;
-} 
+THREAD_STRUCT thread_struct;
 
 void
 fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
@@ -410,7 +387,6 @@ int main(int argc, char **argv) {
   double effective_rate=0.0;
   char channel_model_input[10]= {0};
   static int max_turbo_iterations=4;
-  static int parallel_flag=0;
   int nb_rb_set = 0;
   int sf;
   static int threequarter_fs=0;
@@ -428,6 +404,8 @@ int main(int argc, char **argv) {
   TX_req.tx_request_body.tx_pdu_list = tx_pdu_list;
   cpu_freq_GHz = (double)get_cpu_freq_GHz();
   cpuf = cpu_freq_GHz;
+  set_parallel_conf("PARALLEL_SINGLE_THREAD");
+
   printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz);
   AssertFatal(load_configmodule(argc,argv) != NULL,
               "cannot load configuration module, exiting\n");
@@ -455,7 +433,7 @@ int main(int argc, char **argv) {
     { "Doppler", "Maximum doppler shift",0, dblptr:&maxDoppler,  defdblval:0.0, TYPE_DOUBLE, 0 },
     { "Zdump", "dump table",PARAMFLAG_BOOL,  iptr:&dump_table, defintval:0, TYPE_INT, 0 },
     { "Forms", "Display the soft scope", PARAMFLAG_BOOL, iptr:&xforms,  defintval:0, TYPE_INT, 0 },
-    { "Lparallel", "Enable parallel execution", PARAMFLAG_BOOL, iptr:&parallel_flag,  defintval:0, TYPE_INT, 0 },
+    { "Lparallel", "Enable parallel execution",0, strptr:NULL,  defstrval:NULL, TYPE_STRING,  0 },
     { "Iterations", "Number of iterations of turbo decoder", 0, iptr:&max_turbo_iterations,  defintval:4, TYPE_INT, 0 },
     { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL,  iptr:NULL,  defintval:0, TYPE_INT, 0 },
     { "Q_cqi", "Enable CQI", PARAMFLAG_BOOL, iptr:&cqi_flag,  defintval:0, TYPE_INT, 0 },
@@ -600,6 +578,10 @@ int main(int argc, char **argv) {
       opp_enabled=1;
       break;
 
+    case 'L':
+      set_parallel_conf(optarg);
+      break;
+      
     default:
       printf("Wrong option: %s\n",long_options[option_index].name);
       exit(1);
@@ -618,8 +600,8 @@ int main(int argc, char **argv) {
   if (help)
     exit(0);
   
-  set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
-  set_worker_conf("WORKER_ENABLE");
+  if (thread_struct.parallel_conf != PARALLEL_SINGLE_THREAD)
+    set_worker_conf("WORKER_ENABLE");
   RC.nb_L1_inst = 1;
   RC.nb_RU = 1;
   lte_param_init(&eNB,&UE,&ru,
@@ -767,7 +749,7 @@ int main(int argc, char **argv) {
   UE->ulsch[0]   = new_ue_ulsch(N_RB_DL,0);
   printf("ULSCH %p\n",UE->ulsch[0]);
 
-  if (parallel_flag == 1) {
+  if(get_thread_worker_conf() == WORKER_ENABLE) {
     extern void init_fep_thread(PHY_VARS_eNB *, pthread_attr_t *);
     extern void init_td_thread(PHY_VARS_eNB *);
     init_fep_thread(eNB,NULL);
@@ -1175,8 +1157,7 @@ int main(int argc, char **argv) {
           }
 
 	  start_meas(&eNB->phy_proc_rx);
-          ru->feprx = (parallel_flag == 1) ? ru_fep_full_2thread        : fep_full;
-          eNB->td  = (parallel_flag == 1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
+          ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? ru_fep_full_2thread        : fep_full;
           ru->feprx(ru);
           phy_procedures_eNB_uespec_RX(eNB,proc_rxtx);
 	  stop_meas(&eNB->phy_proc_rx);
@@ -1377,20 +1358,18 @@ int main(int argc, char **argv) {
         printStatIndent(&UE->ulsch_rate_matching_stats,"ULSCH rate-matching time");
         printStatIndent(&UE->ulsch_interleaving_stats,"ULSCH sub-block interleaving");
         printStatIndent(&UE->ulsch_multiplexing_stats,"ULSCH multiplexing time");
-        printDistribution(&eNB->phy_proc_rx,table_rx,"\nTotal PHY proc rx subframe");
-        printDistribution(&ru->ofdm_demod_stats,table_rx_fft,"OFDM_demod time");
-        printDistribution(&eNB->ulsch_demodulation_stats,table_rx_demod,"ULSCH demodulation time");
-        printf("ULSCH Decoding time (%.2f Mbit/s, avg iter %.2f)      :%.2f us (%d trials, max %.2f)\n",
-               UE->ulsch[0]->harq_processes[harq_pid]->TBS/1000.0,(double)iter_trials,
-               (double)eNB->ulsch_decoding_stats.diff/eNB->ulsch_decoding_stats.trials*timeBase,
-               eNB->ulsch_decoding_stats.trials,
-               (double)eNB->ulsch_decoding_stats.max*timeBase);
-        printf("|__ Statistics                           std: %.2fus median %.2fus q1 %.2fus q3 %.2fus \n",
-               squareRoot(&eNB->ulsch_decoding_stats),
-               median(table_rx_dec), q1(table_rx_dec), q3(table_rx_dec));
-        printStatIndent(&eNB->ulsch_deinterleaving_stats,"sub-block interleaving" );
-        printStatIndent(&eNB->ulsch_demultiplexing_stats,"sub-block demultiplexing" );
-        printStatIndent(&eNB->ulsch_rate_unmatching_stats,"sub-block rate-matching" );
+	printf("\n");
+        printDistribution(&eNB->phy_proc_rx,table_rx,"Total PHY proc rx subframe");
+        printDistribution(&ru->ofdm_demod_stats,table_rx_fft,"|__ OFDM_demod time");
+        printDistribution(&eNB->ulsch_demodulation_stats,table_rx_demod,"|__ ULSCH demodulation time");
+	printDistribution(&eNB->ulsch_decoding_stats,table_rx_dec,"|__ ULSCH Decoding time");
+        printf("     (%.2f Mbit/s, avg iter %.2f, max %.2f)\n",
+               UE->ulsch[0]->harq_processes[harq_pid]->TBS/1000.0,
+	       (double)iter_trials,
+	       (double)eNB->ulsch_decoding_stats.max*timeBase);
+        printStatIndent2(&eNB->ulsch_deinterleaving_stats,"sub-block interleaving" );
+        printStatIndent2(&eNB->ulsch_demultiplexing_stats,"sub-block demultiplexing" );
+        printStatIndent2(&eNB->ulsch_rate_unmatching_stats,"sub-block rate-matching" );
         printf("|__ turbo_decoder(%d bits), avg iterations: %.1f       %.2f us (%d cycles, %d trials)\n",
                eNB->ulsch[0]->harq_processes[harq_pid]->Cminus ?
                eNB->ulsch[0]->harq_processes[harq_pid]->Kminus :
@@ -1399,13 +1378,13 @@ int main(int argc, char **argv) {
                (double)eNB->ulsch_turbo_decoding_stats.diff/eNB->ulsch_turbo_decoding_stats.trials*timeBase,
                (int)((double)eNB->ulsch_turbo_decoding_stats.diff/eNB->ulsch_turbo_decoding_stats.trials),
                eNB->ulsch_turbo_decoding_stats.trials);
-        printStatIndent2(&eNB->ulsch_tc_init_stats,"init", eNB->ulsch_tc_init_stats.trials);
-        printStatIndent2(&eNB->ulsch_tc_alpha_stats,"alpha", eNB->ulsch_tc_init_stats.trials);
-        printStatIndent2(&eNB->ulsch_tc_beta_stats,"beta", eNB->ulsch_tc_init_stats.trials);
-        printStatIndent2(&eNB->ulsch_tc_gamma_stats,"gamma", eNB->ulsch_tc_init_stats.trials);
-        printStatIndent2(&eNB->ulsch_tc_ext_stats,"ext", eNB->ulsch_tc_init_stats.trials);
-        printStatIndent2(&eNB->ulsch_tc_intl1_stats,"turbo internal interleaver", eNB->ulsch_tc_init_stats.trials);
-        printStatIndent2(&eNB->ulsch_tc_intl2_stats,"intl2+HardDecode+CRC", eNB->ulsch_tc_init_stats.trials);
+        printStatIndent3(&eNB->ulsch_tc_init_stats,"init");
+        printStatIndent3(&eNB->ulsch_tc_alpha_stats,"alpha");
+        printStatIndent3(&eNB->ulsch_tc_beta_stats,"beta");
+        printStatIndent3(&eNB->ulsch_tc_gamma_stats,"gamma");
+        printStatIndent3(&eNB->ulsch_tc_ext_stats,"ext");
+        printStatIndent3(&eNB->ulsch_tc_intl1_stats,"turbo internal interleaver");
+        printStatIndent3(&eNB->ulsch_tc_intl2_stats,"intl2+HardDecode+CRC");
       }
 
       if(abstx) { //ABSTRACTION
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
index f56b18d469d486b7e5e19c0c2ad97d3b61ba4930..92b9c15efbb66fe49e011eaa14ea5ef810e450a4 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
@@ -298,7 +298,10 @@ rx_sdu(const module_id_t enb_mod_idP,
     case POWER_HEADROOM:
       if (UE_id != -1) {
 	UE_list->UE_template[CC_idP][UE_id].phr_info =
-	  (payload_ptr[0] & 0x3f) - PHR_MAPPING_OFFSET;
+	  (payload_ptr[0] & 0x3f) - PHR_MAPPING_OFFSET + (int8_t)(hundred_times_log10_NPRB[UE_list->UE_template[CC_idP][UE_id].nb_rb_ul[harq_pid]-1]/100);
+	if(UE_list->UE_template[CC_idP][UE_id].phr_info > 40)
+		UE_list->UE_template[CC_idP][UE_id].phr_info = 40;
+
 	LOG_D(MAC,
 	      "[eNB %d] CC_id %d MAC CE_LCID %d : Received PHR PH = %d (db)\n",
 	      enb_mod_idP, CC_idP, rx_ces[i],
diff --git a/targets/ARCH/BLADERF/README b/targets/ARCH/BLADERF/README
new file mode 100644
index 0000000000000000000000000000000000000000..c93c938bafcde213308ca785e48a391489fd2d1c
--- /dev/null
+++ b/targets/ARCH/BLADERF/README
@@ -0,0 +1,138 @@
+BladeRF documentation
+=====================
+
+As of 2018-11-06, the bladeRF support is not fully automatic and requires
+some manual settings before use. This documentation is the ultimate source
+of information. If something described in this file does not work or does
+not correspond to the reality, then contact us so we can fix the problems
+and update this documentation.
+
+1. Install bladeRF 2.0 libraries.
+
+    As of now, it's better to install from source.
+    So, do not run: ./build_oai -I -w BLADERF
+    (That is: do not include '-w BLADERF'.)
+
+    Instead, follow the instructions at: https://github.com/Nuand/bladeRF
+
+    If you already had some bladeRF software installed using automatic
+    methods, first remove it by hand ('apt-get purge bladeRF' or something
+    similar, you can get the list of installed bladeRF packages by running
+    'dpkg -l|grep -i blade', remove them all).
+
+2. Update the device.
+
+    Download the latest FX3 firmware and FPGA images from Nuand's website.
+    As of writing, this is:
+
+        https://github.com/Nuand/bladeRF/wiki
+
+    That points to the following pages.
+    For FX3:
+
+        http://www.nuand.com/fx3_images/
+
+    For FPGA:
+
+        http://www.nuand.com/fpga_images/
+
+    Install FX3 firmware:
+
+        sudo bladeRF-cli -f bladeRF_fw_latest.img
+
+    Install FPGA image (this is for BladeRF x40):
+
+        sudo bladeRF-cli -L hostedx40-latest.rbf
+
+    Retrieve calibration information:
+
+        sudo bladeRF-cli -i
+        info
+
+    That outputs the serial number of your device.
+
+    Go to:
+
+        https://www.nuand.com/calibration
+
+    And enter your serial number.
+    The website tells you to run something like:
+
+        sudo bladeRF-cli -i
+        flash_init_cal 40 0x9271
+
+    Actual values depend on your device and serial number.
+
+3. Calibrate the bladeRF device.
+
+    We will work with band 7 on 2.68GHz with a bandwidth of 5 MHz (25 RBs).
+
+    Plug the bladeRF device, then run:
+
+        sudo bladeRF-cli -i
+        set frequency tx 2680000000
+        set frequency rx 2560000000
+        set gain rx 60
+        set gain tx 60
+        set bandwidth 5000000
+        set samplerate 7680000
+        cal lms
+        cal lms
+        cal lms
+        cal dc rxtx
+        cal dc rxtx
+        cal dc rxtx
+
+4. Tune the RX gain using the enb tracer.
+
+    Run the softmodem and the 'enb' tracer. For instructions, see:
+
+        https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/T/basic
+
+    In the enb window, check the 'input signal'. You should see some blue
+    signal as seen at:
+
+        https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/T/enb
+
+    (the 'Time signal power' plot).
+
+    The level should be around 30.
+
+    If it's not around 30 then edit your configuration file and modify
+    the value 'max_rxgain' in the section 'RUs'.
+
+    The configuration file to use is:
+
+        configuration/bladeRF/enb-band7-5mhz.conf
+
+    In the configuration file, you also need to set the correct values for:
+
+        - tracking_area_code
+        - plmn_list: mcc, mnc, mnc_length
+        - mme_ip_address: this is the IP address used by the computer running
+          the softmodem to connect to the EPC
+        - NETWORK_INTERFACES: all the ENB*ADDRESS* variables have to point
+          to the IP address of the EPC machine
+
+5. You're good to go.
+
+    You can now connect a UE and pass some traffic. If everything is well
+    configured you can expect more than 16 Mb/s of throughput in the downlink
+    using iperf and more than 8 Mb/s in the uplink. Looking at the logs, you
+    should find lines containing 'PHR 40' and 'CQI 15'. If your values are
+    lower then your setup may need some adjustments.
+
+6. In case of problems.
+
+    If the performance of the softmodem is very bad, you can stop it and
+    run the calibration again, without setting the parameters (frequencies,
+    gains, etc.). Just run:
+
+        sudo bladeRF-cli -i
+        cal lms
+        cal dc rxtx
+
+    That may help.
+
+    Be sure to use proper radio equipment (duplexer, antennas, clean
+    environment without interferences).
diff --git a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
index 75a7825669d2320c062ded059aa1ced9c05987bf..e5966af267047b0285583bab64d2e75370b65385 100644
--- a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
+++ b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c
@@ -116,15 +116,6 @@ int trx_brf_start(openair0_device *device) {
     abort();
   }
 
-  if ((status=bladerf_calibrate_dc(brf->dev, BLADERF_MODULE_TX)) != 0) {
-    fprintf(stderr,"Failed to calibrate TX DC: %s\n", bladerf_strerror(status));
-    abort();
-  }
-  if ((status=bladerf_calibrate_dc(brf->dev, BLADERF_MODULE_RX)) != 0) {
-    fprintf(stderr,"Failed to calibrate RX DC: %s\n", bladerf_strerror(status));
-    abort();
-  }
-
   return 0;
 }
 
@@ -235,8 +226,6 @@ static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp,
  * \param device the hardware to use
  */
 void trx_brf_end(openair0_device *device) {
-abort();
-
   int status;
   brf_state_t *brf = (brf_state_t*)device->priv;
   // Disable RX module, shutting down our underlying RX stream
@@ -247,6 +236,7 @@ abort();
     fprintf(stderr, "Failed to disable TX module: %s\n",  bladerf_strerror(status));
   }
   bladerf_close(brf->dev);
+  exit(1);
 }
 
 /*! \brief print the BladeRF statistics  
@@ -362,6 +352,8 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) {
  */
 void calibrate_rf(openair0_device *device) {
 
+  /* TODO: this function does not seem to work. Disabled until fixed. */
+  return;
 
   brf_state_t *brf = (brf_state_t *)device->priv;
   openair0_timestamp ptimestamp;
@@ -1005,6 +997,12 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
   // RX  
   // Example of CLI output: RX Frequency: 2539999999Hz
   
+
+  if ((status=bladerf_set_gain_mode(brf->dev, BLADERF_MODULE_RX, BLADERF_GAIN_MGC))) {
+    fprintf(stderr, "[BRF] Failed to disable AGC\n");
+    brf_error(status);
+  }
+
   if ((status=bladerf_set_frequency(brf->dev, BLADERF_MODULE_RX, (unsigned int) openair0_cfg->rx_freq[0])) != 0){
     fprintf(stderr,"Failed to set RX frequency: %s\n",bladerf_strerror(status));
     brf_error(status);
@@ -1096,17 +1094,14 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
 
   // calibrate 
     
- if ((status=bladerf_calibrate_dc(brf->dev, BLADERF_MODULE_TX)) != 0) {
-    fprintf(stderr,"Failed to calibrate TX DC: %s\n", bladerf_strerror(status));
+  if ((status=bladerf_calibrate_dc(brf->dev, BLADERF_DC_CAL_LPF_TUNING)) != 0 ||
+      (status=bladerf_calibrate_dc(brf->dev, BLADERF_DC_CAL_TX_LPF)) != 0 ||
+      (status=bladerf_calibrate_dc(brf->dev, BLADERF_DC_CAL_RX_LPF)) != 0 ||
+      (status=bladerf_calibrate_dc(brf->dev, BLADERF_DC_CAL_RXVGA2)) != 0) {
+    fprintf(stderr, "[BRF] error calibrating\n");
     brf_error(status);
-  } else 
-    printf("[BRF] TX module calibrated DC \n");
- 
-  if ((status=bladerf_calibrate_dc(brf->dev, BLADERF_MODULE_RX)) != 0) {
-    fprintf(stderr,"Failed to calibrate RX DC: %s\n", bladerf_strerror(status));
-    brf_error(status);
-  }else 
-    printf("[BRF] RX module calibrated DC \n");
+  } else
+    printf("[BRF] calibration OK\n");
   
   bladerf_log_set_verbosity(get_brf_log_level(openair0_cfg->log_level));
   
@@ -1146,8 +1141,8 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
  * \returns 0 on success
  */
 int brf_error(int status) {
-  
-  //exit(-1);
+  fprintf(stderr, "[BRF] brf_error: %s\n", bladerf_strerror(status));
+  exit(-1);
   return status; // or status error code
 }
 
@@ -1190,7 +1185,7 @@ struct bladerf * open_bladerf_from_serial(const char *serial) {
 int get_brf_log_level(int log_level){
 
   int level=BLADERF_LOG_LEVEL_INFO;
-  return  BLADERF_LOG_LEVEL_DEBUG; // BLADERF_LOG_LEVEL_VERBOSE;// BLADERF_LOG_LEVEL_DEBUG; //
+  return  BLADERF_LOG_LEVEL_INFO;
   switch(log_level) {
   case LOG_DEBUG:
     level=BLADERF_LOG_LEVEL_DEBUG;
diff --git a/targets/DOCS/api_icic.xml b/targets/DOCS/api_icic.xml
deleted file mode 100644
index 80984fb2363927c6a3002c2af9220367215bdb6d..0000000000000000000000000000000000000000
--- a/targets/DOCS/api_icic.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-<ICIC_API>
-	<SRUCTURE>
-		<STRUCTNAME>SBMAP_CONF</STRUCTNAME>
-		<PATH>openair2/LAYER2/MAC/defs.h</PATH>
-		<FIELD>
-			<FIELDNAME>sbmap[13]</FIELDNAME>
-			<FIELDTYPE>unsigned char</FIELDTYPE>
-			<DESC>subband map indicates to scheduler allowed SB for eNB</DESC>  
-		</FIELD>
-		<FIELD>
-			<FIELDNAME>periodicity</FIELDNAME>
-			<FIELDTYPE>unsigned char</FIELDTYPE>
-			<DESC>in millisecond indicate update instant</DESC>  
-		</FIELD>
-		<FIELD>
-			<FIELDNAME>first_subframe</FIELDNAME>
-			<FIELDTYPE>unsigned char</FIELDTYPE>
-			<DESC>...</DESC>  
-		</FIELD>
-		<FIELD>
-			<FIELDNAME>sb_size</FIELDNAME>
-			<FIELDTYPE>unsigned char</FIELDTYPE>
-			<DESC>number of PRB in this subband</DESC>  
-		</FIELD>
-		<FIELD>
-			<FIELDNAME>nb_active_sb</FIELDNAME>
-			<FIELDTYPE>unsigned char</FIELDTYPE>
-			<DESC>indicates the number of set subbands</DESC>  
-		</FIELD>
-	</SRUCTURE>
-	
-	<SRUCTURE>
-		<STRUCTNAME>eNB_MAC_INST</STRUCTNAME>
-		<PATH>openair2/LAYER2/MAC/defs.h</PATH>
-		<FIELD>
-			...			 
-		</FIELD>
-		<FIELD>
-			<FIELDNAME>sbmap_conf</FIELDNAME>
-			<FIELDTYPE>SBMAP_CONF</FIELDTYPE>
-			<DESC>subband map configuration for each eNB</DESC>  
-		</FIELD>		
-		<INITPATH>openair2/LAYER2/MAC/main.c</INITPATH>
-		<INITFUNC>mac_top_init</INITFUNC>	
-	</SRUCTURE>
-	
-	<SRUCTURE>
-		<STRUCTNAME>MAC_xface</STRUCTNAME>
-		<PATH>openair2/PHY_INTERFACE/defs.h</PATH>
-		<FIELD>
-			...			 
-		</FIELD>
-		<FIELD>
-			<FIELDNAME>(*get_SB_size)(unsigned char)</FIELDNAME>
-			<FIELDTYPE>function pointer n</FIELDTYPE>
-			<DESC>return the number of PRB supported in a subband configuration</DESC>  
-		</FIELD>		
-		<INITPATH>openair2/LAYER2/MAC/main.c</INITPATH>
-		<INITFUNC>l2_init</INITFUNC>	
-	</SRUCTURE>
-	
-	<FUNCTION>
-		<FUNCNAME>Get_Cell_SBMap</FUNCNAME>
-		<PARAMS>unsigned char Mod_id</PARAMS> 
-		<RETURN>void</RETURN>
-		<PROTOPATH>openair2/LAYER2/MAC/defs.h</PROTOPATH>
-		<IMPLPATH>openair2/LAYER2/MAC/eNB_scheduler.c</IMPLPATH>
-		<DESC>imlements ICIC algo</DESC> 
-	</FUNCTION>
-	<FUNCTION>
-		<FUNCNAME>Get_SB_size</FUNCNAME>
-		<PARAMS>unsigned char n_rb_dl</PARAMS> 
-		<RETURN>unsigned char </RETURN>
-		<PROTOPATH>openair1/PHY/LTE_TRANSPORT/proto.h</PROTOPATH>
-		<IMPLPATH>openair1/PHY/LTE_TRANSPORT/lte_mcs.c</IMPLPATH>
-		<DESC>return the number of PRB supported in a subband configuration.</DESC> 
-	</FUNCTION>
-</ICIC_API>
-
-
-	
-	
-		
-		
-		
-		
-		
-			
-			
-			
-			
-		
-		
\ No newline at end of file
diff --git a/targets/DOCS/oaiemu.doc b/targets/DOCS/oaiemu.doc
deleted file mode 100644
index 13433a5f35d916480a21aaeb5ce9cc6315539a60..0000000000000000000000000000000000000000
Binary files a/targets/DOCS/oaiemu.doc and /dev/null differ
diff --git a/targets/DOCS/oaisim_walkthrough.pdf b/targets/DOCS/oaisim_walkthrough.pdf
deleted file mode 100644
index b6d766e7f6dd825202526e18b13308766b65f3a9..0000000000000000000000000000000000000000
Binary files a/targets/DOCS/oaisim_walkthrough.pdf and /dev/null differ
diff --git a/targets/DOCS/openair_header.tex b/targets/DOCS/openair_header.tex
deleted file mode 100755
index 14e1baee5aa95cc29c8f2bab58ac9f7e490be938..0000000000000000000000000000000000000000
--- a/targets/DOCS/openair_header.tex
+++ /dev/null
@@ -1,47 +0,0 @@
-\documentclass[a4paper]{book}
-\usepackage{a4wide}
-\usepackage{makeidx}
-\usepackage{fancyhdr}
-\usepackage{graphicx}
-\usepackage{multicol}
-\usepackage{float}
-\usepackage{textcomp}
-\usepackage{alltt}
-\usepackage{amsmath}
-\usepackage{amssymb}
-\ifx\pdfoutput\undefined
-\usepackage[ps2pdf,
-            pagebackref=true,
-            colorlinks=true,
-            linkcolor=blue
-           ]{hyperref}
-\usepackage{pspicture}
-\else
-\usepackage[pdftex,
-            pagebackref=true,
-            colorlinks=true,
-            linkcolor=blue
-           ]{hyperref}
-\fi
-\usepackage{doxygen}
-\usepackage{times}
-\makeindex
-\setcounter{tocdepth}{1}
-\renewcommand{\footrulewidth}{0.4pt}
-\begin{document}
-\begin{titlepage}
-\vspace*{7cm}
-\begin{center}
-{\Large openair Specifications }\\
-Phyiscal, Medium-Access, Radio-link Control, Packet Data Convergence Protocol and Radio Resource Control Layers\\
-\vspace*{1cm}
-{\large Generated by Doxygen 1.3.8}\\
-\vspace*{0.5cm}
-{\small Sun Oct 31 19:27:37 2004}\\
-\end{center}
-\end{titlepage}
-\clearemptydoublepage
-\pagenumbering{roman}
-\tableofcontents
-\clearemptydoublepage
-\pagenumbering{arabic}
diff --git a/targets/DOCS/path_loss_oaisim.xlsx b/targets/DOCS/path_loss_oaisim.xlsx
deleted file mode 100644
index 2ba25b466bb99c3886046669fe8d86348f8ce389..0000000000000000000000000000000000000000
Binary files a/targets/DOCS/path_loss_oaisim.xlsx and /dev/null differ
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 472ea27feed81748ae35340f78596efa6b89199a..0bbab136be423c79fb99362c2f037292c18da70b 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -149,8 +149,6 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
 #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
 void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
 #endif
-extern PARALLEL_CONF_t get_thread_parallel_conf(void);
-extern WORKER_CONF_t   get_thread_worker_conf(void);
 
 extern uint8_t nfapi_mode;
 extern void oai_subframe_ind(uint16_t sfn, uint16_t sf);
@@ -835,9 +833,9 @@ static void* process_stats_thread(void* param) {
   while (!oai_exit) {
     sleep(1);
       if (opp_enabled == 1) {
-        if (eNB->td) print_meas(&eNB->ulsch_decoding_stats,"ulsch_decoding",NULL,NULL);
-        if (eNB->te)
-        {
+	if ( eNB->ulsch_decoding_stats.trials>0) 
+          print_meas(&eNB->ulsch_decoding_stats,"ulsch_decoding",NULL,NULL);
+	if (eNB->dlsch_encoding_stats.trials >0) {
           print_meas(&eNB->dlsch_turbo_encoding_preperation_stats,"dlsch_coding_crc",NULL,NULL);
           print_meas(&eNB->dlsch_turbo_encoding_segmentation_stats,"dlsch_segmentation",NULL,NULL);
           print_meas(&eNB->dlsch_encoding_stats,"dlsch_encoding",NULL,NULL);
@@ -1316,11 +1314,6 @@ void init_eNB(int single_thread_flag,int wait_for_sync) {
 #ifndef OCP_FRAMEWORK
       LOG_I(PHY,"Initializing eNB %d CC_id %d\n",inst,CC_id);
 #endif
-
-
-      eNB->td                   = ulsch_decoding_data_all;
-      eNB->te                   = dlsch_encoding_all;
-
       
       LOG_I(PHY,"Registering with MAC interface module\n");
       AssertFatal((eNB->if_inst         = IF_Module_init(inst))!=NULL,"Cannot register interface");
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index 03a461454fc376e39ec4fa37ce03b141e406c8a1..74eb37355ba28e118a8f00eef9ae99d59488744c 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -219,31 +219,7 @@ int numerology = 0;
 char *parallel_config = NULL;
 char *worker_config = NULL;
 
-static THREAD_STRUCT thread_struct;
-void set_parallel_conf(char *parallel_conf)
-{
-  if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0)           thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0)        thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0)    thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
-  printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf);
-} 
-void set_worker_conf(char *worker_conf)
-{
-  if(strcmp(worker_conf,"WORKER_DISABLE")==0)                     thread_struct.worker_conf = WORKER_DISABLE;
-  else if(strcmp(worker_conf,"WORKER_ENABLE")==0)                 thread_struct.worker_conf = WORKER_ENABLE;
-  printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf);
-} 
-PARALLEL_CONF_t get_thread_parallel_conf(void)
-{
-  return thread_struct.parallel_conf;
-} 
-WORKER_CONF_t get_thread_worker_conf(void)
-{
-  return thread_struct.worker_conf;
-} 
-
-
-
+THREAD_STRUCT thread_struct;
 /* struct for ethernet specific parameters given in eNB conf file */
 eth_params_t *eth_params;
 
diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c
index 30715441330cfc2a5758d3369409a0c9e7a1e093..5c4ca6ed2e9bf69ab1b9f87ef26ff0e204ed050c 100644
--- a/targets/RT/USER/lte-uesoftmodem.c
+++ b/targets/RT/USER/lte-uesoftmodem.c
@@ -226,29 +226,7 @@ char *worker_config = NULL;
 char* usrp_args=NULL;
 char* usrp_clksrc=NULL;
 
-static THREAD_STRUCT thread_struct;
-void set_parallel_conf(char *parallel_conf)
-{
-  if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0)           thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0)        thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
-  else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0)    thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
-  printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf);
-} 
-void set_worker_conf(char *worker_conf)
-{
-  if(strcmp(worker_conf,"WORKER_DISABLE")==0)                     thread_struct.worker_conf = WORKER_DISABLE;
-  else if(strcmp(worker_conf,"WORKER_ENABLE")==0)                 thread_struct.worker_conf = WORKER_ENABLE;
-  printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf);
-} 
-PARALLEL_CONF_t get_thread_parallel_conf(void)
-{
-  return thread_struct.parallel_conf;
-} 
-WORKER_CONF_t get_thread_worker_conf(void)
-{
-  return thread_struct.worker_conf;
-}  
-
+THREAD_STRUCT thread_struct;
 /* struct for ethernet specific parameters given in eNB conf file */
 eth_params_t *eth_params;