Commit b160b3f7 authored by Ting-An Lin's avatar Ting-An Lin

fix warnings

parent f93acd22
......@@ -92,6 +92,8 @@ void ccode_encode_NB_IoT (int32_t numbits,
\brief This function initializes the generator polynomials for an LTE convolutional code.*/
void ccodelte_init_NB_IoT(void);
void ccodelte_init2_NB_IoT(void);
/*!\fn void crcTableInit(void)
\brief This function initializes the different crc tables.*/
void crcTableInit_NB_IoT (void);
......
......@@ -8,6 +8,8 @@
#include "common/config/config_paramdesc.h"
#include "openair2/ENB_APP/NB_IoT_paramdef.h"
#include "PHY/phy_vars.h"
#include "openair1/PHY/LTE_REFSIG/lte_refsig.h"
#include "openair1/PHY/CODING/defs_NB_IoT.h"
PHY_VARS_eNB_NB_IoT* init_lte_eNB_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id,
......
#ifndef __PHY_INIT_NB_IOT__H__
#define __PHY_INIT_NB_IOT__H__
#include "../defs_L1_NB_IoT.h"
......@@ -11,4 +13,6 @@ PHY_VARS_eNB_NB_IoT* init_lte_eNB_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms,
int phy_init_lte_eNB_NB_IoT(PHY_VARS_eNB_NB_IoT *phy_vars_eNb,
unsigned char is_secondary_eNb,
unsigned char abstraction_flag);
\ No newline at end of file
unsigned char abstraction_flag);
#endif
\ No newline at end of file
......@@ -751,6 +751,12 @@ typedef struct{
PHY_VARS_eNB_NB_IoT *eNB_NB_IoT;
} eNBs_t;
///////// NB_IoT testing ///////////////////////////
void prach_procedures_NB_IoT(PHY_VARS_eNB_NB_IoT *);
void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *);
int init_frame_parms_NB_IoT(NB_IoT_DL_FRAME_PARMS *,uint8_t);
///////////////////////////////////////////////////
//#define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg
/// Top-level PHY Data Structure for UE
......
......@@ -62,7 +62,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
NB_IoT_DL_eNB_HARQ_t *ndlsch_harq23;
nfapi_dl_config_ndlsch_pdu_rel13_t *rel13 = &dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13;
int UE_id= -1;
int flag_malloc = 0;
int flag_malloc;
ndlsch= eNB->ndlsch_SIB1;
ndlsch23= eNB->ndlsch_SIB23;
......@@ -353,7 +353,7 @@ void schedule_response_NB_IoT(Sched_Rsp_NB_IoT_t *Sched_INFO)
case NFAPI_DL_CONFIG_NBCH_PDU_TYPE:
// for the moment we don't care about the n-bch pdu content since we need only the sdu if tx.request
npbch = &eNB->npbch; //in the main of the lte-softmodem they should allocate this memory of PHY_vars
npbch = eNB->npbch; //in the main of the lte-softmodem they should allocate this memory of PHY_vars
npbch->h_sfn_lsb = dl_config_pdu->nbch_pdu.nbch_pdu_rel13.hyper_sfn_2_lsbs;
//LOG_I(PHY,"npbch->pdu\n");
dl_config_pdu->nbch_pdu.nbch_pdu_rel13.pdu_index = 1;
......
......@@ -184,11 +184,8 @@ uint32_t is_SIB1_NB_IoT(const frame_t frameP,
*/
void common_signal_procedures_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_NB_IoT_t *proc)
{
//LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
NB_IoT_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
NB_IoT_eNB_NPBCH_t *broadcast_str = &eNB->npbch;
//NB_IoT_eNB_NDLSCH_t *sib1 = &eNB->ndlsch_SIB;
//NB_IoT_eNB_NDLSCH_t *ndlsch = &eNB->ndlsch_SIB1;
NB_IoT_eNB_NPBCH_t *broadcast_str = eNB->npbch;
NB_IoT_eNB_NDLSCH_t *sib1 = eNB->ndlsch_SIB1;
NB_IoT_eNB_NDLSCH_t *sib23 = eNB->ndlsch_SIB23;
......@@ -375,7 +372,7 @@ void npusch_procedures(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_NB_IoT_t *proc)
{
uint32_t i;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
//NB_IoT_DL_FRAME_PARMS *fp=&eNB->frame_parms;
NB_IoT_eNB_NULSCH_t *nulsch;
NB_IoT_UL_eNB_HARQ_t *nulsch_harq;
nulsch = eNB->ulsch_NB_IoT[0];
......@@ -645,7 +642,7 @@ void npdsch_procedures(PHY_VARS_eNB_NB_IoT *eNB,
int subframe = proc->subframe_tx;
NB_IoT_DL_eNB_HARQ_t *ndlsch_harq = ndlsch->harq_process;
int input_buffer_length = ndlsch_harq->TBS/8; // get in byte //the TBS is set in generate_dlsch_param
NB_IoT_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
//NB_IoT_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
int G;
uint8_t *DLSCH_pdu = NULL;
uint8_t DLSCH_pdu_tmp[input_buffer_length+4]; //[768*8];
......@@ -906,7 +903,7 @@ void phy_procedures_eNB_TX_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
DCI_PDU_NB_IoT *dci_pdu = eNB->DCI_pdu;
NB_IoT_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
int8_t UE_id = 0;
int **txdataF = eNB->common_vars.txdataF[0];
//int **txdataF = eNB->common_vars.txdataF[0];
uint32_t sib1_startFrame = -1;
//NB_IoT_eNB_NPDCCH_t*npdcch;
......
......@@ -55,6 +55,7 @@
#include "RRC_config_tools.h"
#include "enb_paramdef.h"
#include "proto_agent.h"
#include "NB_IoT_config.h"
extern uint16_t sf_ahead;
extern void set_parallel_conf(char *parallel_conf);
......
......@@ -747,11 +747,12 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
* \param param is a \ref L1_proc_t structure which contains the info what to process.
* \returns a pointer to an int. The storage is not on the heap and must not be freed.
*/
static void *eNB_thread_prach( void *param ) {
static void *eNB_thread_prach( void *param ){
static int eNB_thread_prach_status;
eNBs_t *eNBs= (eNBs_t *)param;
PHY_VARS_eNB *eNB= &eNBs->eNB;
PHY_VARS_eNB_NB_IoT *eNB_NB_IoT= &eNBs->eNB_NB_IoT;//Ann
eNBs_t *eNBs;//Ann
eNBs = (eNBs_t *)param;//Ann
PHY_VARS_eNB *eNB= eNBs->eNB;//Ann
PHY_VARS_eNB_NB_IoT *eNB_NB_IoT= eNBs->eNB_NB_IoT;//Ann
L1_proc_t *proc = &eNBs->eNB->proc;
// set default return value
......@@ -857,8 +858,6 @@ static void *process_stats_thread(void *param) {
void init_eNB_proc(int inst) {
/*int i=0;*/
int CC_id;
//PHY_VARS_eNB *eNB;
// PHY_VARS_eNB_NB_IoT *eNB_NB_IoT;//Ann
eNBs_t eNBs;//Ann
L1_proc_t *proc;
L1_rxtx_proc_t *L1_proc, *L1_proc_tx;
......@@ -949,9 +948,9 @@ void init_eNB_proc(int inst) {
}
if (NFAPI_MODE!=NFAPI_MODE_VNF) {
pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, &eNBs );
pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, &eNBs );//Ann
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, &eNBs.eNB );
pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, eNBs.eNB );
#endif
}
AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach);
......
......@@ -46,6 +46,8 @@
#include "PHY/defs_eNB.h"
#include "PHY/defs_common.h"
#include "PHY/defs_L1_NB_IoT.h"
#include "PHY/INIT/phy_init_NB_IoT.h"
#include "common/ran_context.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
......@@ -95,6 +97,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "lte-softmodem.h"
#include "NB_IoT_interface.h"
#include "PHY/vars_NB_IoT.h"
#include "openair2/ENB_APP/NB_IoT_config.h"
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
......
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