nr,sched: push BSRs into the scheduler when nr_phy_test is run with PUSCH enabled

This commit is contained in:
Francisco 2021-10-22 10:53:11 +01:00 committed by Andre Puschmann
parent 32a1646536
commit 67a39fbb81
3 changed files with 13 additions and 4 deletions

View File

@ -69,6 +69,9 @@ public:
int pusch_info(const srsran_slot_cfg_t& slot_cfg, pusch_info_t& pusch_info) override;
void rach_detected(const rach_info_t& rach_info) override;
// Test interface
void ul_bsr(uint16_t rnti, uint32_t lcid, uint32_t bsr);
private:
uint16_t add_ue_(uint32_t enb_cc_idx);
uint16_t alloc_ue(uint32_t enb_cc_idx);

View File

@ -286,6 +286,11 @@ int mac_nr::rlc_buffer_state(uint16_t rnti, uint32_t lc_id, uint32_t tx_queue, u
return SRSRAN_SUCCESS;
}
void mac_nr::ul_bsr(uint16_t rnti, uint32_t lcid, uint32_t bsr)
{
sched.ul_bsr(rnti, lcid, bsr);
}
int mac_nr::slot_indication(const srsran_slot_cfg_t& slot_cfg)
{
return 0;

View File

@ -86,7 +86,7 @@ private:
srsenb::rlc_dummy rlc_obj;
std::unique_ptr<srsenb::mac_nr> mac;
srslog::basic_logger& sched_logger;
bool autofill_pdsch_bsr = false;
bool autofill_sch_bsr = false;
std::mutex metrics_mutex;
metrics_t metrics = {};
@ -359,7 +359,7 @@ public:
sched_logger.set_level(srslog::str_to_basic_level(args.log_level));
srslog::fetch_basic_logger("MAC-NR").set_level(srslog::str_to_basic_level(args.log_level));
autofill_pdsch_bsr = args.pdsch.slots != "" and args.pdsch.slots != "none";
autofill_sch_bsr = args.pdsch.slots != "" and args.pdsch.slots != "none";
// create sched object
mac.reset(new srsenb::mac_nr{&task_sched});
@ -464,8 +464,9 @@ public:
sched_logger.set_context(slot_cfg.idx);
if (not use_dummy_mac) {
if (autofill_pdsch_bsr) {
mac->rlc_buffer_state(rnti, 0, 10000, 0);
if (autofill_sch_bsr) {
mac->rlc_buffer_state(rnti, 0, 100000, 0);
mac->ul_bsr(rnti, 0, 100000);
}
int ret = mac->get_dl_sched(slot_cfg, dl_sched);