Commit c12429b2 authored by Cedric Roux's avatar Cedric Roux

remove compilation warnings

parent c0480298
......@@ -33,6 +33,7 @@
extern PHY_VARS_eNB *eNB;
extern PHY_VARS_UE *UE;
extern RU_t *ru;
extern void phy_init_RU(RU_t*);
void lte_param_init(PHY_VARS_eNB **eNBp,
PHY_VARS_UE **UEp,
......
......@@ -1874,12 +1874,6 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
#endif //MU_RECEIVER
#if T_TRACER
T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL),
T_INT(n_pdcch_symbols),
T_BUFFER(pdcch_vars[eNB_id]->rxdataF_comp, frame_parms->N_RB_DL*12*n_pdcch_symbols* 4));
#endif
// decode pcfich here and find out pdcch ofdm symbol number
n_pdcch_symbols = rx_pcfich(frame_parms,
subframe,
......@@ -1890,6 +1884,12 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
if (n_pdcch_symbols>3)
n_pdcch_symbols=1;
#if T_TRACER
T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL),
T_INT(n_pdcch_symbols),
T_BUFFER(pdcch_vars[eNB_id]->rxdataF_comp, frame_parms->N_RB_DL*12*n_pdcch_symbols* 4));
#endif
#ifdef DEBUG_DCI_DECODING
......
......@@ -843,7 +843,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
pllr_symbol_cw0 += llr_offset_symbol;
pllr_symbol_cw1 += llr_offset_symbol;
LOG_I(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
LOG_I(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %p @LLR Buff(symb) %p\n",
frame, subframe,symbol,
nb_rb,dlsch0_harq->Qm,
pdsch_vars[eNB_id]->llr_length[symbol],
......
......@@ -2047,6 +2047,8 @@ const static int16_t tw16c[24] __attribute__((aligned(32))) = { 0,32767,12540,30
0,32767,30273,12539,23170,-23170,-12539,-30273
};
#ifdef __AVX2__
const static int16_t tw16rep[48] __attribute__((aligned(32))) = { 32767,0,30272,-12540,23169 ,-23170,12539 ,-30273,32767,0,30272,-12540,23169 ,-23170,12539 ,-30273,
32767,0,23169,-23170,0 ,-32767,-23170,-23170,32767,0,23169,-23170,0 ,-32767,-23170,-23170,
32767,0,12539,-30273,-23170,-23170,-30273,12539,32767,0,12539,-30273,-23170,-23170,-30273,12539
......@@ -2067,6 +2069,8 @@ const static int16_t tw16crep[48] __attribute__((aligned(32))) = { 0,32767,12540
0,32767,30273,12539,23170,-23170,-12539,-30273,0,32767,30273,12539,23170,-23170,-12539,-30273
};
#endif /* __AVX2__ */
static inline void dft16(int16_t *x,int16_t *y) __attribute__((always_inline));
......@@ -200,7 +200,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
chest_t = (int16_t**) phy_vars_enb->srs_vars[UE_id].srs_ch_estimates[eNB_id];
chest_f = (int16_t**) phy_vars_enb->pusch_vars[UE_id]->drs_ch_estimates[eNB_id];
pusch_llr = (int16_t*) phy_vars_enb->pusch_vars[UE_id]->llr;
pusch_comp = (int16_t*) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[eNB_id][0];
pusch_comp = (int16_t*) phy_vars_enb->pusch_vars[UE_id]->rxdataF_comp[0];
pucch1_comp = (int32_t*) phy_vars_enb->pucch1_stats[UE_id];
pucch1_thres = (int32_t*) phy_vars_enb->pucch1_stats_thres[UE_id];
pucch1ab_comp = (int32_t*) phy_vars_enb->pucch1ab_stats[UE_id];
......
......@@ -897,7 +897,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
harq_ack[0] = 4; // DTX
harq_ack[1] = 6; // NACK/DTX
harq_ack[2] = 6; // NACK/DTX
max_metric = 0;
}
else {
......@@ -980,7 +980,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
harq_ack[1] = 6; // NACK/DTX
harq_ack[2] = 6; // NACK/DTX
harq_ack[3] = 6; // NACK/DTX
max_metric = 0;
} else {
max_metric = max(metric[0],max(metric[1],max(metric[2],metric[3])));
......
......@@ -52,6 +52,8 @@
extern uint32_t nfapi_mode;
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
void prach_procedures(PHY_VARS_eNB *eNB
#ifdef Rel14
,
......
......@@ -40,6 +40,7 @@
#include "log.h"
extern int flexran_get_harq_round(mid_t mod_id, uint8_t cc_id, mid_t ue_id);
/*Flags showing if a mac agent has already been registered*/
unsigned int mac_agent_registered[NUM_MAX_ENB];
......
......@@ -175,10 +175,6 @@ typedef enum {
static int DEFBANDS[] = {7};
static int DEFENBS[] = {0};
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
/* RU configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
......
......@@ -1609,6 +1609,10 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
}
}
#if 0
/* this logging is wrong, ue_sched_ctl may not be valid here
* TODO: fix
*/
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
if (total_allocated_rbs[CC_id] > 0) {
......@@ -1617,6 +1621,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_id] - first_rb[CC_id]);
}
}
#endif
}
......
......@@ -769,15 +769,15 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) {
unsigned char *otg_pkt=NULL;
//unsigned char *otg_pkt=NULL;
module_id_t dst_id; // dst for otg
rb_id_t rb_id;
unsigned int pkt_size=0;
//rb_id_t rb_id;
//unsigned int pkt_size=0;
protocol_ctxt_t ctxt;
// we need to add conditions to avoid transmitting data when the UE is not RRC connected.
if ((otg_enabled==1) && (ctxt_pP->enb_flag == ENB_FLAG_YES)) { // generate DL traffic
unsigned int ctime=0;
ctime = ctxt_pP->frame * 100;
//unsigned int ctime=0;
//ctime = ctxt_pP->frame * 100;
/*if ((mac_get_rrc_status(eNB_index, ctxt_pP->enb_flag, 0 ) > 2) &&
(mac_get_rrc_status(eNB_index, ctxt_pP->enb_flag, 1 ) > 2)) { */
......
......@@ -65,26 +65,14 @@ mac_rrc_data_req_ue(
)
//--------------------------------------------------------------------------
{
asn_enc_rval_t enc_rval;
SRB_INFO *Srb_info;
uint8_t Sdu_size = 0;
uint8_t sfn = (uint8_t)((frameP>>2)&0xff);
#ifdef DEBUG_RRC
int i;
LOG_I(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
#endif
eNB_RRC_INST *rrc;
rrc_eNB_carrier_data_t *carrier;
BCCH_BCH_Message_t *mib;
LOG_D(RRC,"[UE %d] Frame %d Filling CCCH SRB_ID %d\n",Mod_idP,frameP,Srb_id);
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size);
if( (UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size > 0) ) {
#if defined(ENABLE_ITTI)
......@@ -139,7 +127,6 @@ mac_rrc_data_ind_ue(
)
//--------------------------------------------------------------------------
{
SRB_INFO *Srb_info;
protocol_ctxt_t ctxt;
sdu_size_t sdu_size = 0;
......@@ -214,6 +201,7 @@ mac_rrc_data_ind_ue(
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
}
#else
SRB_INFO *Srb_info;
Srb_info = &UE_rrc_inst[module_idP].Srb0[eNB_indexP];
memcpy(Srb_info->Rx_buffer.Payload,sduP,sdu_lenP);
Srb_info->Rx_buffer.payload_size = sdu_lenP;
......
......@@ -409,6 +409,17 @@ rrc_data_req(
const pdcp_transmission_mode_t modeP
);
uint8_t
rrc_data_req_ue(
const protocol_ctxt_t* const ctxt_pP,
const rb_id_t rb_idP,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_sizeP,
uint8_t* const buffer_pP,
const pdcp_transmission_mode_t modeP
);
void
rrc_data_ind(
const protocol_ctxt_t* const ctxt_pP,
......
......@@ -241,7 +241,6 @@ openair_rrc_on_ue(
//-----------------------------------------------------------------------------
{
unsigned short i;
int CC_id;
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" UE?:OPENAIR RRC IN....\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
......@@ -4843,9 +4842,6 @@ rrc_rx_tx_ue(
//-----------------------------------------------------------------------------
{
//uint8_t UE_id;
int32_t current_timestamp_ms, ref_timestamp_ms;
struct timeval ts;
struct rrc_eNB_ue_context_s *ue_context_p = NULL,*ue_to_be_removed = NULL;
#ifdef LOCALIZATION
double estimated_distance;
......
......@@ -118,7 +118,6 @@ openair_rrc_on(
)
//-----------------------------------------------------------------------------
{
unsigned short i;
int CC_id;
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" ENB:OPENAIR RRC IN....\n",
......@@ -1232,7 +1231,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
void
rrc_eNB_process_RRCConnectionReestablishmentComplete(
const protocol_ctxt_t* const ctxt_pP,
const rnti_t const reestablish_rnti,
const rnti_t reestablish_rnti,
rrc_eNB_ue_context_t* ue_context_pP,
const uint8_t xid,
RRCConnectionReestablishmentComplete_r8_IEs_t * rrcConnectionReestablishmentComplete
......
......@@ -95,6 +95,10 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "enb_config.h"
//#include "PHY/TOOLS/time_meas.h"
/* these variables have to be defined before including ENB_APP/enb_paramdef.h */
static int DEFBANDS[] = {7};
static int DEFENBS[] = {0};
#include "ENB_APP/enb_paramdef.h"
#include "common/config/config_userapi.h"
......@@ -1883,7 +1887,6 @@ void configure_ru(int idx,
RRU_config_t *config = (RRU_config_t *)arg;
RRU_capabilities_t *capabilities = (RRU_capabilities_t*)arg;
int ret;
int i;
LOG_I(PHY, "Received capabilities from RRU %d\n",idx);
......@@ -1918,6 +1921,7 @@ void configure_ru(int idx,
config->prach_FreqOffset[0],config->prach_ConfigIndex[0]);
#ifdef Rel14
int i;
for (i=0;i<4;i++) {
config->emtc_prach_CElevel_enable[0][i] = ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i];
config->emtc_prach_FreqOffset[0][i] = ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[i];
......
......@@ -140,6 +140,7 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
if (!hold_channel) {
// calculate the random channel from each RU
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
frame_parms = &RC.ru[ru_id]->frame_parms;
random_channel(RU2UE[ru_id][UE_id][CC_id],abstraction_flag);
/*
......
......@@ -685,8 +685,8 @@ void update_mac(Event_t event)
LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].priority[event.lcid]);
}
} else if(!strcmp((char *) event.key, "DCI_aggregation_min") && event.value!=NULL && validate_mac(event)) {
Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
mac_config = (Mac_config *) event.value;
//Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
//mac_config = (Mac_config *) event.value;
LOG_I(EMU,"DCI_aggregation_min update \n");
......@@ -706,8 +706,8 @@ void update_mac(Event_t event)
LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_template[0][event.ue].DCI_aggregation_min);*/
}
} else if(!strcmp((char *) event.key, "DLSCH_dci_size_bits") && event.value!=NULL && validate_mac(event)) {
Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
mac_config = (Mac_config *) event.value;
//Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
//mac_config = (Mac_config *) event.value;
LOG_I(EMU,"DLSCH_dci_size_bits update \n");
......
......@@ -216,7 +216,8 @@ oai_shutdown (void);
void reset_opp_meas_oaisim (void);
void wait_eNBs() {
void wait_eNBs(void)
{
return;
}
......@@ -364,7 +365,7 @@ static void set_cli_start(module_id_t module_idP, uint8_t start)
#ifdef OPENAIR2
int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_Flow_Unit omv_data)
{
module_id_t i, j;
module_id_t i;
omv_data.end = 0;
//omv_data.total_num_nodes = NB_UE_INST + NB_eNB_INST;
......@@ -495,7 +496,7 @@ l2l1_task (void *args_p)
#undef PRINT_STATS /* this undef is to avoid gcc warnings */
#define PRINT_STATS
#ifdef PRINT_STATS
int len;
//int len;
FILE *UE_stats[NUMBER_OF_UE_MAX];
FILE *UE_stats_th[NUMBER_OF_UE_MAX];
FILE *eNB_stats[NUMBER_OF_eNB_MAX];
......@@ -621,7 +622,6 @@ l2l1_task (void *args_p)
}
#endif
module_id_t enb_id;
module_id_t UE_id;
if (abstraction_flag == 1) {
......@@ -769,11 +769,11 @@ l2l1_task (void *args_p)
*/
for (ru_id=0;ru_id<NB_RU;ru_id++) {
current_ru_rx_timestamp[ru_id][CC_id] += RC.ru[ru_id]->frame_parms.samples_per_tti;
LOG_D(EMU,"RU %d/%d: TS %llu\n",ru_id,CC_id,current_ru_rx_timestamp[ru_id][CC_id]);
LOG_D(EMU,"RU %d/%d: TS %"PRIi64"\n",ru_id,CC_id,current_ru_rx_timestamp[ru_id][CC_id]);
}
for (UE_inst = 0; UE_inst<NB_UE_INST;UE_inst++) {
current_UE_rx_timestamp[UE_inst][CC_id] += PHY_vars_UE_g[UE_inst][CC_id]->frame_parms.samples_per_tti;
LOG_D(EMU,"UE %d/%d: TS %llu\n",UE_id,CC_id,current_UE_rx_timestamp[UE_inst][CC_id]);
LOG_D(EMU,"UE %d/%d: TS %"PRIi64"\n",UE_inst,CC_id,current_UE_rx_timestamp[UE_inst][CC_id]);
}
for (eNB_inst = oai_emulation.info.first_enb_local;
......@@ -1013,8 +1013,8 @@ int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */
#endif
void wait_RUs() {
void wait_RUs(void)
{
int i;
// wait for all RUs to be configured over fronthaul
......@@ -1084,9 +1084,9 @@ static void print_current_directory(void)
printf("working directory: %s\n", dir);
}
/*------------------------------------------------------------------------------*/
int
main (int argc, char **argv)
void init_devices(void);
int main (int argc, char **argv)
{
clock_t t;
......@@ -1104,7 +1104,6 @@ main (int argc, char **argv)
int node_id;
int port,Process_Flag=0,wgt,Channel_Flag=0,temp;
#endif
int i;
//default parameters
oai_emulation.info.n_frames = MAX_FRAME_NUMBER; //1024; //10;
......@@ -1472,8 +1471,10 @@ print_opp_meas_oaisim (void)
&oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx,
"[UE][total_phy_proc_rx]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0],
"[UE][total_phy_proc_rx[0]]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1],
"[UE][total_phy_proc_rx[1]]", &oaisim_stats, &oaisim_stats_f);
// print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats,
// "[UE][ofdm_demod]", &oaisim_stats, &oaisim_stats_f);
print_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats, "[UE][rx_dft]",
......@@ -1844,8 +1845,8 @@ get_OAI_emulation ()
// dummy function declarations
void *rrc_enb_task(void *args_p) {
void *rrc_enb_task(void *args_p)
{
return NULL;
}
......@@ -868,7 +868,7 @@ void check_and_adjust_params(void)
{
int32_t ret;
int i,j;
//int i,j;
if (oai_emulation.info.nb_ue_local + oai_emulation.info.nb_rn_local > NUMBER_OF_UE_MAX) {
LOG_E(EMU,"Enter fewer than %d UEs/RNs for the moment or change the NUMBER_OF_UE_MAX\n", NUMBER_OF_UE_MAX);
......@@ -1081,7 +1081,7 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
while (sample_count<nsamps) {
while (current_ru_rx_timestamp[ru_id][CC_id]<
(nsamps+last_ru_rx_timestamp[ru_id][CC_id])) {
LOG_D(EMU,"RU: current TS %llu, last TS %llu, sleeping\n",current_ru_rx_timestamp[ru_id][CC_id],last_ru_rx_timestamp[ru_id][CC_id]);
LOG_D(EMU,"RU: current TS %"PRIi64", last TS %"PRIi64", sleeping\n",current_ru_rx_timestamp[ru_id][CC_id],last_ru_rx_timestamp[ru_id][CC_id]);
usleep(500);
}
......@@ -1136,13 +1136,13 @@ int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
read_size = sptti;
while (sample_count<nsamps) {
LOG_D(EMU,"UE %d: DL simulation 1: UE_trx_read : current TS now %llu, last TS %llu\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
LOG_D(EMU,"UE %d: DL simulation 1: UE_trx_read : current TS now %"PRIi64", last TS %"PRIi64"\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
while (current_UE_rx_timestamp[UE_id][CC_id] <
(last_UE_rx_timestamp[UE_id][CC_id]+read_size)) {
LOG_D(EMU,"UE %d: DL simulation 2: UE_trx_read : current TS %llu, last TS %llu, sleeping\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
LOG_D(EMU,"UE %d: DL simulation 2: UE_trx_read : current TS %"PRIi64", last TS %"PRIi64", sleeping\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
usleep(500);
}
LOG_D(EMU,"UE %d: DL simulation 3: UE_trx_read : current TS now %llu, last TS %llu\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
LOG_D(EMU,"UE %d: DL simulation 3: UE_trx_read : current TS now %"PRIi64", last TS %"PRIi64"\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
// if we cross a subframe-boundary
subframe = (last_UE_rx_timestamp[UE_id][CC_id]/sptti)%10;
......@@ -1174,10 +1174,10 @@ int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
&PHY_vars_UE_g[UE_id][CC_id]->frame_parms,
UE_id,
CC_id);
LOG_D(EMU,"UE %d: DL simulation 6: UE_trx_read @ TS %llu (%llu)=> frame %d, subframe %d\n",
UE_id,(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id],
(unsigned long long)last_UE_rx_timestamp[UE_id][CC_id],
((unsigned long long)last_UE_rx_timestamp[UE_id][CC_id]/(sptti*10))&1023,
LOG_D(EMU,"UE %d: DL simulation 6: UE_trx_read @ TS %"PRIi64" (%"PRIi64")=> frame %d, subframe %d\n",
UE_id, current_UE_rx_timestamp[UE_id][CC_id],
last_UE_rx_timestamp[UE_id][CC_id],
(int)((last_UE_rx_timestamp[UE_id][CC_id]/(sptti*10))&1023),
subframe);
last_UE_rx_timestamp[UE_id][CC_id] += read_size;
......@@ -1367,9 +1367,11 @@ void init_ocm(void)
/* Added for PHY abstraction */
char* frame_type = "unknown";
/* TODO: frame_type is unused, is it intended? */
//char* frame_type = "unknown";
LTE_DL_FRAME_PARMS *fp = &RC.ru[0]->frame_parms;
#if 0
switch (fp->frame_type) {
case FDD:
frame_type = "FDD";
......@@ -1379,6 +1381,7 @@ void init_ocm(void)
frame_type = "TDD";
break;
}
#endif
if (abstraction_flag) {
......
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