Commit 0f47f01c authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'enhancement-10-harmony' of...

Merge branch 'enhancement-10-harmony' of https://gitlab.eurecom.fr/oai/openairinterface5g into enhancement-10-harmony
parents 848f7846 5575fed2
...@@ -1185,9 +1185,7 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1185,9 +1185,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
break; break;
} }
if (eNB->frame_parms.threequarter_fs == 1) // Adjust CP length based on UL bandwidth
Ncp=(Ncp*3)>>2;
switch (eNB->frame_parms.N_RB_UL) { switch (eNB->frame_parms.N_RB_UL) {
case 6: case 6:
Ncp>>=4; Ncp>>=4;
...@@ -1208,6 +1206,11 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1208,6 +1206,11 @@ void rx_prach(PHY_VARS_eNB *eNB,
case 75: case 75:
Ncp=(Ncp*3)>>2; Ncp=(Ncp*3)>>2;
break; break;
case 100:
if (eNB->frame_parms.threequarter_fs == 1)
Ncp=(Ncp*3)>>2;
break;
} }
......
...@@ -66,8 +66,9 @@ int beam_precoding(int32_t **txdataF, ...@@ -66,8 +66,9 @@ int beam_precoding(int32_t **txdataF,
for (p=0; p<14; p++) { for (p=0; p<14; p++) {
//if (p==0 || p==1 || p==5 || p>7) //if (p==0 || p==1 || p==5 || p>7)
// mult_cpx_conj_vector((int16_t*)txdataF[p], (int16_t*)beam_weights[p][aa], (int16_t*)txdataF_BF[aa], frame_parms->ofdm_symbol_size, 15); // mult_cpx_conj_vector((int16_t*)txdataF[p], (int16_t*)beam_weights[p][aa], (int16_t*)txdataF_BF[aa], frame_parms->ofdm_symbol_size, 15);
if (txdataF[p]) {//[slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re]!=0) {
for (re=0;re<frame_parms->ofdm_symbol_size;re++) { for (re=0;re<frame_parms->ofdm_symbol_size;re++) {
if ((p==0 || p==1 || p==5 || p>=7) && txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re]!=0) {
((int16_t*)&txdataF_BF[aa][re])[0] += (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[0]*((int16_t*)&beam_weights[p][aa][re])[0])>>15); ((int16_t*)&txdataF_BF[aa][re])[0] += (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[0]*((int16_t*)&beam_weights[p][aa][re])[0])>>15);
((int16_t*)&txdataF_BF[aa][re])[0] -= (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[1]*((int16_t*)&beam_weights[p][aa][re])[1])>>15); ((int16_t*)&txdataF_BF[aa][re])[0] -= (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[1]*((int16_t*)&beam_weights[p][aa][re])[1])>>15);
((int16_t*)&txdataF_BF[aa][re])[1] += (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[0]*((int16_t*)&beam_weights[p][aa][re])[1])>>15); ((int16_t*)&txdataF_BF[aa][re])[1] += (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[0]*((int16_t*)&beam_weights[p][aa][re])[1])>>15);
......
...@@ -2032,8 +2032,8 @@ void prach_procedures(PHY_VARS_eNB *eNB) { ...@@ -2032,8 +2032,8 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
T_INT(preamble_max), T_INT(preamble_energy_max), T_INT(preamble_delay_list[preamble_max])); T_INT(preamble_max), T_INT(preamble_energy_max), T_INT(preamble_delay_list[preamble_max]));
if (eNB->mac_enabled==1) { if (eNB->mac_enabled==1) {
uint8_t update_TA=4; uint8_t update_TA = 4;
uint8_t update_TA2 = 1;
switch (fp->N_RB_DL) { switch (fp->N_RB_DL) {
case 6: case 6:
update_TA = 16; update_TA = 16;
...@@ -2047,6 +2047,9 @@ void prach_procedures(PHY_VARS_eNB *eNB) { ...@@ -2047,6 +2047,9 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
update_TA = 2; update_TA = 2;
break; break;
case 75:
update_TA = 3;
update_TA2 = 2;
case 100: case 100:
update_TA = 1; update_TA = 1;
break; break;
...@@ -2056,7 +2059,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) { ...@@ -2056,7 +2059,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
eNB->CC_id, eNB->CC_id,
frame, frame,
preamble_max, preamble_max,
preamble_delay_list[preamble_max]*update_TA, preamble_delay_list[preamble_max]*update_TA/update_TA2,
0,subframe,0); 0,subframe,0);
} }
......
...@@ -128,8 +128,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, ...@@ -128,8 +128,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
rnti = UE_RNTI(module_idP, i); rnti = UE_RNTI(module_idP, i);
CC_id = UE_PCCID(module_idP, i); CC_id = UE_PCCID(module_idP, i);
if ((frameP==0)&&(subframeP==0)) if ((frameP==0)&&(subframeP==0))
LOG_I(MAC,"UE rnti %x : %s\n", rnti, LOG_I(MAC,"UE rnti %x : %s, PHR %d dB\n", rnti,
UE_list->UE_sched_ctrl[i].ul_out_of_sync==0 ? "in synch" : "out of sync"); UE_list->UE_sched_ctrl[i].ul_out_of_sync==0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][i].phr_info);
next_i= UE_list->next[i]; next_i= UE_list->next[i];
......
...@@ -791,7 +791,10 @@ void dlsch_scheduler_pre_processor_reset (int module_idP, ...@@ -791,7 +791,10 @@ void dlsch_scheduler_pre_processor_reset (int module_idP,
break; break;
case 100: case 100:
if (PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.threequarter_fs == 0)
ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/16; ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/16;
else
ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/12;
break; break;
} }
// clear the update in case PHY does not have a new measurement after timer expiry // clear the update in case PHY does not have a new measurement after timer expiry
......
...@@ -31,7 +31,7 @@ eNBs = ...@@ -31,7 +31,7 @@ eNBs =
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 = 100; N_RB_DL = 100;
...@@ -70,7 +70,7 @@ eNBs = ...@@ -70,7 +70,7 @@ eNBs =
pusch_p0_Nominal = -96; pusch_p0_Nominal = -96;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
pucch_p0_Nominal = -100; 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";
...@@ -149,7 +149,7 @@ eNBs = ...@@ -149,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
}; };
......
...@@ -31,7 +31,7 @@ eNBs = ...@@ -31,7 +31,7 @@ eNBs =
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 = 2685000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 50; N_RB_DL = 50;
...@@ -149,7 +149,7 @@ eNBs = ...@@ -149,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
}; };
......
...@@ -150,7 +150,7 @@ eNBs = ...@@ -150,7 +150,7 @@ eNBs =
ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
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
}; };
......
...@@ -151,7 +151,7 @@ eNBs = ...@@ -151,7 +151,7 @@ eNBs =
ENB_INTERFACE_NAME_FOR_S1_MME = "lo"; ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
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
}; };
......
...@@ -128,7 +128,7 @@ extern pthread_cond_t sync_cond; ...@@ -128,7 +128,7 @@ extern pthread_cond_t sync_cond;
extern pthread_mutex_t sync_mutex; extern pthread_mutex_t sync_mutex;
extern int sync_var; extern int sync_var;
extern transmission_mode; extern int transmission_mode;
//pthread_t main_eNB_thread; //pthread_t main_eNB_thread;
...@@ -1014,7 +1014,7 @@ void rx_fh_if4p5(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -1014,7 +1014,7 @@ void rx_fh_if4p5(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
uint16_t packet_type; uint16_t packet_type;
uint32_t symbol_number=0; uint32_t symbol_number=0;
uint32_t symbol_mask, symbol_mask_full; uint32_t symbol_mask_full;
symbol_mask_full = (1<<fp->symbols_per_tti)-1; symbol_mask_full = (1<<fp->symbols_per_tti)-1;
...@@ -1262,6 +1262,7 @@ void *eNB_thread_synch(void *arg) { ...@@ -1262,6 +1262,7 @@ void *eNB_thread_synch(void *arg) {
lte_sync_time_free(); lte_sync_time_free();
return NULL;
} }
int wakeup_synch(PHY_VARS_eNB *eNB){ int wakeup_synch(PHY_VARS_eNB *eNB){
...@@ -1490,6 +1491,10 @@ static void* eNB_thread_single( void* param ) { ...@@ -1490,6 +1491,10 @@ static void* eNB_thread_single( void* param ) {
rxp, rxp,
fp->samples_per_tti*10, fp->samples_per_tti*10,
fp->nb_antennas_rx); fp->nb_antennas_rx);
if (rxs != (fp->samples_per_tti*10))
exit_fun("Problem receiving samples\n");
// wakeup synchronization processing thread // wakeup synchronization processing thread
wakeup_synch(eNB); wakeup_synch(eNB);
ic=0; ic=0;
...@@ -1506,6 +1511,9 @@ static void* eNB_thread_single( void* param ) { ...@@ -1506,6 +1511,9 @@ static void* eNB_thread_single( void* param ) {
rxp2, rxp2,
fp->samples_per_tti, fp->samples_per_tti,
fp->nb_antennas_rx); fp->nb_antennas_rx);
if (rxs != fp->samples_per_tti)
exit_fun( "problem receiving samples" );
pthread_mutex_lock(&eNB->proc.mutex_synch); pthread_mutex_lock(&eNB->proc.mutex_synch);
ic = eNB->proc.instance_cnt_synch; ic = eNB->proc.instance_cnt_synch;
pthread_mutex_unlock(&eNB->proc.mutex_synch); pthread_mutex_unlock(&eNB->proc.mutex_synch);
...@@ -1518,6 +1526,9 @@ static void* eNB_thread_single( void* param ) { ...@@ -1518,6 +1526,9 @@ static void* eNB_thread_single( void* param ) {
rxp, rxp,
eNB->rx_offset, eNB->rx_offset,
fp->nb_antennas_rx); fp->nb_antennas_rx);
if (rxs != eNB->rx_offset)
exit_fun( "problem receiving samples" );
for (i=0;i<4;i++) { for (i=0;i<4;i++) {
eNB->rfdevice.openair0_cfg->rx_freq[i] = temp_freq1; eNB->rfdevice.openair0_cfg->rx_freq[i] = temp_freq1;
eNB->rfdevice.openair0_cfg->tx_freq[i] = temp_freq2; eNB->rfdevice.openair0_cfg->tx_freq[i] = temp_freq2;
...@@ -1880,7 +1891,7 @@ int start_rf(PHY_VARS_eNB *eNB) { ...@@ -1880,7 +1891,7 @@ int start_rf(PHY_VARS_eNB *eNB) {
return(eNB->rfdevice.trx_start_func(&eNB->rfdevice)); return(eNB->rfdevice.trx_start_func(&eNB->rfdevice));
} }
extern void eNB_fep_rru_if5(PHY_VARS_eNB *eNB); extern void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); extern void eNB_fep_full_2thread(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
extern void do_prach(PHY_VARS_eNB *eNB,int frame,int subframe); extern void do_prach(PHY_VARS_eNB *eNB,int frame,int subframe);
...@@ -1968,7 +1979,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst ...@@ -1968,7 +1979,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
break; break;
case eNodeB_3GPP: case eNodeB_3GPP:
eNB->do_precoding = 1; eNB->do_precoding = (eNB->frame_parms.nb_antennas_tx==1) ? 0 : 1;
eNB->do_prach = do_prach; eNB->do_prach = do_prach;
eNB->fep = eNB_fep_full;//(single_thread_flag==1) ? eNB_fep_full_2thread : eNB_fep_full; eNB->fep = eNB_fep_full;//(single_thread_flag==1) ? eNB_fep_full_2thread : eNB_fep_full;
eNB->td = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data; eNB->td = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
...@@ -1989,7 +2000,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst ...@@ -1989,7 +2000,7 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB->ifdevice.host_type = BBU_HOST; eNB->ifdevice.host_type = BBU_HOST;
break; break;
case eNodeB_3GPP_BBU: case eNodeB_3GPP_BBU:
eNB->do_precoding = 1; eNB->do_precoding = (eNB->frame_parms.nb_antennas_tx==1) ? 0 : 1;
eNB->do_prach = do_prach; eNB->do_prach = do_prach;
eNB->fep = eNB_fep_full;//(single_thread_flag==1) ? eNB_fep_full_2thread : eNB_fep_full; eNB->fep = eNB_fep_full;//(single_thread_flag==1) ? eNB_fep_full_2thread : eNB_fep_full;
eNB->td = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data; eNB->td = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
......
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