Sending uci_ind based on rx'd ul_tti's sfn/slot
Also, updated the filing of the DCI payload based on the actual number of recevied bits and not based on the max number of rx'd bits.
This commit is contained in:
@@ -329,7 +329,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
nfapi_nr_rach_indication_t *rach_ind = unqueue_matching(&nr_rach_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_rx_data_indication_t *rx_ind = unqueue_matching(&nr_rx_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_crc_indication_t *crc_ind = unqueue_matching(&nr_crc_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_uci_indication_t *uci_ind = unqueue_matching(&nr_uci_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
|
||||
if (rach_ind && rach_ind->number_of_pdus > 0)
|
||||
{
|
||||
@@ -360,14 +359,6 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
send_nsa_standalone_msg(&UL_INFO, crc_ind->header.message_id);
|
||||
free(crc_ind->crc_list);
|
||||
}
|
||||
if (uci_ind && uci_ind->num_ucis > 0)
|
||||
{
|
||||
NR_UL_IND_t UL_INFO = {
|
||||
.uci_ind = *uci_ind,
|
||||
};
|
||||
send_nsa_standalone_msg(&UL_INFO, uci_ind->header.message_id);
|
||||
free(uci_ind->uci_list);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -714,6 +714,9 @@ int phy_nr_rach_indication(struct nfapi_vnf_p7_config *config, nfapi_nr_rach_ind
|
||||
|
||||
int phy_nr_uci_indication(struct nfapi_vnf_p7_config *config, nfapi_nr_uci_indication_t *ind)
|
||||
{
|
||||
|
||||
LOG_I(NR_MAC, "In %s() NFAPI SFN/SF: %d/%d number_of_pdus :%u\n",
|
||||
__FUNCTION__,ind->sfn, ind->slot, ind->num_ucis);
|
||||
if(NFAPI_MODE == NFAPI_MODE_VNF)
|
||||
{
|
||||
UL_INFO.uci_ind = *ind;
|
||||
|
||||
@@ -1154,7 +1154,7 @@ int nfapi_vnf_allocate_phy(nfapi_vnf_config_t* config, int p5_idx, uint16_t* phy
|
||||
|
||||
info->timing_window = 30; // This seems to override what gets set by the user - why??? //TODO: Change in NR in terms of microsecends,what should be the value?
|
||||
info->timing_info_mode = 0x03;
|
||||
info->timing_info_period = 12; // Melissa come back to this
|
||||
info->timing_info_period = 128; // Melissa come back to this
|
||||
|
||||
nfapi_vnf_phy_info_list_add(config, info);
|
||||
|
||||
|
||||
@@ -156,19 +156,14 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response
|
||||
nfapi_nr_uci_indication_t *uci_ind = CALLOC(1, sizeof(*uci_ind));
|
||||
uci_ind->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION;
|
||||
uci_ind->sfn = scheduled_response->frame;
|
||||
uci_ind->slot = scheduled_response->slot + 6; // (+ 6) Specified by pucch->ul_slot field in gNB uci scheduler
|
||||
if (uci_ind->slot >= 20)
|
||||
{
|
||||
uci_ind->slot %= 20;
|
||||
uci_ind->sfn = (uci_ind->sfn + 1) % 1024;
|
||||
}
|
||||
uci_ind->slot = scheduled_response->slot;
|
||||
uci_ind->num_ucis = 1;
|
||||
uci_ind->uci_list = CALLOC(uci_ind->num_ucis, sizeof(*uci_ind->uci_list));
|
||||
for (int j = 0; j < uci_ind->num_ucis; j++)
|
||||
{
|
||||
nfapi_nr_uci_pucch_pdu_format_0_1_t *pdu_0_1 = &uci_ind->uci_list[j].pucch_pdu_format_0_1;
|
||||
uci_ind->uci_list[j].pdu_type = NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE;
|
||||
uci_ind->uci_list[j].pdu_size = 46; //Melissa hack TODO: What should this be? Format 1_1 DCI has PayloadBitSize = 46
|
||||
uci_ind->uci_list[j].pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_0_1_t);
|
||||
pdu_0_1->pduBitmap = 2; // (value->pduBitmap >> 1) & 0x01) == HARQ and (value->pduBitmap) & 0x01) == SR
|
||||
pdu_0_1->handle = 0;
|
||||
pdu_0_1->rnti = dl_config->dl_config_list[0].dlsch_config_pdu.rnti;
|
||||
|
||||
@@ -96,6 +96,8 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
|
||||
|
||||
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
|
||||
const nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu = &uci_list[i].pucch_pdu_format_0_1;
|
||||
LOG_I(NR_MAC, "The received uci has sfn %d, slot %d, num_ucis %d and pdu_size %d\n",
|
||||
UL_INFO.uci_ind.sfn, UL_INFO.uci_ind.slot, num_ucis, uci_list[i].pdu_size);
|
||||
handle_nr_uci_pucch_0_1(mod_id, frame, slot, uci_pdu);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
|
||||
nfapi_nr_dl_tti_request_pdu_t *pdu_list = &dl_tti_request->dl_tti_request_body.dl_tti_pdu_list[i];
|
||||
if (pdu_list->PDUType == NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE)
|
||||
{
|
||||
LOG_I(NR_PHY, "[%d, %d] PDSCH PDU for rnti %x in \n",
|
||||
LOG_I(NR_PHY, "[%d, %d] PDSCH PDU for rnti %x\n",
|
||||
dl_tti_request->SFN, dl_tti_request->Slot, pdu_list->pdsch_pdu.pdsch_pdu_rel15.rnti);
|
||||
}
|
||||
|
||||
@@ -248,9 +248,14 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
|
||||
for (int j = 0; j < num_dcis; j++)
|
||||
{
|
||||
nfapi_nr_dl_dci_pdu_t *dci_pdu_list = &pdu_list->pdcch_pdu.pdcch_pdu_rel15.dci_pdu[j];
|
||||
LOG_I(NR_PHY, "[%d, %d] PDCCH DCI (Payload) for rnti %x with PayloadSizeBits %d\n",
|
||||
dl_tti_request->SFN, dl_tti_request->Slot, dci_pdu_list->RNTI, dci_pdu_list->PayloadSizeBits);
|
||||
for (int k = 0; k < DCI_PAYLOAD_BYTE_LEN; k++)
|
||||
int num_bytes = dci_pdu_list->PayloadSizeBits / 8;
|
||||
if (dci_pdu_list->PayloadSizeBits % 8 > 0)
|
||||
{
|
||||
num_bytes++;
|
||||
}
|
||||
LOG_I(NR_PHY, "[%d, %d] PDCCH DCI (Payload) for rnti %x with PayloadSizeBits %d, num_bytes %d\n",
|
||||
dl_tti_request->SFN, dl_tti_request->Slot, dci_pdu_list->RNTI, dci_pdu_list->PayloadSizeBits, num_bytes);
|
||||
for (int k = 0; k < num_bytes; k++)
|
||||
{
|
||||
LOG_I(NR_MAC, "PDCCH DCI PDU payload[%d] = %d\n", k, dci_pdu_list->Payload[k]);
|
||||
dl_info->dci_ind->dci_list[j].payloadBits[k] = dci_pdu_list->Payload[k];
|
||||
@@ -327,9 +332,14 @@ static void copy_ul_dci_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
|
||||
for (int j = 0; j < num_dci; j++)
|
||||
{
|
||||
nfapi_nr_dl_dci_pdu_t *dci_pdu_list = &pdu_list->pdcch_pdu.pdcch_pdu_rel15.dci_pdu[j];
|
||||
LOG_I(NR_PHY, "[%d, %d] ul_dci_req PDCCH DCI for rnti %x with PayloadSizeBits %d\n",
|
||||
ul_dci_req->SFN, ul_dci_req->Slot, dci_pdu_list->RNTI, dci_pdu_list->PayloadSizeBits);
|
||||
for (int k = 0; k < DCI_PAYLOAD_BYTE_LEN; k++)
|
||||
int num_bytes = dci_pdu_list->PayloadSizeBits / 8;
|
||||
if (dci_pdu_list->PayloadSizeBits % 8 > 0)
|
||||
{
|
||||
num_bytes++;
|
||||
}
|
||||
LOG_I(NR_PHY, "[%d, %d] ul_dci_req PDCCH DCI for rnti %x with PayloadSizeBits %d and num_bytes %d\n",
|
||||
ul_dci_req->SFN, ul_dci_req->Slot, dci_pdu_list->RNTI, dci_pdu_list->PayloadSizeBits, num_bytes);
|
||||
for (int k = 0; k < num_bytes; k++)
|
||||
{
|
||||
LOG_I(NR_MAC, "PDCCH DCI PDU payload[%d] = %d\n", k, dci_pdu_list->Payload[k]);
|
||||
dl_info->dci_ind->dci_list[j].payloadBits[k] = dci_pdu_list->Payload[k];
|
||||
@@ -360,9 +370,20 @@ static void copy_ul_tti_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
|
||||
LOG_D(NR_PHY, "This is the pdu type %d in ul_tti_req\n", pdu_list->pdu_type);
|
||||
if (pdu_list->pdu_type == NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE)
|
||||
{
|
||||
LOG_I(NR_PHY, "This is the tx_sfn %d and tx_slot %d for ul_tti_req. Not doing anything here since"
|
||||
" the slot and frame arent actually the reception values gNB specified.\n",
|
||||
ul_tti_req->SFN, ul_tti_req->Slot);
|
||||
nfapi_nr_uci_indication_t *uci_ind = unqueue(&nr_uci_ind_queue);
|
||||
if (uci_ind && uci_ind->num_ucis > 0)
|
||||
{
|
||||
uci_ind->sfn = ul_tti_req->SFN;
|
||||
uci_ind->slot = ul_tti_req->Slot;
|
||||
LOG_I(NR_MAC, "We have unqueued the previously filled uci_ind and updated the snf/slot to %d/%d.\n",
|
||||
uci_ind->sfn, uci_ind->slot);
|
||||
|
||||
NR_UL_IND_t UL_INFO = {
|
||||
.uci_ind = *uci_ind,
|
||||
};
|
||||
send_nsa_standalone_msg(&UL_INFO, uci_ind->header.message_id);
|
||||
free(uci_ind->uci_list);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user