Commit f86cb8e1 authored by Nick Ho's avatar Nick Ho

Fix error on openair1 and RRC

parent ab857a55
...@@ -1421,7 +1421,7 @@ set(L2_SRC_NBIOT ...@@ -1421,7 +1421,7 @@ set(L2_SRC_NBIOT
${RRC_NBIOT_DIR}/rrc_eNB_NB_IoT.c ${RRC_NBIOT_DIR}/rrc_eNB_NB_IoT.c
${RRC_NBIOT_DIR}/rrc_eNB_UE_context_NB_IoT.c ${RRC_NBIOT_DIR}/rrc_eNB_UE_context_NB_IoT.c
${RRC_NBIOT_DIR}/rrc_common_NB_IoT.c ${RRC_NBIOT_DIR}/rrc_common_NB_IoT.c
${RRC_NBIOT_DIR}/L2_interface_NB_IoT.c #${RRC_NBIOT_DIR}/L2_interface_NB_IoT.c
) )
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h" #include "RRC/NBIOT/defs_NB_IoT.h"
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#endif #endif
#ifndef TEST_DEBUG #ifndef TEST_DEBUG
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#else #else
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
*/ */
//#include "defs.h" //#include "defs.h"
#include "SCHED/defs_NB_IoT.h" #include "SCHED_NBIOT/defs_NB_IoT.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "PHY/extern_NB_IoT.h" // PHY/defs_NB_IoT.h is called here , log.h & LTE_TRANSPORT/defs_NB_IoT.h are included through PHY/defs_NB_IoT.h #include "PHY/extern_NB_IoT.h" // PHY/defs_NB_IoT.h is called here , log.h & LTE_TRANSPORT/defs_NB_IoT.h are included through PHY/defs_NB_IoT.h
#include "openair2/LAYER2/MAC/proto_NB_IoT.h" // for functions: from_earfcn_NB_IoT, get_uldl_offset_NB_IoT #include "openair2/LAYER2/MAC/proto_NB_IoT.h" // for functions: from_earfcn_NB_IoT, get_uldl_offset_NB_IoT
......
...@@ -26,18 +26,19 @@ ...@@ -26,18 +26,19 @@
*/ */
//#include <string.h> //#include <string.h>
#include "defs_NB_IoT.h" #include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
#include "PHY/extern_NB_IoT.h" #include "PHY/extern_NB_IoT.h"
// #include "SCHED/extern_NB_IoT.h" // #include "SCHED/extern_NB_IoT.h"
#include <math.h> #include <math.h>
/*
#ifdef OPENAIR2 #ifdef OPENAIR2
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#include "RRC/NBIOT/extern.h" #include "RRC/NBIOT/extern.h"
#include "PHY_INTERFACE/extern.h" #include "PHY_INTERFACE/extern.h"
#endif #endif
*/
//#define DEBUG_PHY //#define DEBUG_PHY
int* sync_corr_ue0 = NULL; int* sync_corr_ue0 = NULL;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "PHY/extern_NB_IoT.h" #include "PHY/extern_NB_IoT.h"
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
#include "pss6144.h" #include "PHY/LTE_ESTIMATION/pss6144.h"
extern void print_shorts(char*,__m128i*); extern void print_shorts(char*,__m128i*);
#endif #endif
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <math.h> #include <math.h>
#include "PHY/LTE_ESTIMATION/defs_NB_IoT.h" #include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
#include "PHY/LTE_TRANSPORT/extern_NB_IoT.h" #include "PHY/NBIoT_TRANSPORT/extern_NB_IoT.h"
//#define DEBUG_CH //#define DEBUG_CH
#include "PHY/LTE_TRANSPORT/sc_rotation_NB_IoT.h" #include "PHY/LTE_TRANSPORT/sc_rotation_NB_IoT.h"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "PHY/LTE_REFSIG/defs_NB_IoT.h" #include "PHY/LTE_REFSIG/defs_NB_IoT.h"
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
int lte_dl_cell_spec_NB_IoT(PHY_VARS_eNB *phy_vars_eNB, int lte_dl_cell_spec_NB_IoT(PHY_VARS_eNB_NB_IoT *phy_vars_eNB,
int32_t *output, int32_t *output,
short amp, short amp,
unsigned char Ns, unsigned char Ns,
......
...@@ -380,14 +380,14 @@ int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI_1, ...@@ -380,14 +380,14 @@ int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI_1,
{ {
dci_encoding_NB_IoT(DCI_pdu, // Array of two DCI pdus, even if one DCI is to transmit , the number of DCI is indicated in dci_number dci_encoding_NB_IoT(DCI_pdu, // Array of two DCI pdus, even if one DCI is to transmit , the number of DCI is indicated in dci_number
DCI, ////uint8_t *e[2], // *e should be e[2][G] DCI_1, ////uint8_t *e[2], // *e should be e[2][G]
num_bits_of_DCI, //////A = number of bits of the DCI num_bits_of_DCI, //////A = number of bits of the DCI
G, G,
ncce_index, ncce_index,
agr_level); agr_level);
npdcch_scrambling_NB_IoT(frame_parms, npdcch_scrambling_NB_IoT(frame_parms,
DCI, // Input data DCI_1, // Input data
G, // Total number of bits to transmit in one subframe(case of DCI = G) G, // Total number of bits to transmit in one subframe(case of DCI = G)
subframe*2, //XXX we pass the subframe // Slot number (0..19) subframe*2, //XXX we pass the subframe // Slot number (0..19)
ncce_index, ncce_index,
...@@ -397,7 +397,7 @@ int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI_1, ...@@ -397,7 +397,7 @@ int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI_1,
if( ((counter_rep %4)== 0) && (counter_rep != rep) ) if( ((counter_rep %4)== 0) && (counter_rep != rep) )
{ {
npdcch_scrambling_NB_IoT(frame_parms, npdcch_scrambling_NB_IoT(frame_parms,
DCI, // Input data DCI_1, // Input data
G, // Total number of bits to transmit in one subframe(case of DCI = G) G, // Total number of bits to transmit in one subframe(case of DCI = G)
subframe*2, //XXX we pass the subframe // Slot number (0..19) subframe*2, //XXX we pass the subframe // Slot number (0..19)
ncce_index, ncce_index,
...@@ -408,19 +408,19 @@ int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI_1, ...@@ -408,19 +408,19 @@ int generate_NPDCCH_NB_IoT(NB_IoT_eNB_NPDCCH_t *DCI_1,
amp, amp,
frame_parms, frame_parms,
eutra_control_region, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band) eutra_control_region, // control region size for LTE , values between 0..3, (0 for stand-alone / 1, 2 or 3 for in-band)
DCI, DCI_1,
0, // npdsch_data_subframe, // subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf 0, // npdsch_data_subframe, // subframe index of the data table of npdsch channel (G*Nsf) , values are between 0..Nsf
agr_level, agr_level,
ncce_index, ncce_index,
subframe, subframe,
RB_IoT_ID); RB_IoT_ID);
DCI->counter_repetition_number[i]--; DCI_1->counter_repetition_number[i]--;
if(DCI->counter_repetition_number[i] == 0) if(DCI_1->counter_repetition_number[i] == 0)
{ {
//printf("DCI REP done\n"); //printf("DCI REP done\n");
DCI->active[i] = 0; DCI_1->active[i] = 0;
done =1; done =1;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
//#include "PHY/sse_intrin.h" //#include "PHY/sse_intrin.h"
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
#include "PHY/TOOLS/defs.h" // to take into account the dft functions #include "PHY/TOOLS/tools_defs.h" // to take into account the dft functions
#include "tables_nprach_NB_IoT.h" #include "tables_nprach_NB_IoT.h"
#include "first_sc_NB_IoT.h" #include "first_sc_NB_IoT.h"
//#include "PHY/extern.h" //#include "PHY/extern.h"
...@@ -405,7 +405,7 @@ void filtering_signal(int16_t *input_buffer, int16_t *filtered_buffer, uint32_t ...@@ -405,7 +405,7 @@ void filtering_signal(int16_t *input_buffer, int16_t *filtered_buffer, uint32_t
} }
uint32_t process_nprach_NB_IoT(PHY_VARS_eNB *eNB, int frame, uint8_t subframe, uint16_t *rnti, uint16_t *preamble_index, uint16_t *timing_advance){ uint32_t process_nprach_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int frame, uint8_t subframe, uint16_t *rnti, uint16_t *preamble_index, uint16_t *timing_advance){
//uint32_t estimated_TA_coarse=0; //uint32_t estimated_TA_coarse=0;
......
...@@ -390,7 +390,7 @@ int32_t dlsch_encoding_NB_IoT(unsigned char *a, ...@@ -390,7 +390,7 @@ int32_t dlsch_encoding_NB_IoT(unsigned char *a,
void get_pilots_position(uint8_t npusch_format,uint8_t subcarrier_spacing,uint8_t *pilot_pos1,uint8_t *pilot_pos2,uint8_t *pilots_slot); void get_pilots_position(uint8_t npusch_format,uint8_t subcarrier_spacing,uint8_t *pilot_pos1,uint8_t *pilot_pos2,uint8_t *pilots_slot);
void UL_channel_estimation_NB_IoT(PHY_VARS_eNB *eNB, void UL_channel_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *fp, LTE_DL_FRAME_PARMS *fp,
uint16_t UL_RB_ID_NB_IoT, uint16_t UL_RB_ID_NB_IoT,
uint16_t Nsc_RU, uint16_t Nsc_RU,
...@@ -401,7 +401,7 @@ void UL_channel_estimation_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -401,7 +401,7 @@ void UL_channel_estimation_NB_IoT(PHY_VARS_eNB *eNB,
uint16_t N_SF_per_word, uint16_t N_SF_per_word,
uint8_t rx_subframe); uint8_t rx_subframe);
void get_llr_per_sf_NB_IoT(PHY_VARS_eNB *eNB, void get_llr_per_sf_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *fp, LTE_DL_FRAME_PARMS *fp,
uint8_t npusch_format, uint8_t npusch_format,
uint8_t counter_sf, uint8_t counter_sf,
...@@ -428,7 +428,7 @@ void descrambling_NPUSCH_ack_NB_IoT(LTE_DL_FRAME_PARMS *fp, ...@@ -428,7 +428,7 @@ void descrambling_NPUSCH_ack_NB_IoT(LTE_DL_FRAME_PARMS *fp,
uint8_t rx_subframe, uint8_t rx_subframe,
uint32_t rx_frame); uint32_t rx_frame);
uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB *eNB, uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
NB_IoT_eNB_NULSCH_t *ulsch_NB_IoT, NB_IoT_eNB_NULSCH_t *ulsch_NB_IoT,
eNB_rxtx_proc_NB_IoT_t *proc, eNB_rxtx_proc_NB_IoT_t *proc,
uint8_t npusch_format, uint8_t npusch_format,
...@@ -438,7 +438,7 @@ uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -438,7 +438,7 @@ uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB *eNB,
uint32_t rx_frame, uint32_t rx_frame,
uint8_t rx_subframe); uint8_t rx_subframe);
void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB *eNB, void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *fp, LTE_DL_FRAME_PARMS *fp,
eNB_rxtx_proc_NB_IoT_t *proc, eNB_rxtx_proc_NB_IoT_t *proc,
uint8_t npusch_format, uint8_t npusch_format,
...@@ -454,7 +454,7 @@ void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -454,7 +454,7 @@ void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB *eNB,
void deinterleaving_NPUSCH_data_NB_IoT(NB_IoT_UL_eNB_HARQ_t *ulsch_harq, int16_t *y, unsigned int G); void deinterleaving_NPUSCH_data_NB_IoT(NB_IoT_UL_eNB_HARQ_t *ulsch_harq, int16_t *y, unsigned int G);
uint8_t rx_ulsch_Gen_NB_IoT(PHY_VARS_eNB *eNB, uint8_t rx_ulsch_Gen_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
eNB_rxtx_proc_NB_IoT_t *proc, eNB_rxtx_proc_NB_IoT_t *proc,
uint8_t eNB_id, // this is the effective sector id uint8_t eNB_id, // this is the effective sector id
uint8_t UE_id, uint8_t UE_id,
...@@ -493,9 +493,9 @@ void extract_CQI_NB_IoT(void *o,UCI_format_NB_IoT_t uci_format,NB_IoT_eNB_UE_sta ...@@ -493,9 +493,9 @@ void extract_CQI_NB_IoT(void *o,UCI_format_NB_IoT_t uci_format,NB_IoT_eNB_UE_sta
//*****************Vincent part for nprach ******************// //*****************Vincent part for nprach ******************//
uint32_t process_nprach_NB_IoT(PHY_VARS_eNB *eNB, int frame, uint8_t subframe,uint16_t *rnti, uint16_t *preamble_index, uint16_t *timing_advance); uint32_t process_nprach_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int frame, uint8_t subframe,uint16_t *rnti, uint16_t *preamble_index, uint16_t *timing_advance);
uint32_t TA_estimation_NB_IoT(PHY_VARS_eNB *eNB, uint32_t TA_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
int16_t *Rx_sub_sampled_buffer, int16_t *Rx_sub_sampled_buffer,
uint16_t sub_sampling_rate, uint16_t sub_sampling_rate,
...@@ -539,7 +539,7 @@ void generate_grouphop_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms); ...@@ -539,7 +539,7 @@ void generate_grouphop_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms);
void init_ul_hopping_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms); void init_ul_hopping_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms);
void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB, void rotate_single_carrier_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
uint8_t eNB_id, uint8_t eNB_id,
...@@ -550,14 +550,14 @@ void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -550,14 +550,14 @@ void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB,
uint16_t N_SF_per_word, uint16_t N_SF_per_word,
uint8_t option); uint8_t option);
void fill_rbs_zeros_NB_IoT(PHY_VARS_eNB *eNB, void fill_rbs_zeros_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
uint16_t ul_sc_start, uint16_t ul_sc_start,
uint8_t UE_id, uint8_t UE_id,
uint8_t symbol); uint8_t symbol);
int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB *eNB, int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int16_t *ulsch_llr, int16_t *ulsch_llr,
...@@ -566,7 +566,7 @@ int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -566,7 +566,7 @@ int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB *eNB,
uint8_t UE_id, uint8_t UE_id,
int16_t **llrp); int16_t **llrp);
int32_t ulsch_qpsk_llr_NB_IoT(PHY_VARS_eNB *eNB, int32_t ulsch_qpsk_llr_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int16_t *ulsch_llr, int16_t *ulsch_llr,
...@@ -576,7 +576,7 @@ int32_t ulsch_qpsk_llr_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -576,7 +576,7 @@ int32_t ulsch_qpsk_llr_NB_IoT(PHY_VARS_eNB *eNB,
uint8_t Nsc_RU, uint8_t Nsc_RU,
int16_t *llrp); int16_t *llrp);
void rotate_bpsk_NB_IoT(PHY_VARS_eNB *eNB, void rotate_bpsk_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
uint16_t ul_sc_start, uint16_t ul_sc_start,
......
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
//#include "PHY/defs.h" //#include "PHY/defs.h"
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
#include "PHY/extern_NB_IoT.h" #include "PHY/extern_NB_IoT.h"
#include "PHY/LTE_TRANSPORT/vars_NB_IoT.h" #include "PHY/NBIOT_TRANSPORT/vars_NB_IoT.h"
#include "PHY/CODING/defs_NB_IoT.h" #include "PHY/CODING/defs_NB_IoT.h"
#include "PHY/CODING/extern.h" //#include "PHY/CODING/extern.h"
//#include "extern_NB_IoT.h" //#include "extern_NB_IoT.h"
//#include "SCHED/extern.h" //#include "SCHED/extern.h"
/* /*
......
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
#include "defs_NB_IoT.h" #include "defs_NB_IoT.h"
#include "extern_NB_IoT.h" #include "extern_NB_IoT.h"
//#include "PHY/CODING/lte_interleaver2.h" //#include "PHY/CODING/lte_interleaver2.h"
#include "PHY/CODING/extern.h" //#include "PHY/CODING/extern.h"
//#define DEBUG_ULSCH //#define DEBUG_ULSCH
//#include "PHY/sse_intrin.h" //#include "PHY/sse_intrin.h"
#include "PHY/LTE_ESTIMATION/defs_NB_IoT.h" #include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
#include "openair1/SCHED/defs_NB_IoT.h" #include "openair1/SCHED_NBIOT/defs_NB_IoT.h"
//#include "openair1/PHY/LTE_TRANSPORT/sc_rotation_NB_IoT.h" //#include "openair1/PHY/LTE_TRANSPORT/sc_rotation_NB_IoT.h"
#include "T.h" #include "T.h"
...@@ -446,7 +446,7 @@ void lte_idft_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_P ...@@ -446,7 +446,7 @@ void lte_idft_NB_IoT(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_P
#endif #endif
int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB *eNB, int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int16_t *ulsch_llr, int16_t *ulsch_llr,
...@@ -510,7 +510,7 @@ int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -510,7 +510,7 @@ int32_t ulsch_bpsk_llr_NB_IoT(PHY_VARS_eNB *eNB,
// } // }
int32_t ulsch_qpsk_llr_NB_IoT(PHY_VARS_eNB *eNB, int32_t ulsch_qpsk_llr_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int16_t *ulsch_llr, int16_t *ulsch_llr,
...@@ -942,7 +942,7 @@ void ulsch_channel_compensation_NB_IoT(int32_t **rxdataF_ext, ...@@ -942,7 +942,7 @@ void ulsch_channel_compensation_NB_IoT(int32_t **rxdataF_ext,
#endif #endif
} }
void fill_rbs_zeros_NB_IoT(PHY_VARS_eNB *eNB, void fill_rbs_zeros_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
uint16_t ul_sc_start, uint16_t ul_sc_start,
...@@ -1040,7 +1040,7 @@ void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -1040,7 +1040,7 @@ void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB,
//}*/ //}*/
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB, void rotate_single_carrier_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
uint8_t eNB_id, uint8_t eNB_id,
...@@ -1158,7 +1158,7 @@ void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -1158,7 +1158,7 @@ void rotate_single_carrier_NB_IoT(PHY_VARS_eNB *eNB,
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
void rotate_bpsk_NB_IoT(PHY_VARS_eNB *eNB, void rotate_bpsk_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
uint16_t ul_sc_start, uint16_t ul_sc_start,
...@@ -1300,7 +1300,7 @@ void get_pilots_position(uint8_t npusch_format,uint8_t subcarrier_spacing,uint8 ...@@ -1300,7 +1300,7 @@ void get_pilots_position(uint8_t npusch_format,uint8_t subcarrier_spacing,uint8
} }
////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////
void UL_channel_estimation_NB_IoT(PHY_VARS_eNB *eNB, void UL_channel_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *fp, LTE_DL_FRAME_PARMS *fp,
uint16_t UL_RB_ID_NB_IoT, uint16_t UL_RB_ID_NB_IoT,
uint16_t Nsc_RU, uint16_t Nsc_RU,
...@@ -1357,7 +1357,7 @@ void UL_channel_estimation_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -1357,7 +1357,7 @@ void UL_channel_estimation_NB_IoT(PHY_VARS_eNB *eNB,
} }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void get_llr_per_sf_NB_IoT(PHY_VARS_eNB *eNB, void get_llr_per_sf_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *fp, LTE_DL_FRAME_PARMS *fp,
uint8_t npusch_format, uint8_t npusch_format,
uint8_t counter_sf, uint8_t counter_sf,
...@@ -1504,9 +1504,9 @@ void descrambling_NPUSCH_ack_NB_IoT(LTE_DL_FRAME_PARMS *fp, ...@@ -1504,9 +1504,9 @@ void descrambling_NPUSCH_ack_NB_IoT(LTE_DL_FRAME_PARMS *fp,
} }
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB *eNB, uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
NB_IoT_eNB_NULSCH_t *ulsch_NB_IoT, NB_IoT_eNB_NULSCH_t *ulsch_NB_IoT,
eNB_rxtx_proc_NB_IoT_NB_IoT_t *proc, eNB_rxtx_proc_NB_IoT_t *proc,
uint8_t npusch_format, uint8_t npusch_format,
unsigned int G, unsigned int G,
uint8_t rvdx, uint8_t rvdx,
...@@ -1685,7 +1685,7 @@ void deinterleaving_NPUSCH_data_NB_IoT(NB_IoT_UL_eNB_HARQ_t *ulsch_harq, int16_t ...@@ -1685,7 +1685,7 @@ void deinterleaving_NPUSCH_data_NB_IoT(NB_IoT_UL_eNB_HARQ_t *ulsch_harq, int16_t
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB *eNB, void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
LTE_DL_FRAME_PARMS *fp, LTE_DL_FRAME_PARMS *fp,
eNB_rxtx_proc_NB_IoT_t *proc, eNB_rxtx_proc_NB_IoT_t *proc,
uint8_t npusch_format, uint8_t npusch_format,
...@@ -1851,7 +1851,7 @@ void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -1851,7 +1851,7 @@ void decode_NPUSCH_msg_NB_IoT(PHY_VARS_eNB *eNB,
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
uint8_t rx_ulsch_Gen_NB_IoT(PHY_VARS_eNB *eNB, uint8_t rx_ulsch_Gen_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
eNB_rxtx_proc_NB_IoT_t *proc, eNB_rxtx_proc_NB_IoT_t *proc,
uint8_t eNB_id, // this is the effective sector id uint8_t eNB_id, // this is the effective sector id
uint8_t UE_id, uint8_t UE_id,
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <math.h> #include <math.h>
//#include <unistd.h> //#include <unistd.h>
//#include <stdlib.h> //#include <stdlib.h>
#include "PHY/TOOLS/defs.h" #include "PHY/TOOLS/tools_defs.h"
//#define TEST_DEBUG //#define TEST_DEBUG
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
/*!\brief DTCH DRB1 logical channel */ /*!\brief DTCH DRB1 logical channel */
#define DTCH 3 // LCID #define DTCH 3 // LCID
/*!\brief MCCH logical channel */ /*!\brief MCCH logical channel */
#define MCCH 4 //#define MCCH 4
//#define MCCH 62 //#define MCCH 62
/*!\brief MTCH logical channel */ /*!\brief MTCH logical channel */
#define MTCH 1 #define MTCH 1
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file vars.h
* \brief rrc external vars
* \author Navid Nikaein and Raymond Knopp, Michele Paffetti
* \date 2011-2017
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/
#ifndef __OPENAIR_RRC_EXTERN_NB_IOT_H__
#define __OPENAIR_RRC_EXTERN_NB_IOT_H__
#include "RRC/LTE/defs_NB_IoT.h"
#include "PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "LAYER2/RLC/rlc.h"
#include "LTE_LogicalChannelConfig-NB-r13.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
#include "common/ran_context.h"
//MP: NOTE:XXX some of the parameters defined in vars_nb_iot are called by the extern.h file so not replicated here
extern UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT;
extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
extern PHY_Config_NB_IoT_t *config_INFO;
extern rlc_info_t Rlc_info_am_NB_IoT,Rlc_info_am_config_NB_IoT;
extern uint8_t DRB2LCHAN_NB_IoT[2];
extern LTE_LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
extern LTE_LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
extern uint16_t T300_NB_IoT[8];
extern uint16_t T301_NB_IoT[8];
extern uint16_t T310_NB_IoT[8];
extern uint16_t T311_NB_IoT[8];
extern uint16_t N310_NB_IoT[8];
extern uint16_t N311_NB_IoT[8];
extern uint8_t *get_NB_IoT_MIB(
rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint16_t N_RB_DL,//may not needed--> for NB_IoT only 1 PRB is used
uint32_t subframe,
uint32_t frame,
uint32_t hyper_frame);
#endif
/* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file proto_NB_IoT.h
* \brief RRC functions prototypes for eNB and UE for NB-IoT
* \author Navid Nikaein, Raymond Knopp and Michele Paffetti
* \date 2010 - 2014
* \email navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
* \version 1.0
*/
/** \addtogroup _rrc
* @{
*/
#include "RRC/LTE/defs_NB_IoT.h"
#include "pdcp.h"
#include "rlc.h"
#include "extern_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
/*NOTE: no static function should be declared in this header file (e.g. init_SI_NB)*/
/*------------------------common_nb_iot.c----------------------------------------*/
/** \brief configure BCCH & CCCH Logical Channels and associated rrc_buffers, configure associated SRBs
*/
void openair_rrc_on_NB_IoT(const protocol_ctxt_t* const ctxt_pP);
void rrc_config_buffer_NB_IoT(SRB_INFO_NB_IoT *srb_info, uint8_t Lchan_type, uint8_t Role);
int L3_xface_init_NB_IoT(void);
void openair_rrc_top_init_eNB_NB_IoT(void);
//void rrc_top_cleanup(void); -->seems not to be used
//rrc_t310_expiration-->seems not to be used
/** \brief Function to update timers every subframe. For UE it updates T300,T304 and T310.
@param ctxt_pP running context
@param enb_index
@param CC_id
*/
RRC_status_t rrc_rx_tx_NB_IoT(protocol_ctxt_t* const ctxt_pP, const uint8_t enb_index, const int CC_id);
//long binary_search_int(int elements[], long numElem, int value);--> seems not to be used
//long binary_search_float(float elements[], long numElem, float value);--> used only at UE side
//---------------------------------------
//defined in L2_interface
//called by rx_sdu only in case of CCCH message (e.g RRCConnectionRequest-NB)
int8_t mac_rrc_data_ind_eNB_NB_IoT(
const module_id_t module_idP,
const int CC_id,
const frame_t frameP,
const sub_frame_t sub_frameP,
const rnti_t rntiP,
const rb_id_t srb_idP,//could be skipped since always go through the CCCH channel
const uint8_t* sduP,
const sdu_size_t sdu_lenP
);
//-------------------------------------------
//defined in L2_interface
void dump_ue_list_NB_IoT(UE_list_NB_IoT_t *listP, int ul_flag);
//-------------------------------------------
//defined in L2_interface
void mac_eNB_rrc_ul_failure_NB_IoT(
const module_id_t mod_idP,
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP);
//------------------------------------------
//defined in eNB_scheduler_primitives.c
int rrc_mac_remove_ue_NB_IoT(
module_id_t mod_idP,
rnti_t rntiP);
//------------------------------------------
//defined in L2_interface
void mac_eNB_rrc_ul_in_sync_NB_IoT(
const module_id_t mod_idP,
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP);
//------------------------------------------
//defined in L2_interface
int mac_eNB_get_rrc_status_NB_IoT(
const module_id_t Mod_idP,
const rnti_t rntiP
);
//---------------------------
/*-----------eNB procedures (rrc_eNB_nb_iot.c)---------------*/
//---Initialization--------------
void openair_eNB_rrc_on_NB_IoT(
const protocol_ctxt_t* const ctxt_pP
);
void rrc_config_buffer_NB_IoT(
SRB_INFO_NB_IoT* Srb_info,
uint8_t Lchan_type,
uint8_t Role
);
char openair_rrc_eNB_configuration_NB_IoT(
const module_id_t enb_mod_idP,
NbIoTRrcConfigurationReq* configuration
);
//-----------------------------
/**\brief RRC eNB task. (starting of the RRC state machine)
\param void *args_p Pointer on arguments to start the task. */
void *rrc_enb_task_NB_IoT(void *args_p);
/**\brief Entry routine to decode a UL-CCCH-Message-NB. Invokes PER decoder and parses message.
\param ctxt_pP Running context
\param Srb_info Pointer to SRB0 information structure (buffer, etc.)*/
int rrc_eNB_decode_ccch_NB_IoT(
protocol_ctxt_t* const ctxt_pP,
const SRB_INFO_NB_IoT* const Srb_info,
const int CC_id
);
/**\brief Entry routine to decode a UL-DCCH-Message-NB. Invokes PER decoder and parses message.
\param ctxt_pP Context
\param Rx_sdu Pointer Received Message
\param sdu_size Size of incoming SDU*/
int rrc_eNB_decode_dcch_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
const rb_id_t Srb_id,
const uint8_t* const Rx_sdu,
const sdu_size_t sdu_sizeP
);
/**\brief Generate RRCConnectionReestablishmentReject-NB
\param ctxt_pP Running context
\param ue_context_pP UE context
\param CC_id Component Carrier ID*/
void rrc_eNB_generate_RRCConnectionReestablishmentReject_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id
);
void rrc_eNB_generate_RRCConnectionReject_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id
);
void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id
);
void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP,
const uint8_t xid //transaction identifier
);
void //was under ITTI
rrc_eNB_reconfigure_DRBs_NB_IoT(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP);
void //was under ITTI
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
// const uint8_t ho_state
);
void rrc_eNB_process_RRCConnectionSetupComplete_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP,
LTE_RRCConnectionSetupComplete_NB_r13_IEs_t * rrcConnectionSetupComplete_NB
);
void rrc_eNB_generate_SecurityModeCommand_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
);
void rrc_eNB_generate_UECapabilityEnquiry_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
);
void rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB_IoT(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
//no HO flag
);
/// Utilities------------------------------------------------
void rrc_eNB_free_UE_NB_IoT(
const module_id_t enb_mod_idP,
const struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP
);
void rrc_eNB_free_mem_UE_context_NB_IoT(
const protocol_ctxt_t* const ctxt_pP,
struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP
);
/**\brief Function to get the next transaction identifier.
\param module_idP Instance ID for CH/eNB
\return a transaction identifier*/
uint8_t rrc_eNB_get_next_transaction_identifier_NB_IoT(module_id_t module_idP);
int rrc_init_global_param_NB_IoT(void);
//L2_interface.c
int8_t mac_rrc_data_req_eNB_NB_IoT(
const module_id_t Mod_idP,
const int CC_id,
const frame_t frameP,
const frame_t h_frameP,
const sub_frame_t subframeP, //need for the case in which both SIB1-NB_IoT and SIB23-NB_IoT will be scheduled in the same frame
const rb_id_t Srb_id,
uint8_t* const buffer_pP,
uint8_t flag
);
...@@ -35,9 +35,6 @@ ...@@ -35,9 +35,6 @@
#include "LAYER2/MAC/mac.h" #include "LAYER2/MAC/mac.h"
#include "LAYER2/RLC/rlc.h" #include "LAYER2/RLC/rlc.h"
///NB_IoT
#include "defs_NB_IoT.h"
extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
extern UE_RRC_INST *UE_rrc_inst; extern UE_RRC_INST *UE_rrc_inst;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file rrc_types.h
* \brief rrc types and subtypes
* \author Navid Nikaein and Raymond Knopp
* \date 2011 - 2014
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr
*/
#ifndef RRC_TYPES_NB_IOT_H_
#define RRC_TYPES_NB_IOT_H_
typedef enum Rrc_State_NB_IoT_e {
RRC_STATE_INACTIVE_NB_IoT=0,
RRC_STATE_IDLE_NB_IoT,
RRC_STATE_CONNECTED_NB_IoT,
RRC_STATE_FIRST_NB_IoT = RRC_STATE_INACTIVE_NB_IoT,
RRC_STATE_LAST_NB_IoT = RRC_STATE_CONNECTED_NB_IoT,
} Rrc_State_NB_IoT_t;
typedef enum Rrc_Sub_State_NB_IoT_e {
RRC_SUB_STATE_INACTIVE_NB_IoT=0,
RRC_SUB_STATE_IDLE_SEARCHING_NB_IoT,
RRC_SUB_STATE_IDLE_RECEIVING_SIB_NB_IoT,
RRC_SUB_STATE_IDLE_SIB_COMPLETE_NB_IoT,
RRC_SUB_STATE_IDLE_CONNECTING_NB_IoT,
RRC_SUB_STATE_IDLE_NB_IoT,
RRC_SUB_STATE_CONNECTED_NB_IoT,
RRC_SUB_STATE_INACTIVE_FIRST_NB_IoT = RRC_SUB_STATE_INACTIVE_NB_IoT,
RRC_SUB_STATE_INACTIVE_LAST_NB_IoT = RRC_SUB_STATE_INACTIVE_NB_IoT,
RRC_SUB_STATE_IDLE_FIRST_NB_IoT = RRC_SUB_STATE_IDLE_SEARCHING_NB_IoT,
RRC_SUB_STATE_IDLE_LAST_NB_IoT = RRC_SUB_STATE_IDLE_NB_IoT,
RRC_SUB_STATE_CONNECTED_FIRST_NB_IoT = RRC_SUB_STATE_CONNECTED_NB_IoT,
RRC_SUB_STATE_CONNECTED_LAST_NB_IoT = RRC_SUB_STATE_CONNECTED_NB_IoT,
} Rrc_Sub_State_NB_IoT_t;
#endif /* RRC_TYPES_H_ */
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