@@ -74,19 +73,21 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
...
@@ -74,19 +73,21 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
time_stats_t_NB_IoT*te_stats,
time_stats_t_NB_IoT*te_stats,
time_stats_t_NB_IoT*i_stats)
time_stats_t_NB_IoT*i_stats)
{
{
unsignedintcrc=1;
unsignedintcrc=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
//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
unsignedintA;
unsignedintA;
uint8_tRCC;
uint8_tRCC;
A=dlsch->harq_process.TBS;// 680
dlsch->harq_process.length_e=G*Nsf;// G*Nsf (number_of_subframes) = total number of bits to transmit
A=dlsch->harq_process.TBS;// 680
dlsch->harq_process.length_e=G*Nsf;// G*Nsf (number_of_subframes) = total number of bits to transmit
int32_tnumbits=A+24;
int32_tnumbits=A+24;
if(dlsch->harq_process.round==0){// This is a new packet
if(dlsch->harq_process.round==0){// This is a new packet
#include "PHY/defs_NB_IoT.h" // not can be replaced by impl_defs_lte_NB_IoT & impl_defs_top_NB_IoT if "msg" function is not used
//#include "defs.h"
//#include "defs.h"
//#include "PHY/extern_NB_IoT.h"
//#include "PHY/extern_NB_IoT.h"
//#include "PHY/impl_defs_lte_NB_IoT.h"
//#include "PHY/impl_defs_top_NB_IoT.h"
#include "nsss_NB_IoT.h"
#include "nsss_NB_IoT.h"
intgenerate_sss_NB_IoT(int32_t**txdataF,
intgenerate_sss_NB_IoT(int32_t**txdataF,
int16_tamp,
int16_tamp,
NB_IoT_DL_FRAME_PARMS*frame_parms,
NB_IoT_DL_FRAME_PARMS*frame_parms,
uint16_tsymbol_offset,// symbol_offset = 3 for NB-IoT
uint16_tsymbol_offset,// symbol_offset = 3 for NB-IoT
uint16_tslot_offset,
uint16_tslot_offset,
unsignedshortframe_number,// new attribute (Get value from higher layer), it does not exist for LTE
unsignedshortframe_number,// new attribute (Get value from higher layer), it does not exist for LTE
unsignedshortRB_IoT_ID)// new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
unsignedshortRB_IoT_ID)// new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
{
{
uint8_taa,Nid_NB_IoT,Nid2,f,q,s,c,u;
uint8_taa,Nid_NB_IoT,Nid2,f,q,s,c,u;
int16_t*d;
int16_t*d;
uint16_tn_f;
uint16_tn_f;
unsignedshorta;
unsignedshorta;
uint16_tslot_id;// slot_id = 17 in NB_IoT
uint16_tslot_id;// slot_id = 17 in NB_IoT
unsignedshortbandwidth_even_odd;
unsignedshortbandwidth_even_odd;
unsignedshortNB_IoT_start;
unsignedshortNB_IoT_start;
n_f=frame_number;
n_f=frame_number;
Nid_NB_IoT=frame_parms->Nid_cell;// supposing Cell_Id of LTE = Cell_Id of NB-IoT // if different , NB_IOT_DL_FRAME_PARMS should be includes as attribute
Nid_NB_IoT=frame_parms->Nid_cell;// supposing Cell_Id of LTE = Cell_Id of NB-IoT // if different , NB_IOT_DL_FRAME_PARMS should be includes as attribute