Commit b2bda949 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/calib-LimeSDR' into develop_integration_w11

parents 4ae59999 c6581031
...@@ -561,6 +561,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR") ...@@ -561,6 +561,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR")
include_directories("/usr/local/include/lime") include_directories("/usr/local/include/lime")
include_directories("/usr/include/lime") include_directories("/usr/include/lime")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu") LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
LINK_DIRECTORIES("/usr/local/lib")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lmsSDR") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lmsSDR")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lms7002m") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lms7002m")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/Si5351C") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/Si5351C")
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -128,30 +128,20 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) { ...@@ -128,30 +128,20 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) {
/*! \brief Set Gains (TX/RX) on LMSSDR /*! \brief Set Gains (TX/RX) on LMSSDR
* \param device the hardware to use * \param device the hardware to use
* \param openair0_cfg openair0 Config structure * \param openair0_cfg openair0 Config structure
* \returns 0 in success * \returns 0 in success, -1 on error
*/ */
int trx_lms_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) { int trx_lms_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) {
int ret = 0;
LMS_SetNormalizedGain(lms_device, LMS_CH_TX, 0, openair0_cfg[0].tx_gain[0]/100.0); if (openair0_cfg->rx_gain[0] > 70+openair0_cfg->rx_gain_offset[0]) {
printf("[LMS] Reduce RX Gain 0 by %f dB\n",openair0_cfg->rx_gain[0]-openair0_cfg->rx_gain_offset[0]-70);
// RX gains, use low-level setting ret = -1;
double gv = openair0_cfg[0].rx_gain[0] - openair0_cfg[0].rx_gain_offset[0];
if (gv > 31) {
printf("RX Gain 0 too high, reduce by %f dB\n",gv-31);
gv = 31;
} }
if (gv < 0) {
printf("RX Gain 0 too low, increase by %f dB\n",-gv);
gv = 0;
}
printf("[LMS] Setting 7002M G_PGA_RBB to %d\n", (int16_t)gv);
LMS7002M lms7;
lms7.SetConnection(lms7.GetConnection());
lms7.Modify_SPI_Reg_bits(LMS7param(G_PGA_RBB),(int16_t)gv);
LMS_SetGaindB(lms_device, LMS_CH_TX, 0, openair0_cfg->tx_gain[0]);
LMS_SetGaindB(lms_device, LMS_CH_RX, 0, openair0_cfg->rx_gain[0]-openair0_cfg->rx_gain_offset[0]);
return(0); return(ret);
} }
/*! \brief Start LMSSDR /*! \brief Start LMSSDR
...@@ -212,10 +202,11 @@ int trx_lms_start(openair0_device *device){ ...@@ -212,10 +202,11 @@ int trx_lms_start(openair0_device *device){
} }
printf("Set TX frequency %f MHz\n",device->openair0_cfg[0].tx_freq[0]/1e6); printf("Set TX frequency %f MHz\n",device->openair0_cfg[0].tx_freq[0]/1e6);
/*
printf("Override antenna settings to: RX1_H, TXA_2"); printf("Override antenna settings to: RX1_H, TXA_2");
LMS_SetAntenna(lms_device, LMS_CH_RX, 0, 1); LMS_SetAntenna(lms_device, LMS_CH_RX, 0, 1);
LMS_SetAntenna(lms_device, LMS_CH_TX, 0, 2); LMS_SetAntenna(lms_device, LMS_CH_TX, 0, 2);
*/
for (int i = 0; i< device->openair0_cfg->rx_num_channels; i++) for (int i = 0; i< device->openair0_cfg->rx_num_channels; i++)
...@@ -292,12 +283,21 @@ int trx_lms_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,in ...@@ -292,12 +283,21 @@ int trx_lms_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,in
// 31 = 19 dB => 105 dB total gain @ 2.6 GHz // 31 = 19 dB => 105 dB total gain @ 2.6 GHz
/*! \brief calibration table for LMSSDR */ /*! \brief calibration table for LMSSDR */
// V1.2 board
rx_gain_calib_table_t calib_table_lmssdr_1v2[] = {
{3500000000.0,44.0}, // on L PAD
{2660000000.0,55.0}, // on L PAD
{2300000000.0,54.0}, // on L PAD
{1880000000.0,54.0}, // on L PAD
{816000000.0,79.0}, // on W PAD
{-1,0}};
// V1.4 board
rx_gain_calib_table_t calib_table_lmssdr[] = { rx_gain_calib_table_t calib_table_lmssdr[] = {
{3500000000.0,70.0}, {3500000000.0,44.0}, // on H PAD
{2660000000.0,80.0}, {2660000000.0,55.0}, // on H PAD
{2300000000.0,80.0}, {2300000000.0,54.0}, // on H PAD
{1880000000.0,74.0}, // on W PAD {1880000000.0,54.0}, // on H PAD
{816000000.0,76.0}, // on W PAD {816000000.0,79.0}, // on L PAD
{-1,0}}; {-1,0}};
...@@ -344,7 +344,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){ ...@@ -344,7 +344,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){
device->type=LMSSDR_DEV; device->type=LMSSDR_DEV;
printf("LMSSDR: Initializing openair0_device for %s ...\n", ((device->host_type == BBU_HOST) ? "BBU": "RRH")); printf("LMSSDR: Initializing openair0_device for %s ...\n", ((device->host_type == BBU_HOST) ? "BBU": "RRH"));
openair0_cfg[0].iq_txshift = 0;
switch ((int)openair0_cfg[0].sample_rate) { switch ((int)openair0_cfg[0].sample_rate) {
case 30720000: case 30720000:
// from usrp_time_offset // from usrp_time_offset
...@@ -355,9 +355,9 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){ ...@@ -355,9 +355,9 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){
break; break;
case 15360000: case 15360000:
openair0_cfg[0].samples_per_packet = 2048; openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 70; openair0_cfg[0].tx_sample_advance = 450;
openair0_cfg[0].tx_bw = 10e6; openair0_cfg[0].tx_bw = 15.36e6;
openair0_cfg[0].rx_bw = 10e6; openair0_cfg[0].rx_bw = 15.36e6;
break; break;
case 7680000: case 7680000:
openair0_cfg[0].samples_per_packet = 1024; openair0_cfg[0].samples_per_packet = 1024;
......
...@@ -35,8 +35,8 @@ eNBs = ...@@ -35,8 +35,8 @@ eNBs =
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 90; tx_gain = 70;
rx_gain = 107; rx_gain = 116;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -46,7 +46,7 @@ eNBs = ...@@ -46,7 +46,7 @@ eNBs =
pucch_nRB_CQI = 1; pucch_nRB_CQI = 1;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -17; pdsch_referenceSignalPower = -30;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE"; pusch_enable64QAM = "DISABLE";
...@@ -64,9 +64,9 @@ eNBs = ...@@ -64,9 +64,9 @@ eNBs =
srs_ackNackST =; srs_ackNackST =;
srs_MaxUpPts =;*/ srs_MaxUpPts =;*/
pusch_p0_Nominal = -90; pusch_p0_Nominal = -96;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
pucch_p0_Nominal = -96; pucch_p0_Nominal = -104;
msg3_delta_Preamble = 6; msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2"; pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format1b = "deltaF3";
......
...@@ -23,6 +23,9 @@ eNBs = ...@@ -23,6 +23,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
...@@ -33,10 +36,11 @@ eNBs = ...@@ -33,10 +36,11 @@ eNBs =
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 50; N_RB_DL = 50;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 90; tx_gain = 20;
rx_gain = 125; rx_gain = 100;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -46,7 +50,7 @@ eNBs = ...@@ -46,7 +50,7 @@ eNBs =
pucch_nRB_CQI = 1; pucch_nRB_CQI = 1;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -20; pdsch_referenceSignalPower = -30;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE"; pusch_enable64QAM = "DISABLE";
...@@ -64,9 +68,9 @@ eNBs = ...@@ -64,9 +68,9 @@ eNBs =
srs_ackNackST =; srs_ackNackST =;
srs_MaxUpPts =;*/ srs_MaxUpPts =;*/
pusch_p0_Nominal = -90; pusch_p0_Nominal = -96;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
pucch_p0_Nominal = -96; pucch_p0_Nominal = -104;
msg3_delta_Preamble = 6; msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2"; pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format1b = "deltaF3";
...@@ -82,7 +86,7 @@ eNBs = ...@@ -82,7 +86,7 @@ eNBs =
rach_messagePowerOffsetGroupB = ; rach_messagePowerOffsetGroupB = ;
*/ */
rach_powerRampingStep = 4; rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108; rach_preambleInitialReceivedTargetPower = -104;
rach_preambleTransMax = 10; rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10; rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48; rach_macContentionResolutionTimer = 48;
...@@ -98,10 +102,10 @@ eNBs = ...@@ -98,10 +102,10 @@ eNBs =
ue_TimersAndConstants_n310 = 20; ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1; ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
} }
); );
srb1_parameters : srb1_parameters :
{ {
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
...@@ -131,7 +135,6 @@ eNBs = ...@@ -131,7 +135,6 @@ eNBs =
SCTP_OUTSTREAMS = 2; SCTP_OUTSTREAMS = 2;
}; };
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.3"; mme_ip_address = ( { ipv4 = "127.0.0.3";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
...@@ -146,7 +149,7 @@ eNBs = ...@@ -146,7 +149,7 @@ eNBs =
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -23,20 +23,24 @@ eNBs = ...@@ -23,20 +23,24 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
prefix_type = "NORMAL"; prefix_type = "NORMAL";
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2660000000L; downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 50; N_RB_DL = 25;
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 60; tx_gain = 7;
rx_gain = 111; rx_gain = 116;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -46,7 +50,7 @@ eNBs = ...@@ -46,7 +50,7 @@ eNBs =
pucch_nRB_CQI = 1; pucch_nRB_CQI = 1;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29; pdsch_referenceSignalPower = -34;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE"; pusch_enable64QAM = "DISABLE";
...@@ -64,9 +68,9 @@ eNBs = ...@@ -64,9 +68,9 @@ eNBs =
srs_ackNackST =; srs_ackNackST =;
srs_MaxUpPts =;*/ srs_MaxUpPts =;*/
pusch_p0_Nominal = -85; pusch_p0_Nominal = -96;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
pucch_p0_Nominal = -96; pucch_p0_Nominal = -104;
msg3_delta_Preamble = 6; msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2"; pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format1b = "deltaF3";
...@@ -76,13 +80,13 @@ eNBs = ...@@ -76,13 +80,13 @@ eNBs =
rach_numberOfRA_Preambles = 64; rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE"; rach_preamblesGroupAConfig = "DISABLE";
/* /*
rach_sizeOfRA_PreamblesGroupA = ; rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ; rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ; rach_messagePowerOffsetGroupB = ;
*/ */
rach_powerRampingStep = 4; rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -100; rach_preambleInitialReceivedTargetPower = -104;
rach_preambleTransMax = 10; rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10; rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48; rach_macContentionResolutionTimer = 48;
...@@ -98,10 +102,10 @@ eNBs = ...@@ -98,10 +102,10 @@ eNBs =
ue_TimersAndConstants_n310 = 20; ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1; ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
} }
); );
srb1_parameters : srb1_parameters :
{ {
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
...@@ -131,43 +135,21 @@ eNBs = ...@@ -131,43 +135,21 @@ eNBs =
SCTP_OUTSTREAMS = 2; SCTP_OUTSTREAMS = 2;
}; };
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.170"; mme_ip_address = ( { ipv4 = "192.168.12.148";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
} }
); );
rrh_gw_config = (
{
local_if_name = "eth0";
#remote_address = "169.254.10.158";
#local_address = "169.254.8.15";
remote_address = "74:d4:35:cc:88:45";
local_address = "d4:be:d9:22:0a:ac";
local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000;
rrh_gw_active = "yes";
tr_preference = "raw";
rf_preference = "lmssdr";
iq_txshift = 0;
tx_sample_advance = 45;
tx_scheduling_advance = 8;
}
);
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.118/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth6";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.118/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -39,8 +39,8 @@ eNBs = ...@@ -39,8 +39,8 @@ eNBs =
nb_antenna_ports = 1; nb_antenna_ports = 1;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 100; tx_gain = 20;
rx_gain = 111; rx_gain = 116;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -50,7 +50,7 @@ eNBs = ...@@ -50,7 +50,7 @@ eNBs =
pucch_nRB_CQI = 1; pucch_nRB_CQI = 1;
pucch_nCS_AN = 0; pucch_nCS_AN = 0;
pucch_n1_AN = 32; pucch_n1_AN = 32;
pdsch_referenceSignalPower = -30; pdsch_referenceSignalPower = -35;
pdsch_p_b = 0; pdsch_p_b = 0;
pusch_n_SB = 1; pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE"; pusch_enable64QAM = "DISABLE";
...@@ -136,7 +136,7 @@ eNBs = ...@@ -136,7 +136,7 @@ eNBs =
}; };
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.3"; mme_ip_address = ( { ipv4 = "192.168.12.148";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -145,11 +145,11 @@ eNBs = ...@@ -145,11 +145,11 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24";
ENB_INTERFACE_NAME_FOR_S1U = "lo"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -1004,6 +1004,7 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -1004,6 +1004,7 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
start_rf_prev_ts = start_rf_new_ts; start_rf_prev_ts = start_rf_new_ts;
clock_gettime( CLOCK_MONOTONIC, &start_rf_new); clock_gettime( CLOCK_MONOTONIC, &start_rf_new);
start_rf_new_ts = ts; start_rf_new_ts = ts;
LOG_D(PHY,"rx_rf: first_rx %d received ts %"PRId64" (sptti %d)\n",proc->first_rx,ts,fp->samples_per_tti);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
proc->timestamp_rx = ts-eNB->ts_offset; proc->timestamp_rx = ts-eNB->ts_offset;
...@@ -1020,7 +1021,7 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -1020,7 +1021,7 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
else { else {
if (proc->timestamp_rx - old_ts != fp->samples_per_tti) { if (proc->timestamp_rx - old_ts != fp->samples_per_tti) {
LOG_I(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples\n",proc->timestamp_rx - old_ts - fp->samples_per_tti); LOG_I(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",proc->timestamp_rx - old_ts - fp->samples_per_tti,eNB->ts_offset);
eNB->ts_offset += (proc->timestamp_rx - old_ts - fp->samples_per_tti); eNB->ts_offset += (proc->timestamp_rx - old_ts - fp->samples_per_tti);
proc->timestamp_rx = ts-eNB->ts_offset; proc->timestamp_rx = ts-eNB->ts_offset;
} }
...@@ -1559,7 +1560,7 @@ static void* eNB_thread_single( void* param ) { ...@@ -1559,7 +1560,7 @@ static void* eNB_thread_single( void* param ) {
wait_sync("eNB_thread_single"); wait_sync("eNB_thread_single");
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) #if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
if (eNB->node_function < NGFI_RRU_IF5) if ((eNB->node_function < NGFI_RRU_IF5) && (eNB->mac_enabled==1))
wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB); wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB);
#endif #endif
...@@ -1723,7 +1724,7 @@ void init_eNB_proc(int inst) { ...@@ -1723,7 +1724,7 @@ void init_eNB_proc(int inst) {
proc->CC_id = CC_id; proc->CC_id = CC_id;
proc->instance_cnt_synch = -1; proc->instance_cnt_synch = -1;
proc->first_rx=1; proc->first_rx=2;
proc->first_tx=1; proc->first_tx=1;
proc->frame_offset = 0; proc->frame_offset = 0;
......
...@@ -1739,7 +1739,7 @@ int main( int argc, char **argv ) { ...@@ -1739,7 +1739,7 @@ int main( int argc, char **argv ) {
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
if ((UE_flag == 1)|| if ((UE_flag == 1)||
(node_function[0]<NGFI_RAU_IF4p5)) ((node_function[0]<NGFI_RAU_IF4p5)&&(phy_test==0)))
// don't create if node doesn't connect to RRC/S1/GTP // don't create if node doesn't connect to RRC/S1/GTP
if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) { if (create_tasks(UE_flag ? 0 : 1, UE_flag ? 1 : 0) < 0) {
printf("cannot create ITTI tasks\n"); printf("cannot create ITTI tasks\n");
......
...@@ -269,7 +269,7 @@ static void *UE_thread_synch(void *arg) { ...@@ -269,7 +269,7 @@ static void *UE_thread_synch(void *arg) {
} }
} }
AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n"); // AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n");
while (oai_exit==0) { while (oai_exit==0) {
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
...@@ -368,13 +368,13 @@ static void *UE_thread_synch(void *arg) { ...@@ -368,13 +368,13 @@ static void *UE_thread_synch(void *arg) {
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0); UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0);
//UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]); //UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]);
UE->rfdevice.trx_stop_func(&UE->rfdevice); //UE->rfdevice.trx_stop_func(&UE->rfdevice);
sleep(1); sleep(1);
init_frame_parms(&UE->frame_parms,1); init_frame_parms(&UE->frame_parms,1);
if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) { /*if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) {
LOG_E(HW,"Could not start the device\n"); LOG_E(HW,"Could not start the device\n");
oai_exit=1; oai_exit=1;
} }*/
} else { } else {
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
UE->is_synchronized = 1; UE->is_synchronized = 1;
...@@ -647,6 +647,7 @@ void *UE_thread(void *arg) { ...@@ -647,6 +647,7 @@ void *UE_thread(void *arg) {
int sub_frame=-1; int sub_frame=-1;
//int cumulated_shift=0; //int cumulated_shift=0;
AssertFatal(UE->rfdevice.trx_start_func(&UE->rfdevice) == 0, "Could not start the device\n");
while (!oai_exit) { while (!oai_exit) {
AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), ""); AssertFatal ( 0== pthread_mutex_lock(&UE->proc.mutex_synch), "");
int instance_cnt_synch = UE->proc.instance_cnt_synch; int instance_cnt_synch = UE->proc.instance_cnt_synch;
......
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