mac,phy,interface: clean up and add NR interface to LTE stack

* remove obsolte rx_data_ind
* add mac_phy_interface_nr to LTE stack
master
Andre Puschmann 3 years ago
parent 8e174c96ed
commit 45c1971249

@ -293,16 +293,7 @@ public:
}; };
class stack_interface_phy_nr : public mac_interface_phy_nr, public srsran::stack_interface_phy_nr class stack_interface_phy_nr : public mac_interface_phy_nr, public srsran::stack_interface_phy_nr
{ {};
public:
struct rx_data_ind_t {
uint32_t tti;
uint16_t rnti;
srsran::unique_byte_buffer_t tb;
};
virtual int rx_data_indication(rx_data_ind_t& grant) = 0;
};
} // namespace srsenb } // namespace srsenb

@ -35,7 +35,10 @@
namespace srsenb { namespace srsenb {
class enb_stack_lte final : public enb_stack_base, public stack_interface_phy_lte, public srsran::thread class enb_stack_lte final : public enb_stack_base,
public stack_interface_phy_lte,
public stack_interface_phy_nr,
public srsran::thread
{ {
public: public:
enb_stack_lte(srslog::sink& log_sink); enb_stack_lte(srslog::sink& log_sink);
@ -105,6 +108,26 @@ public:
void toggle_padding() override { mac.toggle_padding(); } void toggle_padding() override { mac.toggle_padding(); }
void tti_clock() override; void tti_clock() override;
// mac_interface_phy_nr
int slot_indication(const srsran_slot_cfg_t& slot_cfg) override { return mac_nr.slot_indication(slot_cfg); }
int get_dl_sched(const srsran_slot_cfg_t& slot_cfg, srsenb::mac_interface_phy_nr::dl_sched_t& dl_sched) override
{
return mac_nr.get_dl_sched(slot_cfg, dl_sched);
}
int get_ul_sched(const srsran_slot_cfg_t& slot_cfg, srsenb::mac_interface_phy_nr::ul_sched_t& ul_sched) override
{
return mac_nr.get_ul_sched(slot_cfg, ul_sched);
}
int pucch_info(const srsran_slot_cfg_t& slot_cfg, const pucch_info_t& pucch_info) override
{
return mac_nr.pucch_info(slot_cfg, pucch_info);
}
int pusch_info(const srsran_slot_cfg_t& slot_cfg, const pusch_info_t& pusch_info) override
{
return mac_nr.pusch_info(slot_cfg, pusch_info);
}
void rach_detected(const rach_info_t& rach_info) override { mac_nr.rach_detected(rach_info); }
private: private:
static const int STACK_MAIN_THREAD_PRIO = 4; static const int STACK_MAIN_THREAD_PRIO = 4;
// thread loop // thread loop

@ -58,9 +58,6 @@ public:
bool is_registered() override { return true; }; bool is_registered() override { return true; };
bool start_service_request() override { return true; }; bool start_service_request() override { return true; };
// PHY->MAC interface
int rx_data_indication(rx_data_ind_t& grant) override;
// Temporary GW interface // Temporary GW interface
void write_sdu(uint32_t lcid, srsran::unique_byte_buffer_t sdu) override; void write_sdu(uint32_t lcid, srsran::unique_byte_buffer_t sdu) override;
bool has_active_radio_bearer(uint32_t eps_bearer_id) override; bool has_active_radio_bearer(uint32_t eps_bearer_id) override;

@ -55,9 +55,6 @@ public:
int rlc_buffer_state(uint16_t rnti, uint32_t lc_id, uint32_t tx_queue, uint32_t retx_queue) override { return 0; } int rlc_buffer_state(uint16_t rnti, uint32_t lc_id, uint32_t tx_queue, uint32_t retx_queue) override { return 0; }
// Interface for PHY // Interface for PHY
int sf_indication(const uint32_t tti);
int rx_data_indication(stack_interface_phy_nr::rx_data_ind_t& grant);
void process_pdus(); void process_pdus();
void rach_detected(const srsran_slot_cfg_t& slot_cfg, uint32_t enb_cc_idx, uint32_t preamble_idx, uint32_t time_adv); void rach_detected(const srsran_slot_cfg_t& slot_cfg, uint32_t enb_cc_idx, uint32_t preamble_idx, uint32_t time_adv);
int slot_indication(const srsran_slot_cfg_t& slot_cfg) override; int slot_indication(const srsran_slot_cfg_t& slot_cfg) override;

@ -149,11 +149,6 @@ bool gnb_stack_nr::get_metrics(srsenb::stack_metrics_t* metrics)
return true; return true;
} }
int gnb_stack_nr::rx_data_indication(rx_data_ind_t& grant)
{
return m_mac->rx_data_indication(grant);
}
// Temporary GW interface // Temporary GW interface
void gnb_stack_nr::write_sdu(uint32_t lcid, srsran::unique_byte_buffer_t sdu) void gnb_stack_nr::write_sdu(uint32_t lcid, srsran::unique_byte_buffer_t sdu)
{ {

@ -400,8 +400,6 @@ public:
~gnb_dummy_stack() {} ~gnb_dummy_stack() {}
bool is_valid() const { return valid; } bool is_valid() const { return valid; }
int rx_data_indication(rx_data_ind_t& grant) override { return 0; }
int slot_indication(const srsran_slot_cfg_t& slot_cfg) override { return 0; } int slot_indication(const srsran_slot_cfg_t& slot_cfg) override { return 0; }
int get_dl_sched(const srsran_slot_cfg_t& slot_cfg, dl_sched_t& dl_sched) override int get_dl_sched(const srsran_slot_cfg_t& slot_cfg, dl_sched_t& dl_sched) override

Loading…
Cancel
Save