Commit bd4ad07f authored by Fang-WANG's avatar Fang-WANG

100M ok for ssb at the carrier center

parent da324694
...@@ -495,9 +495,20 @@ int main( int argc, char **argv ) { ...@@ -495,9 +495,20 @@ int main( int argc, char **argv ) {
nrUE_config->carrier_config.dl_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000; nrUE_config->carrier_config.dl_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000;
nrUE_config->carrier_config.uplink_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000; nrUE_config->carrier_config.uplink_frequency = (downlink_frequency[0][0] -(6*UE[CC_id]->frame_parms.N_RB_DL*(15000<<nrUE_config->ssb_config.scs_common)))/1000;
nrUE_config->cell_config.frame_duplex_type = TDD; nrUE_config->cell_config.frame_duplex_type = TDD;
if ((point_a_15khz == 86) && (kssb_15khz == 0))
{
nrUE_config->ssb_table.ssb_offset_point_a = (UE[CC_id]->frame_parms.N_RB_DL - 20)>>1;
if (UE[CC_id]->frame_parms.N_RB_DL == 106)
nrUE_config->ssb_table.ssb_subcarrier_offset = 0; // used as 15kHZ
else
nrUE_config->ssb_table.ssb_subcarrier_offset = 12; // used as 15kHZ
}
else
{
nrUE_config->ssb_table.ssb_offset_point_a = point_a_15khz>>1; // used as 30kHZ //(UE[CC_id]->frame_parms.N_RB_DL - 20)>>1; nrUE_config->ssb_table.ssb_offset_point_a = point_a_15khz>>1; // used as 30kHZ //(UE[CC_id]->frame_parms.N_RB_DL - 20)>>1;
nrUE_config->ssb_table.ssb_subcarrier_offset = kssb_15khz; // used as 15kHZ nrUE_config->ssb_table.ssb_subcarrier_offset = kssb_15khz; // used as 15kHZ
}
LOG_I(PHY, "freq %d %d\n", downlink_frequency[0][0]/1000, nrUE_config->carrier_config.dl_frequency); LOG_I(PHY, "freq %d %d\n", downlink_frequency[0][0]/1000, nrUE_config->carrier_config.dl_frequency);
......
...@@ -136,7 +136,7 @@ void nr_set_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t dl_carrier){ ...@@ -136,7 +136,7 @@ void nr_set_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t dl_carrier){
openair0_cfg->tx_freq[i], openair0_cfg->tx_freq[i],
openair0_cfg->rx_freq[i]); openair0_cfg->rx_freq[i]);
} }
}
ue->rfdevice.trx_set_freq_func(&ue->rfdevice,&openair0_cfg[0],0); ue->rfdevice.trx_set_freq_func(&ue->rfdevice,&openair0_cfg[0],0);
} }
...@@ -458,7 +458,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue, ...@@ -458,7 +458,7 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
} }
if ((startingPRB > (frame_parms->N_RB_DL>>1)) && ((frame_parms->N_RB_DL & 1) == 1)) { // if number RBs in bandwidth is odd and current PRB is upper band if ((startingPRB > (frame_parms->N_RB_DL>>1)) && ((frame_parms->N_RB_DL & 1) == 1)) { // if number RBs in bandwidth is odd and current PRB is upper band
re_offset = ((l+startingSymbolIndex)*frame_parms->ofdm_symbol_size) + (12*(startingPRB-(frame_parms->N_RB_DL>>1))) + 6; re_offset = ((l+startingSymbolIndex)*frame_parms->ofdm_symbol_size) + (12*(startingPRB-(frame_parms->N_RB_DL>>1))) - 6;
} }
if ((startingPRB == (frame_parms->N_RB_DL>>1)) && ((frame_parms->N_RB_DL & 1) == 1)) { // if number RBs in bandwidth is odd and current PRB contains DC if ((startingPRB == (frame_parms->N_RB_DL>>1)) && ((frame_parms->N_RB_DL & 1) == 1)) { // if number RBs in bandwidth is odd and current PRB contains DC
......
...@@ -611,7 +611,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ ...@@ -611,7 +611,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
pucch_resource_id, format, nb_symbols_total, starting_symbol_index, startingPRB, secondHopPRB, harq_status->n_CCE, harq_status->N_CCE, harq_status->pucch_resource_indicator, m_0); pucch_resource_id, format, nb_symbols_total, starting_symbol_index, startingPRB, secondHopPRB, harq_status->n_CCE, harq_status->N_CCE, harq_status->pucch_resource_indicator, m_0);
startingPRB = 0; startingPRB = 0;
secondHopPRB = 105; secondHopPRB = 272;
m_0 = 0; m_0 = 0;
} }
...@@ -907,7 +907,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_ ...@@ -907,7 +907,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
} }
case pucch_format1_nr: case pucch_format1_nr:
{ {
LOG_D(PHY, "pucch1: slot %d, m0 %d, symbols %d, %d, prb %d, %d, occ %d, NUCI %d, payload %d\n", LOG_I(PHY, "pucch1: slot %d, m0 %d, symbols %d, %d, prb %d, %d, occ %d, NUCI %d, payload %d\n",
nr_slot_tx, nr_slot_tx,
(uint8_t)m_0, (uint8_t)m_0,
nb_symbols_total, nb_symbols_total,
......
...@@ -153,7 +153,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id, ...@@ -153,7 +153,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
uint8_t scs_ssb = get_softmodem_params()->numerology; uint8_t scs_ssb = get_softmodem_params()->numerology;
uint32_t band = get_softmodem_params()->band; uint32_t band = get_softmodem_params()->band;
uint16_t ssb_start_symbol = get_ssb_start_symbol(band,scs_ssb,ssb_index); uint16_t ssb_start_symbol = get_ssb_start_symbol(band,scs_ssb,ssb_index);
uint16_t ssb_offset_point_a = (ssb_start_subcarrier - ssb_subcarrier_offset)/12; uint16_t ssb_offset_point_a = (ssb_start_subcarrier - ssb_subcarrier_offset/2)/12;// ssb_subcarrier_offset is 15khz step
get_type0_PDCCH_CSS_config_parameters(&mac->type0_PDCCH_CSS_config, get_type0_PDCCH_CSS_config_parameters(&mac->type0_PDCCH_CSS_config,
frame, frame,
......
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