mirror of https://github.com/PentHertz/srsLTE.git
added DL TTI mask for MBMS
This commit is contained in:
parent
2e9a981a8a
commit
424876c5e4
|
@ -89,6 +89,7 @@ public:
|
||||||
virtual int get_dl_sched(uint32_t tti, dl_sched_t *dl_sched_res) = 0;
|
virtual int get_dl_sched(uint32_t tti, dl_sched_t *dl_sched_res) = 0;
|
||||||
virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_t* dl_sched_res) = 0;
|
virtual int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_t* dl_sched_res) = 0;
|
||||||
virtual int get_ul_sched(uint32_t tti, ul_sched_t *ul_sched_res) = 0;
|
virtual int get_ul_sched(uint32_t tti, ul_sched_t *ul_sched_res) = 0;
|
||||||
|
virtual void set_sched_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs) = 0;
|
||||||
|
|
||||||
// Radio-Link status
|
// Radio-Link status
|
||||||
virtual void rl_failure(uint16_t rnti) = 0;
|
virtual void rl_failure(uint16_t rnti) = 0;
|
||||||
|
|
|
@ -246,6 +246,8 @@ public:
|
||||||
virtual int dl_sched(uint32_t tti, dl_sched_res_t *sched_result) = 0;
|
virtual int dl_sched(uint32_t tti, dl_sched_res_t *sched_result) = 0;
|
||||||
virtual int ul_sched(uint32_t tti, ul_sched_res_t *sched_result) = 0;
|
virtual int ul_sched(uint32_t tti, ul_sched_res_t *sched_result) = 0;
|
||||||
|
|
||||||
|
/* Custom */
|
||||||
|
virtual void set_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,10 @@ public:
|
||||||
return mac.get_mch_sched(tti, is_mcch, dl_sched_res);
|
return mac.get_mch_sched(tti, is_mcch, dl_sched_res);
|
||||||
}
|
}
|
||||||
int get_ul_sched(uint32_t tti, ul_sched_t* ul_sched_res) final { return mac.get_ul_sched(tti, ul_sched_res); }
|
int get_ul_sched(uint32_t tti, ul_sched_t* ul_sched_res) final { return mac.get_ul_sched(tti, ul_sched_res); }
|
||||||
|
void set_sched_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs) final
|
||||||
|
{
|
||||||
|
mac.set_sched_dl_tti_mask(tti_mask, nof_sfs);
|
||||||
|
}
|
||||||
// Radio-Link status
|
// Radio-Link status
|
||||||
void rl_failure(uint16_t rnti) final { mac.rl_failure(rnti); }
|
void rl_failure(uint16_t rnti) final { mac.rl_failure(rnti); }
|
||||||
void rl_ok(uint16_t rnti) final { mac.rl_ok(rnti); }
|
void rl_ok(uint16_t rnti) final { mac.rl_ok(rnti); }
|
||||||
|
|
|
@ -79,6 +79,10 @@ public:
|
||||||
int get_dl_sched(uint32_t tti, dl_sched_t *dl_sched_res);
|
int get_dl_sched(uint32_t tti, dl_sched_t *dl_sched_res);
|
||||||
int get_ul_sched(uint32_t tti, ul_sched_t *ul_sched_res);
|
int get_ul_sched(uint32_t tti, ul_sched_t *ul_sched_res);
|
||||||
int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_t* dl_sched_res);
|
int get_mch_sched(uint32_t tti, bool is_mcch, dl_sched_t* dl_sched_res);
|
||||||
|
void set_sched_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs) final
|
||||||
|
{
|
||||||
|
scheduler.set_dl_tti_mask(tti_mask, nof_sfs);
|
||||||
|
}
|
||||||
void build_mch_sched(uint32_t tbs);
|
void build_mch_sched(uint32_t tbs);
|
||||||
void rl_failure(uint16_t rnti);
|
void rl_failure(uint16_t rnti);
|
||||||
void rl_ok(uint16_t rnti);
|
void rl_ok(uint16_t rnti);
|
||||||
|
|
|
@ -137,8 +137,9 @@ public:
|
||||||
int dl_sched(uint32_t tti, dl_sched_res_t* sched_result) final;
|
int dl_sched(uint32_t tti, dl_sched_res_t* sched_result) final;
|
||||||
int ul_sched(uint32_t tti, ul_sched_res_t* sched_result) final;
|
int ul_sched(uint32_t tti, ul_sched_res_t* sched_result) final;
|
||||||
|
|
||||||
/* Custom TPC functions
|
/* Custom functions
|
||||||
*/
|
*/
|
||||||
|
void set_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs) final;
|
||||||
void tpc_inc(uint16_t rnti);
|
void tpc_inc(uint16_t rnti);
|
||||||
void tpc_dec(uint16_t rnti);
|
void tpc_dec(uint16_t rnti);
|
||||||
|
|
||||||
|
@ -284,6 +285,7 @@ protected:
|
||||||
const static uint32_t nof_sched_ttis = 10;
|
const static uint32_t nof_sched_ttis = 10;
|
||||||
tti_sched_t tti_scheds[nof_sched_ttis];
|
tti_sched_t tti_scheds[nof_sched_ttis];
|
||||||
tti_sched_t* get_tti_sched(uint32_t tti_rx) { return &tti_scheds[tti_rx % nof_sched_ttis]; }
|
tti_sched_t* get_tti_sched(uint32_t tti_rx) { return &tti_scheds[tti_rx % nof_sched_ttis]; }
|
||||||
|
std::vector<uint8_t> tti_dl_mask;
|
||||||
|
|
||||||
tti_sched_t* new_tti(uint32_t tti_rx);
|
tti_sched_t* new_tti(uint32_t tti_rx);
|
||||||
void generate_phich(tti_sched_t* tti_sched);
|
void generate_phich(tti_sched_t* tti_sched);
|
||||||
|
|
|
@ -264,10 +264,12 @@ void phy_common::build_mch_table()
|
||||||
ZERO_OBJECT(mcch_table);
|
ZERO_OBJECT(mcch_table);
|
||||||
|
|
||||||
// 40 element table represents 4 frames (40 subframes)
|
// 40 element table represents 4 frames (40 subframes)
|
||||||
|
uint32_t nof_sfs = 10;
|
||||||
if (mbsfn.mbsfn_subfr_cnfg.sf_alloc.type().value == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame) {
|
if (mbsfn.mbsfn_subfr_cnfg.sf_alloc.type().value == mbsfn_sf_cfg_s::sf_alloc_c_::types::one_frame) {
|
||||||
generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.one_frame().to_number(), 1);
|
generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.one_frame().to_number(), 1);
|
||||||
} else {
|
} else {
|
||||||
generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.four_frames().to_number(), 4);
|
generate_mch_table(&mch_table[0], (uint32_t)mbsfn.mbsfn_subfr_cnfg.sf_alloc.four_frames().to_number(), 4);
|
||||||
|
nof_sfs = 40;
|
||||||
}
|
}
|
||||||
// Debug
|
// Debug
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
@ -275,6 +277,8 @@ void phy_common::build_mch_table()
|
||||||
for(uint32_t j=0; j<40; j++) {
|
for(uint32_t j=0; j<40; j++) {
|
||||||
ss << (int) mch_table[j] << "|";
|
ss << (int) mch_table[j] << "|";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stack->set_sched_dl_tti_mask(mch_table, nof_sfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void phy_common::build_mcch_table()
|
void phy_common::build_mcch_table()
|
||||||
|
|
|
@ -576,6 +576,7 @@ sched::sched() : bc_aggr_level(0), rar_aggr_level(0), P(0), si_n_rbg(0), rar_n_r
|
||||||
bzero(&sched_cfg, sizeof(sched_cfg));
|
bzero(&sched_cfg, sizeof(sched_cfg));
|
||||||
bzero(&common_locations, sizeof(common_locations));
|
bzero(&common_locations, sizeof(common_locations));
|
||||||
bzero(&pdsch_re, sizeof(pdsch_re));
|
bzero(&pdsch_re, sizeof(pdsch_re));
|
||||||
|
tti_dl_mask.resize(10, 1);
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
bzero(rar_locations[i], sizeof(sched_ue::sched_dci_cce_t) * 10);
|
bzero(rar_locations[i], sizeof(sched_ue::sched_dci_cce_t) * 10);
|
||||||
|
@ -1006,6 +1007,11 @@ int sched::ul_sr_info(uint32_t tti, uint16_t rnti)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sched::set_dl_tti_mask(uint8_t* tti_mask, uint32_t nof_sfs)
|
||||||
|
{
|
||||||
|
tti_dl_mask.assign(tti_mask, tti_mask + nof_sfs);
|
||||||
|
}
|
||||||
|
|
||||||
void sched::tpc_inc(uint16_t rnti)
|
void sched::tpc_inc(uint16_t rnti)
|
||||||
{
|
{
|
||||||
pthread_rwlock_rdlock(&rwlock);
|
pthread_rwlock_rdlock(&rwlock);
|
||||||
|
@ -1051,7 +1057,9 @@ sched::tti_sched_t* sched::new_tti(uint32_t tti_rx)
|
||||||
generate_phich(tti_sched);
|
generate_phich(tti_sched);
|
||||||
|
|
||||||
/* Schedule DL */
|
/* Schedule DL */
|
||||||
|
if (tti_dl_mask[tti_rx % tti_dl_mask.size()] > 0) {
|
||||||
generate_dl_sched(tti_sched);
|
generate_dl_sched(tti_sched);
|
||||||
|
}
|
||||||
|
|
||||||
/* Schedule UL */
|
/* Schedule UL */
|
||||||
generate_ul_sched(tti_sched);
|
generate_ul_sched(tti_sched);
|
||||||
|
|
Loading…
Reference in New Issue