|
|
|
@ -25,11 +25,6 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <boost/concept_check.hpp>
|
|
|
|
|
#include <srslte/interfaces/sched_interface.h>
|
|
|
|
|
#include <srslte/phy/phch/pucch.h>
|
|
|
|
|
#include <srslte/srslte.h>
|
|
|
|
|
#include <srslte/phy/common/phy_common.h>
|
|
|
|
|
|
|
|
|
|
#include "srslte/srslte.h"
|
|
|
|
|
#include "srslte/common/pdu.h"
|
|
|
|
@ -397,29 +392,29 @@ int sched_ue::generate_format1(dl_harq_proc *h,
|
|
|
|
|
|
|
|
|
|
h->new_tx(tti, mcs, tbs, data->dci_location.ncce);
|
|
|
|
|
|
|
|
|
|
// Allocate MAC ConRes CE
|
|
|
|
|
if (need_conres_ce) {
|
|
|
|
|
data->pdu[0].lcid = srslte::sch_subh::CON_RES_ID;
|
|
|
|
|
data->nof_pdu_elems++;
|
|
|
|
|
Info("SCHED: Added MAC Contention Resolution CE for rnti=0x%x\n", rnti);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int rem_tbs = tbs;
|
|
|
|
|
int x = 0;
|
|
|
|
|
do {
|
|
|
|
|
x = alloc_pdu(rem_tbs, &data->pdu[data->nof_pdu_elems]);
|
|
|
|
|
rem_tbs -= x;
|
|
|
|
|
if (x) {
|
|
|
|
|
data->nof_pdu_elems++;
|
|
|
|
|
}
|
|
|
|
|
} while(rem_tbs > 0 && x > 0);
|
|
|
|
|
|
|
|
|
|
Debug("SCHED: Alloc format1 new mcs=%d, tbs=%d, nof_prb=%d, req_bytes=%d\n", mcs, tbs, nof_prb, req_bytes);
|
|
|
|
|
} else {
|
|
|
|
|
h->new_retx(tti, &mcs, &tbs);
|
|
|
|
|
Debug("SCHED: Alloc format1 previous mcs=%d, tbs=%d\n", mcs, tbs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Allocate MAC ConRes CE
|
|
|
|
|
if (need_conres_ce) {
|
|
|
|
|
data->pdu[0].lcid = srslte::sch_subh::CON_RES_ID;
|
|
|
|
|
data->nof_pdu_elems++;
|
|
|
|
|
Info("SCHED: Added MAC Contention Resolution CE for rnti=0x%x\n", rnti);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int rem_tbs = tbs;
|
|
|
|
|
int x = 0;
|
|
|
|
|
do {
|
|
|
|
|
x = alloc_pdu(rem_tbs, &data->pdu[data->nof_pdu_elems]);
|
|
|
|
|
rem_tbs -= x;
|
|
|
|
|
if (x) {
|
|
|
|
|
data->nof_pdu_elems++;
|
|
|
|
|
}
|
|
|
|
|
} while(rem_tbs > 0 && x > 0);
|
|
|
|
|
|
|
|
|
|
data->rnti = rnti;
|
|
|
|
|
|
|
|
|
|
if (tbs > 0) {
|
|
|
|
|