ndlsch->resource_assignment_SIB1=rel13->number_of_subframes_for_resource_assignment;//maybe we don't care about it since a fixed schedule
ndlsch->repetition_number_SIB1=rel13->repetition_number;//is the schedulingInfoSIB1 (value 1-15) of MIB that is mapped into value 4-8-16 (see NDLSCH fapi specs Table 4-47)
ndlsch->modulation=rel13->modulation;
ndlsch->status=ACTIVE_NB_IoT;
//ndlsch->
//SI information in reality have no feedback (so there is no retransmission from the HARQ view point since no ack and nack)
//printf("number of subframe : %d, Rep of subframe : %d\n",eNB->ndlsch_RAR->number_of_subframes_for_resource_assignment,eNB->ndlsch_RAR->counter_repetition_number);
eNB->ndlsch_RAR->harq_process->TBS=rel13->length;
eNB->ndlsch_RAR->harq_process->pdu=sdu;
}
else
{//this for ue data
//TODO
LOG_I(PHY,"handling MSG4 or ue-spec data\n");
//program addition DLSCH parameters not from DCI (for the moment we only pass the pdu)
LOG_E(PHY,"Received a schedule_response with N-BCH but no SDU!!\n");
break;
caseNFAPI_DL_CONFIG_NDLSCH_PDU_TYPE:
//we can have three types of NDLSCH based on our assumptions: SIB1, SI, Data, RAR
//remember that SI messages have no DCI in NB-IoT therefore this is the only way to configure the ndlsch_SI/ndlsch_SIB1 structures ndlsch->active = 1;
/*
* OBSERVATION:
* Although 2 DCI may be received over a schedule_response the transmission of the NDLSCH data foresees only 1 NDLSCH PDU at time.
* Therefore is the MAC scheduler that knowing the different timing delay will send the corresponding schedule_response containing the NDLSCH PDU and the MAC PDU
* at the proper DL subframe
* -for this reason the activation of the ndslch structure is done only when we receive the NDLSCH pdu (here) such the in the TX procedure only 1 ue-specific pdu
* result active from the loop before calling the ndlsch_procedure
//nulsch_harq->subcarrier_spacing = nfapi_parameters_rel13->handle; // get from the UL_grant of MSG3
nulsch_harq->subcarrier_indication=nfapi_parameters_rel13->subcarrier_indication;// Isc =0->18 , or 0->47 // format 2, 0->3 or 0->7
nulsch_harq->resource_assignment=nfapi_parameters_rel13->resource_assignment;// valid for format 1 // this should be set by DCI N0 // not used for msg3 // I_RU --> helps to get N_RU
nulsch_harq->mcs=nfapi_parameters_rel13->mcs;// I_mcs = 0->10 (single tone) and 0->12 (multi-tone)
nulsch_harq->rvidx=nfapi_parameters_rel13->redudancy_version;// values = 0 or 1
nulsch_harq->repetition_number=nfapi_parameters_rel13->repetition_number;// // N_rep values = 0->7 // new funciton to be created to compute the nb_slots = f(N_rep)
nulsch_harq->new_data_indication=nfapi_parameters_rel13->new_data_indication;// valid only for DCI N0
nulsch_harq->TBS=nfapi_parameters_rel13->size;/// check if needed *8 or /8 or nothing to do
//nulsch_harq->subcarrier_spacing = nfapi_parameters_rel13->handle; // get from the UL_grant of MSG3
nulsch_harq->subcarrier_indication=nfapi_parameters_rel13->subcarrier_indication;// Isc =0->18 , or 0->47 // format 2, 0->3 or 0->7
nulsch_harq->resource_assignment=nfapi_parameters_rel13->resource_assignment;// valid for format 1 // this should be set by DCI N0 // not used for msg3 // I_RU --> helps to get N_RU
nulsch_harq->mcs=nfapi_parameters_rel13->mcs;// I_mcs = 0->10 (single tone) and 0->12 (multi-tone)
nulsch_harq->rvidx=nfapi_parameters_rel13->redudancy_version;// values = 0 or 1
nulsch_harq->repetition_number=nfapi_parameters_rel13->repetition_number;// // N_rep values = 0->7 // new funciton to be created to compute the nb_slots = f(N_rep)
nulsch_harq->new_data_indication=nfapi_parameters_rel13->new_data_indication;// valid only for DCI N0
nulsch_harq->TBS=nfapi_parameters_rel13->size;/// check if needed *8 or /8 or nothing to do
//nulsch_harq->subcarrier_spacing = nfapi_parameters_rel13->handle; // get from the UL_grant of MSG3
nulsch_harq->subcarrier_indication=nfapi_parameters_rel13->nb_harq_information.nb_harq_information_rel13_fdd.harq_ack_resource;// Isc =0->18 , or 0->47 // format 2, 0->3 or 0->7
nulsch_harq->resource_assignment=nfapi_parameters_rel13->resource_assignment;// valid for format 1 // this should be set by DCI N0 // not used for msg3 // I_RU --> helps to get N_RU
nulsch_harq->mcs=nfapi_parameters_rel13->mcs;// I_mcs = 0->10 (single tone) and 0->12 (multi-tone)
nulsch_harq->rvidx=nfapi_parameters_rel13->redudancy_version;// values = 0 or 1
nulsch_harq->repetition_number=nfapi_parameters_rel13->ue_information.ue_information_rel13.total_number_of_repetitions;// // N_rep values = 0->7 // new funciton to be created to compute the nb_slots = f(N_rep)
nulsch_harq->new_data_indication=nfapi_parameters_rel13->new_data_indication;// valid only for DCI N0
nulsch_harq->TBS=nfapi_parameters_rel13->size;/// check if needed *8 or /8 or nothing to do
LOG_I(PHY,"subframe = %d (TX timing), IF module proceed UL config NULSCH ack pdu, will trigger npusch in next subframe\n",subframe);
}
break;
caseNFAPI_UL_CONFIG_NRACH_PDU_TYPE:
//TODO just for update the nprach configuration (given at the beginning through phy_config_sib2)
break;
}
}
//XXX problem: although we may have nothing to transmit this function should be always triggered in order to allow the PHY layer to complete the repetitions
//of previous Transport Blocks
//phy_procedures_eNB_TX_NB_IoT(eNB,proc,NULL);
//phy_procedures_eNB_TX_NB_IoT(eNB,proc,0); // check if 0 or NULL ?!