reduce PUSCH spectral efficiency if UCI is required

master
Ismael Gomez 7 years ago
parent 9dffa10550
commit 4e8f0de6da

@ -42,6 +42,9 @@ public:
// used by sched_metric
uint32_t ue_idx;
bool has_pusch;
bool has_pucch;
typedef struct {
uint32_t cce_start[4][6];
uint32_t nof_loc[4];

@ -692,6 +692,9 @@ int sched::ul_sched(uint32_t tti, srsenb::sched_interface::ul_sched_res_t* sched
sched_ue *user = (sched_ue*) &iter->second;
uint16_t rnti = (uint16_t) iter->first;
user->has_pusch = false;
user->has_pucch = false;
ul_harq_proc *h = user->get_ul_harq(current_tti);
/* Indicate PHICH acknowledgment if needed */
@ -717,12 +720,16 @@ int sched::ul_sched(uint32_t tti, srsenb::sched_interface::ul_sched_res_t* sched
uint32_t prb_idx[2] = {0, 0};
uint32_t L = 0;
if (user->get_pucch_sched(current_tti, prb_idx, &L)) {
user->has_pucch = true;
// allocate PUCCH if no PUSCH for user
if (!user->has_pusch) {
for (int i=0;i<2;i++) {
ul_harq_proc::ul_alloc_t pucch = {prb_idx[i], L};
ul_metric->update_allocation(pucch);
}
}
}
}
// Now allocate PUSCH
for(std::map<uint16_t, sched_ue>::iterator iter=ue_db.begin(); iter!=ue_db.end(); ++iter) {

@ -100,7 +100,7 @@ void harq_proc::set_ack(bool ack_)
ack = ack_;
ack_received = true;
log_h->debug("ACK=%d received pid=%d, n_rtx=%d, max_retx=%d\n", ack_, id, n_rtx, max_retx);
if (n_rtx >= max_retx) {
if (n_rtx + 1 >= max_retx) {
Warning("SCHED: discarting TB pid=%d, tti=%d, maximum number of retx exceeded (%d)\n", id, tti, max_retx);
active = false;
}

@ -215,6 +215,7 @@ void ul_metric_rr::new_tti(std::map<uint16_t,sched_ue> &ue_db, uint32_t nof_rb_,
sched_ue *user = (sched_ue*) &iter->second;
if (user->get_pending_ul_new_data(current_tti) || !user->get_ul_harq(current_tti)->is_empty()) {
user->ue_idx = nof_users_with_data;
user->has_pusch = true;
nof_users_with_data++;
}
}

@ -813,6 +813,11 @@ int sched_ue::alloc_tbs(uint32_t nof_prb,
uint32_t max_mcs = is_ul?max_mcs_ul:max_mcs_dl;
uint32_t max_Qm = is_ul?4:6; // Allow 16-QAM in PUSCH Only
// TODO: Compute real spectral efficiency based on PUSCH-UCI configuration
if (has_pucch) {
cqi-=2;
}
int tbs = cqi_to_tbs(cqi, nof_prb, nof_re, max_mcs, max_Qm, &sel_mcs)/8;
/* If less bytes are requested, lower the MCS */

Loading…
Cancel
Save