simplified tx softbuffer acquisition interface in mac::ue

master
Francisco 4 years ago committed by Francisco Paisana
parent e0da736a5f
commit beed2ddbaa

@ -47,10 +47,13 @@ public:
void allocate_cc(uint32_t nof_prb, uint32_t nof_rx_harq_proc, uint32_t nof_tx_harq_proc);
void deallocate_cc();
bool empty() const { return softbuffer_tx_list.empty(); }
cc_softbuffer_tx_list_t& get_tx_softbuffer() { return softbuffer_tx_list; }
srslte_softbuffer_rx_t& get_rx_softbuffer(uint32_t tti) { return softbuffer_rx_list[tti % nof_rx_harq_proc]; }
srslte::byte_buffer_t* get_tx_payload_buffer(size_t harq_pid, size_t tb)
bool empty() const { return softbuffer_tx_list.empty(); }
srslte_softbuffer_tx_t& get_tx_softbuffer(uint32_t pid, uint32_t tb_idx)
{
return softbuffer_tx_list.at(pid * SRSLTE_MAX_TB + tb_idx);
}
srslte_softbuffer_rx_t& get_rx_softbuffer(uint32_t tti) { return softbuffer_rx_list.at(tti % nof_rx_harq_proc); }
srslte::byte_buffer_t* get_tx_payload_buffer(size_t harq_pid, size_t tb)
{
return tx_payload_buffer[harq_pid][tb].get();
}
@ -84,7 +87,7 @@ public:
srslog::basic_logger& logger,
uint32_t nof_cells_,
uint32_t nof_rx_harq_proc = SRSLTE_FDD_NOF_HARQ,
uint32_t nof_tx_harq_proc = SRSLTE_FDD_NOF_HARQ * SRSLTE_MAX_TB);
uint32_t nof_tx_harq_proc = SRSLTE_FDD_NOF_HARQ);
virtual ~ue();
void reset();

@ -57,7 +57,7 @@ void cc_buffer_handler::allocate_cc(uint32_t nof_prb_, uint32_t nof_rx_harq_proc
}
// Create and init Tx buffers
softbuffer_tx_list.resize(nof_tx_harq_proc);
softbuffer_tx_list.resize(nof_tx_harq_proc * SRSLTE_MAX_TB);
for (auto& buffer : softbuffer_tx_list) {
srslte_softbuffer_tx_init(&buffer, nof_prb);
}
@ -166,7 +166,7 @@ ue::get_tx_softbuffer(const uint32_t ue_cc_idx, const uint32_t harq_process, con
return nullptr;
}
return &cc_buffers[ue_cc_idx].get_tx_softbuffer().at((harq_process * SRSLTE_MAX_TB + tb_idx) % nof_tx_harq_proc);
return &cc_buffers[ue_cc_idx].get_tx_softbuffer(harq_process, tb_idx);
}
uint8_t* ue::request_buffer(uint32_t tti, uint32_t ue_cc_idx, const uint32_t len)

Loading…
Cancel
Save