@@ -409,17 +410,18 @@ int dci_allocate_REs_in_RB_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
intdci_modulation_NB_IoT(int32_t**txdataF,
int16_tamp,
NB_IoT_DL_FRAME_PARMS*frame_parms,
LTE_DL_FRAME_PARMS*frame_parms,
uint8_tcontrol_region_size,//XXX we pass the npdcch_start_symbol // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
uint8_t*e[2],// Input data
intG,// number of bits per subframe
uint8_t*e,// Input data
uint8_tdci_number,// This variable should takes the 1 or 2 (1 for in case of one DCI, 2 in case of two DCI)
uint8_tagr_level)// Aggregation level
uint8_tagr_level,
intRB_index,
intsubframe)// Aggregation level
{
uint32_tjj=0;
uint32_tre_allocated,symbol_offset;
uint16_tl;
uint8_tid_offset,pilots=0;
uint8_tid_offset,pilot_shift,pilots=0;
unsignedshortbandwidth_even_odd;
unsignedshortNB_IoT_start,RB_IoT_ID;
...
...
@@ -427,24 +429,50 @@ int dci_modulation_NB_IoT(int32_t **txdataF,
id_offset=0;
// testing if the total number of RBs is even or odd
uint8_tNsf,// number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
unsignedintG,
uint8_toption)// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
{
uint32_tcrc=1;
//unsigned char harq_pid = dlsch->current_harq_pid; // to check during implementation if harq_pid is required in the NB_IoT_eNB_DLSCH_t structure in defs_NB_IoT.h
//uint8_t option1,option2,option3,option4;
unsignedintA;
uint8_tRCC;
uint8_tnpbch_a[7];
uint8_tnpbch_a_crc[10];
bzero(npbch_a,7);
bzero(npbch_a_crc,10);
A=56;
dlsch->length_e=G;// G*Nsf (number_of_subframes) = total number of bits to transmit G=236
int32_tnumbits=A+24;
if(option==1)
{
for(inti=0;i<7;i++)
{
npbch_a[i]=a[i];
}
}else{
for(inti=0;i<33;i++)
{
npbch_a[i]=a[i];
}
}
crc=crc24a_NB_IoT(npbch_a,A)>>8;
for(intj=0;j<7;j++)
{
npbch_a_crc[j]=npbch_a[j];
}
npbch_a_crc[7]=((uint8_t*)&crc)[2];
npbch_a_crc[8]=((uint8_t*)&crc)[1];
npbch_a_crc[9]=((uint8_t*)&crc)[0];
dlsch->B=numbits;// The length of table b in bits
//memcpy(dlsch->b,a,numbits/8); // comment if option 2
uint8_tcontrol_region_size,//XXX we pass the npdcch_start_symbol // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
uint8_t*e,// Input data
uint8_tdci_number,// This variable should takes the 1 or 2 (1 for in case of one DCI, 2 in case of two DCI)