sched: scheduler now accounts for prachs with different durations

master
Francisco Paisana 3 years ago
parent bb4f469794
commit bc5a548fe8

@ -170,6 +170,8 @@ SRSRAN_API bool srsran_prach_tti_opportunity(srsran_prach_t* p, uint32_t current
SRSRAN_API bool
srsran_prach_tti_opportunity_config_fdd(uint32_t config_idx, uint32_t current_tti, int allowed_subframe);
SRSRAN_API bool srsran_prach_in_window_config_fdd(uint32_t config_idx, uint32_t current_tti, int allowed_subframe);
SRSRAN_API bool srsran_prach_tti_opportunity_config_tdd(uint32_t config_idx,
uint32_t tdd_ul_dl_config,
uint32_t current_tti,

@ -154,6 +154,23 @@ bool srsran_prach_tti_opportunity_config_fdd(uint32_t config_idx, uint32_t curre
return false;
}
bool srsran_prach_in_window_config_fdd(uint32_t config_idx, uint32_t current_tti, int allowed_subframe)
{
if (srsran_prach_tti_opportunity_config_fdd(config_idx, current_tti, allowed_subframe)) {
return true;
}
uint32_t preamble_format = srsran_prach_get_preamble_format(config_idx);
float T_tot = (prach_Tseq[preamble_format] + prach_Tcp[preamble_format]) * SRSRAN_LTE_TS;
uint32_t tti_dur = (uint32_t)ceilf(T_tot * 1000);
for (uint32_t i = 1; i < tti_dur; ++i) {
if (srsran_prach_tti_opportunity_config_fdd(config_idx, current_tti - i, allowed_subframe)) {
return true;
}
}
return false;
}
uint32_t srsran_prach_nof_f_idx_tdd(uint32_t config_idx, uint32_t tdd_ul_dl_config)
{
if (config_idx < 64 && tdd_ul_dl_config < 7) {

@ -99,7 +99,7 @@ void sf_grid_t::new_tti(tti_point tti_rx_)
ul_mask |= pucch_mask;
// Reserve PRBs for PRACH
if (srsran_prach_tti_opportunity_config_fdd(cc_cfg->cfg.prach_config, to_tx_ul(tti_rx).to_uint(), -1)) {
if (srsran_prach_in_window_config_fdd(cc_cfg->cfg.prach_config, to_tx_ul(tti_rx).to_uint(), -1)) {
prbmask_t prach_mask{cc_cfg->nof_prb()};
prach_mask.fill(cc_cfg->cfg.prach_freq_offset, cc_cfg->cfg.prach_freq_offset + 6);
reserve_ul_prbs(prach_mask, false); // TODO: set to true once test sib.conf files are updated

Loading…
Cancel
Save