enb: loop over CC in MAC

master
Andre Puschmann 5 years ago
parent 664170fec6
commit 73c8b02820

@ -485,15 +485,16 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
log_h->step(tti);
for (uint32_t enb_cc_idx = 0; enb_cc_idx <= cell_config.size(); enb_cc_idx++) {
// Run scheduler with current info
sched_interface::dl_sched_res_t sched_result = {};
if (scheduler.dl_sched(tti, 0, sched_result) < 0) {
if (scheduler.dl_sched(tti, enb_cc_idx, sched_result) < 0) {
Error("Running scheduler\n");
return SRSLTE_ERROR;
}
int n = 0;
dl_sched_t* dl_sched_res = &dl_sched_res_list[0];
dl_sched_t* dl_sched_res = &dl_sched_res_list[enb_cc_idx];
{
srslte::rwlock_read_guard lock(rwlock);
@ -524,7 +525,8 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
}
if (pcap) {
pcap->write_dl_crnti(dl_sched_res->pdsch[n].data[tb], sched_result.data[i].tbs[tb], rnti, true, tti, 0);
pcap->write_dl_crnti(
dl_sched_res->pdsch[n].data[tb], sched_result.data[i].tbs[tb], rnti, true, tti, enb_cc_idx);
}
} else {
@ -554,8 +556,12 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
assemble_rar(sched_result.rar[i].msg3_grant, sched_result.rar[i].nof_grants, i, sched_result.rar[i].tbs, tti);
if (pcap) {
pcap->write_dl_ranti(
dl_sched_res->pdsch[n].data[0], sched_result.rar[i].tbs, dl_sched_res->pdsch[n].dci.rnti, true, tti, 0);
pcap->write_dl_ranti(dl_sched_res->pdsch[n].data[0],
sched_result.rar[i].tbs,
dl_sched_res->pdsch[n].dci.rnti,
true,
tti,
enb_cc_idx);
}
n++;
@ -572,7 +578,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
dl_sched_res->pdsch[n].data[0] = assemble_si(sched_result.bc[i].index);
#ifdef WRITE_SIB_PCAP
if (pcap) {
pcap->write_dl_sirnti(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti, 0);
pcap->write_dl_sirnti(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti, enb_cc_idx);
}
#endif
} else {
@ -581,7 +587,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
rlc_h->read_pdu_pcch(pcch_payload_buffer, pcch_payload_buffer_len);
if (pcap) {
pcap->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti, 0);
pcap->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.bc[i].tbs, true, tti, enb_cc_idx);
}
}
@ -592,6 +598,7 @@ int mac::get_dl_sched(uint32_t tti, dl_sched_list_t& dl_sched_res_list)
// Number of CCH symbols
dl_sched_res->cfi = sched_result.cfi;
}
return SRSLTE_SUCCESS;
}

Loading…
Cancel
Save