Commit 6947202c authored by francescomani's avatar francescomani

sched_pdcch not a pointer in structures

parent bc04d720
...@@ -799,7 +799,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t ...@@ -799,7 +799,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
ul_dci_request_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu)); ul_dci_request_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu));
pdcch_pdu_rel15 = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15; pdcch_pdu_rel15 = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15;
ul_dci_req->numPdus += 1; ul_dci_req->numPdus += 1;
nr_configure_pdcch(pdcch_pdu_rel15, coreset, genericParameters, ra->sched_pdcch); nr_configure_pdcch(pdcch_pdu_rel15, coreset, genericParameters, &ra->sched_pdcch);
nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15; nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15;
} }
...@@ -815,7 +815,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t ...@@ -815,7 +815,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
CC_id, CC_id,
aggregation_level, aggregation_level,
nr_of_candidates, nr_of_candidates,
ra->sched_pdcch, &ra->sched_pdcch,
coreset, coreset,
0); 0);
if (CCEIndex < 0) { if (CCEIndex < 0) {
...@@ -861,7 +861,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t ...@@ -861,7 +861,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
fill_pdcch_vrb_map(nr_mac, fill_pdcch_vrb_map(nr_mac,
CC_id, CC_id,
ra->sched_pdcch, &ra->sched_pdcch,
CCEIndex, CCEIndex,
aggregation_level); aggregation_level);
...@@ -1211,7 +1211,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1211,7 +1211,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
CC_id, CC_id,
aggregation_level, aggregation_level,
nr_of_candidates, nr_of_candidates,
ra->sched_pdcch, &ra->sched_pdcch,
coreset, coreset,
0); 0);
...@@ -1236,7 +1236,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1236,7 +1236,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu)); dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu));
dl_req->nPDUs += 1; dl_req->nPDUs += 1;
pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
nr_configure_pdcch(pdcch_pdu_rel15, coreset, genericParameters, ra->sched_pdcch); nr_configure_pdcch(pdcch_pdu_rel15, coreset, genericParameters, &ra->sched_pdcch);
nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15; nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15;
} }
...@@ -1397,7 +1397,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1397,7 +1397,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// Mark the corresponding symbols RBs as used // Mark the corresponding symbols RBs as used
fill_pdcch_vrb_map(nr_mac, fill_pdcch_vrb_map(nr_mac,
CC_id, CC_id,
ra->sched_pdcch, &ra->sched_pdcch,
CCEIndex, CCEIndex,
aggregation_level); aggregation_level);
for (int rb = 0; rb < rbSize; rb++) { for (int rb = 0; rb < rbSize; rb++) {
...@@ -1500,7 +1500,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1500,7 +1500,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
CC_id, CC_id,
aggregation_level, aggregation_level,
nr_of_candidates, nr_of_candidates,
ra->sched_pdcch, &ra->sched_pdcch,
coreset, coreset,
0); 0);
...@@ -1642,7 +1642,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1642,7 +1642,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu)); dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu));
dl_req->nPDUs += 1; dl_req->nPDUs += 1;
pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
nr_configure_pdcch(pdcch_pdu_rel15, coreset, genericParameters, ra->sched_pdcch); nr_configure_pdcch(pdcch_pdu_rel15, coreset, genericParameters, &ra->sched_pdcch);
nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15; nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15;
} }
...@@ -1786,7 +1786,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1786,7 +1786,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// Mark the corresponding symbols and RBs as used // Mark the corresponding symbols and RBs as used
fill_pdcch_vrb_map(nr_mac, fill_pdcch_vrb_map(nr_mac,
CC_id, CC_id,
ra->sched_pdcch, &ra->sched_pdcch,
CCEIndex, CCEIndex,
aggregation_level); aggregation_level);
for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) {
......
...@@ -366,7 +366,7 @@ uint32_t schedule_control_sib1(module_id_t module_id, ...@@ -366,7 +366,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
CC_id, CC_id,
gNB_mac->sched_ctrlCommon->aggregation_level, gNB_mac->sched_ctrlCommon->aggregation_level,
nr_of_candidates, nr_of_candidates,
gNB_mac->sched_ctrlCommon->sched_pdcch, &gNB_mac->sched_ctrlCommon->sched_pdcch,
gNB_mac->sched_ctrlCommon->coreset, gNB_mac->sched_ctrlCommon->coreset,
0); 0);
...@@ -422,7 +422,7 @@ uint32_t schedule_control_sib1(module_id_t module_id, ...@@ -422,7 +422,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
// Mark the corresponding RBs as used // Mark the corresponding RBs as used
fill_pdcch_vrb_map(gNB_mac, fill_pdcch_vrb_map(gNB_mac,
CC_id, CC_id,
gNB_mac->sched_ctrlCommon->sched_pdcch, &gNB_mac->sched_ctrlCommon->sched_pdcch,
gNB_mac->sched_ctrlCommon->cce_index, gNB_mac->sched_ctrlCommon->cce_index,
gNB_mac->sched_ctrlCommon->aggregation_level); gNB_mac->sched_ctrlCommon->aggregation_level);
for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize; rb++) { for (int rb = 0; rb < gNB_mac->sched_ctrlCommon->sched_pdsch.rbSize; rb++) {
...@@ -452,7 +452,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP, ...@@ -452,7 +452,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
nr_configure_pdcch(pdcch_pdu_rel15, nr_configure_pdcch(pdcch_pdu_rel15,
gNB_mac->sched_ctrlCommon->coreset, gNB_mac->sched_ctrlCommon->coreset,
NULL, NULL,
gNB_mac->sched_ctrlCommon->sched_pdcch); &gNB_mac->sched_ctrlCommon->sched_pdcch);
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs];
memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); memset((void*)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t));
......
...@@ -628,7 +628,7 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -628,7 +628,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
/* CC_id = */ 0, /* CC_id = */ 0,
sched_ctrl->aggregation_level, sched_ctrl->aggregation_level,
nr_of_candidates, nr_of_candidates,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
sched_ctrl->coreset, sched_ctrl->coreset,
Y); Y);
...@@ -657,7 +657,7 @@ bool allocate_dl_retransmission(module_id_t module_id, ...@@ -657,7 +657,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(RC.nrmac[module_id],
/* CC_id = */ 0, /* CC_id = */ 0,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
sched_ctrl->aggregation_level); sched_ctrl->aggregation_level);
...@@ -785,7 +785,7 @@ void pf_dl(module_id_t module_id, ...@@ -785,7 +785,7 @@ void pf_dl(module_id_t module_id,
/* CC_id = */ 0, /* CC_id = */ 0,
sched_ctrl->aggregation_level, sched_ctrl->aggregation_level,
nr_of_candidates, nr_of_candidates,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
sched_ctrl->coreset, sched_ctrl->coreset,
Y); Y);
...@@ -816,7 +816,7 @@ void pf_dl(module_id_t module_id, ...@@ -816,7 +816,7 @@ void pf_dl(module_id_t module_id,
fill_pdcch_vrb_map(mac, fill_pdcch_vrb_map(mac,
/* CC_id = */ 0, /* CC_id = */ 0,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
sched_ctrl->aggregation_level); sched_ctrl->aggregation_level);
...@@ -1073,7 +1073,7 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -1073,7 +1073,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdcch_pdu = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; pdcch_pdu = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15;
LOG_D(NR_MAC,"Trying to configure DL pdcch for UE %d, bwp %d, cs %d\n",UE_id,bwpid,coresetid); LOG_D(NR_MAC,"Trying to configure DL pdcch for UE %d, bwp %d, cs %d\n",UE_id,bwpid,coresetid);
NR_ControlResourceSet_t *coreset = (bwp||bwpd)? sched_ctrl->coreset:gNB_mac->sched_ctrlCommon->coreset; NR_ControlResourceSet_t *coreset = (bwp||bwpd)? sched_ctrl->coreset:gNB_mac->sched_ctrlCommon->coreset;
nr_configure_pdcch(pdcch_pdu, coreset, genericParameters, sched_ctrl->sched_pdcch); nr_configure_pdcch(pdcch_pdu, coreset, genericParameters, &sched_ctrl->sched_pdcch);
gNB_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu; gNB_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu;
} }
......
...@@ -351,7 +351,7 @@ void nr_preprocessor_phytest(module_id_t module_id, ...@@ -351,7 +351,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
CC_id, CC_id,
sched_ctrl->aggregation_level, sched_ctrl->aggregation_level,
nr_of_candidates, nr_of_candidates,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
sched_ctrl->coreset, sched_ctrl->coreset,
Y); Y);
...@@ -377,7 +377,7 @@ void nr_preprocessor_phytest(module_id_t module_id, ...@@ -377,7 +377,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(RC.nrmac[module_id],
CC_id, CC_id,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
sched_ctrl->aggregation_level); sched_ctrl->aggregation_level);
...@@ -517,7 +517,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_ ...@@ -517,7 +517,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
CC_id, CC_id,
sched_ctrl->aggregation_level, sched_ctrl->aggregation_level,
nr_of_candidates, nr_of_candidates,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
sched_ctrl->coreset, sched_ctrl->coreset,
Y); Y);
...@@ -556,7 +556,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_ ...@@ -556,7 +556,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
/* mark the corresponding RBs as used */ /* mark the corresponding RBs as used */
fill_pdcch_vrb_map(nr_mac, fill_pdcch_vrb_map(nr_mac,
CC_id, CC_id,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
sched_ctrl->aggregation_level); sched_ctrl->aggregation_level);
......
...@@ -209,41 +209,41 @@ NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc, ...@@ -209,41 +209,41 @@ NR_SearchSpace_t *get_searchspace(NR_ServingCellConfigCommon_t *scc,
AssertFatal(0, "Couldn't find an adequate searchspace bwp_Dedicated %p\n",bwp_Dedicated); AssertFatal(0, "Couldn't find an adequate searchspace bwp_Dedicated %p\n",bwp_Dedicated);
} }
NR_sched_pdcch_t *set_pdcch_structure(gNB_MAC_INST *gNB_mac, NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
NR_SearchSpace_t *ss, NR_SearchSpace_t *ss,
NR_ControlResourceSet_t *coreset, NR_ControlResourceSet_t *coreset,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
NR_BWP_t *bwp, NR_BWP_t *bwp,
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config) { NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config) {
NR_sched_pdcch_t *pdcch = calloc(1,sizeof(NR_sched_pdcch_t));
int sps; int sps;
NR_sched_pdcch_t pdcch;
AssertFatal(*ss->controlResourceSetId == coreset->controlResourceSetId, AssertFatal(*ss->controlResourceSetId == coreset->controlResourceSetId,
"coreset id in SS %ld does not correspond to the one in coreset %ld", "coreset id in SS %ld does not correspond to the one in coreset %ld",
*ss->controlResourceSetId, coreset->controlResourceSetId); *ss->controlResourceSetId, coreset->controlResourceSetId);
if (bwp) { // This is not for SIB1 if (bwp) { // This is not for SIB1
if(coreset->controlResourceSetId == 0){ if(coreset->controlResourceSetId == 0){
pdcch->BWPSize = gNB_mac->cset0_bwp_size; pdcch.BWPSize = gNB_mac->cset0_bwp_size;
pdcch->BWPStart = gNB_mac->cset0_bwp_start; pdcch.BWPStart = gNB_mac->cset0_bwp_start;
} }
else { else {
pdcch->BWPSize = NRRIV2BW(bwp->locationAndBandwidth, MAX_BWP_SIZE); pdcch.BWPSize = NRRIV2BW(bwp->locationAndBandwidth, MAX_BWP_SIZE);
pdcch->BWPStart = NRRIV2PRBOFFSET(bwp->locationAndBandwidth, MAX_BWP_SIZE); pdcch.BWPStart = NRRIV2PRBOFFSET(bwp->locationAndBandwidth, MAX_BWP_SIZE);
} }
pdcch->SubcarrierSpacing = bwp->subcarrierSpacing; pdcch.SubcarrierSpacing = bwp->subcarrierSpacing;
pdcch->CyclicPrefix = (bwp->cyclicPrefix==NULL) ? 0 : *bwp->cyclicPrefix; pdcch.CyclicPrefix = (bwp->cyclicPrefix==NULL) ? 0 : *bwp->cyclicPrefix;
//AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored"); //AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored");
sps = bwp->cyclicPrefix == NULL ? 14 : 12; sps = bwp->cyclicPrefix == NULL ? 14 : 12;
} }
else { else {
AssertFatal(type0_PDCCH_CSS_config!=NULL,"type0_PDCCH_CSS_config is null,bwp %p\n",bwp); AssertFatal(type0_PDCCH_CSS_config!=NULL,"type0_PDCCH_CSS_config is null,bwp %p\n",bwp);
pdcch->BWPSize = type0_PDCCH_CSS_config->num_rbs; pdcch.BWPSize = type0_PDCCH_CSS_config->num_rbs;
pdcch->BWPStart = type0_PDCCH_CSS_config->cset_start_rb; pdcch.BWPStart = type0_PDCCH_CSS_config->cset_start_rb;
pdcch->SubcarrierSpacing = type0_PDCCH_CSS_config->scs_pdcch; pdcch.SubcarrierSpacing = type0_PDCCH_CSS_config->scs_pdcch;
pdcch->CyclicPrefix = 0; pdcch.CyclicPrefix = 0;
sps = 14; sps = 14;
} }
...@@ -256,29 +256,29 @@ NR_sched_pdcch_t *set_pdcch_structure(gNB_MAC_INST *gNB_mac, ...@@ -256,29 +256,29 @@ NR_sched_pdcch_t *set_pdcch_structure(gNB_MAC_INST *gNB_mac,
for (int i=0; i<sps; i++) { for (int i=0; i<sps; i++) {
if ((monitoringSymbolsWithinSlot>>(sps-1-i))&1) { if ((monitoringSymbolsWithinSlot>>(sps-1-i))&1) {
pdcch->StartSymbolIndex=i; pdcch.StartSymbolIndex=i;
break; break;
} }
} }
pdcch->DurationSymbols = coreset->duration; pdcch.DurationSymbols = coreset->duration;
//cce-REG-MappingType //cce-REG-MappingType
pdcch->CceRegMappingType = coreset->cce_REG_MappingType.present == NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved? pdcch.CceRegMappingType = coreset->cce_REG_MappingType.present == NR_ControlResourceSet__cce_REG_MappingType_PR_interleaved?
NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED : NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED; NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED : NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED;
if (pdcch->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED) { if (pdcch.CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED) {
pdcch->RegBundleSize = (coreset->cce_REG_MappingType.choice.interleaved->reg_BundleSize == pdcch.RegBundleSize = (coreset->cce_REG_MappingType.choice.interleaved->reg_BundleSize ==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6) ? 6 : (2+coreset->cce_REG_MappingType.choice.interleaved->reg_BundleSize); NR_ControlResourceSet__cce_REG_MappingType__interleaved__reg_BundleSize_n6) ? 6 : (2+coreset->cce_REG_MappingType.choice.interleaved->reg_BundleSize);
pdcch->InterleaverSize = (coreset->cce_REG_MappingType.choice.interleaved->interleaverSize == pdcch.InterleaverSize = (coreset->cce_REG_MappingType.choice.interleaved->interleaverSize ==
NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n6) ? 6 : (2+coreset->cce_REG_MappingType.choice.interleaved->interleaverSize); NR_ControlResourceSet__cce_REG_MappingType__interleaved__interleaverSize_n6) ? 6 : (2+coreset->cce_REG_MappingType.choice.interleaved->interleaverSize);
AssertFatal(scc->physCellId != NULL,"scc->physCellId is null\n"); AssertFatal(scc->physCellId != NULL,"scc->physCellId is null\n");
pdcch->ShiftIndex = coreset->cce_REG_MappingType.choice.interleaved->shiftIndex != NULL ? *coreset->cce_REG_MappingType.choice.interleaved->shiftIndex : *scc->physCellId; pdcch.ShiftIndex = coreset->cce_REG_MappingType.choice.interleaved->shiftIndex != NULL ? *coreset->cce_REG_MappingType.choice.interleaved->shiftIndex : *scc->physCellId;
} }
else { else {
pdcch->RegBundleSize = 6; pdcch.RegBundleSize = 6;
pdcch->InterleaverSize = 0; pdcch.InterleaverSize = 0;
pdcch->ShiftIndex = 0; pdcch.ShiftIndex = 0;
} }
int N_rb = 0; // nb of rbs of coreset per symbol int N_rb = 0; // nb of rbs of coreset per symbol
...@@ -287,7 +287,7 @@ NR_sched_pdcch_t *set_pdcch_structure(gNB_MAC_INST *gNB_mac, ...@@ -287,7 +287,7 @@ NR_sched_pdcch_t *set_pdcch_structure(gNB_MAC_INST *gNB_mac,
N_rb+=((coreset->frequencyDomainResources.buf[i]>>t)&1); N_rb+=((coreset->frequencyDomainResources.buf[i]>>t)&1);
} }
} }
pdcch->n_rb = N_rb*=6; // each bit of frequencyDomainResources represents 6 PRBs pdcch.n_rb = N_rb*=6; // each bit of frequencyDomainResources represents 6 PRBs
return pdcch; return pdcch;
} }
......
...@@ -1024,7 +1024,7 @@ bool allocate_ul_retransmission(module_id_t module_id, ...@@ -1024,7 +1024,7 @@ bool allocate_ul_retransmission(module_id_t module_id,
CC_id, CC_id,
sched_ctrl->aggregation_level, sched_ctrl->aggregation_level,
nr_of_candidates, nr_of_candidates,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
sched_ctrl->coreset, sched_ctrl->coreset,
Y); Y);
...@@ -1036,7 +1036,7 @@ bool allocate_ul_retransmission(module_id_t module_id, ...@@ -1036,7 +1036,7 @@ bool allocate_ul_retransmission(module_id_t module_id,
sched_ctrl->cce_index = CCEIndex; sched_ctrl->cce_index = CCEIndex;
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(RC.nrmac[module_id],
CC_id, CC_id,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
sched_ctrl->aggregation_level); sched_ctrl->aggregation_level);
...@@ -1170,7 +1170,7 @@ void pf_ul(module_id_t module_id, ...@@ -1170,7 +1170,7 @@ void pf_ul(module_id_t module_id,
CC_id, CC_id,
sched_ctrl->aggregation_level, sched_ctrl->aggregation_level,
nr_of_candidates, nr_of_candidates,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
sched_ctrl->coreset, sched_ctrl->coreset,
Y); Y);
...@@ -1194,7 +1194,7 @@ void pf_ul(module_id_t module_id, ...@@ -1194,7 +1194,7 @@ void pf_ul(module_id_t module_id,
sched_ctrl->cce_index = CCEIndex; sched_ctrl->cce_index = CCEIndex;
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(RC.nrmac[module_id],
CC_id, CC_id,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
sched_ctrl->aggregation_level); sched_ctrl->aggregation_level);
...@@ -1280,7 +1280,7 @@ void pf_ul(module_id_t module_id, ...@@ -1280,7 +1280,7 @@ void pf_ul(module_id_t module_id,
CC_id, CC_id,
sched_ctrl->aggregation_level, sched_ctrl->aggregation_level,
nr_of_candidates, nr_of_candidates,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
sched_ctrl->coreset, sched_ctrl->coreset,
Y); Y);
if (CCEIndex<0) { if (CCEIndex<0) {
...@@ -1350,7 +1350,7 @@ void pf_ul(module_id_t module_id, ...@@ -1350,7 +1350,7 @@ void pf_ul(module_id_t module_id,
sched_ctrl->cce_index = CCEIndex; sched_ctrl->cce_index = CCEIndex;
fill_pdcch_vrb_map(RC.nrmac[module_id], fill_pdcch_vrb_map(RC.nrmac[module_id],
CC_id, CC_id,
sched_ctrl->sched_pdcch, &sched_ctrl->sched_pdcch,
CCEIndex, CCEIndex,
sched_ctrl->aggregation_level); sched_ctrl->aggregation_level);
...@@ -1754,7 +1754,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) ...@@ -1754,7 +1754,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
ul_dci_request_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu)); ul_dci_request_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdcch_pdu));
pdcch_pdu = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15; pdcch_pdu = &ul_dci_request_pdu->pdcch_pdu.pdcch_pdu_rel15;
ul_dci_req->numPdus += 1; ul_dci_req->numPdus += 1;
nr_configure_pdcch(pdcch_pdu, coreset, genericParameters, sched_ctrl->sched_pdcch); nr_configure_pdcch(pdcch_pdu, coreset, genericParameters, &sched_ctrl->sched_pdcch);
nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu; nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu;
} }
......
...@@ -253,7 +253,7 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu, ...@@ -253,7 +253,7 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
NR_BWP_t *bwp, NR_BWP_t *bwp,
NR_sched_pdcch_t *pdcch); NR_sched_pdcch_t *pdcch);
NR_sched_pdcch_t *set_pdcch_structure(gNB_MAC_INST *gNB_mac, NR_sched_pdcch_t set_pdcch_structure(gNB_MAC_INST *gNB_mac,
NR_SearchSpace_t *ss, NR_SearchSpace_t *ss,
NR_ControlResourceSet_t *coreset, NR_ControlResourceSet_t *coreset,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
......
...@@ -181,7 +181,7 @@ typedef struct { ...@@ -181,7 +181,7 @@ typedef struct {
NR_SearchSpace_t *ra_ss; NR_SearchSpace_t *ra_ss;
/// RA Coreset /// RA Coreset
NR_ControlResourceSet_t *coreset; NR_ControlResourceSet_t *coreset;
NR_sched_pdcch_t *sched_pdcch; NR_sched_pdcch_t sched_pdcch;
// Beam index // Beam index
uint8_t beam_id; uint8_t beam_id;
/// CellGroup for UE that is to come (NSA is non-null, null for SA) /// CellGroup for UE that is to come (NSA is non-null, null for SA)
...@@ -551,7 +551,7 @@ typedef struct { ...@@ -551,7 +551,7 @@ typedef struct {
/// CCE index and aggregation, should be coherent with cce_list /// CCE index and aggregation, should be coherent with cce_list
NR_SearchSpace_t *search_space; NR_SearchSpace_t *search_space;
NR_ControlResourceSet_t *coreset; NR_ControlResourceSet_t *coreset;
NR_sched_pdcch_t *sched_pdcch; NR_sched_pdcch_t sched_pdcch;
/// CCE index and Aggr. Level are shared for PUSCH/PDSCH allocation decisions /// CCE index and Aggr. Level are shared for PUSCH/PDSCH allocation decisions
/// corresponding to the sched_pusch/sched_pdsch structures below /// corresponding to the sched_pusch/sched_pdsch structures below
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment