Commit b38310a1 authored by Francesco Mani's avatar Francesco Mani

pbchsim works again

parent 22af6a3a
......@@ -338,7 +338,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
gNB_config->cell_config.phy_cell_id.value = Nid_cell;
gNB_config->ssb_config.scs_common.value = mu;
gNB_config->ssb_table.ssb_subcarrier_offset.value = 0;
gNB_config->ssb_table.ssb_offset_point_a.value = (N_RB_DL-20);
gNB_config->ssb_table.ssb_offset_point_a.value = (N_RB_DL-20)>>1;
gNB_config->ssb_table.ssb_mask_list[0].ssb_mask.value = position_in_burst;
gNB_config->ssb_table.ssb_mask_list[1].ssb_mask.value = position_in_burst>>32;
gNB_config->cell_config.frame_duplex_type.value = TDD;
......
......@@ -649,7 +649,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
int i,j,k,l,slot,symb,q;
int eNB_id;
int th_id;
int n_ssb_crb=(fp->N_RB_DL-20);
int n_ssb_crb=(fp->N_RB_DL-20)>>1;
int k_ssb=0;
uint32_t ****pusch_dmrs;
uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
......
......@@ -299,7 +299,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
{
/*n_ssb_crb and ssb_subcarrier_offset are given in 15kHz SCS*/
nr_init_frame_parms0(fp,mu,Ncp,N_RB_DL);
fp->ssb_start_subcarrier = (12 * n_ssb_crb + ssb_subcarrier_offset)/(1<<mu);
fp->ssb_start_subcarrier = (12 * n_ssb_crb + ssb_subcarrier_offset);
return 0;
}
......
......@@ -215,7 +215,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode,
int rx_power=0; //aarx,
//nfapi_nr_config_request_t* config;
int n_ssb_crb=(fp->N_RB_DL-20);
int n_ssb_crb=(fp->N_RB_DL-20)>>1;
// First try TDD normal prefix, mu 1
fp->Ncp=NORMAL;
fp->frame_type=TDD;
......
......@@ -341,7 +341,7 @@ int do_pss_sss_extract_nr(PHY_VARS_NR_UE *ue,
pss_rxF_ext = &pss_ext[aarx][0];
sss_rxF_ext = &sss_ext[aarx][0];
unsigned int k = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier + 56;
unsigned int k = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier + 56;
if (k>= frame_parms->ofdm_symbol_size) k-=frame_parms->ofdm_symbol_size;
for (int i=0; i < LENGTH_PSS_NR; i++) {
......
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