Commit bb41434f authored by Raymond Knopp's avatar Raymond Knopp

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7549 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent d82da27f
...@@ -427,7 +427,8 @@ void help (void) { ...@@ -427,7 +427,8 @@ void help (void) {
printf(" --calib-ue-rx set UE RX calibration\n"); printf(" --calib-ue-rx set UE RX calibration\n");
printf(" --calib-ue-rx-med \n"); printf(" --calib-ue-rx-med \n");
printf(" --calib-ue-rxbyp\n"); printf(" --calib-ue-rxbyp\n");
printf(" --debug-ue-prach \n"); printf(" --debug-ue-prach run normal prach power ramping, but don't continue random-access\n");
printf(" --calib-prach-tx run normal prach with maximum power, but don't continue random-access\n");
printf(" --no-L2-connect bypass L2 and upper layers\n"); printf(" --no-L2-connect bypass L2 and upper layers\n");
printf(" --ue_rxgain set UE RX gain\n"); printf(" --ue_rxgain set UE RX gain\n");
printf(" --ue_txgain set UE tx gain\n"); printf(" --ue_txgain set UE tx gain\n");
...@@ -1279,6 +1280,11 @@ static void* eNB_thread_rx( void* param ) ...@@ -1279,6 +1280,11 @@ static void* eNB_thread_rx( void* param )
if ((((PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.frame_type == TDD )&&(subframe_select(&PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms,proc->subframe_rx)==SF_UL)) || if ((((PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.frame_type == TDD )&&(subframe_select(&PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms,proc->subframe_rx)==SF_UL)) ||
(PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.frame_type == FDD))) { (PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.frame_type == FDD))) {
#ifdef OAI_USRP
for (i=0;i<PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.nb_antennas_rx;i++)
rescale(&PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.rxdata[0][i][proc->subframe_rx*phy_vars_eNB->lte_frame_parms.samples_per_tti],
phy_vars_eNB->lte_frame_parms.samples_per_tti);
#endif
phy_procedures_eNB_RX( proc->subframe, PHY_vars_eNB_g[0][proc->CC_id], 0, no_relay ); phy_procedures_eNB_RX( proc->subframe, PHY_vars_eNB_g[0][proc->CC_id], 0, no_relay );
} }
...@@ -1968,6 +1974,7 @@ static void get_options (int argc, char **argv) ...@@ -1968,6 +1974,7 @@ static void get_options (int argc, char **argv)
LONG_OPTION_CALIB_UE_RX_BYP, LONG_OPTION_CALIB_UE_RX_BYP,
LONG_OPTION_DEBUG_UE_PRACH, LONG_OPTION_DEBUG_UE_PRACH,
LONG_OPTION_NO_L2_CONNECT, LONG_OPTION_NO_L2_CONNECT,
LONG_OPTION_CALIB_PRACH_TX,
LONG_OPTION_RXGAIN, LONG_OPTION_RXGAIN,
LONG_OPTION_TXGAIN, LONG_OPTION_TXGAIN,
LONG_OPTION_SCANCARRIER LONG_OPTION_SCANCARRIER
...@@ -1980,9 +1987,10 @@ static void get_options (int argc, char **argv) ...@@ -1980,9 +1987,10 @@ static void get_options (int argc, char **argv)
{"calib-ue-rx-byp", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_BYP}, {"calib-ue-rx-byp", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_BYP},
{"debug-ue-prach", no_argument, NULL, LONG_OPTION_DEBUG_UE_PRACH}, {"debug-ue-prach", no_argument, NULL, LONG_OPTION_DEBUG_UE_PRACH},
{"no-L2-connect", no_argument, NULL, LONG_OPTION_NO_L2_CONNECT}, {"no-L2-connect", no_argument, NULL, LONG_OPTION_NO_L2_CONNECT},
{"ue_rxgain", required_argument, NULL, LONG_OPTION_RXGAIN}, {"calib-prach-tx", no_argument, NULL, LONG_OPTION_CALIB_PRACH_TX},
{"ue_txgain", required_argument, NULL, LONG_OPTION_TXGAIN}, {"ue-rxgain", required_argument, NULL, LONG_OPTION_RXGAIN},
{"ue_scan_carrier", no_argument, NULL, LONG_OPTION_SCANCARRIER}, {"ue-txgain", required_argument, NULL, LONG_OPTION_TXGAIN},
{"ue-scan-carrier", no_argument, NULL, LONG_OPTION_SCANCARRIER},
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
...@@ -2019,6 +2027,10 @@ static void get_options (int argc, char **argv) ...@@ -2019,6 +2027,10 @@ static void get_options (int argc, char **argv)
mode = no_L2_connect; mode = no_L2_connect;
break; break;
case LONG_OPTION_CALIB_PRACH_TX:
mode = calib_prach_tx;
break;
case LONG_OPTION_RXGAIN: case LONG_OPTION_RXGAIN:
for (i=0; i<4; i++) for (i=0; i<4; i++)
rx_gain[0][i] = atof(optarg); rx_gain[0][i] = atof(optarg);
...@@ -2951,7 +2963,7 @@ int main( int argc, char **argv ) ...@@ -2951,7 +2963,7 @@ int main( int argc, char **argv )
// connect the TX/RX buffers // connect the TX/RX buffers
if (UE_flag==1) { if (UE_flag==1) {
openair_daq_vars.timing_advance = 0;//170; openair_daq_vars.timing_advance = 0;
if (setup_ue_buffers(UE,&openair0_cfg[0],rf_map)!=0) { if (setup_ue_buffers(UE,&openair0_cfg[0],rf_map)!=0) {
printf("Error setting up eNB buffer\n"); printf("Error setting up eNB buffer\n");
......
...@@ -232,7 +232,7 @@ static void *UE_thread_synch(void *arg) ...@@ -232,7 +232,7 @@ static void *UE_thread_synch(void *arg)
if (UE->UE_scan == 0) { if (UE->UE_scan == 0) {
do { do {
current_band = eutra_bands[ind].band; current_band = eutra_bands[ind].band;
printf( "Scanning band %d, dl_min %"PRIu32"\n", current_band, eutra_bands[ind].dl_min ); printf( "Scanning band %d, dl_min %"PRIu32", ul_min %"PRIu32"\n", current_band, eutra_bands[ind].dl_min,eutra_bands[ind].ul_min);
if ((eutra_bands[ind].dl_min <= downlink_frequency[0][0]) && (eutra_bands[ind].dl_max >= downlink_frequency[0][0])) { if ((eutra_bands[ind].dl_min <= downlink_frequency[0][0]) && (eutra_bands[ind].dl_max >= downlink_frequency[0][0])) {
for (card=0; card<MAX_NUM_CCs; card++) for (card=0; card<MAX_NUM_CCs; card++)
...@@ -256,7 +256,7 @@ static void *UE_thread_synch(void *arg) ...@@ -256,7 +256,7 @@ static void *UE_thread_synch(void *arg)
LOG_I( PHY, "[SCHED][UE] Check absolute frequency %"PRIu32" (oai_exit %d)\n", downlink_frequency[0][0], oai_exit ); LOG_I( PHY, "[SCHED][UE] Check absolute frequency DL %"PRIu32", UL %"PRIu32" (oai_exit %d)\n", downlink_frequency[0][0], downlink_frequency[0][0]+uplink_frequency_offset[0][0],oai_exit );
for (i=0;i<openair0_cfg[0].rx_num_channels;i++) { for (i=0;i<openair0_cfg[0].rx_num_channels;i++) {
openair0_cfg[0].rx_freq[i] = downlink_frequency[0][i]; openair0_cfg[0].rx_freq[i] = downlink_frequency[0][i];
...@@ -854,7 +854,7 @@ void *UE_thread(void *arg) ...@@ -854,7 +854,7 @@ void *UE_thread(void *arg)
static int UE_thread_retval; static int UE_thread_retval;
PHY_VARS_UE *UE = PHY_vars_UE_g[0][0]; PHY_VARS_UE *UE = PHY_vars_UE_g[0][0];
int spp = openair0_cfg[0].samples_per_packet; int spp = openair0_cfg[0].samples_per_packet;
int slot=1, frame=0, hw_subframe=0, rxpos=0, txpos=0; int slot=1, frame=0, hw_subframe=0, rxpos=0, txpos=spp*tx_delay;
int dummy[2][spp]; int dummy[2][spp];
int dummy_dump = 0; int dummy_dump = 0;
int tx_enabled = 0; int tx_enabled = 0;
......
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