mirror of https://github.com/PentHertz/srsLTE.git
nr,sched: push BSRs into the scheduler when nr_phy_test is run with PUSCH enabled
This commit is contained in:
parent
32a1646536
commit
67a39fbb81
|
@ -69,6 +69,9 @@ public:
|
||||||
int pusch_info(const srsran_slot_cfg_t& slot_cfg, pusch_info_t& pusch_info) override;
|
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;
|
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:
|
private:
|
||||||
uint16_t add_ue_(uint32_t enb_cc_idx);
|
uint16_t add_ue_(uint32_t enb_cc_idx);
|
||||||
uint16_t alloc_ue(uint32_t enb_cc_idx);
|
uint16_t alloc_ue(uint32_t enb_cc_idx);
|
||||||
|
|
|
@ -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;
|
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)
|
int mac_nr::slot_indication(const srsran_slot_cfg_t& slot_cfg)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -86,7 +86,7 @@ private:
|
||||||
srsenb::rlc_dummy rlc_obj;
|
srsenb::rlc_dummy rlc_obj;
|
||||||
std::unique_ptr<srsenb::mac_nr> mac;
|
std::unique_ptr<srsenb::mac_nr> mac;
|
||||||
srslog::basic_logger& sched_logger;
|
srslog::basic_logger& sched_logger;
|
||||||
bool autofill_pdsch_bsr = false;
|
bool autofill_sch_bsr = false;
|
||||||
|
|
||||||
std::mutex metrics_mutex;
|
std::mutex metrics_mutex;
|
||||||
metrics_t metrics = {};
|
metrics_t metrics = {};
|
||||||
|
@ -359,7 +359,7 @@ public:
|
||||||
sched_logger.set_level(srslog::str_to_basic_level(args.log_level));
|
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));
|
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
|
// create sched object
|
||||||
mac.reset(new srsenb::mac_nr{&task_sched});
|
mac.reset(new srsenb::mac_nr{&task_sched});
|
||||||
|
@ -464,8 +464,9 @@ public:
|
||||||
sched_logger.set_context(slot_cfg.idx);
|
sched_logger.set_context(slot_cfg.idx);
|
||||||
|
|
||||||
if (not use_dummy_mac) {
|
if (not use_dummy_mac) {
|
||||||
if (autofill_pdsch_bsr) {
|
if (autofill_sch_bsr) {
|
||||||
mac->rlc_buffer_state(rnti, 0, 10000, 0);
|
mac->rlc_buffer_state(rnti, 0, 100000, 0);
|
||||||
|
mac->ul_bsr(rnti, 0, 100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret = mac->get_dl_sched(slot_cfg, dl_sched);
|
int ret = mac->get_dl_sched(slot_cfg, dl_sched);
|
||||||
|
|
Loading…
Reference in New Issue