common function to generate FAPI DCI PDU
This commit is contained in:
@@ -932,24 +932,17 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fill PDCCH DL DCI PDU
|
// Fill PDCCH DL DCI PDU
|
||||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci];
|
nfapi_nr_dl_dci_pdu_t *dci_pdu = prepare_dci_pdu(pdcch_pdu_rel15,
|
||||||
|
scc,
|
||||||
|
ss,
|
||||||
|
coreset,
|
||||||
|
aggregation_level,
|
||||||
|
CCEIndex,
|
||||||
|
UE->UE_beam_index,
|
||||||
|
UE->rnti);
|
||||||
pdcch_pdu_rel15->numDlDci++;
|
pdcch_pdu_rel15->numDlDci++;
|
||||||
dci_pdu->RNTI = UE->rnti;
|
|
||||||
dci_pdu->ScramblingId = *scc->physCellId;
|
|
||||||
dci_pdu->ScramblingRNTI = 0;
|
|
||||||
dci_pdu->AggregationLevel = aggregation_level;
|
|
||||||
dci_pdu->CceIndex = CCEIndex;
|
|
||||||
dci_pdu->beta_PDCCH_1_0 = 0;
|
|
||||||
dci_pdu->powerControlOffsetSS = 1;
|
|
||||||
|
|
||||||
dci_pdu->precodingAndBeamforming.num_prgs = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prg_size = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 1;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index;
|
|
||||||
|
|
||||||
dci_pdu_rel15_t uldci_payload={0};
|
|
||||||
|
|
||||||
|
dci_pdu_rel15_t uldci_payload = {0};
|
||||||
config_uldci(sc_info,
|
config_uldci(sc_info,
|
||||||
pusch_pdu,
|
pusch_pdu,
|
||||||
&uldci_payload,
|
&uldci_payload,
|
||||||
@@ -1356,21 +1349,15 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac,
|
|||||||
pduindex);
|
pduindex);
|
||||||
|
|
||||||
/* Fill PDCCH DL DCI PDU */
|
/* Fill PDCCH DL DCI PDU */
|
||||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci];
|
nfapi_nr_dl_dci_pdu_t *dci_pdu = prepare_dci_pdu(pdcch_pdu_rel15,
|
||||||
|
scc,
|
||||||
|
sched_ctrl->search_space,
|
||||||
|
coreset,
|
||||||
|
aggregation_level,
|
||||||
|
CCEIndex,
|
||||||
|
UE->UE_beam_index,
|
||||||
|
rnti);
|
||||||
pdcch_pdu_rel15->numDlDci++;
|
pdcch_pdu_rel15->numDlDci++;
|
||||||
dci_pdu->RNTI = rnti;
|
|
||||||
dci_pdu->ScramblingId = *scc->physCellId;
|
|
||||||
dci_pdu->ScramblingRNTI = 0;
|
|
||||||
dci_pdu->AggregationLevel = aggregation_level;
|
|
||||||
dci_pdu->CceIndex = CCEIndex;
|
|
||||||
dci_pdu->beta_PDCCH_1_0 = 0;
|
|
||||||
dci_pdu->powerControlOffsetSS = 1;
|
|
||||||
|
|
||||||
dci_pdu->precodingAndBeamforming.num_prgs = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prg_size = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 1;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index;
|
|
||||||
|
|
||||||
dci_pdu_rel15_t dci_payload = prepare_dci_dl_payload(nr_mac,
|
dci_pdu_rel15_t dci_payload = prepare_dci_dl_payload(nr_mac,
|
||||||
UE,
|
UE,
|
||||||
@@ -1399,7 +1386,7 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac,
|
|||||||
LOG_D(NR_MAC,
|
LOG_D(NR_MAC,
|
||||||
"DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d "
|
"DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d "
|
||||||
"n_symb %d, BWPsize %d\n",
|
"n_symb %d, BWPsize %d\n",
|
||||||
pdcch_pdu_rel15->dci_pdu[0].RNTI,
|
dci_pdu->RNTI,
|
||||||
rnti_type,
|
rnti_type,
|
||||||
NR_DL_DCI_FORMAT_1_0,
|
NR_DL_DCI_FORMAT_1_0,
|
||||||
(unsigned long long)pdcch_pdu_rel15->FreqDomainResource,
|
(unsigned long long)pdcch_pdu_rel15->FreqDomainResource,
|
||||||
@@ -1410,7 +1397,7 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac,
|
|||||||
fill_dci_pdu_rel15(&UE->sc_info,
|
fill_dci_pdu_rel15(&UE->sc_info,
|
||||||
dl_bwp,
|
dl_bwp,
|
||||||
&UE->current_UL_BWP,
|
&UE->current_UL_BWP,
|
||||||
&pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1],
|
dci_pdu,
|
||||||
&dci_payload,
|
&dci_payload,
|
||||||
NR_DL_DCI_FORMAT_1_0,
|
NR_DL_DCI_FORMAT_1_0,
|
||||||
rnti_type,
|
rnti_type,
|
||||||
|
|||||||
@@ -453,21 +453,15 @@ static void nr_fill_nfapi_dl_SIB_pdu(gNB_MAC_INST *gNB_mac,
|
|||||||
pdsch_pdu_rel15->dlDmrsSymbPos);
|
pdsch_pdu_rel15->dlDmrsSymbPos);
|
||||||
|
|
||||||
/* Fill PDCCH DL DCI PDU */
|
/* Fill PDCCH DL DCI PDU */
|
||||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci];
|
nfapi_nr_dl_dci_pdu_t *dci_pdu = prepare_dci_pdu(pdcch_pdu_rel15,
|
||||||
|
scc,
|
||||||
|
search_space,
|
||||||
|
coreset,
|
||||||
|
aggregation_level,
|
||||||
|
cce_index,
|
||||||
|
beam_index,
|
||||||
|
SI_RNTI);
|
||||||
pdcch_pdu_rel15->numDlDci++;
|
pdcch_pdu_rel15->numDlDci++;
|
||||||
dci_pdu->RNTI = SI_RNTI;
|
|
||||||
dci_pdu->ScramblingId = *scc->physCellId;
|
|
||||||
dci_pdu->ScramblingRNTI = 0;
|
|
||||||
dci_pdu->AggregationLevel = aggregation_level;
|
|
||||||
dci_pdu->CceIndex = cce_index;
|
|
||||||
dci_pdu->beta_PDCCH_1_0 = 0;
|
|
||||||
dci_pdu->powerControlOffsetSS = 1;
|
|
||||||
|
|
||||||
dci_pdu->precodingAndBeamforming.num_prgs = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prg_size = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 1;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = beam_index;
|
|
||||||
|
|
||||||
/* DCI payload */
|
/* DCI payload */
|
||||||
int dci_format = NR_DL_DCI_FORMAT_1_0;
|
int dci_format = NR_DL_DCI_FORMAT_1_0;
|
||||||
@@ -486,7 +480,7 @@ static void nr_fill_nfapi_dl_SIB_pdu(gNB_MAC_INST *gNB_mac,
|
|||||||
fill_dci_pdu_rel15(NULL,
|
fill_dci_pdu_rel15(NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1],
|
dci_pdu,
|
||||||
&dci_payload,
|
&dci_payload,
|
||||||
dci_format,
|
dci_format,
|
||||||
rnti_type,
|
rnti_type,
|
||||||
|
|||||||
@@ -1162,31 +1162,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
|||||||
|
|
||||||
LOG_D(NR_MAC,"Configuring DCI/PDCCH in %d.%d at CCE %d, rnti %x\n", frame,slot,sched_ctrl->cce_index,rnti);
|
LOG_D(NR_MAC,"Configuring DCI/PDCCH in %d.%d at CCE %d, rnti %x\n", frame,slot,sched_ctrl->cce_index,rnti);
|
||||||
/* Fill PDCCH DL DCI PDU */
|
/* Fill PDCCH DL DCI PDU */
|
||||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu->dci_pdu[pdcch_pdu->numDlDci];
|
nfapi_nr_dl_dci_pdu_t *dci_pdu = prepare_dci_pdu(pdcch_pdu,
|
||||||
|
scc,
|
||||||
|
sched_ctrl->search_space,
|
||||||
|
sched_ctrl->coreset,
|
||||||
|
sched_ctrl->aggregation_level,
|
||||||
|
sched_ctrl->cce_index,
|
||||||
|
UE->UE_beam_index,
|
||||||
|
rnti);
|
||||||
pdcch_pdu->numDlDci++;
|
pdcch_pdu->numDlDci++;
|
||||||
dci_pdu->RNTI = rnti;
|
|
||||||
|
|
||||||
if (sched_ctrl->coreset &&
|
|
||||||
sched_ctrl->search_space &&
|
|
||||||
sched_ctrl->coreset->pdcch_DMRS_ScramblingID &&
|
|
||||||
sched_ctrl->search_space->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific) {
|
|
||||||
dci_pdu->ScramblingId = *sched_ctrl->coreset->pdcch_DMRS_ScramblingID;
|
|
||||||
dci_pdu->ScramblingRNTI = rnti;
|
|
||||||
} else {
|
|
||||||
dci_pdu->ScramblingId = *scc->physCellId;
|
|
||||||
dci_pdu->ScramblingRNTI = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dci_pdu->AggregationLevel = sched_ctrl->aggregation_level;
|
|
||||||
dci_pdu->CceIndex = sched_ctrl->cce_index;
|
|
||||||
dci_pdu->beta_PDCCH_1_0 = 0;
|
|
||||||
dci_pdu->powerControlOffsetSS = 1;
|
|
||||||
|
|
||||||
dci_pdu->precodingAndBeamforming.num_prgs = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prg_size = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index;
|
|
||||||
|
|
||||||
/* DCI payload */
|
/* DCI payload */
|
||||||
const int rnti_type = TYPE_C_RNTI_;
|
const int rnti_type = TYPE_C_RNTI_;
|
||||||
|
|||||||
@@ -809,6 +809,37 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
|
|||||||
return new_mcs;
|
return new_mcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nfapi_nr_dl_dci_pdu_t *prepare_dci_pdu(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
|
||||||
|
const NR_ServingCellConfigCommon_t *scc,
|
||||||
|
const NR_SearchSpace_t *ss,
|
||||||
|
const NR_ControlResourceSet_t *coreset,
|
||||||
|
int aggregation_level,
|
||||||
|
int cce_index,
|
||||||
|
int beam_index,
|
||||||
|
int rnti)
|
||||||
|
{
|
||||||
|
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu->dci_pdu[pdcch_pdu->numDlDci];
|
||||||
|
dci_pdu->RNTI = rnti;
|
||||||
|
dci_pdu->AggregationLevel = aggregation_level;
|
||||||
|
dci_pdu->CceIndex = cce_index;
|
||||||
|
if (coreset->pdcch_DMRS_ScramblingID &&
|
||||||
|
ss->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific) {
|
||||||
|
dci_pdu->ScramblingId = *coreset->pdcch_DMRS_ScramblingID;
|
||||||
|
dci_pdu->ScramblingRNTI = rnti;
|
||||||
|
} else {
|
||||||
|
dci_pdu->ScramblingId = *scc->physCellId;
|
||||||
|
dci_pdu->ScramblingRNTI = 0;
|
||||||
|
}
|
||||||
|
dci_pdu->beta_PDCCH_1_0 = 0;
|
||||||
|
dci_pdu->powerControlOffsetSS = 1;
|
||||||
|
dci_pdu->precodingAndBeamforming.num_prgs = 0;
|
||||||
|
dci_pdu->precodingAndBeamforming.prg_size = 0;
|
||||||
|
dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 1;
|
||||||
|
dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0;
|
||||||
|
dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = beam_index;
|
||||||
|
return dci_pdu;
|
||||||
|
}
|
||||||
|
|
||||||
dci_pdu_rel15_t prepare_dci_dl_payload(const gNB_MAC_INST *gNB_mac,
|
dci_pdu_rel15_t prepare_dci_dl_payload(const gNB_MAC_INST *gNB_mac,
|
||||||
const NR_UE_info_t *UE,
|
const NR_UE_info_t *UE,
|
||||||
nr_rnti_type_t rnti_type,
|
nr_rnti_type_t rnti_type,
|
||||||
|
|||||||
@@ -2629,26 +2629,15 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_
|
|||||||
LOG_D(NR_MAC,"Configuring ULDCI/PDCCH in %d.%d at CCE %d, rnti %04x\n", frame,slot,sched_ctrl->cce_index,rnti);
|
LOG_D(NR_MAC,"Configuring ULDCI/PDCCH in %d.%d at CCE %d, rnti %04x\n", frame,slot,sched_ctrl->cce_index,rnti);
|
||||||
|
|
||||||
/* Fill PDCCH DL DCI PDU */
|
/* Fill PDCCH DL DCI PDU */
|
||||||
nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu->dci_pdu[pdcch_pdu->numDlDci];
|
nfapi_nr_dl_dci_pdu_t *dci_pdu = prepare_dci_pdu(pdcch_pdu,
|
||||||
|
scc,
|
||||||
|
ss,
|
||||||
|
coreset,
|
||||||
|
sched_ctrl->aggregation_level,
|
||||||
|
sched_ctrl->cce_index,
|
||||||
|
UE->UE_beam_index,
|
||||||
|
rnti);
|
||||||
pdcch_pdu->numDlDci++;
|
pdcch_pdu->numDlDci++;
|
||||||
dci_pdu->RNTI = rnti;
|
|
||||||
if (coreset->pdcch_DMRS_ScramblingID &&
|
|
||||||
ss->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_ue_Specific) {
|
|
||||||
dci_pdu->ScramblingId = *coreset->pdcch_DMRS_ScramblingID;
|
|
||||||
dci_pdu->ScramblingRNTI = rnti;
|
|
||||||
} else {
|
|
||||||
dci_pdu->ScramblingId = *scc->physCellId;
|
|
||||||
dci_pdu->ScramblingRNTI = 0;
|
|
||||||
}
|
|
||||||
dci_pdu->AggregationLevel = sched_ctrl->aggregation_level;
|
|
||||||
dci_pdu->CceIndex = sched_ctrl->cce_index;
|
|
||||||
dci_pdu->beta_PDCCH_1_0 = 0;
|
|
||||||
dci_pdu->powerControlOffsetSS = 1;
|
|
||||||
dci_pdu->precodingAndBeamforming.num_prgs = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prg_size = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.dig_bf_interfaces = 1;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].pm_idx = 0;
|
|
||||||
dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = UE->UE_beam_index;
|
|
||||||
|
|
||||||
dci_pdu_rel15_t uldci_payload;
|
dci_pdu_rel15_t uldci_payload;
|
||||||
memset(&uldci_payload, 0, sizeof(uldci_payload));
|
memset(&uldci_payload, 0, sizeof(uldci_payload));
|
||||||
|
|||||||
@@ -180,6 +180,15 @@ dci_pdu_rel15_t prepare_dci_dl_payload(const gNB_MAC_INST *gNB_mac,
|
|||||||
int harq_pid,
|
int harq_pid,
|
||||||
int tb_scaling,
|
int tb_scaling,
|
||||||
bool is_sib1);
|
bool is_sib1);
|
||||||
|
nfapi_nr_dl_dci_pdu_t *prepare_dci_pdu(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
|
||||||
|
const NR_ServingCellConfigCommon_t *scc,
|
||||||
|
const NR_SearchSpace_t *ss,
|
||||||
|
const NR_ControlResourceSet_t *coreset,
|
||||||
|
int aggregation_level,
|
||||||
|
int cce_index,
|
||||||
|
int beam_index,
|
||||||
|
int rnti);
|
||||||
|
|
||||||
void nr_schedule_pucch(gNB_MAC_INST *nrmac, frame_t frameP, slot_t slotP);
|
void nr_schedule_pucch(gNB_MAC_INST *nrmac, frame_t frameP, slot_t slotP);
|
||||||
|
|
||||||
void nr_srs_ri_computation(const nfapi_nr_srs_normalized_channel_iq_matrix_t *nr_srs_normalized_channel_iq_matrix,
|
void nr_srs_ri_computation(const nfapi_nr_srs_normalized_channel_iq_matrix_t *nr_srs_normalized_channel_iq_matrix,
|
||||||
|
|||||||
Reference in New Issue
Block a user