ndlcch->resource_assignment[ncce_index]=resource_to_subframe[ResAssign];//from Isf of DCI to the number of subframe
ndlcch->repetition_number[ncce_index]=Irep_to_Nrep[RepNum];// repetition number for NPDSCH
ndlcch->dci_repetitions[ncce_index]=DCIrep_to_real_rep(DCIRep,32);////??????? should be repalce by the value in spec table 16.6-3, check also Rmax
ndlcch->dci_repetitions[ncce_index]=DCIrep_to_real_rep(DCIRep,4);////??????? should be repalce by the value in spec table 16.6-3, check also Rmax
ndlcch->modulation[ncce_index]=2;//QPSK
//if(ndlcch->round == 0){ //this should be set from initialization (init-lte)
//ndlcch->status[ncce_index] = ACTIVE_NB_IoT;
ndlcch->mcs[ncce_index]=mcs;
ndlcch->TBS[ncce_index]=TBStable_NB_IoT[mcs][ResAssign];// this table should be rewritten for nb-iot
ndlcch->pdu[ncce_index]=DLSCH_DCI_NB_IoT;
//ndlcch->pdu[ncce_index] = DLSCH_DCI_NB_IoT;
DCI_tmp=(uint8_t*)DLSCH_DCI_NB_IoT;
DCI_flip=(uint8_t*)malloc(3*sizeof(uint8_t));
DCI_flip[0]=DCI_tmp[2]*2;
DCI_flip[1]=DCI_tmp[1]*2;
DCI_flip[2]=DCI_tmp[0]*2;
ndlcch->pdu[ncce_index]=DCI_flip;
printf("DCI N1 PDU content:");
for(tmp=0;tmp<3;tmp++)
printf("%d ",DCI_flip[tmp]);
printf("\n");
ndlcch->counter_repetition_number[ncce_index]=DCIrep_to_real_rep(DCIRep,32);////??????? should be repalce by the value in spec table 16.6-3, check also Rmax
ndlcch->counter_repetition_number[ncce_index]=DCIrep_to_real_rep(DCIRep,4);////??????? should be repalce by the value in spec table 16.6-3, check also Rmax