Commit da3ef782 authored by Guy De Souza's avatar Guy De Souza

SS debug mode

parent 83449968
......@@ -52,6 +52,10 @@ int nr_generate_pss( int16_t *d_pss,
d_pss[i] = (1 - 2*x[m]) * 768;
}
#ifdef NR_PSS_DEBUG
write_output("d_pss.m", "d_pss", (void*)d_pss, NR_PSS_LENGTH, 1, 3);
#endif
/// Resource mapping
a = (config->rf_config.tx_antenna_ports.value == 1) ? amp : (amp*ONE_OVER_SQRT2_Q15)>>15;
......@@ -63,7 +67,7 @@ int nr_generate_pss( int16_t *d_pss,
l = ssb_start_symbol;
for (m = 0; m < NR_PSS_LENGTH; m++) {
((short*)txdataF[aa])[2*(l*frame_parms->ofdm_symbol_size + k)] = (a * d_pss[m]) >> 15;
((int16_t*)txdataF[aa])[2*(l*frame_parms->ofdm_symbol_size + k)] = (a * d_pss[m]) >> 15;
k+=1;
if (k >= frame_parms->ofdm_symbol_size) {
......@@ -73,5 +77,9 @@ int nr_generate_pss( int16_t *d_pss,
}
}
#ifdef NR_PSS_DEBUG
write_output("pss_0.m", "pss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 3);
#endif
return (0);
}
......@@ -62,6 +62,10 @@ int nr_generate_sss( int16_t *d_sss,
d_sss[i] = (1 - 2*x0[(i + m0) % NR_SSS_LENGTH] ) * (1 - 2*x1[(i + m1) % NR_SSS_LENGTH] ) * 768;
}
#ifdef NR_SSS_DEBUG
write_output("d_sss.m", "d_sss", (void*)d_sss, NR_SSS_LENGTH, 1, 3);
#endif
/// Resource mapping
a = (config->rf_config.tx_antenna_ports.value == 1) ? amp : (amp*ONE_OVER_SQRT2_Q15)>>15;
......@@ -82,6 +86,9 @@ int nr_generate_sss( int16_t *d_sss,
}
}
}
#ifdef NR_SSS_DEBUG
write_output("sss_0.m", "sss_0", (void*)txdataF[0][2*l*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 1, 3);
#endif
return (0);
}
......@@ -46,9 +46,9 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
nfapi_config_request_t *cfg = &gNB->gNB_config;
int **txdataF = gNB->common_vars.txdataF;
uint8_t *pbch_pdu=&gNB->pbch_pdu[0];
int ss_subframe = (cfg->sch_config.half_frame_index.value)? 0:5;
int ss_subframe = (cfg->sch_config.half_frame_index.value)? 5 : 0;
LOG_I(PHY,"common_signal_procedures: frame %d, subframe %d\n",frame,subframe);
LOG_D(PHY,"common_signal_procedures: frame %d, subframe %d\n",frame,subframe);
int ssb_start_symbol = nr_get_ssb_start_symbol(cfg, fp);
//nr_set_ssb_first_subcarrier(cfg);
......
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