Commit b7762c6a authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/bugfix-220' into develop_integration_w13

parents 9af7f280 9814de05
......@@ -33,6 +33,13 @@ ORIGIN_PATH=$PWD
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/tools/build_helper
# set environment variables (OPENAIR_HOME, ...)
set_openair_env
#variables for UE data generation
gen_nvram_path=$OPENAIR_DIR/targets/bin
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
MSC_GEN="False"
XFORMS="True"
FLEXRAN_AGENT_SB_IF="True"
......@@ -59,9 +66,6 @@ BUILD_ECLIPSE=0
CMAKE_CMD='cmake'
trap handle_ctrl_c INT
gen_nvram_path=$OPENAIR_DIR/targets/bin
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
function print_help() {
echo_info "
This program installs OpenAirInterface Software
......@@ -404,7 +408,6 @@ function main() {
echo_info "2. Setting the OAI PATHS ..."
set_openair_env
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
# for conf files copy in this bash script
......@@ -774,9 +777,9 @@ function main() {
# build RF device and transport protocol libraries
#####################################
if [ "$eNB" = "1" -o "$RRH" = "1" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" -o "$RRH" = "1" ] ; then
if [ "$eNB" = "1" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
build_dir=$lte_build_dir
else
build_dir=$rrh_build_dir
......
......@@ -493,6 +493,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int16_t **chest_f;
int16_t *pdsch_llr;
int16_t *pdsch_comp;
int16_t *pdsch_mag;
int8_t *pdcch_llr;
int16_t *pdcch_comp;
int8_t *pbch_llr;
......@@ -571,6 +572,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->llr[0]; // stream 0
// pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->rxdataF_comp0[0];
pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[subframe&0x1][eNB_id]->dl_ch_mag0[0];
// Received signal in time domain of receive antenna 0
if (rxsig_t != NULL) {
......@@ -752,8 +754,9 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
for (k=0; k<frame_parms->symbols_per_tti; k++) {
for (i=0; i<12*frame_parms->N_RB_DL/2; i++) {
I[ind] = pdsch_comp[(2*frame_parms->N_RB_DL*12*k)+4*i];
Q[ind] = pdsch_comp[(2*frame_parms->N_RB_DL*12*k)+4*i+1];
int j = (2*frame_parms->N_RB_DL*12*k)+4*i;
I[ind] = (pdsch_mag[j ]!=0? 1.0/pdsch_mag[j ]: 0.0) * pdsch_comp[j ]*1.0;
Q[ind] = (pdsch_mag[j+1]!=0? 1.0/pdsch_mag[j+1]: 0.0) * pdsch_comp[j+1]*1.0;
ind++;
}
}
......
......@@ -190,7 +190,7 @@ int mac_phy_remove_ue(module_id_t Mod_idP,rnti_t rntiP) {
eNB = PHY_vars_eNB_g[Mod_idP][CC_id];
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
if ((eNB->dlsch[i]==NULL) || (eNB->ulsch[i]==NULL)) {
MSC_LOG_EVENT(MSC_PHY_ENB, "0 Failed remove ue %"PRIx16" (ENOMEM)", rnti);
MSC_LOG_EVENT(MSC_PHY_ENB, "0 Failed remove ue %"PRIx16" (ENOMEM)", rntiP);
LOG_E(PHY,"Can't remove UE, not enough memory allocated\n");
return(-1);
} else {
......
......@@ -653,6 +653,7 @@ int main(int argc, char **argv)
printf("-h This message\n");
printf("-a Use AWGN channel and not multipath\n");
printf("-c TDD config\n");
printf("-S Subframe number (0..9)\n");
printf("-R N_RB_DL\n");
printf("-F use FDD frame\n");
printf("-p Use extended prefix mode\n");
......
......@@ -353,7 +353,7 @@ ue_send_sdu(
if (opt_enabled) {
trace_pdu(1, sdu, sdu_len, module_idP, 3, UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].rxFrame, UE_mac_inst[module_idP].rxSubframe, 0, 0);
frameP, subframeP, 0, 0);
LOG_D(OPT,"[UE %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, UE_mac_inst[module_idP].crnti, sdu_len);
}
......@@ -1923,7 +1923,7 @@ if (UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] == LCID_NOT_EMPTY)
if (opt_enabled) {
trace_pdu(0, ulsch_buffer, buflen, module_idP, 3, UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].txSubframe, 0, 0);
LOG_D(OPT,"[UE %d][ULSCH] Frame %d subframe %d trace pdu for rnti %x with size %d\n",
module_idP, UE_mac_inst[module_idP].txFrame, UE_mac_inst[module_idP].txSubframe, UE_mac_inst[module_idP].crnti, buflen);
module_idP, frameP, subframe, UE_mac_inst[module_idP].crnti, buflen);
}
}
......@@ -2104,7 +2104,7 @@ ue_scheduler(
/*
if (lcid == DCCH) {
LOG_D(MAC,"[UE %d][SR] Frame %d subframe %d Pending data for SRB1=%d for LCGID %d \n",
module_idP, frameP,subframeP,UE_mac_inst[module_idP].scheduling_info.BSR[UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]],
module_idP, txFrameP,txSubframeP,UE_mac_inst[module_idP].scheduling_info.BSR[UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]],
// UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]);
}
*/
......
......@@ -91,7 +91,7 @@ rlc_am_send_sdu (
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t * const rlc_pP)
{
# if TRACE_RLC_UM_PDU
# if TRACE_RLC_AM_PDU
char message_string[7000];
size_t message_string_size = 0;
#if ENABLE_ITTI
......
......@@ -1032,6 +1032,19 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
}
if ( (g_log->flag & FLAG_THREAD) || (c->flag & FLAG_THREAD) ) {
#define THREAD_NAME_LEN 16
static char threadname[THREAD_NAME_LEN];
if (pthread_getname_np(pthread_self(), threadname, THREAD_NAME_LEN) != 0)
{
perror("pthread_getname_np : ");
} else {
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s]", threadname);
if (len > MAX_LOG_TOTAL) len = MAX_LOG_TOTAL;
}
#undef THREAD_NAME_LEN
}
if ( (g_log->flag & FLAG_FUNCT) || (c->flag & FLAG_FUNCT) ) {
len += snprintf(&log_buffer[len], MAX_LOG_TOTAL - len, "[%s] ",
func);
......@@ -1287,11 +1300,15 @@ int set_comp_log(int component, int level, int verbosity, int interval)
LOG_EMERG);
DevCheck((interval > 0) && (interval <= 0xFF), interval, 0, 0xFF);
#if 0
if ((verbosity == LOG_NONE) || (verbosity == LOG_LOW) ||
(verbosity == LOG_MED) || (verbosity == LOG_FULL) ||
(verbosity == LOG_HIGH)) {
g_log->log_component[component].flag = verbosity;
}
#else
g_log->log_component[component].flag = verbosity;
#endif
g_log->log_component[component].level = level;
g_log->log_component[component].interval = interval;
......
......@@ -329,6 +329,7 @@ void help (void) {
printf(" --external-clock tells hardware to use an external clock reference\n");
printf(" --usim-test use XOR autentication algo in case of test usim mode\n");
printf(" --single-thread-disable. Disables single-thread mode in lte-softmodem\n");
printf(" -A Set timing_advance\n");
printf(" -C Set the downlink frequency for all component carriers\n");
printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n");
printf(" -F Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n");
......@@ -1417,7 +1418,7 @@ int main( int argc, char **argv ) {
set_comp_log(HW, LOG_DEBUG, LOG_HIGH, 1);
set_comp_log(PHY, LOG_DEBUG, LOG_HIGH, 1);
set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RLC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RLC, LOG_INFO, LOG_HIGH | FLAG_THREAD, 1);
set_comp_log(PDCP, LOG_INFO, LOG_HIGH, 1);
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1);
......
......@@ -243,7 +243,7 @@ help (void)
printf ("-L [0-1] 0 to disable new link adaptation, 1 to enable new link adapatation\n");
printf ("-m Gives a fixed DL mcs for eNB scheduler\n");
printf ("-M Set the machine ID for Ethernet-based emulation\n");
printf ("-n Set the number of frames for the simulation\n");
printf ("-n Set the number of frames for the simulation. 0 for no limit\n");
printf ("-O [enb_conf_file] eNB configuration file name\n");
printf ("-p Set the total number of machine in emulation - valid if M is set\n");
printf ("-P [trace type] Enable protocol analyzer. Possible values for OPT:\n");
......
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