Merge remote-tracking branch 'origin/develop' into Enhancement-142-OAI_UE_autotest_framework
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
The source code of openairinterface5g is distributed under OAI Public License V1.0.
|
||||||
|
For more details of the license, refer to LICENSE file in the same directory.
|
||||||
|
|
||||||
|
However, the source code also contains third party software that is acknowledged here for reference.
|
||||||
|
|
||||||
Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/liblfds6.1.1/
|
Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/liblfds6.1.1/
|
||||||
http://liblfds.org/.
|
http://liblfds.org/.
|
||||||
Extract from http://liblfds.org/pages/downloads_and_license.html:
|
Extract from http://liblfds.org/pages/downloads_and_license.html:
|
||||||
|
|||||||
+41
-36
@@ -1,36 +1,41 @@
|
|||||||
OpenAirInterface is under OpenAirInterface Software Alliance license.
|
OpenAirInterface is under OpenAirInterface Software Alliance license.
|
||||||
├── http://www.openairinterface.org/?page_id=101
|
├── http://www.openairinterface.org/?page_id=101
|
||||||
├── http://www.openairinterface.org/?page_id=698
|
├── http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
The OpenAirInterface (OAI) software is composed of the following parts:
|
It is distributed under OAI Public License V1.0.
|
||||||
|
The license information is distributed under LICENSE file in the same directory.
|
||||||
openairinterface5g
|
Please see NOTICE.txt for third party software that is included in the sources.
|
||||||
├── cmake_targets: build utilities to compile (simulation, emulation and real-time platforms), and generated build files
|
|
||||||
├── common : some common OAI utilities, other tools can be found at openair2/UTILS
|
The OpenAirInterface (OAI) software is composed of the following parts:
|
||||||
├── LICENSE
|
|
||||||
├── maketags : script to generate emacs tags
|
openairinterface5g
|
||||||
├── openair1 : 3GPP LTE Rel-10 PHY layer + PHY RF simulation and a subset of Rel 12 Features.
|
├── cmake_targets: build utilities to compile (simulation, emulation and real-time platforms), and generated build files
|
||||||
├── openair2 :3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP implementation.
|
├── common : some common OAI utilities, other tools can be found at openair2/UTILS
|
||||||
├── LAYER2/RLC/ with the following subdirectories: UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0.
|
├── LICENSE
|
||||||
├── LAYER2/PDCP/PDCP_v10.1.0.
|
├── maketags : script to generate emacs tags
|
||||||
├── RRC/LITE
|
├── openair1 : 3GPP LTE Rel-10 PHY layer + PHY RF simulation and a subset of Rel 12 Features.
|
||||||
├── PHY_INTERFACE
|
├── openair2 :3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP implementation.
|
||||||
├── X2AP
|
├── LAYER2/RLC/ with the following subdirectories: UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0.
|
||||||
├── ENB_APP
|
├── LAYER2/PDCP/PDCP_v10.1.0.
|
||||||
├── openair3: 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
|
├── RRC/LITE
|
||||||
├── GTPV1-U
|
├── PHY_INTERFACE
|
||||||
├── NAS
|
├── X2AP
|
||||||
├── S1AP
|
├── ENB_APP
|
||||||
├── SCTP
|
├── openair3: 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
|
||||||
├── SECU
|
├── GTPV1-U
|
||||||
├── UDP
|
├── NAS
|
||||||
└── targets: top level wrapper for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
|
├── S1AP
|
||||||
|
├── SCTP
|
||||||
|
├── SECU
|
||||||
RELEASE NOTES:
|
├── UDP
|
||||||
|
└── targets: top level wrapper for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
|
||||||
v0.1 -> Last stable commit on develop branch before enhancement-10-harmony
|
|
||||||
v0.2 -> Merge of enhancement-10-harmony to include NGFI RRH + New Interface for RF/BBU
|
|
||||||
v0.3 -> Last stable commit on develop branch before the merge of feature-131-new-license. This is the last commit with GPL License
|
RELEASE NOTES:
|
||||||
v0.4 -> Merge of feature-131-new-license. It closes issue#131 and changes the license to OAI Public License V1.0
|
|
||||||
v0.5 -> Merge of enhancement-10-harmony-lts. It includes fixes for Ubuntu 16.04 support
|
v0.1 -> Last stable commit on develop branch before enhancement-10-harmony
|
||||||
|
v0.2 -> Merge of enhancement-10-harmony to include NGFI RRH + New Interface for RF/BBU
|
||||||
|
v0.3 -> Last stable commit on develop branch before the merge of feature-131-new-license. This is the last commit with GPL License
|
||||||
|
v0.4 -> Merge of feature-131-new-license. It closes issue#131 and changes the license to OAI Public License V1.0
|
||||||
|
v0.5 -> Merge of enhancement-10-harmony-lts. It includes fixes for Ubuntu 16.04 support
|
||||||
|
v0.5.1 -> Merge of bugfix-137-uplink-fixes. It includes stablity fixes for eNB
|
||||||
|
|||||||
@@ -1058,7 +1058,7 @@ unsigned char phy_threegpplte_turbo_decoder_scalar(llr_t *y,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((crc == oldcrc) && (crc!=0)) {
|
if (crc == oldcrc) {
|
||||||
return(iteration_cnt);
|
return(iteration_cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1375,7 +1375,7 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y,
|
|||||||
fprintf(fdavx2b,"oldcrc %x, crc %x, oldcrc_cw2 %x, crc_cw2 %x\n",oldcrc,crc,oldcrc_cw2,crc_cw2);
|
fprintf(fdavx2b,"oldcrc %x, crc %x, oldcrc_cw2 %x, crc_cw2 %x\n",oldcrc,crc,oldcrc_cw2,crc_cw2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((crc == oldcrc) && (crc!=0) && (crc_cw2 == oldcrc_cw2) && (crc_cw2!=0)) {
|
if (crc == oldcrc && crc_cw2 == oldcrc_cw2) {
|
||||||
return(iteration_cnt);
|
return(iteration_cnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2556,7 +2556,7 @@ unsigned char phy_threegpplte_turbo_decoder(short *y,
|
|||||||
|
|
||||||
stop_meas(intl2_stats);
|
stop_meas(intl2_stats);
|
||||||
|
|
||||||
if ((crc == oldcrc) && (crc!=0)) {
|
if (crc == oldcrc) {
|
||||||
return(iteration_cnt);
|
return(iteration_cnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1612,7 +1612,7 @@ unsigned char phy_threegpplte_turbo_decoder16(short *y,
|
|||||||
fprintf(fdsse4,"oldcrc %x, crc %x\n",oldcrc,crc);
|
fprintf(fdsse4,"oldcrc %x, crc %x\n",oldcrc,crc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((crc == oldcrc) && (crc!=0)) {
|
if (crc == oldcrc) {
|
||||||
return(iteration_cnt);
|
return(iteration_cnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1625,7 +1625,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
|
|||||||
|
|
||||||
if (intl2_stats) stop_meas(intl2_stats);
|
if (intl2_stats) stop_meas(intl2_stats);
|
||||||
|
|
||||||
if ((crc == oldcrc) && (crc!=0)) {
|
if (crc == oldcrc) {
|
||||||
return(iteration_cnt);
|
return(iteration_cnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7205,7 +7205,17 @@ int generate_eNB_ulsch_params_from_dci(PHY_VARS_eNB *eNB,
|
|||||||
|
|
||||||
|
|
||||||
if (cqi_req == 1) {
|
if (cqi_req == 1) {
|
||||||
ulsch->harq_processes[harq_pid]->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table
|
/* 36.213 7.2.1 (release 10) says:
|
||||||
|
* "RI is only reported for transmission modes 3 and 4,
|
||||||
|
* as well as transmission modes 8 and 9 with PMI/RI reporting"
|
||||||
|
* This is for aperiodic reporting.
|
||||||
|
* TODO: deal with TM 8&9 correctly when they are implemented.
|
||||||
|
* TODO: deal with periodic reporting if we implement it.
|
||||||
|
*/
|
||||||
|
if (transmission_mode == 3 || transmission_mode == 4)
|
||||||
|
ulsch->harq_processes[harq_pid]->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table
|
||||||
|
else
|
||||||
|
ulsch->harq_processes[harq_pid]->O_RI = 0;
|
||||||
|
|
||||||
switch(transmission_mode) {
|
switch(transmission_mode) {
|
||||||
// The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling
|
// The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling
|
||||||
|
|||||||
@@ -366,6 +366,8 @@ typedef struct {
|
|||||||
uint32_t TBS;
|
uint32_t TBS;
|
||||||
/// The payload + CRC size in bits
|
/// The payload + CRC size in bits
|
||||||
uint32_t B;
|
uint32_t B;
|
||||||
|
/// Number of soft channel bits
|
||||||
|
uint32_t G;
|
||||||
/// CQI CRC status
|
/// CQI CRC status
|
||||||
uint8_t cqi_crc_status;
|
uint8_t cqi_crc_status;
|
||||||
/// Pointer to CQI data
|
/// Pointer to CQI data
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ int ulsch_decoding_data_2thread0(td_params* tdp) {
|
|||||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||||
int Q_m = get_Qm_ul(ulsch_harq->mcs);
|
int Q_m = get_Qm_ul(ulsch_harq->mcs);
|
||||||
int G = ulsch_harq->nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
|
int G = ulsch_harq->G;
|
||||||
uint32_t E;
|
uint32_t E;
|
||||||
uint32_t Gp,GpmodC,Nl=1;
|
uint32_t Gp,GpmodC,Nl=1;
|
||||||
uint32_t C = ulsch_harq->C;
|
uint32_t C = ulsch_harq->C;
|
||||||
@@ -450,7 +450,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
|
|||||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||||
int Q_m = get_Qm_ul(ulsch_harq->mcs);
|
int Q_m = get_Qm_ul(ulsch_harq->mcs);
|
||||||
int G = ulsch_harq->nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
|
int G = ulsch_harq->G;
|
||||||
unsigned int E;
|
unsigned int E;
|
||||||
int Cby2;
|
int Cby2;
|
||||||
|
|
||||||
@@ -658,7 +658,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
|
|||||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||||
int Q_m = get_Qm_ul(ulsch_harq->mcs);
|
int Q_m = get_Qm_ul(ulsch_harq->mcs);
|
||||||
int G = ulsch_harq->nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
|
int G = ulsch_harq->G;
|
||||||
unsigned int E;
|
unsigned int E;
|
||||||
|
|
||||||
uint8_t (*tc)(int16_t *y,
|
uint8_t (*tc)(int16_t *y,
|
||||||
@@ -1036,6 +1036,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
G = G - Q_RI - Q_CQI;
|
G = G - Q_RI - Q_CQI;
|
||||||
|
ulsch_harq->G = G;
|
||||||
|
|
||||||
if ((int)G < 0) {
|
if ((int)G < 0) {
|
||||||
LOG_E(PHY,"FATAL: ulsch_decoding.c G < 0 (%d) : Q_RI %d, Q_CQI %d\n",G,Q_RI,Q_CQI);
|
LOG_E(PHY,"FATAL: ulsch_decoding.c G < 0 (%d) : Q_RI %d, Q_CQI %d\n",G,Q_RI,Q_CQI);
|
||||||
|
|||||||
@@ -1006,7 +1006,7 @@ void dump_CCE_table(int *CCE_table,const int nCCE,const unsigned short rnti,cons
|
|||||||
for (i=0;i<nCCE;i++) {
|
for (i=0;i<nCCE;i++) {
|
||||||
printf("%1d.",CCE_table[i]);
|
printf("%1d.",CCE_table[i]);
|
||||||
if ((i&7) == 7)
|
if ((i&7) == 7)
|
||||||
printf("\n CCE %d: ");
|
printf("\n CCE %d: ", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
Yk = (unsigned int)rnti;
|
Yk = (unsigned int)rnti;
|
||||||
|
|||||||
@@ -828,9 +828,6 @@ void schedule_ulsch_rnti(module_id_t module_idP,
|
|||||||
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power=target_rx_power;
|
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power=target_rx_power;
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1=UE_template->pre_assigned_mcs_ul;
|
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1=UE_template->pre_assigned_mcs_ul;
|
||||||
mcs = UE_template->pre_assigned_mcs_ul;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
mcs = UE_template->pre_assigned_mcs_ul;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
||||||
if ((cqi_req==1) && (mcs>19)) {
|
|
||||||
mcs=19;
|
|
||||||
}
|
|
||||||
if (UE_template->pre_allocated_rb_table_index_ul >=0) {
|
if (UE_template->pre_allocated_rb_table_index_ul >=0) {
|
||||||
rb_table_index=UE_template->pre_allocated_rb_table_index_ul;
|
rb_table_index=UE_template->pre_allocated_rb_table_index_ul;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Regular → Executable
BIN
Binary file not shown.
Regular → Executable
BIN
Binary file not shown.
@@ -38,6 +38,7 @@ 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;
|
||||||
|
nb_antenna_ports = 1;
|
||||||
tx_gain = 90;
|
tx_gain = 90;
|
||||||
rx_gain = 125;
|
rx_gain = 125;
|
||||||
prach_root = 0;
|
prach_root = 0;
|
||||||
@@ -100,6 +101,7 @@ eNBs =
|
|||||||
ue_TimersAndConstants_t311 = 10000;
|
ue_TimersAndConstants_t311 = 10000;
|
||||||
ue_TimersAndConstants_n310 = 20;
|
ue_TimersAndConstants_n310 = 20;
|
||||||
ue_TimersAndConstants_n311 = 1;
|
ue_TimersAndConstants_n311 = 1;
|
||||||
|
ue_TransmissionMode = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ 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;
|
||||||
|
nb_antenna_ports = 1;
|
||||||
tx_gain = 90;
|
tx_gain = 90;
|
||||||
rx_gain = 125;
|
rx_gain = 125;
|
||||||
prach_root = 0;
|
prach_root = 0;
|
||||||
@@ -100,6 +101,7 @@ eNBs =
|
|||||||
ue_TimersAndConstants_t311 = 10000;
|
ue_TimersAndConstants_t311 = 10000;
|
||||||
ue_TimersAndConstants_n310 = 20;
|
ue_TimersAndConstants_n310 = 20;
|
||||||
ue_TimersAndConstants_n311 = 1;
|
ue_TimersAndConstants_n311 = 1;
|
||||||
|
ue_TransmissionMode = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1305,7 +1305,7 @@ extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
|
|||||||
|
|
||||||
void init_eNB_proc(int inst) {
|
void init_eNB_proc(int inst) {
|
||||||
|
|
||||||
int i;
|
int i=0;
|
||||||
int CC_id;
|
int CC_id;
|
||||||
PHY_VARS_eNB *eNB;
|
PHY_VARS_eNB *eNB;
|
||||||
eNB_proc_t *proc;
|
eNB_proc_t *proc;
|
||||||
|
|||||||
@@ -1795,11 +1795,19 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
|
|
||||||
// start the main thread
|
// start the main thread
|
||||||
if (UE_flag == 1) init_UE(1);
|
if (UE_flag == 1) {
|
||||||
|
init_UE(1);
|
||||||
|
number_of_cards = 1;
|
||||||
|
|
||||||
|
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
|
PHY_vars_UE_g[0][CC_id]->rf_map.card=0;
|
||||||
|
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
init_eNB(node_function,node_timing,1,eth_params,single_thread_flag);
|
init_eNB(node_function,node_timing,1,eth_params,single_thread_flag);
|
||||||
// Sleep to allow all threads to setup
|
// Sleep to allow all threads to setup
|
||||||
|
|
||||||
number_of_cards = 1;
|
number_of_cards = 1;
|
||||||
|
|
||||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
|
|||||||
+57
-77
@@ -220,7 +220,7 @@ static void *UE_thread_synch(void *arg)
|
|||||||
int current_band = 0;
|
int current_band = 0;
|
||||||
int current_offset = 0;
|
int current_offset = 0;
|
||||||
sync_mode_t sync_mode = pbch;
|
sync_mode_t sync_mode = pbch;
|
||||||
int card;
|
int CC_id = UE->CC_id;
|
||||||
int ind;
|
int ind;
|
||||||
int found;
|
int found;
|
||||||
int freq_offset=0;
|
int freq_offset=0;
|
||||||
@@ -312,9 +312,8 @@ static void *UE_thread_synch(void *arg)
|
|||||||
printf( "Scanning band %d, dl_min %"PRIu32", ul_min %"PRIu32"\n", current_band, eutra_bands[ind].dl_min,eutra_bands[ind].ul_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 (i=0; i<4; i++)
|
||||||
for (i=0; i<4; i++)
|
uplink_frequency_offset[CC_id][i] = eutra_bands[ind].ul_min - eutra_bands[ind].dl_min;
|
||||||
uplink_frequency_offset[card][i] = eutra_bands[ind].ul_min - eutra_bands[ind].dl_min;
|
|
||||||
|
|
||||||
found = 1;
|
found = 1;
|
||||||
break;
|
break;
|
||||||
@@ -333,16 +332,16 @@ static void *UE_thread_synch(void *arg)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
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 );
|
LOG_I( PHY, "[SCHED][UE] Check absolute frequency DL %"PRIu32", UL %"PRIu32" (oai_exit %d, rx_num_channels %d)\n", downlink_frequency[0][0], downlink_frequency[0][0]+uplink_frequency_offset[0][0],oai_exit, openair0_cfg[0].rx_num_channels);
|
||||||
|
|
||||||
for (i=0;i<openair0_cfg[0].rx_num_channels;i++) {
|
for (i=0;i<openair0_cfg[UE->rf_map.card].rx_num_channels;i++) {
|
||||||
openair0_cfg[0].rx_freq[i] = downlink_frequency[0][i];
|
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i];
|
||||||
openair0_cfg[0].tx_freq[i] = downlink_frequency[0][i]+uplink_frequency_offset[0][i];
|
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+uplink_frequency_offset[CC_id][i];
|
||||||
openair0_cfg[0].autocal[i] = 1;
|
openair0_cfg[UE->rf_map.card].autocal[UE->rf_map.chain+i] = 1;
|
||||||
if (uplink_frequency_offset[0][i] != 0) //
|
if (uplink_frequency_offset[CC_id][i] != 0) //
|
||||||
openair0_cfg[0].duplex_mode = duplex_mode_FDD;
|
openair0_cfg[UE->rf_map.card].duplex_mode = duplex_mode_FDD;
|
||||||
else //FDD
|
else //FDD
|
||||||
openair0_cfg[0].duplex_mode = duplex_mode_TDD;
|
openair0_cfg[UE->rf_map.card].duplex_mode = duplex_mode_TDD;
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_mode = pbch;
|
sync_mode = pbch;
|
||||||
@@ -350,18 +349,14 @@ static void *UE_thread_synch(void *arg)
|
|||||||
} else if (UE->UE_scan == 1) {
|
} else if (UE->UE_scan == 1) {
|
||||||
current_band=0;
|
current_band=0;
|
||||||
|
|
||||||
for (card=0; card<MAX_CARDS; card++) {
|
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
|
||||||
for (i=0; i<openair0_cfg[card].rx_num_channels; i++) {
|
downlink_frequency[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[CC_id].dl_min;
|
||||||
downlink_frequency[card][i] = bands_to_scan.band_info[0].dl_min;
|
uplink_frequency_offset[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[CC_id].ul_min-bands_to_scan.band_info[CC_id].dl_min;
|
||||||
uplink_frequency_offset[card][i] = bands_to_scan.band_info[0].ul_min-bands_to_scan.band_info[0].dl_min;
|
|
||||||
|
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i];
|
||||||
openair0_cfg[card].rx_freq[i] = downlink_frequency[card][i];
|
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+uplink_frequency_offset[CC_id][i];
|
||||||
openair0_cfg[card].tx_freq[i] = downlink_frequency[card][i]+uplink_frequency_offset[card][i];
|
openair0_cfg[UE->rf_map.card].rx_gain[UE->rf_map.chain+i] = UE->rx_total_gain_dB;
|
||||||
openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;
|
|
||||||
printf( "UE synch: setting RX gain (%d,%d) to %f\n", card, i, openair0_cfg[card].rx_gain[i] );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -417,28 +412,19 @@ static void *UE_thread_synch(void *arg)
|
|||||||
oai_exit=1;
|
oai_exit=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (card=0; card<MAX_CARDS; card++) {
|
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
|
||||||
for (i=0; i<openair0_cfg[card].rx_num_channels; i++) {
|
downlink_frequency[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[current_band].dl_min+current_offset;
|
||||||
downlink_frequency[card][i] = bands_to_scan.band_info[current_band].dl_min+current_offset;
|
uplink_frequency_offset[UE->rf_map.card][UE->rf_map.chain+i] = bands_to_scan.band_info[current_band].ul_min-bands_to_scan.band_info[0].dl_min + current_offset;
|
||||||
uplink_frequency_offset[card][i] = bands_to_scan.band_info[current_band].ul_min-bands_to_scan.band_info[0].dl_min + current_offset;
|
|
||||||
|
|
||||||
|
|
||||||
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];
|
|
||||||
openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;
|
|
||||||
printf("UE synch: setting RX gain (%d,%d) to %f\n",card,i,openair0_cfg[card].rx_gain[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i];
|
||||||
|
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+uplink_frequency_offset[CC_id][i];
|
||||||
|
openair0_cfg[UE->rf_map.card].rx_gain[UE->rf_map.chain+i] = UE->rx_total_gain_dB;
|
||||||
|
if (UE->UE_scan_carrier) {
|
||||||
|
openair0_cfg[UE->rf_map.card].autocal[UE->rf_map.chain+i] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UE->UE_scan_carrier) {
|
|
||||||
|
|
||||||
for (i=0;i<openair0_cfg[0].rx_num_channels;i++)
|
|
||||||
openair0_cfg[0].autocal[i] = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case pbch:
|
case pbch:
|
||||||
@@ -452,42 +438,42 @@ static void *UE_thread_synch(void *arg)
|
|||||||
|
|
||||||
UE->UE_scan_carrier = 0;
|
UE->UE_scan_carrier = 0;
|
||||||
// rerun with new cell parameters and frequency-offset
|
// rerun with new cell parameters and frequency-offset
|
||||||
for (i=0;i<openair0_cfg[0].rx_num_channels;i++) {
|
for (i=0;i<openair0_cfg[UE->rf_map.card].rx_num_channels;i++) {
|
||||||
openair0_cfg[0].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET;
|
openair0_cfg[UE->rf_map.card].rx_gain[UE->rf_map.chain+i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET;
|
||||||
openair0_cfg[0].rx_freq[i] -= UE->common_vars.freq_offset;
|
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] -= UE->common_vars.freq_offset;
|
||||||
openair0_cfg[0].tx_freq[i] = openair0_cfg[0].rx_freq[i]+uplink_frequency_offset[0][i];
|
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] = openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i]+uplink_frequency_offset[CC_id][i];
|
||||||
downlink_frequency[0][i] = openair0_cfg[0].rx_freq[i];
|
downlink_frequency[CC_id][i] = openair0_cfg[CC_id].rx_freq[i];
|
||||||
freq_offset=0;
|
freq_offset=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reconfigure for potentially different bandwidth
|
// reconfigure for potentially different bandwidth
|
||||||
switch(UE->frame_parms.N_RB_DL) {
|
switch(UE->frame_parms.N_RB_DL) {
|
||||||
case 6:
|
case 6:
|
||||||
openair0_cfg[0].sample_rate =1.92e6;
|
openair0_cfg[UE->rf_map.card].sample_rate =1.92e6;
|
||||||
openair0_cfg[0].rx_bw =.96e6;
|
openair0_cfg[UE->rf_map.card].rx_bw =.96e6;
|
||||||
openair0_cfg[0].tx_bw =.96e6;
|
openair0_cfg[UE->rf_map.card].tx_bw =.96e6;
|
||||||
// openair0_cfg[0].rx_gain[0] -= 12;
|
// openair0_cfg[0].rx_gain[0] -= 12;
|
||||||
break;
|
break;
|
||||||
case 25:
|
case 25:
|
||||||
openair0_cfg[0].sample_rate =7.68e6;
|
openair0_cfg[UE->rf_map.card].sample_rate =7.68e6;
|
||||||
openair0_cfg[0].rx_bw =2.5e6;
|
openair0_cfg[UE->rf_map.card].rx_bw =2.5e6;
|
||||||
openair0_cfg[0].tx_bw =2.5e6;
|
openair0_cfg[UE->rf_map.card].tx_bw =2.5e6;
|
||||||
// openair0_cfg[0].rx_gain[0] -= 6;
|
// openair0_cfg[0].rx_gain[0] -= 6;
|
||||||
break;
|
break;
|
||||||
case 50:
|
case 50:
|
||||||
openair0_cfg[0].sample_rate =15.36e6;
|
openair0_cfg[UE->rf_map.card].sample_rate =15.36e6;
|
||||||
openair0_cfg[0].rx_bw =5.0e6;
|
openair0_cfg[UE->rf_map.card].rx_bw =5.0e6;
|
||||||
openair0_cfg[0].tx_bw =5.0e6;
|
openair0_cfg[UE->rf_map.card].tx_bw =5.0e6;
|
||||||
// openair0_cfg[0].rx_gain[0] -= 3;
|
// openair0_cfg[0].rx_gain[0] -= 3;
|
||||||
break;
|
break;
|
||||||
case 100:
|
case 100:
|
||||||
openair0_cfg[0].sample_rate=30.72e6;
|
openair0_cfg[UE->rf_map.card].sample_rate=30.72e6;
|
||||||
openair0_cfg[0].rx_bw=10.0e6;
|
openair0_cfg[UE->rf_map.card].rx_bw=10.0e6;
|
||||||
openair0_cfg[0].tx_bw=10.0e6;
|
openair0_cfg[UE->rf_map.card].tx_bw=10.0e6;
|
||||||
// openair0_cfg[0].rx_gain[0] -= 0;
|
// openair0_cfg[0].rx_gain[0] -= 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
@@ -559,25 +545,19 @@ static void *UE_thread_synch(void *arg)
|
|||||||
downlink_frequency[0][0]+freq_offset,
|
downlink_frequency[0][0]+freq_offset,
|
||||||
downlink_frequency[0][0]+uplink_frequency_offset[0][0]+freq_offset );
|
downlink_frequency[0][0]+uplink_frequency_offset[0][0]+freq_offset );
|
||||||
|
|
||||||
for (card=0; card<MAX_CARDS; card++) {
|
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
|
||||||
for (i=0; i<openair0_cfg[card].rx_num_channels; i++) {
|
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+freq_offset;
|
||||||
openair0_cfg[card].rx_freq[i] = downlink_frequency[card][i]+freq_offset;
|
openair0_cfg[UE->rf_map.card].tx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+uplink_frequency_offset[CC_id][i]+freq_offset;
|
||||||
openair0_cfg[card].tx_freq[i] = downlink_frequency[card][i]+uplink_frequency_offset[card][i]+freq_offset;
|
|
||||||
|
openair0_cfg[UE->rf_map.card].rx_gain[UE->rf_map.chain+i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET;
|
||||||
|
|
||||||
|
if (UE->UE_scan_carrier==1) {
|
||||||
|
openair0_cfg[UE->rf_map.card].autocal[UE->rf_map.chain+i] = 1;
|
||||||
openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET;
|
|
||||||
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UE->UE_scan_carrier==1) {
|
|
||||||
for (i=0;i<openair0_cfg[0].rx_num_channels;i++) {
|
|
||||||
// openair0_cfg[0].autocal[i] = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UE->rfdevice.trx_set_freq_func(&UE->rfdevice,&openair0_cfg[0],0);
|
||||||
|
|
||||||
}// initial_sync=0
|
}// initial_sync=0
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user