Commit 597ddf75 authored by Mario Hudon's avatar Mario Hudon

Merged in some FR2 fixes from Rakesh

parent 384fc315
...@@ -691,9 +691,9 @@ int main( int argc, char **argv ) { ...@@ -691,9 +691,9 @@ int main( int argc, char **argv ) {
nr_init_frame_parms_ue(frame_parms[CC_id],nrUE_config,NORMAL); nr_init_frame_parms_ue(frame_parms[CC_id],nrUE_config,NORMAL);
// Overwrite DL frequency (for FR2 testing) // Overwrite DL frequency (for FR2 testing)
if (downlink_frequency[0][0]!=0) //if (downlink_frequency[0][0]!=0)
frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0]; // frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0];
init_nr_ue_vars(UE[CC_id],frame_parms[CC_id],0,abstraction_flag); init_nr_ue_vars(UE[CC_id],frame_parms[CC_id],0,abstraction_flag);
UE[CC_id]->mac_enabled = 1; UE[CC_id]->mac_enabled = 1;
...@@ -752,7 +752,14 @@ int main( int argc, char **argv ) { ...@@ -752,7 +752,14 @@ int main( int argc, char **argv ) {
UE[CC_id]->N_TA_offset = (int)(N_TA_offset * factor); UE[CC_id]->N_TA_offset = (int)(N_TA_offset * factor);
LOG_I(PHY,"UE %d Setting N_TA_offset to %d samples (factor %f, UL Freq %lu, N_RB %d)\n", UE[CC_id]->Mod_id, UE[CC_id]->N_TA_offset, factor, UE[CC_id]->frame_parms.ul_CarrierFreq, N_RB); LOG_I(PHY,"UE %d Setting N_TA_offset to %d samples (factor %f, UL Freq %lu, N_RB %d)\n", UE[CC_id]->Mod_id, UE[CC_id]->N_TA_offset, factor, UE[CC_id]->frame_parms.ul_CarrierFreq, N_RB);
} }
}
// Overwrite DL frequency (for FR2 testing)
if (downlink_frequency[0][0]!=0){
frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0];
if (frame_parms[CC_id]->frame_type == TDD)
frame_parms[CC_id]->ul_CarrierFreq = downlink_frequency[0][0];
}
}
// printf("tx_max_power = %d -> amp %d\n",tx_max_power[0],get_tx_amp(tx_max_poHwer,tx_max_power)); // printf("tx_max_power = %d -> amp %d\n",tx_max_power[0],get_tx_amp(tx_max_poHwer,tx_max_power));
init_openair0(); init_openair0();
......
...@@ -461,9 +461,15 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms, ...@@ -461,9 +461,15 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
dft(dftsize,(int16_t *)&tmp_dft_in, dft(dftsize,(int16_t *)&tmp_dft_in,
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1); (int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
} }
else else{
dft(dftsize,(int16_t *)&rxdata[rxdata_offset-sample_offset], //dft(dftsize,(int16_t *)&rxdata[rxdata_offset-sample_offset],
// (int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
memcpy((void *)tmp_dft_in,
(void *) &rxdata[rxdata_offset-sample_offset],
(frame_parms->ofdm_symbol_size)*sizeof(int));
dft(dftsize,(int16_t *)&tmp_dft_in,
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1); (int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
}
// clear DC carrier from OFDM symbols // clear DC carrier from OFDM symbols
rxdataF[symbol * frame_parms->ofdm_symbol_size] = 0; rxdataF[symbol * frame_parms->ofdm_symbol_size] = 0;
......
...@@ -1151,6 +1151,7 @@ static void build_ro_list(NR_ServingCellConfigCommon_t *scc) { ...@@ -1151,6 +1151,7 @@ static void build_ro_list(NR_ServingCellConfigCommon_t *scc) {
prach_occasion_p->frame = frame; prach_occasion_p->frame = frame;
prach_occasion_p->slot = slot; prach_occasion_p->slot = slot;
prach_occasion_p->format = format; prach_occasion_p->format = format;
printf("\nprach_conf_period_idx : %d, .nb_of_prach_occasion : %d\n",prach_conf_period_idx,prach_assoc_pattern.prach_conf_period_list[prach_conf_period_idx].nb_of_prach_occasion);
prach_assoc_pattern.prach_conf_period_list[prach_conf_period_idx].nb_of_prach_occasion++; prach_assoc_pattern.prach_conf_period_list[prach_conf_period_idx].nb_of_prach_occasion++;
LOG_D(MAC,"Adding a PRACH occasion: fdm %d, frame %d, slot-symbol %d-%d, occ_in_time-occ_in-freq %d-%d, nb ROs in conf period %d, for this slot: RO# in time %d, RO# in freq %d\n", LOG_D(MAC,"Adding a PRACH occasion: fdm %d, frame %d, slot-symbol %d-%d, occ_in_time-occ_in-freq %d-%d, nb ROs in conf period %d, for this slot: RO# in time %d, RO# in freq %d\n",
......
...@@ -205,7 +205,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, ...@@ -205,7 +205,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
uint16_t band; uint16_t band;
int32_t offset; int32_t offset;
get_band((cfg->carrier_config.dl_frequency)*1000, get_band((uint64_t)(cfg->carrier_config.dl_frequency)*1000,
&band, &band,
&offset, &offset,
&frame_type); &frame_type);
......
...@@ -125,7 +125,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm ...@@ -125,7 +125,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
uint16_t band; uint16_t band;
int32_t offset; int32_t offset;
get_band((cfg->carrier_config.dl_frequency.value)*1000, get_band((uint64_t)(cfg->carrier_config.dl_frequency.value)*1000,
&band, &band,
&offset, &offset,
&frame_type); &frame_type);
......
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