Commit bfecc011 authored by oai's avatar oai

Remove compilation warnings, also fix telnet server compilation failure and...

Remove compilation warnings, also fix telnet server compilation failure and NB-IoT shared lib compilation failure introduced when reviewing L1 sources  organization
parent 204488f8
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include "common/config/config_userapi.h"
#define QUIT(x) do { \ #define QUIT(x) do { \
printf("T tracer: QUIT: %s\n", x); \ printf("T tracer: QUIT: %s\n", x); \
exit(1); \ exit(1); \
...@@ -17,6 +19,7 @@ ...@@ -17,6 +19,7 @@
/* array used to activate/disactivate a log */ /* array used to activate/disactivate a log */
static int T_IDs[T_NUMBER_OF_IDS]; static int T_IDs[T_NUMBER_OF_IDS];
int *T_active = T_IDs; int *T_active = T_IDs;
int T_stdout;
static int T_socket; static int T_socket;
...@@ -157,3 +160,28 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork) ...@@ -157,3 +160,28 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
new_thread(T_receive_thread, NULL); new_thread(T_receive_thread, NULL);
} }
void T_Config_Init(void)
{
int T_port; /* by default we wait for the tracer */
int T_nowait; /* default port to listen to to wait for the tracer */
int T_dont_fork; /* default is to fork, see 'T_init' to understand */
paramdef_t ttraceparams[] = CMDLINE_TTRACEPARAMS_DESC ;
/* compatibility: look for TTracer parameters in root section */
config_get( ttraceparams,sizeof(ttraceparams)/sizeof(paramdef_t),NULL);
/* but for a cleaner config file, TTracer params should be defined in a specific section... */
int ret = config_get( ttraceparams,sizeof(ttraceparams)/sizeof(paramdef_t),TTRACER_CONFIG_PREFIX);
if (ret <0) {
printf( "TTracer configuration couldn't be performed via config module\n");
}
if (T_stdout == 0) {
T_init(T_port, 1-T_nowait, T_dont_fork);
} else {
for( int i=0 ; i<T_NUMBER_OF_IDS ; i++ ) {
T_active[i] = T_ACTIVE_STDOUT;
}
}
}
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "openair1/PHY/extern.h" #include "openair1/PHY/phy_extern.h"
#define TELNETVAR_PHYCC0 0 #define TELNETVAR_PHYCC0 0
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
#include "log.h" #include "log.h"
#include "log_extern.h" #include "log_extern.h"
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#include "openair1/PHY/extern.h" #include "openair1/PHY/phy_extern.h"
#include "telnetsrv_proccmd.h" #include "telnetsrv_proccmd.h"
void decode_procstat(char *record, int debug, telnet_printfunc_t prnt) void decode_procstat(char *record, int debug, telnet_printfunc_t prnt)
...@@ -193,7 +193,6 @@ struct dirent *entry; ...@@ -193,7 +193,6 @@ struct dirent *entry;
int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt) int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt)
{ {
extern log_t *g_log;
if (debug > 0) if (debug > 0)
prnt(" proccmd_show received %s\n",buf); prnt(" proccmd_show received %s\n",buf);
...@@ -203,10 +202,12 @@ extern log_t *g_log; ...@@ -203,10 +202,12 @@ extern log_t *g_log;
if (strcasestr(buf,"loglvl") != NULL) { if (strcasestr(buf,"loglvl") != NULL) {
prnt("component verbosity level enabled\n"); prnt("component verbosity level enabled\n");
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) { for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
prnt("%02i %17.17s:%10.10s%10.10s %s\n",i ,g_log->log_component[i].name, if (g_log->log_component[i].name != NULL) {
map_int_to_str(log_verbosity_names,g_log->log_component[i].flag), prnt("%02i %17.17s:%10.10s%10.10s %s\n",i ,g_log->log_component[i].name,
map_int_to_str(log_level_names,g_log->log_component[i].level), map_int_to_str(log_verbosity_names,g_log->log_component[i].flag),
((g_log->log_component[i].interval>0)?"Y":"N") ); map_int_to_str(log_level_names,g_log->log_component[i].level),
((g_log->log_component[i].interval>0)?"Y":"N") );
}
} }
} }
if (strcasestr(buf,"config") != NULL) { if (strcasestr(buf,"config") != NULL) {
...@@ -368,6 +369,15 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2); ...@@ -368,6 +369,15 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2);
if (logparam != NULL) free(logparam); if (logparam != NULL) free(logparam);
if (tmpstr != NULL) free(tmpstr); if (tmpstr != NULL) free(tmpstr);
for (int i=idx1; i<=idx2 ; i++) { for (int i=idx1; i<=idx2 ; i++) {
if (level < 0) {
level=g_log->log_component[i].level;
}
if (verbosity < 0) {
verbosity=g_log->log_component[i].flag;
}
if (interval < 0) {
interval=g_log->log_component[i].interval;
}
set_comp_log(i, level, verbosity, interval); set_comp_log(i, level, verbosity, interval);
prnt("log level/verbosity comp %i %s set to %s / %s (%s)\n", prnt("log level/verbosity comp %i %s set to %s / %s (%s)\n",
i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name), i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name),
......
...@@ -2924,7 +2924,7 @@ static uint8_t unpack_dl_config_bch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa ...@@ -2924,7 +2924,7 @@ static uint8_t unpack_dl_config_bch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
nfapi_dl_config_bch_pdu_rel8_t* bch_pdu_rel8 = (nfapi_dl_config_bch_pdu_rel8_t*)tlv; nfapi_dl_config_bch_pdu_rel8_t* bch_pdu_rel8 = (nfapi_dl_config_bch_pdu_rel8_t*)tlv;
return ( pull16(ppReadPackedMsg, &bch_pdu_rel8->length, end) && return ( pull16(ppReadPackedMsg, &bch_pdu_rel8->length, end) &&
pull16(ppReadPackedMsg, &bch_pdu_rel8->pdu_index, end) && pull16(ppReadPackedMsg, (uint16_t *)&bch_pdu_rel8->pdu_index, end) &&
pull16(ppReadPackedMsg, &bch_pdu_rel8->transmission_power, end)); pull16(ppReadPackedMsg, &bch_pdu_rel8->transmission_power, end));
} }
...@@ -2933,7 +2933,7 @@ static uint8_t unpack_dl_config_mch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa ...@@ -2933,7 +2933,7 @@ static uint8_t unpack_dl_config_mch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
nfapi_dl_config_mch_pdu_rel8_t* mch_pdu_rel8 = (nfapi_dl_config_mch_pdu_rel8_t*)tlv; nfapi_dl_config_mch_pdu_rel8_t* mch_pdu_rel8 = (nfapi_dl_config_mch_pdu_rel8_t*)tlv;
return (pull16(ppReadPackedMsg, &mch_pdu_rel8->length, end) && return (pull16(ppReadPackedMsg, &mch_pdu_rel8->length, end) &&
pull16(ppReadPackedMsg, &mch_pdu_rel8->pdu_index, end) && pull16(ppReadPackedMsg, (uint16_t *)&mch_pdu_rel8->pdu_index, end) &&
pull16(ppReadPackedMsg, &mch_pdu_rel8->rnti, end) && pull16(ppReadPackedMsg, &mch_pdu_rel8->rnti, end) &&
pull8(ppReadPackedMsg, &mch_pdu_rel8->resource_allocation_type, end) && pull8(ppReadPackedMsg, &mch_pdu_rel8->resource_allocation_type, end) &&
pull32(ppReadPackedMsg, &mch_pdu_rel8->resource_block_coding, end) && pull32(ppReadPackedMsg, &mch_pdu_rel8->resource_block_coding, end) &&
...@@ -2947,7 +2947,7 @@ static uint8_t unpack_dl_config_dlsch_pdu_rel8_value(void *tlv, uint8_t **ppRead ...@@ -2947,7 +2947,7 @@ static uint8_t unpack_dl_config_dlsch_pdu_rel8_value(void *tlv, uint8_t **ppRead
nfapi_dl_config_dlsch_pdu_rel8_t* dlsch_pdu_rel8 = (nfapi_dl_config_dlsch_pdu_rel8_t*)tlv; nfapi_dl_config_dlsch_pdu_rel8_t* dlsch_pdu_rel8 = (nfapi_dl_config_dlsch_pdu_rel8_t*)tlv;
if (!(pull16(ppReadPackedMsg, &dlsch_pdu_rel8->length, end) && if (!(pull16(ppReadPackedMsg, &dlsch_pdu_rel8->length, end) &&
pull16(ppReadPackedMsg, &dlsch_pdu_rel8->pdu_index, end) && pull16(ppReadPackedMsg, (uint16_t *)&dlsch_pdu_rel8->pdu_index, end) &&
pull16(ppReadPackedMsg, &dlsch_pdu_rel8->rnti, end) && pull16(ppReadPackedMsg, &dlsch_pdu_rel8->rnti, end) &&
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->resource_allocation_type, end) && pull8(ppReadPackedMsg, &dlsch_pdu_rel8->resource_allocation_type, end) &&
pull8(ppReadPackedMsg, &dlsch_pdu_rel8->virtual_resource_block_assignment_flag, end) && pull8(ppReadPackedMsg, &dlsch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
...@@ -3033,7 +3033,7 @@ static uint8_t unpack_dl_config_pch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa ...@@ -3033,7 +3033,7 @@ static uint8_t unpack_dl_config_pch_pdu_rel8_value(void *tlv, uint8_t **ppReadPa
nfapi_dl_config_pch_pdu_rel8_t* pch_pdu_rel8 = (nfapi_dl_config_pch_pdu_rel8_t*)tlv; nfapi_dl_config_pch_pdu_rel8_t* pch_pdu_rel8 = (nfapi_dl_config_pch_pdu_rel8_t*)tlv;
return ( pull16(ppReadPackedMsg, &pch_pdu_rel8->length, end) && return ( pull16(ppReadPackedMsg, &pch_pdu_rel8->length, end) &&
pull16(ppReadPackedMsg, &pch_pdu_rel8->pdu_index, end) && pull16(ppReadPackedMsg, (uint16_t *)&pch_pdu_rel8->pdu_index, end) &&
pull16(ppReadPackedMsg, &pch_pdu_rel8->p_rnti, end) && pull16(ppReadPackedMsg, &pch_pdu_rel8->p_rnti, end) &&
pull8(ppReadPackedMsg, &pch_pdu_rel8->resource_allocation_type, end) && pull8(ppReadPackedMsg, &pch_pdu_rel8->resource_allocation_type, end) &&
pull8(ppReadPackedMsg, &pch_pdu_rel8->virtual_resource_block_assignment_flag, end) && pull8(ppReadPackedMsg, &pch_pdu_rel8->virtual_resource_block_assignment_flag, end) &&
...@@ -3179,7 +3179,7 @@ static uint8_t unpack_dl_config_nbch_pdu_rel13_value(void *tlv, uint8_t **ppRead ...@@ -3179,7 +3179,7 @@ static uint8_t unpack_dl_config_nbch_pdu_rel13_value(void *tlv, uint8_t **ppRead
nfapi_dl_config_nbch_pdu_rel13_t* nbch_params_rel13 = (nfapi_dl_config_nbch_pdu_rel13_t*)tlv; nfapi_dl_config_nbch_pdu_rel13_t* nbch_params_rel13 = (nfapi_dl_config_nbch_pdu_rel13_t*)tlv;
return ( pull16(ppReadPackedMsg, &nbch_params_rel13->length, end) && return ( pull16(ppReadPackedMsg, &nbch_params_rel13->length, end) &&
pull16(ppReadPackedMsg, &nbch_params_rel13->pdu_index, end) && pull16(ppReadPackedMsg, (uint16_t *)&nbch_params_rel13->pdu_index, end) &&
pull16(ppReadPackedMsg, &nbch_params_rel13->transmission_power, end) && pull16(ppReadPackedMsg, &nbch_params_rel13->transmission_power, end) &&
pull16(ppReadPackedMsg, &nbch_params_rel13->hyper_sfn_2_lsbs, end)); pull16(ppReadPackedMsg, &nbch_params_rel13->hyper_sfn_2_lsbs, end));
} }
...@@ -3189,7 +3189,7 @@ static uint8_t unpack_dl_config_npdcch_pdu_rel13_value(void *tlv, uint8_t **ppRe ...@@ -3189,7 +3189,7 @@ static uint8_t unpack_dl_config_npdcch_pdu_rel13_value(void *tlv, uint8_t **ppRe
nfapi_dl_config_npdcch_pdu_rel13_t* npdcch_params_rel13 = (nfapi_dl_config_npdcch_pdu_rel13_t*)tlv; nfapi_dl_config_npdcch_pdu_rel13_t* npdcch_params_rel13 = (nfapi_dl_config_npdcch_pdu_rel13_t*)tlv;
return ( pull16(ppReadPackedMsg, &npdcch_params_rel13->length, end) && return ( pull16(ppReadPackedMsg, &npdcch_params_rel13->length, end) &&
pull16(ppReadPackedMsg, &npdcch_params_rel13->pdu_index, end) && pull16(ppReadPackedMsg, (uint16_t *)&npdcch_params_rel13->pdu_index, end) &&
pull8(ppReadPackedMsg, &npdcch_params_rel13->ncce_index, end) && pull8(ppReadPackedMsg, &npdcch_params_rel13->ncce_index, end) &&
pull8(ppReadPackedMsg, &npdcch_params_rel13->aggregation_level, end) && pull8(ppReadPackedMsg, &npdcch_params_rel13->aggregation_level, end) &&
pull8(ppReadPackedMsg, &npdcch_params_rel13->start_symbol, end) && pull8(ppReadPackedMsg, &npdcch_params_rel13->start_symbol, end) &&
...@@ -3218,7 +3218,7 @@ static uint8_t unpack_dl_config_ndlsch_pdu_rel13_value(void *tlv, uint8_t **ppRe ...@@ -3218,7 +3218,7 @@ static uint8_t unpack_dl_config_ndlsch_pdu_rel13_value(void *tlv, uint8_t **ppRe
nfapi_dl_config_ndlsch_pdu_rel13_t* ndlsch_params_rel13 = (nfapi_dl_config_ndlsch_pdu_rel13_t*)tlv; nfapi_dl_config_ndlsch_pdu_rel13_t* ndlsch_params_rel13 = (nfapi_dl_config_ndlsch_pdu_rel13_t*)tlv;
return ( pull16(ppReadPackedMsg, &ndlsch_params_rel13->length, end) && return ( pull16(ppReadPackedMsg, &ndlsch_params_rel13->length, end) &&
pull16(ppReadPackedMsg, &ndlsch_params_rel13->pdu_index, end) && pull16(ppReadPackedMsg, (uint16_t *)&ndlsch_params_rel13->pdu_index, end) &&
pull8(ppReadPackedMsg, &ndlsch_params_rel13->start_symbol, end) && pull8(ppReadPackedMsg, &ndlsch_params_rel13->start_symbol, end) &&
pull8(ppReadPackedMsg, &ndlsch_params_rel13->rnti_type, end) && pull8(ppReadPackedMsg, &ndlsch_params_rel13->rnti_type, end) &&
pull16(ppReadPackedMsg, &ndlsch_params_rel13->rnti, end) && pull16(ppReadPackedMsg, &ndlsch_params_rel13->rnti, end) &&
...@@ -3602,7 +3602,7 @@ static uint8_t unpack_ul_config_ue_info_rel8_value(void *tlv, uint8_t **ppReadPa ...@@ -3602,7 +3602,7 @@ static uint8_t unpack_ul_config_ue_info_rel8_value(void *tlv, uint8_t **ppReadPa
nfapi_ul_config_ue_information_rel8_t* ue_info_rel8 = (nfapi_ul_config_ue_information_rel8_t*)tlv; nfapi_ul_config_ue_information_rel8_t* ue_info_rel8 = (nfapi_ul_config_ue_information_rel8_t*)tlv;
return (pull32(ppReadPackedMsg, &ue_info_rel8->handle, end) && return (pull32(ppReadPackedMsg, &ue_info_rel8->handle, end) &&
pull16(ppReadPackedMsg, &ue_info_rel8->rnti, end)); pull16(ppReadPackedMsg, (uint16_t *)&ue_info_rel8->rnti, end));
} }
static uint8_t unpack_ul_config_ue_info_rel11_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end) static uint8_t unpack_ul_config_ue_info_rel11_value(void *tlv, uint8_t **ppReadPackedMsg, uint8_t *end)
{ {
......
...@@ -1089,6 +1089,9 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t ...@@ -1089,6 +1089,9 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
return(9); return(9);
else else
return((n+6)%10); return((n+6)%10);
LOG_E(PHY, "%s %s:%i pdcch allocation error\n",__FUNCTION__,__FILE__,__LINE__);
return 0;
} }
uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t n) uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t n)
...@@ -1099,6 +1102,9 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui ...@@ -1099,6 +1102,9 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui
(frame_parms->tdd_config == 1)) { (frame_parms->tdd_config == 1)) {
if ((n==1)||(n==6)||(n==4)||(n==9)) { // tdd_config 0,1 SF 1,5 if ((n==1)||(n==6)||(n==4)||(n==9)) { // tdd_config 0,1 SF 1,5
ul_frame = (frame + (n < 5 ? 0 : 1)); ul_frame = (frame + (n < 5 ? 0 : 1));
} else {
LOG_E(PHY, "frame %d subframe %d: PUSCH frame = ?\n", frame, n);
ul_frame = 0;
} }
} else if ((frame_parms->frame_type == TDD) && } else if ((frame_parms->frame_type == TDD) &&
(frame_parms->tdd_config == 6) && (frame_parms->tdd_config == 6) &&
......
...@@ -2103,30 +2103,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2103,30 +2103,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];//qpsk_table_a1[2],qpsk_table_b1[2] int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];//qpsk_table_a1[2],qpsk_table_b1[2]
int16_t *qam_table_s0=NULL,*qam_table_s1=NULL; int16_t *qam_table_s0=NULL,*qam_table_s1=NULL;
#ifdef NEW_ALLOC_RE
/* TODO: variable to be removed? */
int (*allocate_REs)(PHY_VARS_eNB*,
int **,
uint32_t*,
uint32_t*,
uint16_t,
uint32_t,
LTE_DL_eNB_HARQ_t *,
LTE_DL_eNB_HARQ_t *,
uint8_t,
int16_t,
uint8_t,
int16_t *,
int16_t *,
uint32_t *,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
int *,
int *);
#endif
int P1_SHIFT[13],P2_SHIFT[13]; int P1_SHIFT[13],P2_SHIFT[13];
int offset,nushiftmod3; int offset,nushiftmod3;
...@@ -2373,52 +2349,23 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2373,52 +2349,23 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
re_offset = frame_parms->first_carrier_offset; re_offset = frame_parms->first_carrier_offset;
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe_offset*nsymb)); symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe_offset*nsymb));
#ifdef NEW_ALLOC_RE
/* TODO: remove this code? */
allocate_REs = allocate_REs_in_RB;
#endif
switch (mod_order0) { switch (mod_order0) {
case 2: case 2:
qam_table_s0 = NULL; qam_table_s0 = NULL;
/*if (pilots) { /*if (pilots) {
qam_table_s0 = qpsk_table_b0; qam_table_s0 = qpsk_table_b0;
#ifdef NEW_ALLOC_RE
// TODO: remove this code? //
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_QPSK_siso :
allocate_REs_in_RB;
#endif
} }
else { else {
qam_table_s0 = qpsk_table_a0; qam_table_s0 = qpsk_table_a0;
#ifdef NEW_ALLOC_RE
// TODO: remove this code? //
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_QPSK_siso :
allocate_REs_in_RB;
#endif
}*/ }*/
break; break;
case 4: case 4:
if (pilots) { if (pilots) {
qam_table_s0 = qam16_table_b0; qam_table_s0 = qam16_table_b0;
#ifdef NEW_ALLOC_RE
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_16QAM_siso :
allocate_REs_in_RB;
#endif
} }
else { else {
qam_table_s0 = qam16_table_a0; qam_table_s0 = qam16_table_a0;
#ifdef NEW_ALLOC_RE
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_16QAM_siso :
allocate_REs_in_RB;
#endif
} }
break; break;
...@@ -2426,21 +2373,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2426,21 +2373,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
case 6: case 6:
if (pilots) { if (pilots) {
qam_table_s0 = qam64_table_b0; qam_table_s0 = qam64_table_b0;
#ifdef NEW_ALLOC_RE
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_64QAM_siso :
allocate_REs_in_RB;
#endif
} }
else { else {
qam_table_s0 = qam64_table_a0; qam_table_s0 = qam64_table_a0;
#ifdef NEW_ALLOC_RE
/* TODO: remove this code? */
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_64QAM_siso :
allocate_REs_in_RB;
#endif
} }
break; break;
...@@ -2449,10 +2384,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2449,10 +2384,6 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
switch (mod_order1) { switch (mod_order1) {
case 2: case 2:
qam_table_s1 = NULL; qam_table_s1 = NULL;
#ifdef NEW_ALLOC_RE
/* TODO: remove this code? */
allocate_REs = allocate_REs_in_RB;
#endif
/*if (pilots) { /*if (pilots) {
qam_table_s1 = qpsk_table_b1; qam_table_s1 = qpsk_table_b1;
} }
......
...@@ -732,7 +732,6 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -732,7 +732,6 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
int i; int i;
LTE_eNB_UCI *uci; LTE_eNB_UCI *uci;
uint16_t tdd_multiplexing_mask=0; uint16_t tdd_multiplexing_mask=0;
int res;
for (i=0;i<NUMBER_OF_UE_MAX;i++) { for (i=0;i<NUMBER_OF_UE_MAX;i++) {
......
...@@ -64,7 +64,6 @@ void feptx0(RU_t *ru,int slot) { ...@@ -64,7 +64,6 @@ void feptx0(RU_t *ru,int slot) {
//int dummy_tx_b[7680*2] __attribute__((aligned(32))); //int dummy_tx_b[7680*2] __attribute__((aligned(32)));
unsigned int aa,slot_offset; unsigned int aa,slot_offset;
int i, tx_offset;
int slot_sizeF = (fp->ofdm_symbol_size)* int slot_sizeF = (fp->ofdm_symbol_size)*
((fp->Ncp==1) ? 6 : 7); ((fp->Ncp==1) ? 6 : 7);
int subframe = ru->proc.subframe_tx; int subframe = ru->proc.subframe_tx;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "TDD-Config.h"
/*! \brief Function to compute subframe Number(DL and S) as a function of Frame type and TDD Configuration /*! \brief Function to compute subframe Number(DL and S) as a function of Frame type and TDD Configuration
@param frame_parms Pointer to DL frame parameter descriptor @param frame_parms Pointer to DL frame parameter descriptor
@returns Subframe Number (DL,S) @returns Subframe Number (DL,S)
...@@ -341,6 +341,12 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf ...@@ -341,6 +341,12 @@ int is_srs_occasion_common(LTE_DL_FRAME_PARMS *frame_parms,int frame_tx,int subf
void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset); void compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsPeriodicity,uint16_t *psrsOffset);
/* from here: prototype added to remove compilation warnings, doc to be written by the author of the function */
int ul_ACK_subframe2_dl_frame(LTE_DL_FRAME_PARMS *frame_parms,int frame, unsigned char subframe,unsigned char subframe_tx);
void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP, sub_frame_t *subframeP);
/*@}*/ /*@}*/
......
...@@ -3600,7 +3600,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3600,7 +3600,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
LOG_D(PHY," ------ start turbo decoder for AbsSubframe %d.%d / %d ------ \n", frame_rx, subframe_rx, harq_pid); LOG_D(PHY," ------ start turbo decoder for AbsSubframe %d.%d / %d ------ \n", frame_rx, subframe_rx, harq_pid);
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->nb_rb); LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->nb_rb);
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->rb_alloc_even); LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, (unsigned int)((intptr_t)dlsch0->harq_processes[harq_pid]->rb_alloc_even));
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Qm); LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Qm);
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Nl); LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->Nl);
LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->G); LOG_D(PHY,"start turbo decode for CW 0 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch0->harq_processes[harq_pid]->G);
...@@ -3663,7 +3663,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3663,7 +3663,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
#endif #endif
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->nb_rb); LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->nb_rb);
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->rb_alloc_even); LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> rb_alloc_even %x \n", frame_rx, subframe_rx, harq_pid, (uint16_t)((intptr_t)dlsch1->harq_processes[harq_pid]->rb_alloc_even));
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Qm); LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Qm %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Qm);
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Nl); LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> Nl %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->Nl);
LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->G); LOG_D(PHY,"start turbo decode for CW 1 for AbsSubframe %d.%d / %d --> G %d \n", frame_rx, subframe_rx, harq_pid, dlsch1->harq_processes[harq_pid]->G);
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#endif #endif
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#include "RRC_config_tools.h" #include "RRC_config_tools.h"
......
...@@ -641,8 +641,8 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, ...@@ -641,8 +641,8 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
#endif #endif
static int debug_flag=0; static int debug_flag=0;
void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe); void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe)=NULL;
void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag); void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag)=NULL;
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_DEFAULT){ if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_DEFAULT){
schedule_ulsch_p = schedule_ulsch; schedule_ulsch_p = schedule_ulsch;
schedule_ue_spec_p = schedule_dlsch; schedule_ue_spec_p = schedule_dlsch;
...@@ -672,13 +672,22 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, ...@@ -672,13 +672,22 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
// This schedules SRS in subframeP // This schedules SRS in subframeP
schedule_SRS(module_idP, frameP, subframeP); schedule_SRS(module_idP, frameP, subframeP);
// This schedules ULSCH in subframeP (dci0) // This schedules ULSCH in subframeP (dci0)
schedule_ulsch_p(module_idP, frameP, subframeP); if (schedule_ulsch_p != NULL) {
schedule_ulsch_p(module_idP, frameP, subframeP);
} else {
LOG_E(MAC," %s %d: schedule_ulsch_p is NULL, function not called\n",__FILE__,__LINE__);
}
// This schedules UCI_SR in subframeP // This schedules UCI_SR in subframeP
schedule_SR(module_idP, frameP, subframeP); schedule_SR(module_idP, frameP, subframeP);
// This schedules UCI_CSI in subframeP // This schedules UCI_CSI in subframeP
schedule_CSI(module_idP, frameP, subframeP); schedule_CSI(module_idP, frameP, subframeP);
// This schedules DLSCH in subframeP // This schedules DLSCH in subframeP
schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status); if (schedule_ue_spec_p != NULL) {
schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status);
} else {
LOG_E(MAC," %s %d: schedule_ue_spec_p is NULL, function not called\n",__FILE__,__LINE__);
}
} }
else{ else{
schedule_ulsch_phy_test(module_idP,frameP,subframeP); schedule_ulsch_phy_test(module_idP,frameP,subframeP);
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "RRC/LTE/rrc_extern.h" #include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "SCHED/sched_common.h"
//#include "LAYER2/MAC/pre_processor.c" //#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h" #include "pdcp.h"
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
#include "T.h" #include "T.h"
#include "common/ran_context.h" #include "common/ran_context.h"
#include "LAYER2/MAC/eNB_scheduler_fairRR.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
extern uint16_t frame_cnt; extern uint16_t frame_cnt;
#include "common/ran_context.h" #include "common/ran_context.h"
#include "SCHED/sched_common.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
...@@ -1973,7 +1974,6 @@ int rrc_mac_remove_ue(module_id_t mod_idP, rnti_t rntiP) ...@@ -1973,7 +1974,6 @@ int rrc_mac_remove_ue(module_id_t mod_idP, rnti_t rntiP)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
int i;
int j; int j;
UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list; UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list;
int UE_id = find_UE_id(mod_idP,rntiP); int UE_id = find_UE_id(mod_idP,rntiP);
...@@ -3321,7 +3321,7 @@ void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP, ...@@ -3321,7 +3321,7 @@ void get_retransmission_timing(TDD_Config_t *tdd_Config, frame_t *frameP,
else else
{ {
AssertFatal(2 == 1, AssertFatal(2 == 1,
"Illegal dl subframe %d for tdd config %d\n", *subframeP, "Illegal dl subframe %d for tdd config %ld\n", *subframeP,
tdd_Config->subframeAssignment); tdd_Config->subframeAssignment);
} }
break; break;
...@@ -3350,7 +3350,7 @@ uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, su ...@@ -3350,7 +3350,7 @@ uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, su
harq_pid = (((frame_cnt*1024 + abs_frameP) * 4) - 1 + get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP))%7;//4 dl subframe in a frame harq_pid = (((frame_cnt*1024 + abs_frameP) * 4) - 1 + get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP))%7;//4 dl subframe in a frame
if(harq_pid < 0) if(harq_pid < 0)
harq_pid += 7; harq_pid += 7;
LOG_D(MAC,"[frame_subframe2_dl_harq_pid] (%d,%d) calculate harq_pid ((( %d * 1024 + %d) *4) - 1 + %d)%7 = %d \n", LOG_D(MAC,"[frame_subframe2_dl_harq_pid] (%d,%d) calculate harq_pid ((( %d * 1024 + %d) *4) - 1 + %d) = %d \n",
(abs_frameP+1024)%1024,subframeP,frame_cnt,abs_frameP, (abs_frameP+1024)%1024,subframeP,frame_cnt,abs_frameP,
get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP),harq_pid); get_dl_subframe_count(tdd_Config->subframeAssignment,subframeP),harq_pid);
return harq_pid; return harq_pid;
......
...@@ -1242,5 +1242,7 @@ uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, int total_rbs); ...@@ -1242,5 +1242,7 @@ uint16_t flexran_nb_rbs_allowed_slice(float rb_percentage, int total_rbs);
int ue_slice_membership(int UE_id, int slice_id); int ue_slice_membership(int UE_id, int slice_id);
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
#endif #endif
/** @}*/ /** @}*/
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h" #include "openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h" #include "LAYER2/MAC/defs_NB_IoT.h"
#include "COMMON/platform_types.h" #include "COMMON/platform_types.h"
#include "openair2/RRC/LITE/defs_NB_IoT.h" #include "openair2/RRC/LTE/defs_NB_IoT.h"
/** \addtogroup _mac /** \addtogroup _mac
* @{ * @{
*/ */
......
...@@ -7620,7 +7620,6 @@ rrc_eNB_process_SidelinkUEInformation( ...@@ -7620,7 +7620,6 @@ rrc_eNB_process_SidelinkUEInformation(
{ {
SL_DestinationInfoList_r12_t *destinationInfoList; SL_DestinationInfoList_r12_t *destinationInfoList;
int n_destinations = 0; int n_destinations = 0;
int ue_type = 0;
int n_discoveryMessages = 0; int n_discoveryMessages = 0;
LOG_I(RRC, LOG_I(RRC,
...@@ -7668,7 +7667,6 @@ rrc_eNB_process_SidelinkUEInformation( ...@@ -7668,7 +7667,6 @@ rrc_eNB_process_SidelinkUEInformation(
if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) &&(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13 != NULL)) { if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) &&(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13 != NULL)) {
if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count > 0) { if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count > 0) {
n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count; n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.count;
ue_type = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->ue_Type_r13;
destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t)); destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t));
for (int i=0; i< n_destinations; i++ ){ for (int i=0; i< n_destinations; i++ ){
//sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.array[i]); //sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelayUC_r13->destinationInfoList_r12.list.array[i]);
...@@ -7684,7 +7682,6 @@ rrc_eNB_process_SidelinkUEInformation( ...@@ -7684,7 +7682,6 @@ rrc_eNB_process_SidelinkUEInformation(
if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) && (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13 != NULL)) { if ((sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension != NULL) && (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13 != NULL)) {
if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count > 0){ if (sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count > 0){
n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count; n_destinations = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.count;
ue_type = sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->ue_Type_r13;
destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t)); destinationInfoList = CALLOC(1, sizeof(SL_DestinationInfoList_r12_t));
for (int i=0; i< n_destinations; i++ ){ for (int i=0; i< n_destinations; i++ ){
//sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.array[i]); //sl_DestinationIdentityList[i] = *(sidelinkUEInformation->criticalExtensions.choice.c1.choice.sidelinkUEInformation_r12.nonCriticalExtension->commTxResourceInfoReqRelay_r13->commTxResourceReqRelay_r13->destinationInfoList_r12.list.array[i]);
......
This diff is collapsed.
...@@ -186,10 +186,13 @@ typedef enum { ...@@ -186,10 +186,13 @@ typedef enum {
LOCALIZE, LOCALIZE,
RRH, RRH,
X2AP, X2AP,
MAX_LOG_COMPONENTS, LOADER,
MAX_LOG_PREDEF_COMPONENTS,
} }
comp_name_t; comp_name_t;
#define MAX_LOG_DYNALLOC_COMPONENTS 20
#define MAX_LOG_COMPONENTS (MAX_LOG_PREDEF_COMPONENTS + MAX_LOG_DYNALLOC_COMPONENTS)
//#define msg printf //#define msg printf
typedef struct { typedef struct {
...@@ -231,6 +234,7 @@ typedef struct { ...@@ -231,6 +234,7 @@ typedef struct {
int syslog; int syslog;
int filelog; int filelog;
char* filelog_name; char* filelog_name;
int async; // asynchronous mode, via dedicated log thread + log buffer
} log_t; } log_t;
typedef struct LOG_params { typedef struct LOG_params {
...@@ -289,16 +293,15 @@ char *map_int_to_str(mapping *map, int val); ...@@ -289,16 +293,15 @@ char *map_int_to_str(mapping *map, int val);
void logClean (void); void logClean (void);
int is_newline( char *str, int size); int is_newline( char *str, int size);
void *log_thread_function(void * list); void *log_thread_function(void * list);
int register_log_component(char *name, char *fext, int compidx);
/** @defgroup _logIt logIt function /** @defgroup _logIt logIt function
* @ingroup _macro * @ingroup _macro
* @brief Macro used to call tr_log_full_ex with file, function and line information * @brief Macro used to call tr_log_full_ex with file, function and line information
* @{*/ * @{*/
#ifdef LOG_NO_THREAD
#define logIt(component, level, format, args...) (g_log->log_component[component].interval?logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0) #define logIt(component, level, format, args...) (g_log->log_component[component].interval?logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
#else //default #define logItS(component, level, format, args...) (g_log->log_component[component].interval?logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
#define logIt(component, level, format, args...) (g_log->log_component[component].interval?logRecord(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
#endif
/* @}*/ /* @}*/
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format); /*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
...@@ -323,15 +326,16 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int ...@@ -323,15 +326,16 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
#define LOG_CONFIG_LEVEL_FORMAT "%s_log_level" #define LOG_CONFIG_LEVEL_FORMAT "%s_log_level"
#define LOG_CONFIG_VERBOSITY_FORMAT "%s_log_verbosity" #define LOG_CONFIG_VERBOSITY_FORMAT "%s_log_verbosity"
#define LOG_CONFIG_LOGFILE_FORMAT "%s_log_infile" #define LOG_CONFIG_LOGFILE_FORMAT "%s_log_infile"
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* LOG globalconfiguration parameters */ /* LOG globalconfiguration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname help paramflags XXXptr defXXXval type numelt */
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define LOG_GLOBALPARAMS_DESC { \ #define LOG_GLOBALPARAMS_DESC { \
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, NULL, 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \ {LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, NULL, 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,NULL, 0, strptr:(char **)&glogverbo, defstrval:log_verbosity_names[2].name, TYPE_STRING, 0}, \ {LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,NULL, 0, strptr:(char **)&glogverbo, defstrval:log_verbosity_names[2].name, TYPE_STRING, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, NULL, 0, iptr:&(g_log->onlinelog), defintval:1, TYPE_INT, 0, }, \ {LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, NULL, 0, iptr:&(g_log->onlinelog), defintval:1, TYPE_INT, 0}, \
{LOG_CONFIG_STRING_GLOBAL_LOG_INFILE, NULL, 0, iptr:&(g_log->filelog), defintval:0, TYPE_INT, 0, }, \ {LOG_CONFIG_STRING_GLOBAL_LOG_INFILE, NULL, 0, iptr:&(g_log->filelog), defintval:0, TYPE_INT, 0}, \
} }
/*----------------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------------*/
/** @defgroup _debugging debugging macros /** @defgroup _debugging debugging macros
...@@ -339,20 +343,20 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int ...@@ -339,20 +343,20 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
* @brief Macro used to call logIt function with different message levels * @brief Macro used to call logIt function with different message levels
* @{*/ * @{*/
// debugging macros // debugging macros(g_log->log_component[component].interval?logRecord_mt(__FILE__, __FUNCTION__, __LINE__, component, level, format, ##args):(void)0)
# if T_TRACER # if T_TRACER
# include "T.h" # include "T.h"
# define LOG_I(c, x...) T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) # define LOG_I(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
# define LOG_W(c, x...) T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) # define LOG_W(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0)
# define LOG_E(c, x...) T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) # define LOG_E(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0)
# define LOG_D(c, x...) T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) # define LOG_D(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
# define LOG_T(c, x...) T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) # define LOG_T(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
# define LOG_G(c, x...) /* */ # define LOG_G(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_EMERG, x) ;}} while (0) /* */
# define LOG_A(c, x...) /* */ # define LOG_A(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_ALERT, x) ;}} while (0) /* */
# define LOG_C(c, x...) /* */ # define LOG_C(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_CRIT, x) ;}} while (0) /* */
# define LOG_N(c, x...) /* */ # define LOG_N(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_NOTICE, x) ;}} while (0) /* */
# define LOG_F(c, x...) /* */ # define LOG_F(c, x...) do { if (T_active[c] == T_ACTIVE_STDOUT) { logIt(c, LOG_FILE, x) ;}} while (0) /* */
# define LOG_M(file, vector, data, len, dec, format) /* */ # define LOG_M(file, vector, data, len, dec, format) write_file_matlab(file, vector, data, len, dec, format)/* */
# else /* T_TRACER */ # else /* T_TRACER */
# if DISABLE_LOG_X # if DISABLE_LOG_X
# define LOG_I(c, x...) /* */ # define LOG_I(c, x...) /* */
......
...@@ -266,8 +266,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -266,8 +266,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
TICK_TO_US(eNB->phy_proc_tx), TICK_TO_US(eNB->phy_proc_tx),
TICK_TO_US(eNB->phy_proc_rx), TICK_TO_US(eNB->phy_proc_rx),
TICK_TO_US(eNB->rx_prach), TICK_TO_US(eNB->rx_prach),
TICK_TO_US(eNB->ofdm_mod_stats), TICK_TO_US(eNB->ofdm_mod_stats)
softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now); );
LOG_D(PHY, LOG_D(PHY,
"dlsch[enc:%lld mod:%lld scr:%lld rm:%lld t:%lld i:%lld] rx_dft:%lld ", "dlsch[enc:%lld mod:%lld scr:%lld rm:%lld t:%lld i:%lld] rx_dft:%lld ",
TICK_TO_US(eNB->dlsch_encoding_stats), TICK_TO_US(eNB->dlsch_encoding_stats),
......
...@@ -912,6 +912,9 @@ void tx_rf(RU_t *ru) { ...@@ -912,6 +912,9 @@ void tx_rf(RU_t *ru) {
flags=2; // start burst flags=2; // start burst
late_control=STATE_BURST_NORMAL; late_control=STATE_BURST_NORMAL;
break; break;
default:
LOG_D(PHY,"[TXPATH] RU %d late_control %d not implemented\n",ru->idx, late_control);
break;
} }
} }
/* add fail safe for late command end */ /* add fail safe for late command end */
...@@ -1585,9 +1588,6 @@ static void* ru_thread( void* param ) { ...@@ -1585,9 +1588,6 @@ static void* ru_thread( void* param ) {
dlsch_ue_select_tbl_in_use = 1; dlsch_ue_select_tbl_in_use = 1;
#endif #endif
struct timespec time_req, time_rem;
time_req.tv_sec = 0;
time_req.tv_nsec = 10000;
// set default return value // set default return value
thread_top_init("ru_thread",1,400000,500000,500000); thread_top_init("ru_thread",1,400000,500000,500000);
...@@ -1796,6 +1796,10 @@ static void* ru_thread( void* param ) { ...@@ -1796,6 +1796,10 @@ static void* ru_thread( void* param ) {
} }
} }
#else #else
struct timespec time_req, time_rem;
time_req.tv_sec = 0;
time_req.tv_nsec = 10000;
while((!oai_exit)&&(phy_tx_end == 0)){ while((!oai_exit)&&(phy_tx_end == 0)){
nanosleep(&time_req,&time_rem); nanosleep(&time_req,&time_rem);
continue; continue;
...@@ -2766,7 +2770,7 @@ void init_RU(char *rf_config_file) { ...@@ -2766,7 +2770,7 @@ void init_RU(char *rf_config_file) {
void stop_ru(RU_t *ru) { void stop_ru(RU_t *ru) {
int *status;
printf("Stopping RU %p processing threads\n",(void*)ru); printf("Stopping RU %p processing threads\n",(void*)ru);
#if defined(PRE_SCD_THREAD) #if defined(PRE_SCD_THREAD)
if(ru){ if(ru){
......
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