Commit 2ff7bfc4 authored by Guy De Souza's avatar Guy De Souza

Merge with develop-nr

parents 6d760fe4 e1757a8a
This diff is collapsed.
This diff is collapsed.
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
# * contact@openairinterface.org # * contact@openairinterface.org
# */ # */
function usage { function create_usage {
echo "OAI VM Creation script" echo "OAI CI VM script"
echo " Original Author: Raphael Defosseux" echo " Original Author: Raphael Defosseux"
echo " Requirements:" echo " Requirements:"
echo " -- uvtool uvtool-libvirt apt-cacher" echo " -- uvtool uvtool-libvirt apt-cacher"
...@@ -31,9 +31,9 @@ function usage { ...@@ -31,9 +31,9 @@ function usage {
echo "" echo ""
echo "Usage:" echo "Usage:"
echo "------" echo "------"
echo " createVM.sh [OPTIONS]" echo " oai-ci-vm-tool create [OPTIONS]"
echo "" echo ""
echo "Options:" echo "Mandatory Options:"
echo "--------" echo "--------"
echo " --job-name #### OR -jn ####" echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job." echo " Specify the name of the Jenkins job."
...@@ -41,14 +41,7 @@ function usage { ...@@ -41,14 +41,7 @@ function usage {
echo " --build-id #### OR -id ####" echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job." echo " Specify the build ID of the Jenkins job."
echo "" echo ""
echo " --variant enb-usrp OR -v1" variant_usage
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo " --variant gnb-usrp OR -v5"
echo " --variant nu-ue-usrp OR -v6"
echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8"
echo " Specify the variant to build." echo " Specify the variant to build."
echo "" echo ""
echo " --help OR -h" echo " --help OR -h"
...@@ -56,158 +49,21 @@ function usage { ...@@ -56,158 +49,21 @@ function usage {
echo "" echo ""
} }
function variant_usage { function create_vm {
echo "OAI VM Build Check script" echo "############################################################"
echo " Original Author: Raphael Defosseux" echo "OAI CI VM script"
echo "" echo "############################################################"
echo " --variant enb-usrp OR -v1" echo "VM_NAME = $VM_NAME"
echo " --variant basic-sim OR -v2" echo "VM_MEMORY = $VM_MEMORY MBytes"
echo " --variant phy-sim OR -v3" echo "VM_CPU = $VM_CPU"
echo " --variant cppcheck OR -v4"
echo " --variant gnb-usrp OR -v5"
echo " --variant nu-ue-usrp OR -v6"
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
while [[ $# -gt 0 ]] echo "############################################################"
do echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
key="$1" 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 VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
-h|--help) echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
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=8192
shift
;;
-v5)
VM_NAME=ci-gnb-usrp
shift
;;
-v6)
VM_NAME=ci-ue-nr-usrp
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=8192
;;
gnb-usrp)
VM_NAME=ci-gnb-usrp
;;
nu-ue-usrp)
VM_NAME=ci-ue-nr-usrp
;;
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
...@@ -20,15 +20,17 @@ ...@@ -20,15 +20,17 @@
# * contact@openairinterface.org # * contact@openairinterface.org
# */ # */
function usage { function destroy_usage {
echo "OAI VM Destroy script" echo "OAI CI VM script"
echo " Original Author: Raphael Defosseux" echo " Original Author: Raphael Defosseux"
echo " Requirements:"
echo " -- uvtool uvtool-libvirt apt-cacher"
echo "" echo ""
echo "Usage:" echo "Usage:"
echo "------" echo "------"
echo " destroyAllRunningVM.sh [OPTIONS]" echo " oai-ci-vm-tool destroy [OPTIONS]"
echo "" echo ""
echo "Options:" echo "Mandatory Options:"
echo "--------" echo "--------"
echo " --job-name #### OR -jn ####" echo " --job-name #### OR -jn ####"
echo " Specify the name of the Jenkins job." echo " Specify the name of the Jenkins job."
...@@ -36,66 +38,26 @@ function usage { ...@@ -36,66 +38,26 @@ function usage {
echo " --build-id #### OR -id ####" echo " --build-id #### OR -id ####"
echo " Specify the build ID of the Jenkins job." echo " Specify the build ID of the Jenkins job."
echo "" echo ""
echo "Options:"
echo "--------"
echo " --help OR -h" echo " --help OR -h"
echo " Print this help message." echo " Print this help message."
echo "" echo ""
} }
if [ $# -gt 4 ] function destroy_vm {
then echo "############################################################"
echo "Syntax Error: not the correct number of arguments" echo "OAI CI VM script"
echo "" echo "############################################################"
usage echo "VM_TEMPLATE = $VM_TEMPLATE"
exit 1
fi LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
VM_TEMPLATE=ci- for CI_VM in $LIST_CI_VM
JOB_NAME=XX do
BUILD_ID=XX VM_IP_ADDR=`uvt-kvm ip $CI_VM`
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
while [[ $# -gt 0 ]] uvt-kvm destroy $CI_VM
do ssh-keygen -R $VM_IP_ADDR
key="$1" done
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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1055,7 +1055,7 @@ ...@@ -1055,7 +1055,7 @@
<main_exec_args>-s-11 -S-10 -n1000 <main_exec_args>-s-11 -S-10 -n1000
-s-11 -S-10 -n10 -I</main_exec_args> -s-11 -S-10 -n10 -I</main_exec_args>
<tags>nr_pbchsim.test1</tags> <tags>nr_pbchsim.test1</tags>
<search_expr_true>n_errors \(negative CRC\) = 0</search_expr_true> <search_expr_true>PBCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns> <nruns>3</nruns>
</testCase> </testCase>
......
...@@ -406,7 +406,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu) ...@@ -406,7 +406,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu)
gNB_config->rf_config.ul_carrier_bandwidth.value = N_RB_UL; gNB_config->rf_config.ul_carrier_bandwidth.value = N_RB_UL;
gNB_config->sch_config.half_frame_index.value = 0; gNB_config->sch_config.half_frame_index.value = 0;
gNB_config->sch_config.ssb_subcarrier_offset.value = 0; gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
gNB_config->sch_config.n_ssb_crb.value = (N_RB_DL-20)>>1; gNB_config->sch_config.n_ssb_crb.value = (N_RB_DL-20);
gNB_config->sch_config.ssb_subcarrier_offset.value = 0; gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
...@@ -441,7 +441,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) ...@@ -441,7 +441,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config)
gNB_config->rf_config.ul_carrier_bandwidth.value = phy_config->cfg->rf_config.ul_carrier_bandwidth.value;//106; gNB_config->rf_config.ul_carrier_bandwidth.value = phy_config->cfg->rf_config.ul_carrier_bandwidth.value;//106;
gNB_config->sch_config.half_frame_index.value = 0; gNB_config->sch_config.half_frame_index.value = 0;
gNB_config->sch_config.ssb_subcarrier_offset.value = phy_config->cfg->sch_config.ssb_subcarrier_offset.value;//0; gNB_config->sch_config.ssb_subcarrier_offset.value = phy_config->cfg->sch_config.ssb_subcarrier_offset.value;//0;
gNB_config->sch_config.n_ssb_crb.value = (phy_config->cfg->rf_config.dl_carrier_bandwidth.value-20)>>1; gNB_config->sch_config.n_ssb_crb.value = (phy_config->cfg->rf_config.dl_carrier_bandwidth.value-20);
gNB_config->sch_config.physical_cell_id.value = phy_config->cfg->sch_config.physical_cell_id.value; gNB_config->sch_config.physical_cell_id.value = phy_config->cfg->sch_config.physical_cell_id.value;
if (phy_config->cfg->subframe_config.duplex_mode.value == 0) { if (phy_config->cfg->subframe_config.duplex_mode.value == 0) {
......
...@@ -655,7 +655,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -655,7 +655,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
int i,j,k,l; int i,j,k,l;
int eNB_id; int eNB_id;
int th_id; int th_id;
int n_ssb_crb=(fp->N_RB_DL-20)>>1; int n_ssb_crb=(fp->N_RB_DL-20);
abstraction_flag = 0; abstraction_flag = 0;
fp->nb_antennas_tx = 1; fp->nb_antennas_tx = 1;
fp->nb_antennas_rx=1; fp->nb_antennas_rx=1;
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
//#define NR_LTE_PDCCH_DCI_SWITCH //#define NR_LTE_PDCCH_DCI_SWITCH
#define NR_PDCCH_DCI_RUN // activates new nr functions #define NR_PDCCH_DCI_RUN // activates new nr functions
//#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs #define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs
#define NR_NBR_CORESET_ACT_BWP 3 // The number of CoreSets per BWP is limited to 3 (including initial CORESET: ControlResourceId 0) #define NR_NBR_CORESET_ACT_BWP 3 // The number of CoreSets per BWP is limited to 3 (including initial CORESET: ControlResourceId 0)
#define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0) #define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0)
#define PDCCH_TEST_POLAR_TEMP_FIX #define PDCCH_TEST_POLAR_TEMP_FIX
......
...@@ -149,7 +149,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) ...@@ -149,7 +149,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
int rx_power=0; //aarx, int rx_power=0; //aarx,
//nfapi_nr_config_request_t* config; //nfapi_nr_config_request_t* config;
int n_ssb_crb=(fp->N_RB_DL-20)>>1; int n_ssb_crb=(fp->N_RB_DL-20);
// First try TDD normal prefix, mu 1 // First try TDD normal prefix, mu 1
fp->Ncp=NORMAL; fp->Ncp=NORMAL;
fp->frame_type=TDD; fp->frame_type=TDD;
...@@ -212,12 +212,12 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode) ...@@ -212,12 +212,12 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
nr_gold_pdcch(ue,0, 2); nr_gold_pdcch(ue,0, 2);
/* /*
int nb_prefix_samples0 = frame_parms->nb_prefix_samples0; int nb_prefix_samples0 = fp->nb_prefix_samples0;
frame_parms->nb_prefix_samples0 = frame_parms->nb_prefix_samples. fp->nb_prefix_samples0 = fp->nb_prefix_samples;
nr_slot_fep(ue,0, 0, ue->ssb_offset, 0, 1, NR_PDCCH_EST); nr_slot_fep(ue,0, 0, ue->ssb_offset, 0, 1, NR_PDCCH_EST);
nr_slot_fep(ue,1, 0, ue->ssb_offset, 0, 1, NR_PDCCH_EST); nr_slot_fep(ue,1, 0, ue->ssb_offset, 0, 1, NR_PDCCH_EST);
frame_parms->nb_prefix_samples0 = nb_prefix_samples0; fp->nb_prefix_samples0 = nb_prefix_samples0;
LOG_I(PHY,"[UE %d] AUTOTEST Cell Sync : frame = %d, rx_offset %d, freq_offset %d \n", LOG_I(PHY,"[UE %d] AUTOTEST Cell Sync : frame = %d, rx_offset %d, freq_offset %d \n",
ue->Mod_id, ue->Mod_id,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment