added ue_cc_idx to dci allocation

master
Francisco Paisana 5 years ago committed by Xavier Arteaga
parent e62972d38e
commit f3c3c52fcd

@ -163,14 +163,14 @@ public:
uint32_t current_sf_allocation_num; uint32_t current_sf_allocation_num;
} dl_pdu_mch_t; } dl_pdu_mch_t;
typedef struct { struct dl_sched_data_t {
srslte_dci_dl_t dci; srslte_dci_dl_t dci;
uint32_t tbs[SRSLTE_MAX_TB]; uint32_t tbs[SRSLTE_MAX_TB];
bool mac_ce_ta; bool mac_ce_ta;
bool mac_ce_rnti; bool mac_ce_rnti;
uint32_t nof_pdu_elems[SRSLTE_MAX_TB]; uint32_t nof_pdu_elems[SRSLTE_MAX_TB];
dl_sched_pdu_t pdu[SRSLTE_MAX_TB][MAX_RLC_PDU_LIST]; dl_sched_pdu_t pdu[SRSLTE_MAX_TB][MAX_RLC_PDU_LIST];
} dl_sched_data_t; };
typedef struct { typedef struct {
bool needs_pdcch; bool needs_pdcch;

@ -82,6 +82,7 @@ typedef struct SRSLTE_API {
uint16_t rnti; uint16_t rnti;
srslte_dci_format_t format; srslte_dci_format_t format;
srslte_dci_location_t location; srslte_dci_location_t location;
uint32_t ue_cc_idx;
// Resource Allocation // Resource Allocation
srslte_ra_type_t alloc_type; srslte_ra_type_t alloc_type;
@ -132,6 +133,7 @@ typedef struct SRSLTE_API {
uint16_t rnti; uint16_t rnti;
srslte_dci_format_t format; srslte_dci_format_t format;
srslte_dci_location_t location; srslte_dci_location_t location;
uint32_t ue_cc_idx;
srslte_ra_type2_t type2_alloc; srslte_ra_type2_t type2_alloc;
/* 36.213 Table 8.4-2: SRSLTE_RA_PUSCH_HOP_HALF is 0 for < 10 Mhz and 10 for > 10 Mhz. /* 36.213 Table 8.4-2: SRSLTE_RA_PUSCH_HOP_HALF is 0 for < 10 Mhz and 10 for > 10 Mhz.

@ -463,6 +463,7 @@ int sched_ue::generate_format1(uint32_t pid,
if (tbs > 0) { if (tbs > 0) {
dci->rnti = rnti; dci->rnti = rnti;
dci->pid = h->get_id(); dci->pid = h->get_id();
dci->ue_cc_idx = cc_idx;
dci->tb[0].mcs_idx = (uint32_t)mcs; dci->tb[0].mcs_idx = (uint32_t)mcs;
dci->tb[0].rv = sched_utils::get_rvidx(h->nof_retx(0)); dci->tb[0].rv = sched_utils::get_rvidx(h->nof_retx(0));
dci->tb[0].ndi = h->get_ndi(0); dci->tb[0].ndi = h->get_ndi(0);
@ -588,6 +589,7 @@ int sched_ue::generate_format2a_unlocked(uint32_t pid,
/* Fill common fields */ /* Fill common fields */
dci->format = SRSLTE_DCI_FORMAT2A; dci->format = SRSLTE_DCI_FORMAT2A;
dci->rnti = rnti; dci->rnti = rnti;
dci->ue_cc_idx = cc_idx;
dci->pid = h->get_id(); dci->pid = h->get_id();
dci->tpc_pucch = (uint8_t)next_tpc_pucch; dci->tpc_pucch = (uint8_t)next_tpc_pucch;
next_tpc_pucch = 1; next_tpc_pucch = 1;
@ -669,6 +671,7 @@ int sched_ue::generate_format0(sched_interface::ul_sched_data_t* data,
if (tbs > 0) { if (tbs > 0) {
dci->rnti = rnti; dci->rnti = rnti;
dci->format = SRSLTE_DCI_FORMAT0; dci->format = SRSLTE_DCI_FORMAT0;
dci->ue_cc_idx = cc_idx;
dci->type2_alloc.riv = srslte_ra_type2_to_riv(alloc.L, alloc.RB_start, cell.nof_prb); dci->type2_alloc.riv = srslte_ra_type2_to_riv(alloc.L, alloc.RB_start, cell.nof_prb);
dci->tb.rv = sched_utils::get_rvidx(h->nof_retx(0)); dci->tb.rv = sched_utils::get_rvidx(h->nof_retx(0));
if (!is_newtx && h->is_adaptive_retx()) { if (!is_newtx && h->is_adaptive_retx()) {

@ -552,7 +552,20 @@ int user_state_sched_tester::test_scell_activation(uint32_t
CONDERROR(dl_result.data[i].dci.rnti == rnti, "Allocated user in inactive carrier\n"); CONDERROR(dl_result.data[i].dci.rnti == rnti, "Allocated user in inactive carrier\n");
} }
for (uint32_t i = 0; i < ul_result.nof_dci_elems; ++i) { for (uint32_t i = 0; i < ul_result.nof_dci_elems; ++i) {
CONDERROR(ul_result.pusch[i].dci.rnti == rnti, "Allocated user in inactive carrier\n"); CONDERROR(ul_result.pusch[i].needs_pdcch and ul_result.pusch[i].dci.rnti == rnti,
"Allocated user in inactive carrier\n");
}
} else {
uint32_t ue_cc_idx = std::distance(userinfo.user_cfg.supported_cc_list.begin(), it);
for (uint32_t i = 0; i < dl_result.nof_data_elems; ++i) {
if (dl_result.data[i].dci.rnti == rnti) {
CONDERROR(dl_result.data[i].dci.ue_cc_idx != ue_cc_idx, "User cell index was incorrectly set\n");
}
}
for (uint32_t i = 0; i < ul_result.nof_dci_elems; ++i) {
if (ul_result.pusch[i].needs_pdcch and ul_result.pusch[i].dci.rnti == rnti) {
CONDERROR(ul_result.pusch[i].dci.ue_cc_idx != ue_cc_idx, "The user cell index was incorrectly set\n");
}
} }
} }
} }

Loading…
Cancel
Save