Commit 11a33bc4 authored by Raymond Knopp's avatar Raymond Knopp

Merge remote-tracking branch 'origin/develop' into issue-centos-fixes

parents a2cf8611 e04b8241
Branches unavailable
2025.w14 2025.w13 2025.w12 2025.w11 2025.w10 2025.w09 2025.w08 2025.w07 2025.w06 2025.w05 2025.w04 2025.w03 2025.w02 2024.w51 2024.w50 2024.w49 2024.w48 2024.w47 2024.w46 2024.w45 2024.w44 2024.w43 2024.w42 2024.w41 2024.w40 2024.w39 2024.w38 2024.w36 2024.w35 2024.w34 2024.w33 2024.w32 2024.w31 2024.w30 2024.w29 2024.w28 2024.w27 2024.w26 2024.w25 2024.w24 2024.w23 2024.w22 2024.w21 2024.w18 2024.w17 2024.w16 2024.w15 2024.w14 2024.w13 2024.w12 2024.w11 2024.w10 2024.w09 2024.w08 2024.w06 2024.w05 2024.w04 2024.w03 2024.w02 2024.w01 2023.w51 2023.w50 2023.w49 2023.w48 2023.w47 2023.w45 2023.w43 2023.w42 2023.w41 2023.w40 2023.w39 2023.w38 2023.w37 2023.w36 2023.w34 2023.w33 2023.w32 2023.w31 2023.w30 2023.w29 2023.w28 2023.w27 2023.w26 2023.w25 2023.w24 2023.w23 2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 2021.wk46 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w51_c 2021.w51_a 2021.w50_a 2021.w49_b 2021.w49_a 2021.w48 2021.w47 2021.w46 2021.w46-powder 2021.w45 2021.w45_b 2021.w44 2021.w43 2021.w42 2021.w37 2021.w36 2021.w35 2021.w34 2021.w33 2021.w32 2021.w31 2021.w30 2021.w29 2021.w28 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 2019.w08 2019.w07 2019.w06 2019.w04 2019.w03 2018.w51 2018.w48 2018.w47 2018.w46 2018.w44 2018.w41 2018.w40 2018.w39 2018.w36 2018.w33 v2.2.0 v2.1.0 v2.0.0 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 v1.0.3 v1.0.2 v1.0.1 v1.0.0 setparam osa-etsi-ws-ue osa-etsi-ws-try2 osa-etsi-ws-try1 osa-etsi-ws-gNB nr-ip-over-lte nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 flexran-eol develop-nr-pdcch develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 develop-nr-2019w28 develop-nr-2019w23 benetel_phase_rotation benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 benetel_enb_rel_1.0 ARC_1.3
No related merge requests found
......@@ -897,7 +897,7 @@ set(UTIL_SRC
${OPENAIR2_DIR}/UTIL/FIFO/pad_list.c
${OPENAIR2_DIR}/UTIL/LISTS/list.c
${OPENAIR2_DIR}/UTIL/LISTS/list2.c
${OPENAIR2_DIR}/UTIL/LOG/log.c
${OPENAIR_DIR}/common/utils/LOG/log.c
# ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c
${OPENAIR2_DIR}/UTIL/MATH/oml.c
${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
......@@ -1214,7 +1214,12 @@ set(PHY_MEX_UE
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ue_measurements.c
${OPENAIR2_DIR}/UTIL/LOG/log.c
${OPENAIR_DIR}/common/utils/LOG/log.c
${OPENAIR_DIR}/common/utils/T/T.c
${OPENAIR_DIR}/common/utils/T/local_tracer.c
${OPENAIR_DIR}/common/config/config_cmdline.c
${OPENAIR_DIR}/common/config/config_userapi.c
${OPENAIR_DIR}/common/config/config_load_configmodule.c
)
add_library(PHY_MEX ${PHY_MEX_UE})
......@@ -2175,14 +2180,14 @@ if (${T_TRACER})
#all "add_executable" definitions (except tests, rb_tool, updatefw)
lte-softmodem lte-softmodem-nos1 lte-uesoftmodem lte-uesoftmodem-nos1
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
pdcchsim pucchsim prachsim syncsim
pdcchsim pucchsim prachsim syncsim ulsim
#all "add_library" definitions
ITTI RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB
oai_exmimodevif oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif
oai_eth_transpro
FLPT_MSG ASYNC_IF FLEXRAN_AGENT HASHTABLE MSC UTIL OMG_SUMO SECU_OSA
SECU_CN SCHED_LIB PHY L2 default_sched remote_sched RAL CN_UTILS
GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU OPENAIR0_LIB)
GTPV1U SCTP_CLIENT UDP LIB_NAS_UE LFDS LFDS7 SIMU OPENAIR0_LIB PHY_MEX)
if (TARGET ${i})
add_dependencies(${i} generate_T)
endif()
......
......@@ -508,7 +508,9 @@ function main() {
lte_exec=lte-uesoftmodem
fi
fi
if [ "$T_TRACER" = "False" ] ; then
lte_build_dir=${lte_build_dir}_noLOG
fi
# configuration module libraries, one currently available, using libconfig
config_libconfig_shlib=params_libconfig
......
......@@ -37,6 +37,35 @@
#include <errno.h>
#include "config_userapi.h"
void parse_stringlist(paramdef_t *cfgoptions, char *val)
{
char *atoken;
char *tokctx;
char *tmpval=strdup(val);
int numelt=0;
cfgoptions->numelt=0;
atoken=strtok_r(tmpval, ",",&tokctx);
while(atoken != NULL) {
numelt++ ;
atoken=strtok_r(NULL, ",",&tokctx);
}
free(tmpval);
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
cfgoptions->numelt=numelt;
atoken=strtok_r(val, ",",&tokctx);
for( int i=0; i<cfgoptions->numelt && atoken != NULL ; i++) {
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(atoken)+1);
sprintf(cfgoptions->strlistptr[i],"%s",atoken);
printf_params("[LIBCONFIG] %s[%i]: %s\n", cfgoptions->optname,i,cfgoptions->strlistptr[i]);
atoken=strtok_r(NULL, ",",&tokctx);
}
cfgoptions->numelt=numelt;
}
int processoption(paramdef_t *cfgoptions, char *value)
{
char *tmpval = value;
......@@ -66,6 +95,7 @@ char defbool[2]="1";
break;
case TYPE_STRINGLIST:
parse_stringlist(cfgoptions,tmpval);
break;
case TYPE_UINT32:
case TYPE_INT32:
......@@ -140,7 +170,7 @@ char *cfgpath;
exit_fun("[CONFIG] Exiting after displaying help\n");
}
} else {
pp=strtok_r(NULL, "_",&tokctx);
pp=strtok_r(NULL, " ",&tokctx);
if ( prefix != NULL && pp != NULL && strncasecmp(prefix,pp,strlen(pp)) == 0 ) {
printf ("Help for %s section:\n",prefix);
config_printhelp(cfgoptions,numoptions);
......@@ -167,17 +197,19 @@ char *cfgpath;
((strlen(oneargv) > 2) && (strcmp(oneargv + 2,cfgpath ) == 0 )) ) {
char *valptr=NULL;
int ret;
pp = config_get_if()->argv[i+1];
if (pp != NULL && c > 1) {
ret = strlen(pp);
if (ret > 0 ) {
if (pp[0] != '-')
valptr=pp;
else if ( ret > 1 && pp[0] == '-' && isdigit(pp[1]) )
valptr=pp;
}
if (c > 0) {
pp = config_get_if()->argv[i+1];
if (pp != NULL ) {
ret = strlen(pp);
if (ret > 0 ) {
if (pp[0] != '-')
valptr=pp;
else if ( ret > 1 && pp[0] == '-' && isdigit(pp[1]) )
valptr=pp;
}
}
}
j += processoption(&(cfgoptions[n]), pp);
j += processoption(&(cfgoptions[n]), valptr);
if ( valptr != NULL ) {
i++;
c--;
......
......@@ -23,15 +23,8 @@
extern log_t *g_log;
#if !defined(LOG_NO_THREAD)
extern LOG_params log_list[2000];
extern pthread_mutex_t log_lock;
extern pthread_cond_t log_notify;
extern int log_shutdown;
#endif
extern mapping log_level_names[];
extern mapping log_verbosity_names[];
extern mapping log_options[];
extern mapping log_maskmap[];
extern int log_mem_flag;
extern char * log_mem_filename;
File moved
......@@ -749,7 +749,6 @@ ID = LEGACY_OSA_TRACE
DESC = OSA legacy logs - trace level
GROUP = ALL:LEGACY_OSA:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_SIM_INFO
DESC = SIM legacy logs - info level
GROUP = ALL:LEGACY_SIM:LEGACY_GROUP_INFO:LEGACY
......@@ -770,7 +769,6 @@ ID = LEGACY_SIM_TRACE
DESC = SIM legacy logs - trace level
GROUP = ALL:LEGACY_SIM:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
# this is a bad hack but I won't fix (function util_print_hex_octets
# in openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
# does funky things with the LOG_x macros but we work on the C pre-processor
......
......@@ -174,7 +174,8 @@ void usage(void)
" -ip <host> connect to given IP address (default %s)\n"
" -p <port> connect to given port (default %d)\n"
" -b <event> <arg> <vcd name> trace as binary (0 off, anything else on)\n"
" -l <event> <arg> <vcd name> trace as uint64_t\n",
" -l <event> <arg> <vcd name> trace as uint64_t\n"
" -vcd trace all VCD variables and functions\n",
DEFAULT_REMOTE_IP,
DEFAULT_REMOTE_PORT
);
......@@ -192,6 +193,20 @@ void force_stop(int x)
run = 0;
}
vcd_vars *add_var(vcd_vars *vars, int nvars,
char *event, char *arg, char *vcd_name, int is_boolean)
{
if (nvars % 64 == 0) {
vars = realloc(vars, (nvars+64) * sizeof(vcd_vars));
if (vars == NULL) abort();
}
vars[nvars].event = event;
vars[nvars].arg = arg;
vars[nvars].vcd_name = vcd_name;
vars[nvars].boolean = is_boolean;
return vars;
}
int main(int n, char **v)
{
char *output_filename = NULL;
......@@ -202,11 +217,12 @@ int main(int n, char **v)
int *is_on;
int number_of_events;
int i;
vcd_vars vars[n];
vcd_vars *vars = NULL;
int nvars = 0;
view *vcd_view;
event_handler *h;
logger *textlog;
int all_vcd = 0;
/* write on a socket fails if the other end is closed and we get SIGPIPE */
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort();
......@@ -221,19 +237,22 @@ int main(int n, char **v)
if (!strcmp(v[i], "-p"))
{ if (i > n-2) usage(); port = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-b")) { if(i>n-4)usage();
vars[nvars].event = v[++i];
vars[nvars].arg = v[++i];
vars[nvars].vcd_name = v[++i];
vars[nvars++].boolean = 1;
char *event = v[++i];
char *arg = v[++i];
char *vcd_name = v[++i];
vars = add_var(vars, nvars, event, arg, vcd_name, 1);
nvars++;
continue;
}
if (!strcmp(v[i], "-l")) { if(i>n-4)usage();
vars[nvars].event = v[++i];
vars[nvars].arg = v[++i];
vars[nvars].vcd_name = v[++i];
vars[nvars++].boolean = 0;
char *event = v[++i];
char *arg = v[++i];
char *vcd_name = v[++i];
vars = add_var(vars, nvars, event, arg, vcd_name, 0);
nvars++;
continue;
}
if (!strcmp(v[i], "-vcd")) { all_vcd = 1; continue; }
usage();
}
......@@ -260,11 +279,32 @@ int main(int n, char **v)
/* create the view */
vcd_view = new_view_vcd();
if (all_vcd) {
/* activate all VCD traces */
for (i = 0; i < number_of_events; i++) {
int is_boolean;
int prefix_length;
char *name = event_name_from_id(database, i);
char *var_prefix = "VCD_VARIABLE_";
char *fun_prefix = "VCD_FUNCTION_";
if (!strncmp(name, var_prefix, strlen(var_prefix))) {
prefix_length = strlen(var_prefix);
is_boolean = 0;
} else if (!strncmp(name, fun_prefix, strlen(fun_prefix))) {
prefix_length = strlen(fun_prefix);
is_boolean = 1;
} else
continue;
vars = add_var(vars, nvars,
name, "value", name+prefix_length, is_boolean);
nvars++;
}
}
/* setup traces */
for (i = 0; i < nvars; i++) {
char format[256];
if (strlen(vars[i].arg) > 256-3) abort();
if (strlen(vars[i].vcd_name) > 256-1) abort();
if (strlen(vars[i].arg) + strlen(vars[i].vcd_name) > 256-16) abort();
sprintf(format, "%c [%s] %s",
vars[i].boolean ? 'b' : 'l',
vars[i].arg,
......
......@@ -39,7 +39,6 @@ void output_log_mem(void);
#define _Assert_Exit_ \
{ \
fprintf(stderr, "\nExiting execution\n"); \
output_log_mem(); \
display_backtrace(); \
fflush(stdout); \
fflush(stderr); \
......
......@@ -117,19 +117,16 @@ int signal_handle(int *end)
case SIGUSR1:
SIG_DEBUG("Received SIGUSR1\n");
*end = 1;
output_log_mem();
break;
case SIGSEGV: /* Fall through */
case SIGABRT:
SIG_DEBUG("Received SIGABORT\n");
output_log_mem();
backtrace_handle_signal(&info);
break;
case SIGINT:
printf("Received SIGINT\n");
output_log_mem();
itti_send_terminate_message(TASK_UNKNOWN);
*end = 1;
break;
......
......@@ -32,7 +32,7 @@
#ifdef TELNETSRV_LOADER_MAIN
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "common/utils/load_module_shlib.h"
......
......@@ -32,7 +32,7 @@
#ifdef TELNETSRV_PHYCMD_MAIN
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "openair1/PHY/phy_extern.h"
......
......@@ -52,8 +52,7 @@
#define TELNETSERVERCODE
#include "telnetsrv.h"
#define TELNETSRV_PROCCMD_MAIN
#include "log.h"
#include "log_extern.h"
#include "common/utils/LOG/log.h"
#include "common/config/config_userapi.h"
#include "openair1/PHY/phy_extern.h"
#include "telnetsrv_proccmd.h"
......@@ -200,16 +199,30 @@ int proccmd_show(char *buf, int debug, telnet_printfunc_t prnt)
print_threads(buf,debug,prnt);
}
if (strcasestr(buf,"loglvl") != NULL) {
prnt("component verbosity level enabled\n");
prnt(" component level enabled\n");
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
if (g_log->log_component[i].name != NULL) {
prnt("%02i %17.17s:%10.10s%10.10s %s\n",i ,g_log->log_component[i].name,
map_int_to_str(log_verbosity_names,g_log->log_component[i].flag),
prnt("%02i %17.17s:%10.10s %s\n",i ,g_log->log_component[i].name,
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,"logopt") != NULL) {
prnt(" option enabled\n");
for (int i=0; log_options[i].name != NULL; i++) {
prnt("%02i %17.17s %10.10s \n",i ,log_options[i].name,
((g_log->flag & log_options[i].value)?"Y":"N") );
}
}
if (strcasestr(buf,"dbgopt") != NULL) {
prnt(" option debug matlab\n");
for (int i=0; log_maskmap[i].name != NULL ; i++) {
prnt("%02i %17.17s %5.5s %5.5s\n",i ,log_maskmap[i].name,
((g_log->debug_mask & log_maskmap[i].value)?"Y":"N"),
((g_log->matlab_mask & log_maskmap[i].value)?"Y":"N") );
}
}
if (strcasestr(buf,"config") != NULL) {
prnt("Command line arguments:\n");
for (int i=0; i < config_get_if()->argc; i++) {
......@@ -324,24 +337,76 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2);
prnt("Available log levels: \n ");
for (int i=0; log_level_names[i].name != NULL; i++)
prnt("%s ",log_level_names[i].name);
prnt("\nAvailable verbosity: \n ");
for (int i=0; log_verbosity_names[i].name != NULL; i++)
prnt("%s ",log_verbosity_names[i].name);
prnt("\n");
prnt("Available display options: \n ");
for (int i=0; log_options[i].name != NULL; i++)
prnt("%s ",log_options[i].name);
prnt("\n");
prnt("Available debug or matlab options: \n ");
for (int i=0; log_maskmap[i].name != NULL; i++)
prnt("%s ",log_maskmap[i].name);
prnt("\n");
proccmd_show("loglvl",debug,prnt);
proccmd_show("logopt",debug,prnt);
proccmd_show("dbgopt",debug,prnt);
}
else if (strcasestr(logsubcmd,"help") != NULL) {
prnt(PROCCMD_LOG_HELP_STRING);
} else {
prnt("%s: wrong log command...\n",logsubcmd);
}
} else if ( s == 2 && logsubcmd != NULL) {
char *opt=NULL;
char *logparam=NULL;
int l;
int optbit;
l=sscanf(logsubcmd,"%m[^'_']_%ms",&logparam,&opt);
if (l == 2 && strcmp(logparam,"print") == 0){
optbit=map_str_to_int(log_options,opt);
if (optbit < 0) {
prnt("option %s unknown\n",opt);
} else {
if (idx1 > 0)
SET_LOG_OPTION(optbit);
else
CLEAR_LOG_OPTION(optbit);
proccmd_show("logopt",debug,prnt);
}
}
else if (l == 2 && strcmp(logparam,"debug") == 0){
optbit=map_str_to_int(log_maskmap,opt);
if (optbit < 0) {
prnt("debug flag %s unknown\n",opt);
} else {
if (idx1 > 0)
SET_LOG_DEBUG(optbit);
else
CLEAR_LOG_DEBUG(optbit);
proccmd_show("dbgopt",debug,prnt);
}
}
else if (l == 2 && strcmp(logparam,"matlab") == 0){
optbit=map_str_to_int(log_maskmap,opt);
if (optbit < 0) {
prnt("matlab flag %s unknown\n",opt);
} else {
if (idx1 > 0)
SET_LOG_MATLAB(optbit);
else
CLEAR_LOG_MATLAB(optbit);
proccmd_show("dbgopt",debug,prnt);
}
}
if (logparam != NULL) free(logparam);
if (opt != NULL) free(opt);
} else if ( s == 3 && logsubcmd != NULL) {
int level, verbosity, interval;
int level, interval;
char *tmpstr=NULL;
char *logparam=NULL;
int l;
level = verbosity = interval = -1;
level = interval = -1;
l=sscanf(logsubcmd,"%m[^'_']_%m[^'_']",&logparam,&tmpstr);
if (debug > 0)
prnt("l=%i, %s %s\n",l,((logparam==NULL)?"\"\"":logparam), ((tmpstr==NULL)?"\"\"":tmpstr));
......@@ -349,9 +414,6 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2);
if (strcmp(logparam,"level") == 0) {
level=map_str_to_int(log_level_names,tmpstr);
if (level < 0) prnt("level %s unknown\n",tmpstr);
} else if (strcmp(logparam,"verbos") == 0) {
verbosity=map_str_to_int(log_verbosity_names,tmpstr);
if (verbosity < 0) prnt("verbosity %s unknown\n",tmpstr);
} else {
prnt("%s%s unknown log sub command \n",logparam, tmpstr);
}
......@@ -372,17 +434,13 @@ int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2);
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);
prnt("log level/verbosity comp %i %s set to %s / %s (%s)\n",
set_log(i, level, interval);
prnt("log level comp %i %s set to %s (%s)\n",
i,((g_log->log_component[i].name==NULL)?"":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)?"enabled":"disabled"));
......
......@@ -49,9 +49,12 @@ telnetshell_vardef_t proc_vardef[] = {
online, noonline: enable or disable console logs \n\
enable, disable id1-id2: enable or disable logs for components index id1 to id2 \n\
level_<level> id1-id2: set log level to <level> for components index id1 to id2 \n\
level_<verbosity> id1-id2: set log verbosity to <verbosity> for components index id1 to id2 \n\
use the show command to get the values for <level>, <verbosity> and the list of component indexes \
that can be used for id1 and id2 \n"
use the show command to get the authorized values for <level> and the list of component \
indexes that can be used for id1 and id2 \n\
print_<opt> <0|1> disable or enable the \"opt\" log option, use the show command to get \
the available options\n\
matlab_<opt> debug_<func> disable or enable the debug code or matlab file generation \
for \"func\" function. use the show command to get the available options\n"
#define PROCCMD_THREAD_HELP_STRING " thread sub commands: \n\
<thread id> aff <core> : set affinity of thread <thread id> to core <core> \n\
......
......@@ -47,7 +47,7 @@ extern RAN_CONTEXT_t RC;
#include <vendor_ext.h>
#include "fapi_stub.h"
//#include "fapi_l1.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "PHY/INIT/phy_init.h"
......@@ -193,26 +193,25 @@ typedef struct {
static pnf_info pnf;
static pthread_t pnf_start_pthread;
extern void nfapi_log(char *file, char *func, int line, int comp, int level, const char* format, va_list args);
int nfapitooai_level(int nfapi_level) {
switch(nfapi_level) {
case NFAPI_TRACE_ERROR:
return LOG_ERR;
case NFAPI_TRACE_WARN:
return LOG_WARNING;
case NFAPI_TRACE_NOTE:
return LOG_INFO;
case NFAPI_TRACE_INFO:
return LOG_DEBUG;
}
return LOG_ERR;
}
void pnf_nfapi_trace(nfapi_trace_level_t nfapi_level, const char* message, ...) {
va_list args;
int oai_level;
if (nfapi_level==NFAPI_TRACE_ERROR) {
oai_level = LOG_ERR;
} else if (nfapi_level==NFAPI_TRACE_WARN) {
oai_level = LOG_WARNING;
} else if (nfapi_level==NFAPI_TRACE_NOTE) {
oai_level = LOG_INFO;
} else if (nfapi_level==NFAPI_TRACE_INFO) {
oai_level = LOG_DEBUG;
} else {
oai_level = LOG_ERR;
}
va_start(args, message);
nfapi_log("FILE>", "FUNC", 999, PHY, oai_level, message, args);
nfapi_log("FILE>", "FUNC", 999, PHY, nfapitooai_level(nfapi_level), message, args);
va_end(args);
}
......
......@@ -680,36 +680,13 @@ void vnf_deallocate(void* ptr) {
free(ptr);
}
extern void nfapi_log(char *file, char *func, int line, int comp, int level, const char* format, va_list args);
void vnf_trace(nfapi_trace_level_t nfapi_level, const char* message, ...) {
va_list args;
int oai_level;
if (nfapi_level==NFAPI_TRACE_ERROR)
{
oai_level = LOG_ERR;
}
else if (nfapi_level==NFAPI_TRACE_WARN)
{
oai_level = LOG_WARNING;
}
else if (nfapi_level==NFAPI_TRACE_NOTE)
{
oai_level = LOG_INFO;
}
else if (nfapi_level==NFAPI_TRACE_INFO)
{
oai_level = LOG_INFO;
}
else
{
oai_level = LOG_INFO;
}
va_start(args, message);
nfapi_log("FILE>", "FUNC", 999, PHY, oai_level, message, args);
nfapi_log("FILE>", "FUNC", 999, PHY, nfapitooai_level(nfapi_level), message, args);
va_end(args);
}
......
......@@ -25,7 +25,7 @@ extern "C" {
// todo : move to public_inc so can be used by vendor extensions
#define MAX_BAD_TAG 3
int nfapitooai_level(int nfapilevel);
uint8_t push8(uint8_t in, uint8_t **out, uint8_t *end);
uint8_t pushs8(int8_t in, uint8_t **out, uint8_t *end);
uint8_t push16(uint16_t in, uint8_t **out, uint8_t *end);
......
......@@ -67,15 +67,12 @@ void generate_qpsk_table(void)
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms)
{
ccodedot11_init();
ccodedot11_init_inv();
ccodelte_init();
ccodelte_init_inv();
init_dfts();
phy_generate_viterbi_tables();
phy_generate_viterbi_tables_lte();
load_codinglib();
......@@ -86,6 +83,7 @@ void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms)
generate_64qam_table();
generate_16qam_table();
generate_qpsk_table();
generate_RIV_tables();
init_unscrambling_lut();
......
......@@ -31,7 +31,7 @@
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
......@@ -477,7 +477,7 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
if (mbsfn_Area_idx == 0) {
fp->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9;
LOG_N(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
LOG_I(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
}
lte_gold_mbsfn(fp,RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn);
......
......@@ -27,7 +27,7 @@
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
......
......@@ -27,7 +27,7 @@
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
......@@ -190,7 +190,7 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A
if (mbsfn_Area_idx == 0) {
fp->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9;
LOG_N(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
LOG_I(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
}
lte_gold_mbsfn(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn);
......
......@@ -373,6 +373,8 @@ void phy_config_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
void init_dfts(void);
/** @} */
#endif
......@@ -23,7 +23,7 @@
#include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#define DEBUG_PHY
......
......@@ -25,7 +25,7 @@
#include "PHY/impl_defs_top.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#define DEBUG_PHY
......
......@@ -274,11 +274,11 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
#ifdef DEBUG_PHY
LOG_M_BEGIN(DEBUG_LTEESTIM);
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
#endif
LOG_M_END
return (1);
}
......@@ -330,10 +330,6 @@ static inline int abs32(int x)
return (((int)((short*)&x)[0])*((int)((short*)&x)[0]) + ((int)((short*)&x)[1])*((int)((short*)&x)[1]));
}
#ifdef DEBUG_PHY
int debug_cnt=0;
#endif
#define SHIFT 17
int lte_sync_time(int **rxdata, ///rx data in time domain
......@@ -464,7 +460,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
LOG_I(PHY,"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)\n",sync_source,peak_pos,peak_val,dB_fixed(peak_val)/2);
#ifdef DEBUG_PHY
LOG_M_BEGIN(DEBUG_LTEESTIM)
static int debug_cnt;
if (debug_cnt == 0) {
LOG_M("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
LOG_M("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
......@@ -474,9 +471,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
} else {
debug_cnt++;
}
#endif
LOG_M_END
return(peak_pos);
......
......@@ -81,7 +81,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
//compute frequency-domain representation of 6144-sample chunk
dft6144((int16_t *)rxp,
sp);
sp,1);
/*
......
......@@ -23,9 +23,8 @@
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_CH
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "T.h"
#include "lte_estimation.h"
// round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15))
......
......@@ -41,8 +41,8 @@
#include "transport_common_proto.h"
#include "assertions.h"
#include "T.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_extern.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
......
......@@ -38,8 +38,8 @@
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "SCHED/sched_eNB.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include <syscall.h>
#include "targets/RT/USER/rt_wrapper.h"
......@@ -511,16 +511,15 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
proc->tep[i].total_worker = worker_num;
proc->tep[i].current_worker = i;
if (pthread_cond_signal(&proc->tep[i].cond_te) != 0) {
printf("[eNB] ERROR pthread_cond_signal for te thread exit\n");
exit_fun( "ERROR pthread_cond_signal" );
return (-1);
printf("[eNB] ERROR pthread_cond_signal for te thread exit\n");
exit_fun( "ERROR pthread_cond_signal" );
return (-1);
}
}
}
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
// outputs for each code segment, see Section 5.1.5 p.20
for (r=0,r_offset=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
// get information for E for the segments that are handled by the worker thread
......
......@@ -35,11 +35,11 @@
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
//#define DEBUG_DLSCH_MODULATION
#define NEW_ALLOC_RE
//#define NEW_ALLOC_RE
//#define is_not_pilot(pilots,re,nushift,use2ndpilots) ((pilots==0) || ((re!=nushift) && (re!=nushift+6)&&((re!=nushift+3)||(use2ndpilots==1))&&((re!=nushift+9)||(use2ndpilots==1)))?1:0)
......@@ -706,6 +706,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
int *P2_SHIFT)
{
uint8_t *x0 = NULL;
MIMO_mode_t mimo_mode = -1;
......@@ -2099,10 +2100,33 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
uint8_t mod_order0 = 0;
uint8_t mod_order1 = 0;
int16_t amp_rho_a, amp_rho_b;
int16_t qam16_table_a0[4],qam64_table_a0[8],qam16_table_b0[4],qam64_table_b0[8];//qpsk_table_a0[2],qpsk_table_b0[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 qam16_table_a0[4],qam64_table_a0[8],qam16_table_b0[4],qam64_table_b0[8],qpsk_table_a0[2],qpsk_table_b0[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;
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 *);
int P1_SHIFT[13],P2_SHIFT[13];
int offset,nushiftmod3;
......@@ -2201,7 +2225,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
amp_rho_b = (int16_t)(((int32_t)amp*dlsch1->sqrt_rho_b)>>13);
}
/*if(mod_order0 == 2)
if(mod_order0 == 2)
{
for(i=0;i<2;i++)
{
......@@ -2209,7 +2233,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
qpsk_table_b0[i] = (int16_t)(((int32_t)qpsk_table[i]*amp_rho_b)>>15);
}
}
else*/ if (mod_order0 == 4)
else if (mod_order0 == 4)
for (i=0;i<4; i++) {
qam16_table_a0[i] = (int16_t)(((int32_t)qam16_table[i]*amp_rho_a)>>15);
qam16_table_b0[i] = (int16_t)(((int32_t)qam16_table[i]*amp_rho_b)>>15);
......@@ -2220,14 +2244,14 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
qam64_table_b0[i] = (int16_t)(((int32_t)qam64_table[i]*amp_rho_b)>>15);
}
/*if (mod_order1 == 2)
if (mod_order1 == 2)
{
for (i=0; i<2; i++) {
qpsk_table_a1[i] = (int16_t)(((int32_t)qpsk_table[i]*amp_rho_a)>>15);
qpsk_table_b1[i] = (int16_t)(((int32_t)qpsk_table[i]*amp_rho_b)>>15);
}
}
else*/ if (mod_order1 == 4)
else if (mod_order1 == 4)
for (i=0; i<4; i++) {
qam16_table_a1[i] = (int16_t)(((int32_t)qam16_table[i]*amp_rho_a)>>15);
qam16_table_b1[i] = (int16_t)(((int32_t)qam16_table[i]*amp_rho_b)>>15);
......@@ -2348,24 +2372,36 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
re_offset = frame_parms->first_carrier_offset;
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe_offset*nsymb));
allocate_REs = allocate_REs_in_RB;
switch (mod_order0) {
case 2:
qam_table_s0 = NULL;
/*if (pilots) {
if (pilots) {
qam_table_s0 = qpsk_table_b0;
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_QPSK_siso :
allocate_REs_in_RB;
}
else {
qam_table_s0 = qpsk_table_a0;
}*/
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_QPSK_siso :
allocate_REs_in_RB;
}
break;
case 4:
if (pilots) {
qam_table_s0 = qam16_table_b0;
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_16QAM_siso :
allocate_REs_in_RB;
}
else {
qam_table_s0 = qam16_table_a0;
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_16QAM_siso :
allocate_REs_in_RB;
}
break;
......@@ -2373,23 +2409,41 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
case 6:
if (pilots) {
qam_table_s0 = qam64_table_b0;
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_pilots_64QAM_siso :
allocate_REs_in_RB;
}
else {
qam_table_s0 = qam64_table_a0;
allocate_REs = (dlsch0->harq_processes[harq_pid]->mimo_mode == SISO) ?
allocate_REs_in_RB_no_pilots_64QAM_siso :
allocate_REs_in_RB;
}
/* TODO: this is a quick hack to be removed. There is a problem
* with above code that needs to be analyzed and fixed. In the
* meantime, let's use the generic function.
*/
allocate_REs = allocate_REs_in_RB;
break;
}
/* TODO: hack, to be removed. The power is too different from
* previous version. Some more work/validation is needed before
* we switch to the new version.
*/
allocate_REs = allocate_REs_in_RB;
switch (mod_order1) {
case 2:
qam_table_s1 = NULL;
/*if (pilots) {
allocate_REs = allocate_REs_in_RB;
if (pilots) {
qam_table_s1 = qpsk_table_b1;
}
else {
qam_table_s1 = qpsk_table_a1;
}*/
}
break;
case 4:
if (pilots) {
......@@ -2465,7 +2519,7 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
rb);
allocate_REs_in_RB(phy_vars_eNB,
allocate_REs(phy_vars_eNB,
txdataF,
&jj,
&jj2,
......
......@@ -39,7 +39,7 @@
#include "PHY/CODING/lte_interleaver_inline.h"
#include "transport_eNB.h"
#include "PHY/phy_extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag,
......
......@@ -40,8 +40,7 @@
#include "transport_proto.h"
#include "transport_common_proto.h"
#include "assertions.h"
#include "T.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_DCI_ENCODING 1
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -37,7 +37,7 @@
//#include "targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_DL_MOBIPASS
//#define DEBUG_UL_MOBIPASS
#define SUBFRAME_SKIP_NUM_MOBIPASS 8
......
......@@ -712,12 +712,10 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
LTE_DL_FRAME_PARMS *frame_parms=&eNB->frame_parms;
int32_t **txdataF = eNB->common_vars.txdataF;
uint8_t harq_pid;
uint8_t Ngroup_PHICH,ngroup_PHICH,nseq_PHICH;
uint8_t NSF_PHICH = 4;
uint8_t pusch_subframe;
uint8_t i;
uint32_t pusch_frame;
int subframe = proc->subframe_tx;
phich_config_t *phich;
......@@ -732,9 +730,7 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
NSF_PHICH = 2;
if (eNB->phich_vars[subframe&1].num_hi > 0) {
pusch_frame = phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe);
pusch_subframe = phich_subframe2_pusch_subframe(frame_parms,subframe);
harq_pid = subframe2harq_pid(frame_parms,pusch_frame,pusch_subframe);
}
for (i=0; i<eNB->phich_vars[subframe&1].num_hi; i++) {
......@@ -753,13 +749,15 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
nseq_PHICH = ((phich->first_rb/Ngroup_PHICH) +
phich->n_DMRS)%(2*NSF_PHICH);
LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d Generating PHICH, AMP %d ngroup_PHICH %d/%d, nseq_PHICH %d : HI %d, first_rb %d)\n",
eNB->Mod_id,harq_pid,proc->frame_tx,
eNB->Mod_id,subframe2harq_pid(frame_parms,
phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe),pusch_subframe),proc->frame_tx,
subframe,amp,ngroup_PHICH,Ngroup_PHICH,nseq_PHICH,
phich->hi,
phich->first_rb);
T(T_ENB_PHY_PHICH, T_INT(eNB->Mod_id), T_INT(proc->frame_tx), T_INT(subframe),
T_INT(-1 /* TODO: rnti */), T_INT(harq_pid),
T_INT(-1 /* TODO: rnti */),
T_INT(subframe2harq_pid(frame_parms,phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe),pusch_subframe)),
T_INT(Ngroup_PHICH), T_INT(NSF_PHICH),
T_INT(ngroup_PHICH), T_INT(nseq_PHICH),
T_INT(phich->hi),
......
This diff is collapsed.
......@@ -33,7 +33,7 @@
#include "PHY/defs_common.h"
#include "PHY/phy_extern.h"
#include "PHY/phy_extern_ue.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
......
......@@ -34,10 +34,9 @@
#include "LAYER2/MAC/mac.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h"
//uint8_t ncs_cell[20][7];
//#define DEBUG_PUCCH_TXS
......
......@@ -33,11 +33,10 @@
#include "PHY/phy_extern.h"
#include "LAYER2/MAC/mac.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "T.h"
void init_ncs_cell(LTE_DL_FRAME_PARMS *frame_parms,uint8_t ncs_cell[20][7])
{
......
......@@ -33,7 +33,7 @@
#include "PHY/phy_extern.h"
#include "SCHED/sched_eNB.h"
#include "LAYER2/MAC/mac.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "assertions.h"
......
......@@ -40,7 +40,7 @@
#include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/phy_interface.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_ULSCH_DECODING
#include "targets/RT/USER/rt_wrapper.h"
#include "transport_proto.h"
......
......@@ -1350,70 +1350,70 @@ void rx_ulsch_emul(PHY_VARS_eNB *eNB,
eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
sprintf(fname,"/tmp/ulsch_r%d_d",round);
sprintf(vname,"/tmp/ulsch_r%d_dseq",round);
LOG_M(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96],
LOG_UM(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96],
eNB->ulsch[UE_id]->harq_processes[harq_pid]->Kplus*3,1,0);
if (eNB->common_vars.rxdata) {
sprintf(fname,"/tmp/rxsig0_r%d.m",round);
sprintf(vname,"rxs0_r%d",round);
LOG_M(fname,vname, &eNB->common_vars.rxdata[0][0],eNB->frame_parms.samples_per_tti*10,1,1);
LOG_UM(fname,vname, &eNB->common_vars.rxdata[0][0],eNB->frame_parms.samples_per_tti*10,1,1);
if (eNB->frame_parms.nb_antennas_rx>1)
if (eNB->common_vars.rxdata) {
sprintf(fname,"/tmp/rxsig1_r%d.m",round);
sprintf(vname,"rxs1_r%d",round);
LOG_M(fname,vname, &eNB->common_vars.rxdata[1][0],eNB->frame_parms.samples_per_tti*10,1,1);
LOG_UM(fname,vname, &eNB->common_vars.rxdata[1][0],eNB->frame_parms.samples_per_tti*10,1,1);
}
}
sprintf(fname,"/tmp/rxsigF0_r%d.m",round);
sprintf(vname,"rxsF0_r%d",round);
LOG_M(fname,vname, (void*)&eNB->common_vars.rxdataF[0][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1);
LOG_UM(fname,vname, (void*)&eNB->common_vars.rxdataF[0][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1);
if (eNB->frame_parms.nb_antennas_rx>1) {
sprintf(fname,"/tmp/rxsigF1_r%d.m",round);
sprintf(vname,"rxsF1_r%d",round);
LOG_M(vname,fname, &eNB->common_vars.rxdataF[1][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1);
LOG_UM(vname,fname, &eNB->common_vars.rxdataF[1][0],eNB->frame_parms.ofdm_symbol_size*nsymb,1,1);
}
sprintf(fname,"/tmp/rxsigF0_ext_r%d.m",round);
sprintf(vname,"rxsF0_ext_r%d",round);
LOG_M(fname,vname, &eNB->pusch_vars[UE_id]->rxdataF_ext[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
LOG_UM(fname,vname, &eNB->pusch_vars[UE_id]->rxdataF_ext[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
if (eNB->frame_parms.nb_antennas_rx>1) {
sprintf(fname,"/tmp/rxsigF1_ext_r%d.m",round);
sprintf(vname,"rxsF1_ext_r%d",round);
LOG_M(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_ext[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_ext[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
}
/*
if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_M("/tmp/srs_est0.m","srsest0",eNB->srs_vars[UE_id].srs_ch_estimates[0],eNB->frame_parms.ofdm_symbol_size,1,1);
if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_UM("/tmp/srs_est0.m","srsest0",eNB->srs_vars[UE_id].srs_ch_estimates[0],eNB->frame_parms.ofdm_symbol_size,1,1);
if (eNB->frame_parms.nb_antennas_rx>1)
if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_M("/tmp/srs_est1.m","srsest1",eNB->srs_vars[UE_id].srs_ch_estimates[1],eNB->frame_parms.ofdm_symbol_size,1,1);
if (eNB->srs_vars[UE_id].srs_ch_estimates) LOG_UM("/tmp/srs_est1.m","srsest1",eNB->srs_vars[UE_id].srs_ch_estimates[1],eNB->frame_parms.ofdm_symbol_size,1,1);
*/
sprintf(fname,"/tmp/drs_est0_r%d.m",round);
sprintf(vname,"drsest0_r%d",round);
LOG_M(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
if (eNB->frame_parms.nb_antennas_rx>1) {
sprintf(fname,"/tmp/drs_est1_r%d.m",round);
sprintf(vname,"drsest1_r%d",round);
LOG_M(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[1],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->drs_ch_estimates[1],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
}
sprintf(fname,"/tmp/ulsch0_rxF_comp0_r%d.m",round);
sprintf(vname,"ulsch0_rxF_comp0_r%d",round);
LOG_M(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
// LOG_M("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&eNB->pusch_vars[UE_id]->rxdataF_comp[0][1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
sprintf(fname,"/tmp/ulsch_rxF_llr_r%d.m",round);
sprintf(vname,"ulsch_llr_r%d",round);
LOG_M(fname,vname,eNB->pusch_vars[UE_id]->llr,
LOG_UM(fname,vname,eNB->pusch_vars[UE_id]->llr,
eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm
*eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch,1,0);
sprintf(fname,"/tmp/ulsch_ch_mag_r%d.m",round);
sprintf(vname,"ulsch_ch_mag_r%d",round);
LOG_M(fname,vname,&eNB->pusch_vars[UE_id]->ul_ch_mag[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
// LOG_M("ulsch_ch_mag1.m","ulsch_ch_mag1",&eNB->pusch_vars[UE_id]->ul_ch_mag[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->ul_ch_mag[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
// LOG_UM("ulsch_ch_mag1.m","ulsch_ch_mag1",&eNB->pusch_vars[UE_id]->ul_ch_mag[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
//#endif
}
......@@ -3128,7 +3128,7 @@ void fill_CQI(LTE_UE_ULSCH_t *ulsch,PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_
// this is the cba mcs uci for cba transmission
((HLC_subband_cqi_mcs_CBA_5MHz *)o)->mcs = ulsch->harq_processes[harq_pid]->mcs;
((HLC_subband_cqi_mcs_CBA_5MHz *)o)->crnti = rnti;
LOG_N(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs);
LOG_I(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs);
break;
case ue_selected:
......@@ -3182,7 +3182,7 @@ void fill_CQI(LTE_UE_ULSCH_t *ulsch,PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_
// this is the cba mcs uci for cba transmission
((HLC_subband_cqi_mcs_CBA_10MHz *)o)->mcs = ulsch->harq_processes[harq_pid]->mcs;
((HLC_subband_cqi_mcs_CBA_10MHz *)o)->crnti = rnti;
LOG_N(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs);
LOG_I(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs);
break;
case ue_selected:
......@@ -3236,7 +3236,7 @@ void fill_CQI(LTE_UE_ULSCH_t *ulsch,PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_
// this is the cba mcs uci for cba transmission
((HLC_subband_cqi_mcs_CBA_20MHz *)o)->mcs = ulsch->harq_processes[harq_pid]->mcs;
((HLC_subband_cqi_mcs_CBA_20MHz *)o)->crnti = rnti;
LOG_N(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs);
LOG_I(PHY,"fill uci for cba rnti %x, mcs %d \n", rnti, ulsch->harq_processes[harq_pid]->mcs);
break;
case ue_selected:
......
......@@ -43,9 +43,8 @@
#include "SCHED/sched_common.h"
#include "assertions.h"
#include "T.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_DCI_ENCODING 1
//#define DEBUG_DCI_DECODING 1
......
......@@ -35,7 +35,7 @@
#include "PHY/CODING/coding_extern.h"
#include "SCHED/sched_common_extern.h"
#include "SIMULATION/TOOLS/sim.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
//#define DEBUG_DLSCH_DECODING
#define UE_DEBUG_TRACE 1
......
......@@ -43,34 +43,32 @@
void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,int subframe)
{
unsigned int nsymb_pmch=12;
char fname[32],vname[32];
int N_RB_DL=ue->frame_parms.N_RB_DL;
#define NSYMB_PMCH 12
sprintf(fname,"mch_rxF_ext0.m");
sprintf(vname,"pmch_rxF_ext0");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->rxdataF_ext[0],12*(ue->frame_parms.N_RB_DL)*12,1,1);
sprintf(fname,"mch_ch_ext00.m");
sprintf(vname,"pmch_ch_ext00");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_estimates_ext[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
/*
LOG_M("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M("dlsch%d_rho.m","dl_rho",pdsch_vars[eNB_id]->rho[0],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*NSYMB_PMCH,1,1);
LOG_M("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*NSYMB_PMCH,1,1);
LOG_M("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*NSYMB_PMCH,1,1);
LOG_M("dlsch%d_rho.m","dl_rho",pdsch_vars[eNB_id]->rho[0],12*N_RB_DL*NSYMB_PMCH,1,1);
*/
sprintf(fname,"mch_rxF_comp0.m");
sprintf(vname,"pmch_rxF_comp0");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->rxdataF_comp0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
sprintf(fname,"mch_rxF_llr.m");
sprintf(vname,"pmch_llr");
LOG_M(fname,vname, ue->pdsch_vars_MCH[eNB_id]->llr[0],coded_bits_per_codeword,1,0);
sprintf(fname,"mch_mag1.m");
sprintf(vname,"pmch_mag1");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_mag0[0],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_mag0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
sprintf(fname,"mch_mag2.m");
sprintf(vname,"pmch_mag2");
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_magb0[0],12*N_RB_DL*nsymb_pmch,1,1);
LOG_M(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_magb0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
LOG_M("mch00_ch0.m","pmch00_ch0",
&(ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
......
......@@ -37,7 +37,7 @@
#include "SCHED_UE/sched_UE.h"
#include "SCHED/sched_common_extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "../LTE_TRANSPORT/prach_extern.h"
......@@ -376,7 +376,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
memmove( prach, prach+1024, Ncp<<2 );
prach_len = 512+Ncp;
} else {
idft3072(prachF,prach2);
idft3072(prachF,prach2,1);
memmove( prach, prach+6144, Ncp<<2 );
prach_len = 3072+Ncp;
......@@ -395,7 +395,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
memmove( prach, prach+2048, Ncp<<2 );
prach_len = 1024+Ncp;
} else {
idft6144(prachF,prach2);
idft6144(prachF,prach2,1);
/*for (i=0;i<6144*2;i++)
prach2[i]<<=1;*/
memmove( prach, prach+12288, Ncp<<2 );
......@@ -415,7 +415,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
memmove( prach, prach+4096, Ncp<<2 );
prach_len = 2048+Ncp;
} else {
idft12288(prachF,prach2);
idft12288(prachF,prach2,1);
memmove( prach, prach+24576, Ncp<<2 );
prach_len = 12288+Ncp;
......@@ -429,12 +429,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
case 75:
if (prach_fmt == 4) {
idft3072(prachF,prach2);
idft3072(prachF,prach2,1);
//TODO: account for repeated format in dft output
memmove( prach, prach+6144, Ncp<<2 );
prach_len = 3072+Ncp;
} else {
idft18432(prachF,prach2);
idft18432(prachF,prach2,1);
memmove( prach, prach+36864, Ncp<<2 );
prach_len = 18432+Ncp;
......@@ -453,7 +453,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
memmove( prach, prach+8192, Ncp<<2 );
prach_len = 4096+Ncp;
} else {
idft24576(prachF,prach2);
idft24576(prachF,prach2,1);
memmove( prach, prach+49152, Ncp<<2 );
prach_len = 24576+Ncp;
......@@ -465,12 +465,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
}
else {
if (prach_fmt == 4) {
idft3072(prachF,prach2);
idft3072(prachF,prach2,1);
//TODO: account for repeated format in dft output
memmove( prach, prach+6144, Ncp<<2 );
prach_len = 3072+Ncp;
} else {
idft18432(prachF,prach2);
idft18432(prachF,prach2,1);
memmove( prach, prach+36864, Ncp<<2 );
prach_len = 18432+Ncp;
printf("Generated prach for 100 PRB, 3/4 sampling\n");
......
......@@ -33,8 +33,8 @@
#include "PHY/phy_extern_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h"
......
......@@ -33,7 +33,7 @@
#include "PHY/phy_extern_ue.h"
#include "SCHED_UE/sched_UE.h"
#include "LAYER2/MAC/mac.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "transport_proto_ue.h"
#include "assertions.h"
......
......@@ -31,7 +31,7 @@
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
unsigned short msrsb_6_40[8][4] = {{36,12,4,4},
{32,16,8,4},
......@@ -134,7 +134,6 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
//uint32_t subframe_offset;
uint8_t Bsrs = soundingrs_ul_config_dedicated->srs_Bandwidth;
uint8_t Csrs = frame_parms->soundingrs_ul_config_common.srs_BandwidthConfig;
uint8_t Ssrs = frame_parms->soundingrs_ul_config_common.srs_SubframeConfig;
uint8_t n_RRC = soundingrs_ul_config_dedicated->freqDomainPosition;
uint8_t kTC = soundingrs_ul_config_dedicated->transmissionComb;
......@@ -144,7 +143,9 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
uint32_t v=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
LOG_D(PHY,"SRS root sequence: u %d, v %d\n",u,v);
LOG_D(PHY,"CommonSrsConfig: Csrs %d, Ssrs %d, AnSrsSimultan %d \n",Csrs,Ssrs,frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission);
LOG_D(PHY,"CommonSrsConfig: Csrs %d, Ssrs %d, AnSrsSimultan %d \n",Csrs,
frame_parms->soundingrs_ul_config_common.srs_SubframeConfig,
frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission);
LOG_D(PHY,"DedicatedSrsConfig: Bsrs %d, bhop %d, nRRC %d, Isrs %d, kTC %d, n_SRS %d\n",Bsrs,soundingrs_ul_config_dedicated->srs_HoppingBandwidth,n_RRC
,soundingrs_ul_config_dedicated->srs_ConfigIndex,kTC
,soundingrs_ul_config_dedicated->cyclicShift);
......
......@@ -37,7 +37,7 @@
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_UE_TRANSPORT/transport_ue.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_ULSCH_CODING
//#define DEBUG_ULSCH_FREE 1
......
......@@ -36,7 +36,7 @@
#include "PHY/LTE_UE_TRANSPORT/transport_ue.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
......
......@@ -37,7 +37,7 @@
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "modulation_eNB.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
int beam_precoding(int32_t **txdataF,
int32_t **txdataF_BF,
......
......@@ -31,8 +31,8 @@ This section deals with basic functions for OFDM Modulation.
#include "PHY/defs_eNB.h"
#include "PHY/impl_defs_top.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "modulation_common.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
//#define DEBUG_OFDM_MOD
......
lte_dfts_sse4: lte_dfts.c
gcc -O2 -msse4.1 -g -ggdb -o lte_dfts_sse4 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
gcc -O2 -std=gnu99 -msse4.1 -g -ggdb -o lte_dfts_sse4 lte_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
lte_dfts_avx2: lte_dfts.c
gcc -O2 -mavx2 -g -ggdb -o lte_dfts_avx2 lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
gcc -O2 -std=gnu99 -mavx2 -g -ggdb -o lte_dfts_avx2 lte_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
lte_dfts_avx2.s: lte_dfts.c
gcc -O2 -mavx2 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
gcc -O2 -std=gnu99 -mavx2 -S lte_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm -lpthread # -DD256STATS #-DD64STATS
lte_dfts_sse4.s: lte_dfts.c
gcc -O2 -msse4.1 -S lte_dfts.c time_meas.c file_output.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR/COMMON -DMR_MAIN -DNB_ANTENNAS_RX=1 # -DD256STATS #-DD64STATS
gcc -O2 -std=gnu99 -msse4.1 -S lte_dfts.c time_meas.c ../../SIMULATION/TOOLS/taus.c -I$$OPENAIR_HOME -I$$OPENAIR1_DIR -I$$OPENAIR_TARGETS -I$$OPENAIR2_DIR -I$$OPENAIR2_DIR/COMMON -I$$OPENAIR_HOME/common/utils -DMR_MAIN -DNB_ANTENNAS_RX=1 -lm # -DD256STATS #-DD64STATS
dft_cycles_avx2: lte_dfts_avx2
./lte_dfts_avx2 | egrep cycles
This diff is collapsed.
......@@ -174,27 +174,27 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
void idft1536(int16_t *sigF,int16_t *sig,int scale);
void idft6144(int16_t *sigF,int16_t *sig);
void idft6144(int16_t *sigF,int16_t *sig,int scale);
void idft12288(int16_t *sigF,int16_t *sig);
void idft12288(int16_t *sigF,int16_t *sig,int scale);
void idft18432(int16_t *sigF,int16_t *sig);
void idft18432(int16_t *sigF,int16_t *sig,int scale);
void idft3072(int16_t *sigF,int16_t *sig);
void idft3072(int16_t *sigF,int16_t *sig,int scale);
void idft24576(int16_t *sigF,int16_t *sig);
void idft24576(int16_t *sigF,int16_t *sig,int scale);
void dft1536(int16_t *sigF,int16_t *sig,int scale);
void dft6144(int16_t *sigF,int16_t *sig);
void dft6144(int16_t *sigF,int16_t *sig,int scale);
void dft12288(int16_t *sigF,int16_t *sig);
void dft12288(int16_t *sigF,int16_t *sig,int scale);
void dft18432(int16_t *sigF,int16_t *sig);
void dft18432(int16_t *sigF,int16_t *sig,int scale);
void dft3072(int16_t *sigF,int16_t *sig);
void dft3072(int16_t *sigF,int16_t *sig,int scale);
void dft24576(int16_t *sigF,int16_t *sig);
void dft24576(int16_t *sigF,int16_t *sig,int scale);
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -930,7 +930,7 @@ typedef enum {
void exit_fun(const char* s);
#include "UTIL/LOG/log_extern.h"
#include "common/utils/LOG/log_extern.h"
extern pthread_cond_t sync_cond;
extern pthread_mutex_t sync_mutex;
extern int sync_var;
......
......@@ -194,11 +194,11 @@ typedef struct RU_proc_t_s {
pthread_cond_t cond_synch;
/// condition variable for asynch RX/TX thread
pthread_cond_t cond_asynch_rxtx;
/// condition varible for RU RX FEP thread
/// condition variable for RU RX FEP thread
pthread_cond_t cond_fep;
/// condition varible for RU TX FEP thread
/// condition variable for RU TX FEP thread
pthread_cond_t cond_feptx;
/// condition varible for emulated RF
/// condition variable for emulated RF
pthread_cond_t cond_emulateRF;
/// condition variable for eNB signal
pthread_cond_t cond_eNBs;
......@@ -260,6 +260,7 @@ typedef struct RU_proc_t_s {
/// pipeline ready state
int ru_rx_ready;
int ru_tx_ready;
int emulate_rf_busy;
} RU_proc_t;
typedef enum {
......
......@@ -668,7 +668,6 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
AssertFatal(RC.eNB[Mod_id][CC_id]!=NULL,"RC.eNB[%d][%d] is null\n",Mod_id,CC_id);
eNB = RC.eNB[Mod_id][CC_id];
fp = &eNB->frame_parms;
proc = &eNB->proc.proc_rxtx[0];
......
......@@ -37,10 +37,8 @@
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "nfapi_interface.h"
#include "fapi_l1.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "T.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include "msc.h"
......@@ -324,7 +322,6 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
int frame=proc->frame_tx;
int subframe=proc->subframe_tx;
LTE_DL_eNB_HARQ_t *dlsch_harq=dlsch->harq_processes[harq_pid];
int input_buffer_length = dlsch_harq->TBS/8;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
if (dlsch->rnti == 0x02) {//frame < 200) {
......@@ -332,7 +329,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
LOG_D(PHY,
"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
eNB->Mod_id, dlsch->rnti,harq_pid,
frame, subframe, input_buffer_length, dlsch_harq->pdsch_start,
frame, subframe, dlsch_harq->TBS/8, dlsch_harq->pdsch_start,
get_G(fp,
dlsch_harq->nb_rb,
dlsch_harq->rb_alloc,
......@@ -356,7 +353,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
NULL,0,
"%05u:%02u PDSCH/DLSCH input size = %"PRIu16", G %d, nb_rb %"PRIu16", TBS %"PRIu16", pmi_alloc %"PRIx16", rv %"PRIu8" (round %"PRIu8")",
frame, subframe,
input_buffer_length,
dlsch_harq->TBS/8,
get_G(fp,
dlsch_harq->nb_rb,
dlsch_harq->rb_alloc,
......@@ -415,7 +412,6 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
&eNB->dlsch_turbo_encoding_wakeup_stats1,
&eNB->dlsch_interleaving_stats);
stop_meas(&eNB->dlsch_encoding_stats);
//////////////////////////////////////////////////*******************************************
if(eNB->dlsch_encoding_stats.diff_now>500*3000 && opp_enabled == 1)
{
print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr);
......@@ -482,12 +478,11 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
LTE_UL_eNB_HARQ_t *ulsch_harq;
int offset = eNB->CC_id;//proc == &eNB->proc.proc_rxtx[0] ? 0 : 1;
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)==SF_UL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),1);
if (do_meas==1) start_meas(&eNB->phy_proc_tx);
// clear the transmit data array for the current subframe
......@@ -649,7 +644,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
AMP);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PHICH,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),0);
if (do_meas==1) stop_meas(&eNB->phy_proc_tx);
}
......@@ -1505,7 +1500,7 @@ void init_te_thread(PHY_VARS_eNB *eNB) {
pthread_cond_init( &proc->tep[i].cond_te, NULL);
pthread_attr_init( &proc->tep[i].attr_te);
printf("Creating te_thread 0\n");
LOG_I(PHY,"Creating te_thread %d\n",i);
pthread_create(&proc->tep[i].pthread_te, &proc->tep[i].attr_te, te_thread, (void*)&proc->tep[i]);
}
}
......
......@@ -36,10 +36,9 @@
#include "nfapi_interface.h"
#include "fapi_l1.h"
#include "nfapi_pnf.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h"
#include "assertions.h"
#include "msc.h"
......@@ -125,14 +124,11 @@ void prach_procedures(PHY_VARS_eNB *eNB
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (br_flag==1) {
int prach_mask;
prach_mask = is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br);
eNB->UL_INFO.rach_ind_br.rach_indication_body.preamble_list = eNB->preamble_list_br;
int ind=0;
int ce_level=0;
/* Save for later, it doesn't work
/* Save for later, it doesn't work
int prach_mask = is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br);
for (int ind=0,ce_level=0;ce_level<4;ce_level++) {
if ((eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[ce_level]==1)&&
......@@ -154,7 +150,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
LOG_D(PHY,"Filling NFAPI indication for RACH %d CELevel %d (mask %x) : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
ind,
ce_level,
prach_mask,
is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br),
eNB->preamble_list_br[ind].preamble_rel8.timing_advance,
eNB->preamble_list_br[ind].preamble_rel8.preamble,
eNB->preamble_list_br[ind].preamble_rel8.rnti,
......
......@@ -39,10 +39,9 @@
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "LAYER2/MAC/mac.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h"
#include "assertions.h"
#include "msc.h"
......@@ -151,6 +150,7 @@ static void *feptx_thread(void *param) {
while (!oai_exit) {
if (wait_on_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread")<0) break;
if (oai_exit) break;
//stop_meas(&ru->ofdm_mod_wakeup_stats);
feptx0(ru,1);
if (release_thread(&proc->mutex_feptx,&proc->instance_cnt_feptx,"feptx thread")<0) break;
......@@ -248,7 +248,6 @@ void feptx_ofdm(RU_t *ru) {
// int CC_id = ru->proc.CC_id;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 );
slot_offset_F = 0;
slot_offset = subframe*fp->samples_per_tti;
......@@ -456,6 +455,7 @@ static void *fep_thread(void *param) {
while (!oai_exit) {
if (wait_on_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread")<0) break;
if (oai_exit) break;
//stop_meas(&ru->ofdm_demod_wakeup_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1, 1 );
fep0(ru,0);
......@@ -505,6 +505,33 @@ void init_fep_thread(RU_t *ru,pthread_attr_t *attr_fep) {
}
extern void kill_fep_thread(RU_t *ru)
{
RU_proc_t *proc = &ru->proc;
pthread_mutex_lock( &proc->mutex_fep );
proc->instance_cnt_fep = 0;
pthread_cond_signal(&proc->cond_fep);
pthread_mutex_unlock( &proc->mutex_fep );
LOG_D(PHY, "Joining pthread_fep\n");
pthread_join(proc->pthread_fep, NULL);
pthread_mutex_destroy( &proc->mutex_fep );
pthread_cond_destroy( &proc->cond_fep );
}
extern void kill_feptx_thread(RU_t *ru)
{
RU_proc_t *proc = &ru->proc;
pthread_mutex_lock( &proc->mutex_feptx );
proc->instance_cnt_feptx = 0;
pthread_cond_signal(&proc->cond_feptx);
pthread_mutex_unlock( &proc->mutex_feptx );
LOG_D(PHY, "Joining pthread_feptx\n");
pthread_join(proc->pthread_feptx, NULL);
pthread_mutex_destroy( &proc->mutex_feptx );
pthread_cond_destroy( &proc->cond_feptx );
}
void ru_fep_full_2thread(RU_t *ru) {
RU_proc_t *proc = &ru->proc;
......
This diff is collapsed.
......@@ -54,7 +54,7 @@
#include "socket.h"
#include "multicast_link.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
extern unsigned short Master_id;
......
......@@ -47,7 +47,7 @@
#include "LAYER2/MAC/mac_vars.h"
#include "OCG_vars.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "UTIL/LISTS/list.h"
#include "unitary_defs.h"
......@@ -67,6 +67,7 @@
#include "common/config/config_load_configmodule.h"
#include "PHY/INIT/phy_init.h"
void feptx_ofdm(RU_t *ru);
void feptx_prec(RU_t *ru);
......@@ -83,6 +84,8 @@ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
int codingw = 0;
int emulate_rf = 0;
void handler(int sig)
{
void *array[10];
......@@ -647,7 +650,6 @@ int main(int argc, char **argv)
int two_thread_flag=0;
int DLSCH_RB_ALLOC = 0;
int log_level = LOG_ERR;
int dci_received;
PHY_VARS_eNB *eNB;
RU_t *ru;
......@@ -999,7 +1001,7 @@ int main(int argc, char **argv)
break;
case 'L':
log_level=atoi(optarg);
set_glog(atoi(optarg));
break;
case 'h':
......@@ -1047,8 +1049,7 @@ int main(int argc, char **argv)
"cannot load configuration module, exiting\n");
logInit();
// enable these lines if you need debug info
set_comp_log(PHY,LOG_INFO,LOG_HIGH,1);
set_glog(log_level,LOG_HIGH);
set_glog(LOG_DEBUG);
// moreover you need to init itti with the following line
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
......
......@@ -1143,6 +1143,10 @@ int main(int argc, char **argv)
if (mcs < 11) modulation_type = 2;
else if (mcs < 21) modulation_type = 4;
else if (mcs < 29) modulation_type = 6;
else {
LOG_E(SIM,"mcs %i is not valid\n",mcs);
exit(-1);
}
fill_ulsch_dci(eNB,proc_rxtx->frame_rx,subframe,&sched_resp,14,(void*)&UL_alloc_pdu,first_rb,nb_rb,(round==0)?mcs:(28+rvidx[round]),modulation_type,ndi,get_TBS_UL(mcs,nb_rb),cqi_flag,beta_CQI,beta_RI,cqi_size);
......@@ -1488,23 +1492,23 @@ int main(int argc, char **argv)
if (dump_table == 1 ) {
int n;
set_component_filelog(USIM); // file located in /tmp/usim.txt
LOG_F(USIM,"The transmitter raw data: \n");
set_component_filelog(SIM); // file located in /tmp/usim.txt
LOG_F(SIM,"The transmitter raw data: \n");
for (n=0; n< time_vector_tx.size; n++) {
// printf("%f ", table_tx[n]);
LOG_F(USIM,"%f ", table_tx[n]);
LOG_F(SIM,"%f ", table_tx[n]);
}
LOG_F(USIM,"\n");
LOG_F(USIM,"The receiver raw data: \n");
LOG_F(SIM,"\n");
LOG_F(SIM,"The receiver raw data: \n");
for (n=0; n< time_vector_rx.size; n++) {
// printf("%f ", table_rx[n]);
LOG_F(USIM,"%f ", table_rx[n]);
LOG_F(SIM,"%f ", table_rx[n]);
}
LOG_F(USIM,"\n");
LOG_F(SIM,"\n");
}
double tx_median = table_tx[time_vector_tx.size/2];
......
......@@ -35,8 +35,7 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log_if.h"
#include "UTIL/LOG/log_extern.h"
#include "common/utils/LOG/log.h"
#include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/phy_interface_extern.h"
#include "UTIL/OCG/OCG.h"
......@@ -45,10 +44,6 @@
#include "UTIL/FIFO/types.h"
#define RF
//#define DEBUG_SIM
//#undef LOG_D
//#define LOG_D(A,B,C...) printf(B,C)
......
......@@ -29,7 +29,7 @@
#include "PHY/TOOLS/tools_defs.h"
#include "sim.h"
#include "scm_corrmat.h"
#include "UTIL/LOG/log.h"
#include "common/utils/LOG/log.h"
//#define DEBUG_CH
#include "assertions.h"
......
......@@ -49,7 +49,7 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
Protocol__FlexHeader *header = NULL;
void *data;
int priority = 0;
err_code_t err_code;
err_code_t err_code=0;
int xid = 0;
......@@ -241,7 +241,8 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
return;
error:
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
if (err_code != 0)
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d \n",err_code);
}
......
......@@ -31,8 +31,7 @@
#include <string.h>
#include <inttypes.h>
#include "log.h"
#include "log_extern.h"
#include "common/utils/LOG/log.h"
#include "assertions.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
......
......@@ -113,8 +113,6 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
{
s1ap_register_enb_req_t *s1ap_register_eNB;
/* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
......@@ -122,8 +120,7 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//,
if (enb_id == 0) RCconfig_gtpu();
s1ap_register_eNB = &S1AP_REGISTER_ENB_REQ(msg_p);
LOG_I(ENB_APP,"default drx %d\n",s1ap_register_eNB->default_drx);
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
LOG_I(ENB_APP,"[eNB %d] eNB_app_register for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
......@@ -152,7 +149,6 @@ void *eNB_app_task(void *args_p)
# endif
uint32_t enb_id;
MessageDef *msg_p = NULL;
const char *msg_name = NULL;
instance_t instance;
int result;
/* for no gcc warnings */
......@@ -200,7 +196,6 @@ void *eNB_app_task(void *args_p)
// Wait for a message
itti_receive_msg (TASK_ENB_APP, &msg_p);
msg_name = ITTI_MSG_NAME (msg_p);
instance = ITTI_MSG_INSTANCE (msg_p);
switch (ITTI_MSG_ID(msg_p)) {
......@@ -216,7 +211,7 @@ void *eNB_app_task(void *args_p)
# if defined(ENABLE_USE_MME)
case S1AP_REGISTER_ENB_CNF:
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, msg_name,
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
DevAssert(register_enb_pending > 0);
......@@ -237,10 +232,8 @@ void *eNB_app_task(void *args_p)
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
} else {
uint32_t not_associated = enb_nb - registered_enb;
LOG_W(ENB_APP, " %d eNB %s not associated with a MME, retrying registration in %d seconds ...\n",
not_associated, not_associated > 1 ? "are" : "is", ENB_REGISTER_RETRY_DELAY);
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
......@@ -258,14 +251,14 @@ void *eNB_app_task(void *args_p)
break;
case S1AP_DEREGISTERED_ENB_IND:
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, msg_name,
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
/* TODO handle recovering of registration */
break;
case TIMER_HAS_EXPIRED:
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", msg_name, TIMER_HAS_EXPIRED(msg_p).timer_id);
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
/* Restart the registration process */
......@@ -277,7 +270,7 @@ void *eNB_app_task(void *args_p)
# endif
default:
LOG_E(ENB_APP, "Received unexpected message %s\n", msg_name);
LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
break;
}
......
......@@ -30,8 +30,7 @@
#include <string.h>
#include <inttypes.h>
#include "log.h"
#include "log_extern.h"
#include "common/utils/LOG/log.h"
#include "assertions.h"
#include "enb_config.h"
#include "UTIL/OTG/otg.h"
......@@ -410,7 +409,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
int num_enbs = 0;
int num_component_carriers = 0;
int j,k = 0;
int32_t enb_id = 0;
int nb_cc = 0;
......@@ -704,17 +702,10 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
sprintf(enbpath,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k),
config_getlist( &CCsParamList,NULL,0,enbpath);
LOG_I(RRC,"num component carriers %d \n", num_component_carriers);
LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt);
if ( CCsParamList.numelt> 0) {
char ccspath[MAX_OPTNAME_SIZE*2 + 16];
//enb_properties_loc.properties[enb_properties_loc_index]->nb_cc = num_component_carriers;
for (j = 0; j < CCsParamList.numelt ;j++) {
sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j);
......
......@@ -47,11 +47,10 @@ void *flexran_agent_task(void *args){
Protocol__FlexranMessage *msg;
void *data;
int size;
err_code_t err_code;
err_code_t err_code=0;
int priority = 0;
MessageDef *msg_p = NULL;
const char *msg_name = NULL;
int result;
struct flexran_agent_timer_element_s * elem = NULL;
......@@ -61,7 +60,6 @@ void *flexran_agent_task(void *args){
// Wait for a message
itti_receive_msg (TASK_FLEXRAN_AGENT, &msg_p);
DevAssert(msg_p != NULL);
msg_name = ITTI_MSG_NAME (msg_p);
switch (ITTI_MSG_ID(msg_p)) {
case TERMINATE_MESSAGE:
......@@ -88,7 +86,7 @@ void *flexran_agent_task(void *args){
break;
default:
LOG_E(FLEXRAN_AGENT, "Received unexpected message %s\n", msg_name);
LOG_E(FLEXRAN_AGENT, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
break;
}
......@@ -96,7 +94,8 @@ void *flexran_agent_task(void *args){
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
continue;
error:
LOG_E(FLEXRAN_AGENT,"flexran_agent_task: error %d occured\n",err_code);
if (err_code != 0)
LOG_E(FLEXRAN_AGENT,"flexran_agent_task: error %d occured\n",err_code);
} while (1);
return NULL;
......@@ -108,7 +107,7 @@ void *receive_thread(void *args) {
void *data;
int size;
int priority;
err_code_t err_code;
err_code_t err_code=0;
Protocol__FlexranMessage *msg;
......@@ -140,7 +139,8 @@ void *receive_thread(void *args) {
return NULL;
error:
LOG_E(FLEXRAN_AGENT,"receive_thread: error %d occured\n",err_code);
if (err_code != 0)
LOG_E(FLEXRAN_AGENT,"receive_thread: error %d occured\n",err_code);
return NULL;
}
......@@ -299,7 +299,7 @@ Protocol__FlexranMessage *flexran_agent_timeout(void* args){
//memcpy (timer_args, args, sizeof(*timer_args));
flexran_agent_timer_args_t *timer_args = (flexran_agent_timer_args_t *) args;
LOG_I(FLEXRAN_AGENT, "flexran_agent %d timeout\n", timer_args->mod_id);
LOG_UI(FLEXRAN_AGENT, "flexran_agent %d timeout\n", timer_args->mod_id);
//LOG_I(FLEXRAN_AGENT, "eNB action %d ENB flags %d \n", timer_args->cc_actions,timer_args->cc_report_flags);
//LOG_I(FLEXRAN_AGENT, "UE action %d UE flags %d \n", timer_args->ue_actions,timer_args->ue_report_flags);
......
......@@ -29,7 +29,7 @@
#include "flexran_agent_async.h"
#include "flexran_agent_defs.h"
#include "log.h"
#include "common/utils/LOG/log.h"
flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, char *dst_ip, uint16_t dst_port) {
......
......@@ -130,16 +130,15 @@ void * flexran_agent_pack_message(Protocol__FlexranMessage *msg,
int * size){
void * buffer;
err_code_t err_code = PROTOCOL__FLEXRAN_ERR__NO_ERR;
if (flexran_agent_serialize_message(msg, &buffer, size) < 0 ) {
err_code = PROTOCOL__FLEXRAN_ERR__MSG_ENCODING;
LOG_E(FLEXRAN_AGENT,"errno %d occured\n",PROTOCOL__FLEXRAN_ERR__MSG_ENCODING);
goto error;
}
// free the msg --> later keep this in the data struct and just update the values
//TODO call proper destroy function
err_code = ((*message_destruction_callback[msg->msg_case-1])(msg));
((*message_destruction_callback[msg->msg_case-1])(msg));
DevAssert(buffer !=NULL);
......@@ -148,8 +147,6 @@ void * flexran_agent_pack_message(Protocol__FlexranMessage *msg,
return buffer;
error :
LOG_E(FLEXRAN_AGENT,"errno %d occured\n",err_code);
return NULL;
}
......
......@@ -27,7 +27,7 @@
*/
#include "flexran_agent_net_comm.h"
#include "log.h"
#include "common/utils/LOG/log.h"
flexran_agent_channel_t *agent_channel[NUM_MAX_ENB][FLEXRAN_AGENT_MAX];
flexran_agent_channel_instance_t channel_instance;
......
......@@ -45,8 +45,8 @@
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/ran_context.h"
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
......
......@@ -46,8 +46,8 @@
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/INIT/phy_init.h"
#include "common/ran_context.h"
......
......@@ -35,8 +35,8 @@
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......
......@@ -40,8 +40,8 @@
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......
......@@ -33,8 +33,8 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......
......@@ -33,8 +33,8 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......@@ -474,7 +474,7 @@ schedule_dlsch(module_id_t module_idP,
slice_sched_dl[i] = dlsym(NULL, dl_scheduler_type[i]);
update_dl_scheduler[i] = 0 ;
update_dl_scheduler_current[i] = 0;
LOG_N(MAC,"update dl scheduler slice %d\n", i);
LOG_I(MAC,"update dl scheduler slice %d\n", i);
}
if (total_slice_percentage <= 1.0){ // the new total RB share is within the range
......@@ -482,7 +482,7 @@ schedule_dlsch(module_id_t module_idP,
// check if the number of slices has changed, and log
if (n_active_slices_current != n_active_slices ){
if ((n_active_slices > 0) && (n_active_slices <= MAX_NUM_SLICES)) {
LOG_N(MAC,"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n",
LOG_I(MAC,"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d\n",
module_idP, frameP, subframeP, n_active_slices_current, n_active_slices);
n_active_slices_current = n_active_slices;
......@@ -495,7 +495,7 @@ schedule_dlsch(module_id_t module_idP,
// check if the slice rb share has changed, and log the console
if (slice_percentage_current[i] != slice_percentage[i]){ // new slice percentage
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
module_idP, i, frameP, subframeP, total_slice_percentage_current, total_slice_percentage, slice_percentage_current[i], slice_percentage[i]);
total_slice_percentage_current= total_slice_percentage;
slice_percentage_current[i] = slice_percentage[i];
......@@ -505,7 +505,7 @@ schedule_dlsch(module_id_t module_idP,
// check if the slice max MCS, and log the console
if (slice_maxmcs_current[i] != slice_maxmcs[i]){
if ((slice_maxmcs[i] >= 0) && (slice_maxmcs[i] < 29)){
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
module_idP, i, frameP, subframeP, slice_maxmcs_current[i], slice_maxmcs[i]);
slice_maxmcs_current[i] = slice_maxmcs[i];
} else {
......@@ -516,7 +516,7 @@ schedule_dlsch(module_id_t module_idP,
// check if a new scheduler, and log the console
if (update_dl_scheduler_current[i] != update_dl_scheduler[i]){
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n",
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s \n",
module_idP, i, frameP, subframeP, dl_scheduler_type[i]);
update_dl_scheduler_current[i] = update_dl_scheduler[i];
}
......@@ -542,7 +542,7 @@ schedule_dlsch(module_id_t module_idP,
// Check for new sorting policy
if (sorting_policy_current[i] != sorting_policy[i]) {
LOG_N(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n",
LOG_I(MAC,"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n",
module_idP, i, frameP, subframeP, sorting_policy_current[i], sorting_policy[i]);
sorting_policy_current[i] = sorting_policy[i];
}
......@@ -1780,7 +1780,7 @@ set_ue_dai(sub_frame_t subframeP,
default:
UE_list->UE_template[CC_id][UE_id].DAI = 0;
LOG_N(MAC, "unknow TDD config %d\n", tdd_config);
LOG_I(MAC, "unknow TDD config %d\n", tdd_config);
break;
}
}
......
......@@ -39,8 +39,8 @@
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/eNB_scheduler_fairRR.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......@@ -2264,7 +2264,6 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
uint32_t tbs;
int16_t tx_power;
int UE_id;
rnti_t rnti;
COMMON_channels_t *cc;
LOG_D(MAC,"In ulsch_preprocessor: ulsch ue select\n");
//ue select
......@@ -2308,11 +2307,10 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
continue;
}
rnti = UE_RNTI(CC_id,UE_id);
if (first_rb[CC_id] >= frame_parms->N_RB_UL-num_pucch_rb ) {
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id);
module_idP,frameP,subframeP,UE_id,UE_RNTI(CC_id,UE_id),CC_id);
break;
}
total_rbs = frame_parms->N_RB_UL-num_pucch_rb-first_rb[CC_id];
......@@ -2390,7 +2388,7 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
rb_table_index = find_rb_table_index(average_rbs);
if (rb_table_index>=34){
LOG_W(MAC,"[eNB %d] frame %d subframe %d, UE %d/%x CC %d: average RBs %d > 100\n",
module_idP,frameP,subframeP,UE_id,rnti,CC_id,average_rbs);
module_idP,frameP,subframeP,UE_id,UE_RNTI(CC_id,UE_id),CC_id,average_rbs);
break;
}
first_rb[CC_id] = first_rb[CC_id] + rb_table[rb_table_index];
......
......@@ -33,8 +33,8 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......
......@@ -39,8 +39,8 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......@@ -67,13 +67,13 @@ schedule_ue_spec_phy_test(
uint16_t TBS;
uint16_t nb_rb;
unsigned char harq_pid = subframeP%5;
unsigned char harq_pid = (frameP*10+subframeP)%8;
uint16_t rnti = 0x1235;
uint32_t rb_alloc = 0x1FFFFFFF;
uint32_t rb_alloc = 0x1FFFFF;
int32_t tpc = 1;
int32_t mcs = 28;
int32_t cqi = 15;
int32_t ndi = subframeP/5;
int32_t ndi = (frameP*10+subframeP)/8;
int32_t dai = 0;
eNB_MAC_INST *eNB = RC.mac[module_idP];
......@@ -92,10 +92,9 @@ schedule_ue_spec_phy_test(
continue;
nb_rb = conv_nprb(0,rb_alloc,N_RB_DL);
//printf("////////////////////////////////////*************************nb_rb = %d\n",nb_rb);
TBS = get_TBS_DL(mcs,nb_rb);
LOG_D(PHY,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d (rb_alloc=%x, N_RB_DL=%d)\n",frameP,subframeP,nb_rb,TBS,mcs,rb_alloc,N_RB_DL);
LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc, N_RB_DL, dl_req->number_pdu);
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
......@@ -136,6 +135,8 @@ schedule_ue_spec_phy_test(
//ue_sched_ctl->round[CC_id][harq_pid] = 0;
dl_req->number_dci++;
dl_req->number_pdu++;
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
//eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
// Toggle NDI for next time
/*
......@@ -150,7 +151,6 @@ schedule_ue_spec_phy_test(
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
*/
fill_nfapi_dlsch_config(eNB,
dl_req,
......@@ -196,32 +196,35 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
int UE_id = 0;
uint8_t aggregation = 2;
rnti_t rnti = 0x1235;
uint8_t mcs = 0;
uint8_t mcs = 20;
uint8_t harq_pid = 0;
uint32_t cqi_req = 0,cshift,ndi,tpc = 1;
int32_t normalized_rx_power;
int32_t target_rx_power= 178;
int CC_id = 0;
int nb_rb = 96;
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc = eNB->common_channels;
UE_list_t *UE_list=&eNB->UE_list;
eNB_MAC_INST *mac = RC.mac[module_idP];
COMMON_channels_t *cc = &mac->common_channels[0];
UE_list_t *UE_list=&mac->UE_list;
UE_TEMPLATE *UE_template;
UE_sched_ctrl *UE_sched_ctrl;
int sched_frame=frameP;
int sched_subframe = (subframeP+4)%10;
uint16_t ul_req_index;
uint8_t dlsch_flag;
if (sched_subframe<subframeP) sched_frame++;
nfapi_hi_dci0_request_body_t *hi_dci0_req = &eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body;
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id][subframeP];
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
//nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[0];;
nfapi_ul_config_request_body_t *ul_req = &eNB->UL_req[CC_id].ul_config_request_body;
nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body;
eNB->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
eNB->HI_DCI0_req[CC_id][subframeP].sfn_sf = (frameP<<4)+subframeP;
mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
hi_dci0_req->sfn_sf = (frameP << 4) + subframeP;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
//rnti = UE_RNTI(module_idP,UE_id);
......@@ -235,7 +238,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
LOG_D(MAC,"Scheduling for frame %d, subframe %d => harq_pid %d\n",sched_frame,sched_subframe,harq_pid);
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
......@@ -245,7 +247,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
//compute the expected ULSCH RX power (for the stats)
// this is the normalized RX power and this should be constant (regardless of mcs
normalized_rx_power = UE_sched_ctrl->pusch_snr[CC_id];
normalized_rx_power = (5*UE_sched_ctrl->pusch_snr[CC_id]-640)/10+30;
// new transmission
......@@ -281,7 +283,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
// save it for a potential retransmission
UE_template->cshift[harq_pid] = cshift;
hi_dci0_pdu = &hi_dci0_req->hi_dci0_pdu_list[eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_dci+eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_hi];
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu);
......@@ -298,18 +300,28 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe];
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
hi_dci0_req_body->number_of_dci++;
eNB->HI_DCI0_req[CC_id][subframeP].hi_dci0_request_body.number_of_dci++;
ul_req_index = 0;
dlsch_flag = 0;
for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){
if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
dlsch_flag = 1;
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
break;
}
}
// Add UL_config PDUs
fill_nfapi_ulsch_config_request_rel8(&ul_req->ul_config_pdu_list[ul_req->number_of_pdus],
fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
cqi_req,
cc,
0,//UE_template->physicalConfigDedicated,
get_tmode(module_idP,CC_id,UE_id),
eNB->ul_handle,
mac->ul_handle,//eNB->ul_handle,
rnti,
first_rb[CC_id], // resource_block_start
nb_rb, // number_of_resource_blocks
......@@ -327,7 +339,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req->number_of_pdus],
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
UE_template->rach_resource_type>2 ? 2 : 1,
1, //total_number_of_repetitions
1, //repetition_number
......@@ -335,7 +347,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
}
#endif
ul_req->number_of_pdus = 1;
eNB->ul_handle++;
mac->ul_handle++;
......
......@@ -35,8 +35,8 @@
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......@@ -3399,7 +3399,7 @@ unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe)
} else if (subframe == 8) { // ACK subframe 4
return(1); // To be updated
} else {
AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
AssertFatal(1==0,"illegal subframe %d for tdd_config %ld\n",
subframe,tdd_Config->subframeAssignment);
}
......@@ -3413,7 +3413,7 @@ unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe)
} else if (subframe == 4) { // ACK subframes 9 and 0
return(2);
} else {
AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
AssertFatal(1==0,"illegal subframe %d for tdd_config %ld\n",
subframe,tdd_Config->subframeAssignment);
}
......@@ -3425,7 +3425,7 @@ unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe)
} else if (subframe == 3) { // ACK subframes 6,7,8 and 9
return(4);
} else {
AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
AssertFatal(1==0,"illegal subframe %d for tdd_config %ld\n",
subframe,tdd_Config->subframeAssignment);
}
......@@ -3435,7 +3435,7 @@ unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe)
if (subframe == 2) { // ACK subframes 0,3,4,5,6,7,8 and 9
return(8); // should be 3
} else {
AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
AssertFatal(1==0,"illegal subframe %d for tdd_config %ld\n",
subframe,tdd_Config->subframeAssignment);
}
......@@ -3464,7 +3464,7 @@ unsigned char ul_ACK_subframe2dl_subframe(TDD_Config_t *tdd_Config,unsigned char
} else if (subframe == 4) { // ACK subframes 9 and 0
return((9+ACK_index)%10);
} else {
AssertFatal(1==0,"illegal subframe %d for tdd_config->subframeAssignment %d\n",
AssertFatal(1==0,"illegal subframe %d for tdd_config->subframeAssignment %ld\n",
subframe,tdd_Config->subframeAssignment);
}
......@@ -3481,7 +3481,7 @@ unsigned char ul_ACK_subframe2dl_subframe(TDD_Config_t *tdd_Config,unsigned char
} else if (subframe == 3) { // ACK subframes 6, 7 8 and 9
return(6+ACK_index); // To be updated
} else {
AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
AssertFatal(1==0,"illegal subframe %d for tdd_config %ld\n",
subframe,tdd_Config->subframeAssignment);
}
......@@ -3497,7 +3497,7 @@ unsigned char ul_ACK_subframe2dl_subframe(TDD_Config_t *tdd_Config,unsigned char
} else if (subframe == 8) { // ACK subframe 4
return(4); // To be updated
} else {
AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
AssertFatal(1==0,"illegal subframe %d for tdd_config %ld\n",
subframe,tdd_Config->subframeAssignment);
}
......
......@@ -36,8 +36,8 @@
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
......@@ -800,7 +800,7 @@ rx_sdu(const module_id_t enb_mod_idP,
/*
if (msg3_flagP != NULL) {
if( *msg3_flagP == 1 ) {
LOG_N(MAC,"[eNB %d] CC_id %d frame %d : false msg3 detection: signal phy to canceling RA and remove the UE\n", enb_mod_idP, CC_idP, frameP);
LOG_I(MAC,"[eNB %d] CC_id %d frame %d : false msg3 detection: signal phy to canceling RA and remove the UE\n", enb_mod_idP, CC_idP, frameP);
*msg3_flagP=0;
}
} */
......@@ -1095,7 +1095,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
//total_slice_percentage_current_uplink+=slice_percentage_uplink[i];
//if (total_slice_percentage_current_uplink> 1)
//total_slice_percentage_current_uplink=1;
LOG_N(MAC,"update ul scheduler slice %d\n", i);
LOG_I(MAC,"update ul scheduler slice %d\n", i);
}
// the new total RB share is within the range
if (total_slice_percentage_uplink <= 1.0){
......@@ -1103,7 +1103,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
// check if the number of slices has changed, and log
if (n_active_slices_current_uplink != n_active_slices_uplink ){
if ((n_active_slices_uplink > 0) && (n_active_slices_uplink <= MAX_NUM_SLICES)) {
LOG_N(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n",
LOG_I(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n",
module_idP, frameP, subframeP, n_active_slices_current_uplink, n_active_slices_uplink);
n_active_slices_current_uplink = n_active_slices_uplink;
} else {
......@@ -1115,7 +1115,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
// check if the slice rb share has changed, and log the console
if (slice_percentage_current_uplink[i] != slice_percentage_uplink[i]){
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
module_idP, i, frameP, subframeP, total_slice_percentage_current_uplink,
total_slice_percentage_uplink, slice_percentage_current_uplink[i], slice_percentage_uplink[i]);
total_slice_percentage_current_uplink = total_slice_percentage_uplink;
......@@ -1125,7 +1125,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
// check if the slice max MCS, and log the console
if (slice_maxmcs_current_uplink[i] != slice_maxmcs_uplink[i]){
if ((slice_maxmcs_uplink[i] >= 0) && (slice_maxmcs_uplink[i] <= 16)){
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d\n",
module_idP, i, frameP, subframeP, slice_maxmcs_current_uplink[i], slice_maxmcs_uplink[i]);
slice_maxmcs_current_uplink[i] = slice_maxmcs_uplink[i];
} else {
......@@ -1137,7 +1137,7 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
// check if a new scheduler, and log the console
if (update_ul_scheduler_current[i] != update_ul_scheduler[i]){
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n",
LOG_I(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n",
module_idP, i, frameP, subframeP, ul_scheduler_type[i]);
update_ul_scheduler_current[i] = update_ul_scheduler[i];
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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