Commit c43593c8 authored by Marwan Hammouda's avatar Marwan Hammouda

changes to make HO working with FDD

parent e17fcf08
...@@ -593,9 +593,15 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) ...@@ -593,9 +593,15 @@ nr_phy_data_t UE_dl_preprocessing(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc)
if (UE->synch_request.received_synch_request == 1 && UE->target_Nid_cell == -1) { if (UE->synch_request.received_synch_request == 1 && UE->target_Nid_cell == -1) {
fapi_nr_synch_request_t *synch_req = &UE->synch_request.synch_req; fapi_nr_synch_request_t *synch_req = &UE->synch_request.synch_req;
if( synch_req->absoluteFrequencySSB != UINT64_MAX) { if( synch_req->absoluteFrequencySSB != UINT64_MAX) {
UE->frame_parms.dl_CarrierFreq = synch_req->absoluteFrequencySSB;
UE->frame_parms.ul_CarrierFreq = synch_req->absoluteFrequencySSB; uint64_t diff = UE->frame_parms.dl_CarrierFreq - UE->frame_parms.ul_CarrierFreq;
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], UE->frame_parms.dl_CarrierFreq, UE->frame_parms.ul_CarrierFreq, 0); uint64_t dl_bw = (12 * UE->frame_parms.N_RB_DL) * (15000 << synch_req->scs);
uint64_t dl_CarrierFreq = (dl_bw >> 1) + synch_req->absoluteFrequencyPointA;
UE->frame_parms.dl_CarrierFreq = dl_CarrierFreq;
UE->frame_parms.ul_CarrierFreq = dl_CarrierFreq - diff;
nr_rf_card_config_freq(&openair0_cfg[UE->rf_map.card], UE->frame_parms.ul_CarrierFreq, UE->frame_parms.dl_CarrierFreq, 0);
UE->rfdevice.trx_set_freq_func(&UE->rfdevice, &openair0_cfg[0]); UE->rfdevice.trx_set_freq_func(&UE->rfdevice, &openair0_cfg[0]);
init_symbol_rotation(&UE->frame_parms); init_symbol_rotation(&UE->frame_parms);
} }
......
...@@ -688,6 +688,7 @@ typedef struct { ...@@ -688,6 +688,7 @@ typedef struct {
typedef struct { typedef struct {
uint64_t absoluteFrequencySSB; uint64_t absoluteFrequencySSB;
uint64_t absoluteFrequencyPointA; uint64_t absoluteFrequencyPointA;
uint8_t scs;
uint16_t target_Nid_cell; uint16_t target_Nid_cell;
} fapi_nr_synch_request_t; } fapi_nr_synch_request_t;
......
...@@ -761,6 +761,9 @@ void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac, ...@@ -761,6 +761,9 @@ void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac,
if (reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon && reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon->frequencyInfoDL) { if (reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon && reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon->frequencyInfoDL) {
struct NR_FrequencyInfoDL *frequencyInfoDL = reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon->frequencyInfoDL; struct NR_FrequencyInfoDL *frequencyInfoDL = reconfigurationWithSync->spCellConfigCommon->downlinkConfigCommon->frequencyInfoDL;
mac->synch_request.synch_req.scs = frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing;
mac->synch_request.synch_req.absoluteFrequencySSB = from_nrarfcn(*frequencyInfoDL->frequencyBandList.list.array[0], mac->synch_request.synch_req.absoluteFrequencySSB = from_nrarfcn(*frequencyInfoDL->frequencyBandList.list.array[0],
frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing, frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
*frequencyInfoDL->absoluteFrequencySSB); *frequencyInfoDL->absoluteFrequencySSB);
......
...@@ -1985,7 +1985,7 @@ static int get_nr_prach_info_from_ssb_index(uint8_t ssb_idx, ...@@ -1985,7 +1985,7 @@ static int get_nr_prach_info_from_ssb_index(uint8_t ssb_idx,
for (uint8_t n_mapped_ro=0; n_mapped_ro<ssb_info_p->nb_mapped_ro; n_mapped_ro++) { for (uint8_t n_mapped_ro=0; n_mapped_ro<ssb_info_p->nb_mapped_ro; n_mapped_ro++) {
LOG_D(NR_MAC,"%d.%d: mapped_ro[%d]->frame.slot %d.%d, prach_assoc_pattern.nb_of_frame %d\n", LOG_D(NR_MAC,"%d.%d: mapped_ro[%d]->frame.slot %d.%d, prach_assoc_pattern.nb_of_frame %d\n",
frame,slot,n_mapped_ro,ssb_info_p->mapped_ro[n_mapped_ro]->frame,ssb_info_p->mapped_ro[n_mapped_ro]->slot,prach_assoc_pattern.nb_of_frame); frame,slot,n_mapped_ro,ssb_info_p->mapped_ro[n_mapped_ro]->frame,ssb_info_p->mapped_ro[n_mapped_ro]->slot,prach_assoc_pattern.nb_of_frame);
if ((slot == ssb_info_p->mapped_ro[n_mapped_ro]->slot) && if ((slot == ssb_info_p->mapped_ro[n_mapped_ro]->slot) && prach_assoc_pattern.prach_conf_period_list[0].nb_of_frame != 0 &&
(ssb_info_p->mapped_ro[n_mapped_ro]->frame == (frame % prach_assoc_pattern.nb_of_frame))) { (ssb_info_p->mapped_ro[n_mapped_ro]->frame == (frame % prach_assoc_pattern.nb_of_frame))) {
uint8_t prach_config_period_nb = ssb_info_p->mapped_ro[n_mapped_ro]->frame / prach_assoc_pattern.prach_conf_period_list[0].nb_of_frame; uint8_t prach_config_period_nb = ssb_info_p->mapped_ro[n_mapped_ro]->frame / prach_assoc_pattern.prach_conf_period_list[0].nb_of_frame;
......
...@@ -342,7 +342,7 @@ static uint32_t schedule_control_sib1(module_id_t module_id, ...@@ -342,7 +342,7 @@ static uint32_t schedule_control_sib1(module_id_t module_id,
if(rbSize < bwpSize && !(vrb_map[rbStart + rbSize]&SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols))) if(rbSize < bwpSize && !(vrb_map[rbStart + rbSize]&SL_to_bitmap(tda_info->startSymbolIndex, tda_info->nrOfSymbols)))
rbSize++; rbSize++;
else{ else{
if (pdsch->mcs<10) if (pdsch->mcs<27)
pdsch->mcs++; pdsch->mcs++;
else else
break; break;
......
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