Commit 7bec8575 authored by Matthieu Kanj's avatar Matthieu Kanj

Merge branch 'develop-nb-iot-mac' of...

Merge branch 'develop-nb-iot-mac' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-nb-iot-mac
parents ec2b045d 8cd9b164
...@@ -2120,6 +2120,8 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2120,6 +2120,8 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
// generate DCIs in order of decreasing aggregation level, then common/ue spec // generate DCIs in order of decreasing aggregation level, then common/ue spec
// MAC is assumed to have ordered the UE spec DCI according to the RNTI-based randomization // MAC is assumed to have ordered the UE spec DCI according to the RNTI-based randomization
for (L=3; L>=0; L--) { for (L=3; L>=0; L--) {
//first common DCI
for (i=0; i<num_common_dci; i++) { for (i=0; i<num_common_dci; i++) {
if (dci_alloc[i].L == (uint8_t)L) { if (dci_alloc[i].L == (uint8_t)L) {
...@@ -2140,6 +2142,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, ...@@ -2140,6 +2142,7 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci,
} }
} }
//start the second loop from the end of the previous one for ue specific DCI
for (; i<num_ue_spec_dci + num_common_dci; i++) { for (; i<num_ue_spec_dci + num_common_dci; i++) {
if (dci_alloc[i].L == (uint8_t)L) { if (dci_alloc[i].L == (uint8_t)L) {
......
This diff is collapsed.
...@@ -42,7 +42,7 @@ typedef enum ...@@ -42,7 +42,7 @@ typedef enum
{ {
DCIFormatN0 = 0, DCIFormatN0 = 0,
DCIFormatN1, DCIFormatN1,
DCIFormatN1_RA, DCIFormatN1_RA,//is for initial RA procedure (semi-static information) so maybe is not needed
DCIFormatN1_RAR, DCIFormatN1_RAR,
DCIFormatN2, DCIFormatN2,
DCIFormatN2_Ind, DCIFormatN2_Ind,
......
...@@ -56,7 +56,7 @@ void NB_add_dci(DCI_PDU_NB *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size ...@@ -56,7 +56,7 @@ void NB_add_dci(DCI_PDU_NB *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].L = aggregation; DCI_pdu->dci_alloc[DCI_pdu->Num_dci].L = aggregation;
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].rnti = rnti; DCI_pdu->dci_alloc[DCI_pdu->Num_dci].rnti = rnti;
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].format = dci_fmt; DCI_pdu->dci_alloc[DCI_pdu->Num_dci].format = dci_fmt;
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].npdcch_start_symbol = npdcch_start_symbol; DCI_pdu->npdcch_start_symbol = npdcch_start_symbol;
DCI_pdu->Num_dci++; DCI_pdu->Num_dci++;
...@@ -122,7 +122,6 @@ int NB_generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB, ...@@ -122,7 +122,6 @@ int NB_generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
((DCIN0_t *)ULSCH_DCI_NB)->ndi =ndi; ((DCIN0_t *)ULSCH_DCI_NB)->ndi =ndi;
((DCIN0_t *)ULSCH_DCI_NB)->DCIRep =DCIRep; ((DCIN0_t *)ULSCH_DCI_NB)->DCIRep =DCIRep;
eNB->DCI_pdu->Num_dci++;
NB_add_dci(eNB->DCI_pdu,ULSCH_DCI_NB,rnti,sizeof(DCIN0_t),aggregation,sizeof_DCIN0_t,DCIFormatN0, npdcch_start_symbol); NB_add_dci(eNB->DCI_pdu,ULSCH_DCI_NB,rnti,sizeof(DCIN0_t),aggregation,sizeof_DCIN0_t,DCIFormatN0, npdcch_start_symbol);
...@@ -160,6 +159,7 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB, ...@@ -160,6 +159,7 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB,
eNB->DCI_pdu = (DCI_PDU_NB*) malloc(sizeof(DCI_PDU_NB)); eNB->DCI_pdu = (DCI_PDU_NB*) malloc(sizeof(DCI_PDU_NB));
//N1 parameters //N1 parameters
/// type = 0 => DCI Format N0, type = 1 => DCI Format N1, 1 bits /// type = 0 => DCI Format N0, type = 1 => DCI Format N1, 1 bits
...@@ -229,8 +229,8 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB, ...@@ -229,8 +229,8 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB,
/*Now configure the ndlsch structure*/ /*Now configure the ndlsch structure*/
ndlsch->subframe_tx[subframe] = 1; // check if it's OK ndlsch->subframe_tx[subframe] = 1; // check if it's OK
ndlsch->rnti = rnti; ndlsch->rnti = rnti; //we store the RNTI (e.g. for RNTI will be used later)
ndlsch->active = 1; ndlsch->active = 0; //will be activated by the corresponding NDSLCH pdu
// use this value to configure PHY both harq_processes and resource mapping. // use this value to configure PHY both harq_processes and resource mapping.
ndlsch_harq->scheduling_delay = Sched_delay; ndlsch_harq->scheduling_delay = Sched_delay;
...@@ -248,8 +248,7 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB, ...@@ -248,8 +248,7 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB,
* ISF = ResAssign * ISF = ResAssign
*/ */
ndlsch_harq->TBS = TBStable_NB_IoT[mcs][ResAssign]; // this table should be rewritten for nb-iot ndlsch_harq->TBS = TBStable_NB_IoT[mcs][ResAssign];
ndlsch_harq->frame = frame;
ndlsch_harq->subframe = subframe; ndlsch_harq->subframe = subframe;
//ndlsch_harq->B; we don-t have now my is given when we receive the dlsch data //ndlsch_harq->B; we don-t have now my is given when we receive the dlsch data
...@@ -299,6 +298,8 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB, ...@@ -299,6 +298,8 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB,
/*Now configure the ndlsch structure*/ /*Now configure the ndlsch structure*/
ndlsch->subframe_tx[subframe] = 1; // check if it's OK ndlsch->subframe_tx[subframe] = 1; // check if it's OK
ndlsch->rnti = rnti; //we store the RNTI (e.g. for RNTI will be used later)
ndlsch->active = 0;//will be activated by the corresponding NDSLCH pdu
// use this value to configure PHY both harq_processes and resource mapping. // use this value to configure PHY both harq_processes and resource mapping.
ndlsch_harq->scheduling_delay = Sched_delay; ndlsch_harq->scheduling_delay = Sched_delay;
......
...@@ -818,14 +818,24 @@ typedef enum ...@@ -818,14 +818,24 @@ typedef enum
}ndlsch_flag_t; }ndlsch_flag_t;
typedef struct {
//array containing the pdus of DCI
uint8_t *a[2];
//Array containing encoded DCI data
uint8_t *e[2];
}NB_IoT_eNB_NPDCCH_t;
typedef struct { typedef struct {
///indicates the starting OFDM symbol in the first slot of a subframe k for the NPDCCH transmission
/// see FAPI/NFAPI specs Table 4-121
uint8_t npdcch_start_symbol;
/// Length of DCI in bits /// Length of DCI in bits
uint8_t dci_length; uint8_t dci_length;
/// Aggregation level only 0,1 in NB-IoT /// Aggregation level only 1,2 in NB-IoT
uint8_t L; uint8_t L;
/// Position of first CCE of the dci /// Position of first CCE of the dci
int firstCCE; int firstCCE;
...@@ -842,6 +852,9 @@ typedef struct { ...@@ -842,6 +852,9 @@ typedef struct {
typedef struct { typedef struct {
//delete the count for the DCI numbers,NUM_DCI_MAX should set to 2 //delete the count for the DCI numbers,NUM_DCI_MAX should set to 2
uint32_t num_npdcch_symbols; uint32_t num_npdcch_symbols;
///indicates the starting OFDM symbol in the first slot of a subframe k for the NPDCCH transmission
/// see FAPI/NFAPI specs Table 4-45
uint8_t npdcch_start_symbol;
uint8_t Num_dci; uint8_t Num_dci;
DCI_ALLOC_NB_t dci_alloc[2] ; DCI_ALLOC_NB_t dci_alloc[2] ;
} DCI_PDU_NB; } DCI_PDU_NB;
...@@ -882,6 +895,8 @@ typedef struct { ...@@ -882,6 +895,8 @@ typedef struct {
uint8_t mcs; uint8_t mcs;
// we don't have code block segmentation / crc attachment / concatenation in NB-IoT R13 36.212 6.4.2 // we don't have code block segmentation / crc attachment / concatenation in NB-IoT R13 36.212 6.4.2
// we don't have beamforming in NB-IoT // we don't have beamforming in NB-IoT
//this index will be used mainly for SI message buffer
uint8_t pdu_buffer_index;
} NB_IoT_DL_eNB_HARQ_t; } NB_IoT_DL_eNB_HARQ_t;
...@@ -933,10 +948,11 @@ typedef struct { ...@@ -933,10 +948,11 @@ typedef struct {
uint8_t relative_sib1_frame; uint8_t relative_sib1_frame;
//Flag used to discern among different NDLSCH structures (SIB1,SI,RA,UE-spec) //Flag used to discern among different NDLSCH structures (SIB1,SI,RA,UE-spec)
//(in this case is used because we may have that more that one calls of npdch_procedure is needed for transmitting a data (NB-IoT implement repetitions) //(used inside the ndlsch procedure for distinguish the different type of data to manage also in term of repetitions and transmission over more subframes
ndlsch_flag_t ndlsch_type; ndlsch_flag_t ndlsch_type;
} NB_IoT_eNB_NDLSCH_t; } NB_IoT_eNB_NDLSCH_t;
typedef struct { typedef struct {
......
This diff is collapsed.
...@@ -92,7 +92,7 @@ void npbch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -92,7 +92,7 @@ void npbch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
/*Function to pack the DCI*/ /*Function to pack the DCI*/
void NB_add_dci(DCI_PDU_NB *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt, uint8_t npdcch_start_symbol); void NB_add_dci(DCI_PDU_NB *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt, uint8_t npdcch_start_symbol);
/*Use the UL DCI Information to configure PHY and also Packed*/ /*Use the UL DCI Information to configure PHY and also Pack the DCI*/
int NB_generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB, int NB_generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc, eNB_rxtx_proc_t *proc,
DCI_CONTENT *DCI_Content, DCI_CONTENT *DCI_Content,
...@@ -102,7 +102,7 @@ int NB_generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB, ...@@ -102,7 +102,7 @@ int NB_generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
uint8_t aggregation, uint8_t aggregation,
uint8_t npdcch_start_symbol uint8_t npdcch_start_symbol
); );
/*Use the DL DCI Information to configure PHY and also Packed*/ /*Use the DL DCI Information to configure PHY and also Pack the DCI*/
int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB, int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB,
int frame, int frame,
uint8_t subframe, uint8_t subframe,
...@@ -115,5 +115,17 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB, ...@@ -115,5 +115,17 @@ int NB_generate_eNB_dlsch_params_from_dci(PHY_VARS_eNB *eNB,
uint8_t npdcch_start_symbol uint8_t npdcch_start_symbol
); );
/*Function for DCI encoding, scrambling, modulation*/
uint8_t generate_dci_top_NB(
NB_IoT_eNB_NPDCCH_t* npdcch,
uint8_t Num_dci,
DCI_ALLOC_NB_t *dci_alloc,
int16_t amp,
NB_DL_FRAME_PARMS *fp,
int32_t **txdataF,
uint32_t subframe,
uint8_t npdcch_start_symbol);
#endif #endif
...@@ -703,7 +703,7 @@ typedef struct PHY_VARS_eNB_s { ...@@ -703,7 +703,7 @@ typedef struct PHY_VARS_eNB_s {
*/ */
NB_IoT_eNB_NPBCH *npbch; NB_IoT_eNB_NPBCH *npbch;
//NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAX_NB_IoT]; //check the max size of this array NB_IoT_eNB_NPDCCH_t *npdcch; //check if should be an array and the max size of this array
NB_IoT_eNB_NDLSCH_t *ndlsch[NUMBER_OF_UE_MAX_NB_IoT]; NB_IoT_eNB_NDLSCH_t *ndlsch[NUMBER_OF_UE_MAX_NB_IoT];
NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX_NB_IoT+1]; //nulsch[0] contains the RAR NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX_NB_IoT+1]; //nulsch[0] contains the RAR
NB_IoT_eNB_NDLSCH_t *ndlsch_SI,*ndlsch_ra, *ndlsch_SIB1; NB_IoT_eNB_NDLSCH_t *ndlsch_SI,*ndlsch_ra, *ndlsch_SIB1;
......
...@@ -152,6 +152,13 @@ typedef struct { ...@@ -152,6 +152,13 @@ typedef struct {
} DL_GapConfig_NB; } DL_GapConfig_NB;
typedef struct { typedef struct {
/// Number of resource blocks (RB) in DL of the LTE (for knowing the bandwidth)
uint8_t N_RB_DL;
/// Number of resource blocks (RB) in UL of the LTE ((for knowing the bandwidth)
uint8_t N_RB_UL;
/// Cell ID /// Cell ID
uint16_t Nid_cell; uint16_t Nid_cell;
/// Cyclic Prefix for DL (0=Normal CP, 1=Extended CP) /// Cyclic Prefix for DL (0=Normal CP, 1=Extended CP)
...@@ -226,8 +233,6 @@ typedef struct { ...@@ -226,8 +233,6 @@ typedef struct {
// CE level to determine the NPRACH Configuration (one CE for each NPRACH config.) // CE level to determine the NPRACH Configuration (one CE for each NPRACH config.)
uint8_t CE; uint8_t CE;
/* /*
* index of the PRB assigned to NB-IoT carrier in in-band/guard-band operating mode * index of the PRB assigned to NB-IoT carrier in in-band/guard-band operating mode
*/ */
......
...@@ -75,23 +75,25 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB, ...@@ -75,23 +75,25 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB,
* *
* From spec. TS 36.321 v14.2.o pag 31 --> there is an HARQ process for all the broadcast * From spec. TS 36.321 v14.2.o pag 31 --> there is an HARQ process for all the broadcast
* *
* XXX for the moment we are not able to prevent the problem of Error: first transmission but sdu = NULL.
* anyway, the PHY layer if have finished the transmission it will not transmit anything and will generate the error
*
*/ */
ndlsch= eNB->ndlsch_SI; ndlsch= eNB->ndlsch_SI;
ndlsch->ndlsch_type = SI_Message;
ndlsch->npdsch_start_symbol = rel13->start_symbol; //start OFDM symbol for the ndlsch transmission
ndlsch_harq = ndlsch->harq_process; ndlsch_harq = ndlsch->harq_process;
//new SI starting transmission //new SI starting transmission (should enter here only the first time for a new transmission)
if(sdu != NULL) if(sdu != NULL)
{ {
ndlsch->ndlsch_type = SI_Message;
ndlsch->npdsch_start_symbol = rel13->start_symbol; //start OFDM symbol for the ndlsch transmission
ndlsch_harq->pdu = sdu; ndlsch_harq->pdu = sdu;
ndlsch_harq->resource_assignment = rel13->number_of_subframes_for_resource_assignment;//value 2 or 8 ndlsch_harq->resource_assignment = rel13->number_of_subframes_for_resource_assignment;//value 2 or 8
ndlsch_harq->repetition_number = rel13->repetition_number;//should be always fix to 0 to be mapped in 1 ndlsch_harq->repetition_number = rel13->repetition_number;//should be always fix to 0 to be mapped in 1
ndlsch_harq->modulation = rel13->modulation; ndlsch_harq->modulation = rel13->modulation;
ndlsch_harq->status = ACTIVE;
//SI information in reality have no feedback (so there is no retransmission from the HARQ view point since no sck and nack) //SI information in reality have no feedback (so there is no retransmission from the HARQ view point since no sck and nack)
// ndlsch_harq->frame = frame; // ndlsch_harq->frame = frame;
...@@ -100,14 +102,17 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB, ...@@ -100,14 +102,17 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB,
ndlsch->nrs_antenna_ports = rel13->nrs_antenna_ports_assumed_by_the_ue; ndlsch->nrs_antenna_ports = rel13->nrs_antenna_ports_assumed_by_the_ue;
ndlsch->scrambling_sequence_intialization = rel13->scrambling_sequence_initialization_cinit; ndlsch->scrambling_sequence_intialization = rel13->scrambling_sequence_initialization_cinit;
} }
//continue the remaining transmission of the previous SI at PHY if any (otherwise nothing)
else else
{ {
ndlsch_harq->pdu = NULL; //continue the remaining transmission of the previous SI at PHY if any (otherwise nothing)
//there is no need of repeating the configuration on the ndlsch //there is no need of repeating the configuration on the ndlsch
ndlsch_harq->pdu = NULL;
} }
//Independently if we have the PDU or not (first transmission or repetition) the process is activated for triggering the ndlsch_procedure
ndlsch_harq->status = ACTIVE;
} }
//ue specific data or RAR (we already have received the DCI for this) //ue specific data or RAR (we already have received the DCI for this)
else if(rel13->rnti != 65535 && rel13->rnti_type == 1) else if(rel13->rnti != 65535 && rel13->rnti_type == 1)
...@@ -118,6 +123,7 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB, ...@@ -118,6 +123,7 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB,
{ {
eNB->ndlsch_ra->harq_process->pdu = sdu; eNB->ndlsch_ra->harq_process->pdu = sdu;
eNB->ndlsch_ra->npdsch_start_symbol = rel13->start_symbol; eNB->ndlsch_ra->npdsch_start_symbol = rel13->start_symbol;
eNB->ndlsch_ra->active = 1;
} }
else else
{ //this for ue data { //this for ue data
...@@ -132,8 +138,11 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB, ...@@ -132,8 +138,11 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB,
ndlsch = eNB->ndlsch[(uint8_t)UE_id]; ndlsch = eNB->ndlsch[(uint8_t)UE_id];
ndlsch_harq = eNB->ndlsch[(uint8_t)UE_id]->harq_process; ndlsch_harq = eNB->ndlsch[(uint8_t)UE_id]->harq_process;
AssertFatal(ndlsch_harq!=NULL,"dlsch_harq for ue specific is null\n"); AssertFatal(ndlsch_harq!=NULL,"dlsch_harq for ue specific is null\n");
ndlsch->npdsch_start_symbol = rel13->start_symbol; ndlsch->npdsch_start_symbol = rel13->start_symbol;
ndlsch_harq->pdu = sdu; ndlsch_harq->pdu = sdu;
ndlsch->active = 1;
} }
} }
...@@ -147,6 +156,11 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB, ...@@ -147,6 +156,11 @@ void handle_nfapi_dlsch_pdu_NB(PHY_VARS_eNB *eNB,
/////////////////////////////////////////////////////////////////////////////////////////////////
//Memo for initialization TODO: target/SIMU/USER/init_lte.c/init_lte_eNB --> new_eNB_dlsch(..) //
//this is where the allocation of PHy_vars_eNB and all the ndlsch structures happen //
/////////////////////////////////////////////////////////////////////////////////////////////////
// do the schedule response and trigger the TX // do the schedule response and trigger the TX
void schedule_response(Sched_Rsp_t *Sched_INFO) void schedule_response(Sched_Rsp_t *Sched_INFO)
...@@ -206,7 +220,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -206,7 +220,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
for (i=0;i<number_dl_pdu;i++) //in principle this should be always = 1 for (i=0;i<number_dl_pdu;i++) //in principle this should be at most 2 (in case of DCI)
{ {
dl_config_pdu = &DL_req->dl_config_pdu_list[i]; dl_config_pdu = &DL_req->dl_config_pdu_list[i];
switch (dl_config_pdu->pdu_type) switch (dl_config_pdu->pdu_type)
...@@ -229,8 +243,17 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -229,8 +243,17 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
break; break;
case NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE: case NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE:
//we can have three types of NDLSCH based on our assumptions: SIB1, SI, Data //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 structure //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
*/
handle_nfapi_dlsch_pdu_NB(eNB, proc,dl_config_pdu,Sched_INFO->sdu[i]); handle_nfapi_dlsch_pdu_NB(eNB, proc,dl_config_pdu,Sched_INFO->sdu[i]);
...@@ -282,6 +305,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) ...@@ -282,6 +305,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
} }
//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
NB_phy_procedures_eNB_TX(eNB,proc,NULL); NB_phy_procedures_eNB_TX(eNB,proc,NULL);
} }
......
...@@ -376,6 +376,7 @@ uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1); ...@@ -376,6 +376,7 @@ uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1);
int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB); int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
//NB-IoT //NB-IoT
int8_t find_ue_NB(uint16_t rnti, PHY_VARS_eNB *eNB); int8_t find_ue_NB(uint16_t rnti, PHY_VARS_eNB *eNB);
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB); int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rnti); int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rnti);
......
...@@ -768,6 +768,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -768,6 +768,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties_index = 0; enb_properties_index = 0;
num_enbs = config_setting_length(setting); num_enbs = config_setting_length(setting);
//Start the loop for parsing all the element over the .config file
for (i = 0; i < num_enbs; i++) { for (i = 0; i < num_enbs; i++) {
setting_enb = config_setting_get_elem(setting, i); setting_enb = config_setting_get_elem(setting, i);
...@@ -783,6 +786,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -783,6 +786,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
# endif # endif
} }
//Identification Parameters
if ( !( config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type) if ( !( config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME, &enb_name) && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME, &enb_name)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac) && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac)
...@@ -2519,7 +2524,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -2519,7 +2524,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} }
// OTG _CONFIG // OTG _CONFIG //MP: refers to USB On the GO Features ?? (use USB devices as a fleshdrives)
setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG); setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG);
if (setting_otg != NULL) { if (setting_otg != NULL) {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h" #include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h"
#include "PhysicalConfigDedicated-NB-r13.h" #include "PhysicalConfigDedicated-NB-r13.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h" #include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/COMMON/platform_types.h"
#define SCH_PAYLOAD_SIZE_MAX 4096 #define SCH_PAYLOAD_SIZE_MAX 4096
#define BCCH_PAYLOAD_SIZE_MAX 128 #define BCCH_PAYLOAD_SIZE_MAX 128
......
...@@ -141,7 +141,8 @@ int NB_rrc_mac_config_req_eNB( ...@@ -141,7 +141,8 @@ int NB_rrc_mac_config_req_eNB(
int p_rx_eNB,// number of eNB Rx antenna ports (1 or 2 for NB-IoT) int p_rx_eNB,// number of eNB Rx antenna ports (1 or 2 for NB-IoT)
int Ncp, int Ncp,
int Ncp_UL, int Ncp_UL,
long eutra_band,//FIXME: frequencyBandIndicator in sib1 (is a long not an int!!) //FIXME: frequencyBandIndicator (eutra_band) in sib1 (as Rymond Implementation) (is a long not an int!!)//XXX this param is set in the do_sib1_nb and is directly taken from the .config file
long eutra_band,
struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1 struct NS_PmaxList_NB_r13 *frequencyBandInfo, //optional SIB1
struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1 struct MultiBandInfoList_NB_r13 *multiBandInfoList, //optional SIB1
struct DL_Bitmap_NB_r13 *dl_bitmap, //optional SIB1 struct DL_Bitmap_NB_r13 *dl_bitmap, //optional SIB1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment