Commit 5616e656 authored by Lionel Gauthier's avatar Lionel Gauthier

Sebastian Held patches15/0006-changed-the-remaining-USRP-defines-to-OAI_USRP.patch

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7308 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 640d7270
......@@ -293,7 +293,7 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode)
gain_control_all(phy_vars_ue->PHY_measurements.rx_power_avg_dB[0],0);
#else
#ifndef USRP
#ifndef OAI_USRP
phy_adjust_gain(phy_vars_ue,0);
#endif
#endif
......
......@@ -140,7 +140,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
memcpy((void *)tmp_dft_in,
(void *)&ue_common_vars->rxdata[aa][(rx_offset-nb_prefix_samples0) % frame_length_samples],
frame_parms->ofdm_symbol_size*sizeof(int));
#ifdef USRP
#ifdef OAI_USRP
rescale((int16_t *)tmp_dft_in,
frame_parms->ofdm_symbol_size);
#endif
......@@ -148,7 +148,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
(int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
} else { // use dft input from RX buffer directly
start_meas(&phy_vars_ue->rx_dft_stats);
#ifdef USRP
#ifdef OAI_USRP
rescale((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset-nb_prefix_samples0) % frame_length_samples],
frame_parms->ofdm_symbol_size+nb_prefix_samples0);
#endif
......@@ -178,14 +178,14 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
memcpy((void *)tmp_dft_in,
(void *)&ue_common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
frame_parms->ofdm_symbol_size*sizeof(int));
#ifdef USRP
#ifdef OAI_USRP
rescale((int16_t *)tmp_dft_in,
frame_parms->ofdm_symbol_size);
#endif
dft((int16_t *)tmp_dft_in,
(int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
} else { // use dft input from RX buffer directly
#ifdef USRP
#ifdef OAI_USRP
rescale((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset-nb_prefix_samples) % frame_length_samples],
frame_parms->ofdm_symbol_size+nb_prefix_samples);
#endif
......
......@@ -32,12 +32,6 @@
* Author: HongliangXU : hong-liang-xu@agilent.com
*/
#ifdef USRP
/* USRP is both an enum in ettus library and a define for OAI */
/* This removes the define for OAI */
#undef USRP
#endif
#include <string.h>
#include <pthread.h>
#include <unistd.h>
......
......@@ -124,7 +124,7 @@ eNBs =
{
global_log_level ="trace";
global_log_verbosity ="medium";
hw_log_level ="trace";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="trace";
phy_log_verbosity ="medium";
......
......@@ -1828,7 +1828,7 @@ static void get_options (int argc, char **argv)
// char line[1000];
// int l;
int k,i;//,j,k;
#if defined(USRP) || defined(CPRIGW)
#if defined(OAI_USRP) || defined(CPRIGW)
int clock_src;
#endif
int CC_id;
......@@ -2034,7 +2034,7 @@ static void get_options (int argc, char **argv)
break;
case 's':
#if defined(USRP) || defined(CPRIGW)
#if defined(OAI_USRP) || defined(CPRIGW)
clock_src = atoi(optarg);
......
......@@ -259,7 +259,7 @@ static void *UE_thread_synch(void *arg)
openair0_cfg[card].rx_freq[i] = downlink_frequency[card][i];
openair0_cfg[card].tx_freq[i] = downlink_frequency[card][i]+uplink_frequency_offset[card][i];
#ifdef USRP
#ifdef OAI_USRP
openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB-USRP_GAIN_OFFSET;
switch(UE->lte_frame_parms.N_RB_DL) {
......@@ -289,7 +289,7 @@ static void *UE_thread_synch(void *arg)
#endif
}
#ifdef USRP
#ifdef OAI_USRP
#ifndef USRP_DEBUG
openair0_set_rx_frequencies(&openair0,&openair0_cfg[0]);
openair0_set_gains(&openair0,&openair0_cfg[0]);
......@@ -349,7 +349,7 @@ static void *UE_thread_synch(void *arg)
openair0_cfg[card].rx_freq[i] = downlink_frequency[card][i]+openair_daq_vars.freq_offset;
openair0_cfg[card].tx_freq[i] = downlink_frequency[card][i]+uplink_frequency_offset[card][i]+openair_daq_vars.freq_offset;
#ifdef USRP
#ifdef OAI_USRP
openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB-USRP_GAIN_OFFSET; // 65 calibrated for USRP B210 @ 2.6 GHz
switch(UE->lte_frame_parms.N_RB_DL) {
......@@ -380,7 +380,7 @@ static void *UE_thread_synch(void *arg)
#endif
}
#ifdef USRP
#ifdef OAI_USRP
#ifndef USRP_DEBUG
openair0_set_rx_frequencies(&openair0,&openair0_cfg[0]);
// openair0_set_gains(&openair0,&openair0_cfg[0]);
......@@ -445,7 +445,7 @@ static void *UE_thread_synch(void *arg)
for (i=0; i<openair0_cfg[card].rx_num_channels; i++) {
openair0_cfg[card].rx_freq[i] = downlink_frequency[card][i]+openair_daq_vars.freq_offset;
openair0_cfg[card].tx_freq[i] = downlink_frequency[card][i]+uplink_frequency_offset[card][i]+openair_daq_vars.freq_offset;
#ifdef USRP
#ifdef OAI_USRP
openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB-USRP_GAIN_OFFSET; // 65 calibrated for USRP B210 @ 2.6 GHz
switch(UE->lte_frame_parms.N_RB_DL) {
......@@ -476,7 +476,7 @@ static void *UE_thread_synch(void *arg)
#endif
}
#ifdef USRP
#ifdef OAI_USRP
#ifndef USRP_DEBUG
openair0_set_frequencies(&openair0,&openair0_cfg[0]);
// openair0_set_gains(&openair0,&openair0_cfg[0]);
......
......@@ -439,7 +439,7 @@ int olg_config(void)
set_log(RAL_UE, LOG_DEBUG, 1);
#endif
/*
//set_log(OCG, LOG_DEBUG, 1);
//set_log(EMU, LOG_INFO, 20);
set_log(MAC, LOG_DEBUG, 1);
......@@ -451,16 +451,16 @@ int olg_config(void)
//set_log(OTG, LOG_INFO, 1);
set_comp_log(OCG, LOG_ERR, 0x15,1);
set_comp_log(EMU, LOG_ERR, 0x15,20);
set_comp_log(MAC, LOG_DEBUG, 0x15,1);
set_comp_log(RLC, LOG_INFO, 0x15,1);
set_comp_log(PHY, LOG_DEBUG, 0x15, 1);
set_comp_log(MAC, LOG_TRACE, 0x15,1);
set_comp_log(RLC, LOG_TRACE, 0x15,1);
set_comp_log(PHY, LOG_TRACE, 0x15, 1);
set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
set_comp_log(RRC, LOG_DEBUG, 0x15,1);
set_comp_log(OCM, LOG_ERR, 0x15,20);
set_comp_log(OTG, LOG_ERR, 0x15,1);
set_comp_log(OMG, LOG_ERR, 0x15,1);
set_comp_log(OPT, LOG_ERR, 0x15,1);
*/
// set_comp_log(MAC, LOG_TRACE, LOG_FULL,1);
return 1;
......
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