Commit 5bacfb40 authored by francescomani's avatar francescomani

another attempt at fixing FR2 RA

parent 9b903ea2
...@@ -1179,12 +1179,12 @@ int get_format0(uint8_t index, ...@@ -1179,12 +1179,12 @@ int get_format0(uint8_t index,
return format; return format;
} }
int64_t *get_prach_config_info(int fr2_flag, int64_t *get_prach_config_info(frequency_range_t freq_range,
uint8_t index, uint8_t index,
uint8_t unpaired) { uint8_t unpaired) {
int64_t *prach_config_info_p; int64_t *prach_config_info_p;
if (fr2_flag > 0) { //FR2 if (freq_range == FR2) { //FR2
prach_config_info_p = table_6_3_3_2_4_prachConfig_Index[index]; prach_config_info_p = table_6_3_3_2_4_prachConfig_Index[index];
} }
else { // FR1 else { // FR1
......
...@@ -113,7 +113,7 @@ int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig,long transformPreco ...@@ -113,7 +113,7 @@ int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig,long transformPreco
int get_format0(uint8_t index, uint8_t unpaired,frequency_range_t); int get_format0(uint8_t index, uint8_t unpaired,frequency_range_t);
int64_t *get_prach_config_info(int fr2_flag, int64_t *get_prach_config_info(frequency_range_t freq_range,
uint8_t index, uint8_t index,
uint8_t unpaired); uint8_t unpaired);
......
...@@ -209,7 +209,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, ...@@ -209,7 +209,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
} }
uint32_t band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]; uint32_t band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0];
frequency_range_t frequency_range = band<100?FR1:FR2; mac->frequency_range = band<100?FR1:FR2;
lte_frame_type_t frame_type = get_frame_type(*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing); lte_frame_type_t frame_type = get_frame_type(*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing);
...@@ -320,7 +320,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac, ...@@ -320,7 +320,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart; cfg->prach_config.num_prach_fd_occasions_list[i].k1 = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart;
cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig; cfg->prach_config.num_prach_fd_occasions_list[i].prach_zero_corr_conf = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig;
cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup, nb_preambles, frame_type,frequency_range); cfg->prach_config.num_prach_fd_occasions_list[i].num_root_sequences = compute_nr_root_seq(scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup,
nb_preambles, frame_type,mac->frequency_range);
//cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ??? //cfg->prach_config.num_prach_fd_occasions_list[i].num_unused_root_sequences = ???
} }
......
...@@ -1210,10 +1210,8 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) { ...@@ -1210,10 +1210,8 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) {
int unpaired = mac->phy_config.config_req.cell_config.frame_duplex_type; int unpaired = mac->phy_config.config_req.cell_config.frame_duplex_type;
// Identify the proper PRACH Configuration Index table according to the operating frequency // Identify the proper PRACH Configuration Index table according to the operating frequency
LOG_D(NR_MAC,"mu = %u, PRACH config index = %u, unpaired = %u\n", mu, config_index, unpaired); LOG_D(NR_MAC,"mu = %u, PRACH config index = %u, unpaired = %u\n", mu, config_index, unpaired);
int fr2_flag=0;
if (downlink_frequency[0][0] > 6e9) fr2_flag = 1;
prach_config_info_p = get_prach_config_info(fr2_flag, config_index, unpaired); prach_config_info_p = get_prach_config_info(mac->frequency_range, config_index, unpaired);
if (mac->frequency_range == FR2) { //FR2 if (mac->frequency_range == FR2) { //FR2
......
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