uint8_tNsf,// number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
uint8_tNsf,// number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
unsignedintG,
unsignedintG,
uint8_toption)// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
uint8_toption)// G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
...
@@ -134,7 +134,7 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
...
@@ -134,7 +134,7 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
//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
//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;
//uint8_t option1,option2,option3,option4;
unsignedintA=0;
unsignedintA=0;
A=dlsch->TBS/8;
A=dlsch->harq_process->TBS/8;
uint8_tRCC;
uint8_tRCC;
...
@@ -143,7 +143,7 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
...
@@ -143,7 +143,7 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
bzero(npbch_a,A);
bzero(npbch_a,A);
bzero(npbch_a_crc,A+3);
bzero(npbch_a_crc,A+3);
dlsch->length_e=G*Nsf;// G*Nsf (number_of_subframes) = total number of bits to transmit G=236
dlsch->harq_process->length_e=G*Nsf;// G*Nsf (number_of_subframes) = total number of bits to transmit G=236
for(inti=0;i<A;i++)
for(inti=0;i<A;i++)
...
@@ -165,13 +165,12 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
...
@@ -165,13 +165,12 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
npbch_a_crc[A+1]=((uint8_t*)&crc)[1];
npbch_a_crc[A+1]=((uint8_t*)&crc)[1];
npbch_a_crc[A+2]=((uint8_t*)&crc)[0];
npbch_a_crc[A+2]=((uint8_t*)&crc)[0];
dlsch->B=numbits;// The length of table b in bits
dlsch->harq_process->B=numbits;// The length of table b in bits
//memcpy(dlsch->b,a,numbits/8); // comment if option 2
//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_tcontrol_region_size,// 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
NB_IoT_eNB_NDLSCH_t*dlsch0,//NB_IoT_eNB_NDLSCH_t
intG,// number of bits per subframe
unsignedintnpdsch_data_subframe,// subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
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_tdci_number,// This variable should takes the 1 or 2 (1 for in case of one DCI, 2 in case of two DCI)