Fixed bug. The same data was pushed in both transport blocks for TM3/4.

master
Xavier Arteaga 7 years ago
parent 57d443ace2
commit 3e29e5a853

@ -72,7 +72,7 @@ public:
void set_tti(uint32_t tti); void set_tti(uint32_t tti);
void config(uint16_t rnti, uint32_t nof_prb, sched_interface *sched, rrc_interface_mac *rrc_, rlc_interface_mac *rlc, srslte::log *log_h); void config(uint16_t rnti, uint32_t nof_prb, sched_interface *sched, rrc_interface_mac *rrc_, rlc_interface_mac *rlc, srslte::log *log_h);
uint8_t* generate_pdu(sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST], uint8_t* generate_pdu(uint32_t tb_idx, sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST],
uint32_t nof_pdu_elems, uint32_t grant_size); uint32_t nof_pdu_elems, uint32_t grant_size);
srslte_softbuffer_tx_t* get_tx_softbuffer(uint32_t harq_process, uint32_t tb_idx); srslte_softbuffer_tx_t* get_tx_softbuffer(uint32_t harq_process, uint32_t tb_idx);
@ -130,9 +130,9 @@ private:
uint8_t *pending_buffers[NOF_HARQ_PROCESSES]; uint8_t *pending_buffers[NOF_HARQ_PROCESSES];
// For DL there is a single buffer // For DL there are two buffers, one for each Transport block
const static int payload_buffer_len = 128*1024; const static int payload_buffer_len = 128*1024;
uint8_t tx_payload_buffer[payload_buffer_len]; uint8_t tx_payload_buffer[SRSLTE_MAX_TB][payload_buffer_len];
// For UL there are multiple buffers per PID and are managed by pdu_queue // For UL there are multiple buffers per PID and are managed by pdu_queue
srslte::pdu_queue pdus; srslte::pdu_queue pdus;

@ -481,7 +481,8 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_t *dl_sched_res)
if (sched_result.data[i].nof_pdu_elems[tb] > 0) { if (sched_result.data[i].nof_pdu_elems[tb] > 0) {
/* Get PDU if it's a new transmission */ /* Get PDU if it's a new transmission */
dl_sched_res->sched_grants[n].data[tb] = ue_db[rnti]->generate_pdu(sched_result.data[i].pdu[tb], dl_sched_res->sched_grants[n].data[tb] = ue_db[rnti]->generate_pdu(tb,
sched_result.data[i].pdu[tb],
sched_result.data[i].nof_pdu_elems[tb], sched_result.data[i].nof_pdu_elems[tb],
sched_result.data[i].tbs[tb]); sched_result.data[i].tbs[tb]);

@ -359,14 +359,14 @@ void ue::allocate_ce(srslte::sch_pdu *pdu, uint32_t lcid)
} }
} }
uint8_t* ue::generate_pdu(sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST], uint8_t* ue::generate_pdu(uint32_t tb_idx, sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST],
uint32_t nof_pdu_elems, uint32_t grant_size) uint32_t nof_pdu_elems, uint32_t grant_size)
{ {
uint8_t *ret = NULL; uint8_t *ret = NULL;
pthread_mutex_lock(&mutex); pthread_mutex_lock(&mutex);
if (rlc) if (rlc)
{ {
mac_msg_dl.init_tx(tx_payload_buffer, grant_size, false); mac_msg_dl.init_tx(tx_payload_buffer[tb_idx], grant_size, false);
for (uint32_t i=0;i<nof_pdu_elems;i++) { for (uint32_t i=0;i<nof_pdu_elems;i++) {
if (pdu[i].lcid <= srslte::sch_subh::PHR_REPORT) { if (pdu[i].lcid <= srslte::sch_subh::PHR_REPORT) {
allocate_sdu(&mac_msg_dl, pdu[i].lcid, pdu[i].nbytes); allocate_sdu(&mac_msg_dl, pdu[i].lcid, pdu[i].nbytes);

Loading…
Cancel
Save