fix fixed mcs issue

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent 51f8ba60da
commit 7713df2cf9

@ -568,6 +568,7 @@ std::pair<int, int> sched_ue::compute_mcs_and_tbs(uint32_t ue_cc_i
tbs_bytes = carriers[ue_cc_idx].alloc_tbs_dl(nof_alloc_prbs, nof_re, req_bytes.second, &mcs);
} else {
// Fixed MCS
mcs = carriers[ue_cc_idx].fixed_mcs_dl;
tbs_bytes = sched_utils::get_tbs_bytes(
(uint32_t)carriers[ue_cc_idx].fixed_mcs_dl, nof_alloc_prbs, cfg.use_tbs_index_alt, false);
}

@ -875,6 +875,7 @@ int common_sched_tester::sim_cfg(sim_sched_args args)
sim_args0 = std::move(args);
sched::cell_cfg(sim_args0.cell_cfg); // call parent cfg
sched::set_sched_cfg(&sim_args0.sched_args);
ue_tester.reset(new user_state_sched_tester{sim_args0.cell_cfg});
output_tester.clear();

@ -426,13 +426,14 @@ void test_scheduler_rand(sched_sim_events sim)
sched_sim_events rand_sim_params(uint32_t nof_ttis)
{
sched_sim_events sim_gen;
uint32_t max_conn_dur = 10000, min_conn_dur = 500;
float P_ul_sr = srsenb::randf() * 0.5, P_dl = srsenb::randf() * 0.5;
float P_prach = 0.99f; // 0.1f + randf()*0.3f;
float ul_sr_exps[] = {1, 4}; // log rand
float dl_data_exps[] = {1, 4}; // log rand
uint32_t max_nof_users = 5;
auto boolean_dist = []() { return std::uniform_int_distribution<>{0, 1}(srsenb::get_rand_gen()); };
sched_sim_events sim_gen;
uint32_t max_conn_dur = 10000, min_conn_dur = 500;
float P_ul_sr = srsenb::randf() * 0.5, P_dl = srsenb::randf() * 0.5;
float P_prach = 0.99f; // 0.1f + randf()*0.3f;
float ul_sr_exps[] = {1, 4}; // log rand
float dl_data_exps[] = {1, 4}; // log rand
uint32_t max_nof_users = 5;
std::uniform_int_distribution<> connection_dur_dist(min_conn_dur, max_conn_dur);
std::uniform_int_distribution<uint32_t> dist_prb_idx(0, 5);
uint32_t prb_idx = dist_prb_idx(srsenb::get_rand_gen());
@ -444,6 +445,10 @@ sched_sim_events rand_sim_params(uint32_t nof_ttis)
sim_gen.sim_args.default_ue_sim_cfg.periodic_cqi = true;
sim_gen.sim_args.start_tti = 0;
sim_gen.sim_args.sim_log = log_global.get();
sim_gen.sim_args.sched_args.pdsch_mcs =
boolean_dist() ? -1 : std::uniform_int_distribution<>{0, 24}(srsenb::get_rand_gen());
sim_gen.sim_args.sched_args.pusch_mcs =
boolean_dist() ? -1 : std::uniform_int_distribution<>{0, 24}(srsenb::get_rand_gen());
generator.tti_events.resize(nof_ttis);

@ -109,6 +109,7 @@ struct sim_sched_args {
std::vector<srsenb::sched_interface::cell_cfg_t> cell_cfg;
srslte::log* sim_log = nullptr;
ue_ctxt_test_cfg default_ue_sim_cfg{};
srsenb::sched_interface::sched_args_t sched_args = {};
};
// generate all events up front

Loading…
Cancel
Save