|
|
@ -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++) {
|
|
|
|