revert enb phy tests. Check that when nof_carriers==6 the phy fails to start and reports an error.

master
Francisco 4 years ago committed by Francisco Paisana
parent ce47cf5910
commit d1b336101f

@ -99,6 +99,12 @@ int phy::init(const phy_args_t& args,
srsran::radio_interface_phy* radio_, srsran::radio_interface_phy* radio_,
stack_interface_phy_lte* stack_) stack_interface_phy_lte* stack_)
{ {
if (cfg.phy_cell_cfg.size() > SRSRAN_MAX_CARRIERS) {
phy_log.error(
"Number of carriers=%zd provided above its maximum=%zd", cfg.phy_cell_cfg.size(), SRSRAN_MAX_CARRIERS);
return SRSRAN_ERROR;
}
mlockall((uint32_t)MCL_CURRENT | (uint32_t)MCL_FUTURE); mlockall((uint32_t)MCL_CURRENT | (uint32_t)MCL_FUTURE);
// Add PHY lib log. // Add PHY lib log.

@ -52,7 +52,7 @@ add_lte_test(enb_phy_test_tm4 enb_phy_test --duration=${ENB_PHY_TEST_DURATION} -
# - 5 Aggregated carriers # - 5 Aggregated carriers
# - 6 PRB # - 6 PRB
# - PUCCH format 3 ACK/NACK feedback mode and more than 2 ACK/NACK bits in PUSCH # - PUCCH format 3 ACK/NACK feedback mode and more than 2 ACK/NACK bits in PUSCH
add_lte_test(enb_phy_test_tm1_ca_pucch3 enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=5 --ue_cell_list=3,4,0,1,2 --ack_mode=pucch3 --cell.nof_prb=6 --tm=1) add_lte_test(enb_phy_test_tm1_ca_pucch3 enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=6 --ue_cell_list=3,4,0,1,2 --ack_mode=pucch3 --cell.nof_prb=6 --tm=1)
# Five carrier aggregation using PUCCH3: # Five carrier aggregation using PUCCH3:
# - 6 eNb cell/carrier # - 6 eNb cell/carrier
@ -60,7 +60,7 @@ add_lte_test(enb_phy_test_tm1_ca_pucch3 enb_phy_test --duration=${ENB_PHY_TEST_D
# - 5 Aggregated carriers # - 5 Aggregated carriers
# - 6 PRB # - 6 PRB
# - PUCCH format 3 ACK/NACK feedback mode and more than 2 ACK/NACK bits in PUSCH # - PUCCH format 3 ACK/NACK feedback mode and more than 2 ACK/NACK bits in PUSCH
add_lte_test(enb_phy_test_tm4_ca_pucch3 enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=5 --ue_cell_list=0,4,3,1,2 --ack_mode=pucch3 --cell.nof_prb=6 --tm=4) add_lte_test(enb_phy_test_tm4_ca_pucch3 enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=6 --ue_cell_list=0,4,3,1,2 --ack_mode=pucch3 --cell.nof_prb=6 --tm=4)
# Two carrier aggregation using Channel Selection: # Two carrier aggregation using Channel Selection:
# - 6 eNb cell/carrier # - 6 eNb cell/carrier
@ -68,7 +68,7 @@ add_lte_test(enb_phy_test_tm4_ca_pucch3 enb_phy_test --duration=${ENB_PHY_TEST_D
# - 2 Aggregated carriers # - 2 Aggregated carriers
# - 6 PRB # - 6 PRB
# - PUCCH format 1b with Channel selection ACK/NACK feedback mode # - PUCCH format 1b with Channel selection ACK/NACK feedback mode
add_lte_test(enb_phy_test_tm1_ca_cs enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=5 --ue_cell_list=4,3 --ack_mode=cs --cell.nof_prb=6 --tm=1) add_lte_test(enb_phy_test_tm1_ca_cs enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=6 --ue_cell_list=5,4 --ack_mode=cs --cell.nof_prb=6 --tm=1)
# Two carrier aggregation using Channel Selection: # Two carrier aggregation using Channel Selection:
# - 6 eNb cell/carrier # - 6 eNb cell/carrier
@ -76,7 +76,7 @@ add_lte_test(enb_phy_test_tm1_ca_cs enb_phy_test --duration=${ENB_PHY_TEST_DURAT
# - 2 Aggregated carriers # - 2 Aggregated carriers
# - 6 PRB # - 6 PRB
# - PUCCH format 1b with Channel selection ACK/NACK feedback mode # - PUCCH format 1b with Channel selection ACK/NACK feedback mode
add_lte_test(enb_phy_test_tm4_ca_cs enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=5 --ue_cell_list=0,4 --ack_mode=cs --cell.nof_prb=6 --tm=4) add_lte_test(enb_phy_test_tm4_ca_cs enb_phy_test --duration=${ENB_PHY_TEST_DURATION} --nof_enb_cells=6 --ue_cell_list=1,5 --ack_mode=cs --cell.nof_prb=6 --tm=4)
# Two carrier aggregation using Channel Selection and HO: # Two carrier aggregation using Channel Selection and HO:
# - 3 eNb cell/carrier # - 3 eNb cell/carrier

@ -1228,6 +1228,12 @@ public:
phy_cfg.prach_cnfg.prach_cfg_info.prach_freq_offset = 2; phy_cfg.prach_cnfg.prach_cfg_info.prach_freq_offset = 2;
phy_cfg.prach_cnfg.prach_cfg_info.zero_correlation_zone_cfg = 5; phy_cfg.prach_cnfg.prach_cfg_info.zero_correlation_zone_cfg = 5;
/// eNb PHY initialisation instance
enb_phy = unique_srsenb_phy_t(new srsenb::phy(log_sink));
}
int init()
{
// Create base UE dedicated configuration // Create base UE dedicated configuration
srsran::phy_cfg_t dedicated = {}; srsran::phy_cfg_t dedicated = {};
@ -1293,11 +1299,10 @@ public:
stack = unique_dummy_stack_t(new dummy_stack(phy_cfg, phy_rrc_cfg, args.log_level, args.rnti)); stack = unique_dummy_stack_t(new dummy_stack(phy_cfg, phy_rrc_cfg, args.log_level, args.rnti));
stack->set_active_cell_list(args.ue_cell_list); stack->set_active_cell_list(args.ue_cell_list);
/// eNb PHY initialisation instance
enb_phy = unique_srsenb_phy_t(new srsenb::phy(log_sink));
/// Initiate eNb PHY with the given RNTI /// Initiate eNb PHY with the given RNTI
enb_phy->init(phy_args, phy_cfg, radio.get(), stack.get()); if (enb_phy->init(phy_args, phy_cfg, radio.get(), stack.get()) < 0) {
return SRSRAN_ERROR;
}
enb_phy->set_config(args.rnti, phy_rrc_cfg); enb_phy->set_config(args.rnti, phy_rrc_cfg);
enb_phy->complete_config(args.rnti); enb_phy->complete_config(args.rnti);
enb_phy->set_activation_deactivation_scell(args.rnti, activation); enb_phy->set_activation_deactivation_scell(args.rnti, activation);
@ -1307,6 +1312,8 @@ public:
/// Configure UE with initial configuration /// Configure UE with initial configuration
ue_phy->reconfigure(phy_rrc_cfg); ue_phy->reconfigure(phy_rrc_cfg);
return SRSRAN_SUCCESS;
} }
void stop() void stop()
@ -1457,6 +1464,14 @@ int main(int argc, char** argv)
// Create Test Bench // Create Test Bench
unique_phy_test_bench test_bench = unique_phy_test_bench(new phy_test_bench(test_args, srslog::get_default_sink())); unique_phy_test_bench test_bench = unique_phy_test_bench(new phy_test_bench(test_args, srslog::get_default_sink()));
int err_code = test_bench->init();
bool valid_cfg = test_args.nof_enb_cells <= SRSRAN_MAX_CARRIERS;
if (not valid_cfg) {
// Verify that phy returns with an error if provided an invalid configuration
TESTASSERT(err_code != SRSRAN_SUCCESS);
return 0;
}
TESTASSERT(err_code == SRSRAN_SUCCESS);
// Run Simulation // Run Simulation
for (uint32_t i = 0; i < test_args.duration; i++) { for (uint32_t i = 0; i < test_args.duration; i++) {

Loading…
Cancel
Save