fix SIB1 detection in slot different than 0
moving slot assignment before pdcch functions
This commit is contained in:
@@ -739,8 +739,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
int re_offset = k;
|
int re_offset = k;
|
||||||
|
|
||||||
#ifdef DEBUG_PDSCH
|
#ifdef DEBUG_PDSCH
|
||||||
printf("PDSCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, symbol_offset %d OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",proc->thread_id, gNB_id,ch_offset,symbol_offset,ue->frame_parms.ofdm_symbol_size,
|
printf("PDSCH Channel Estimation : ThreadId %d, gNB_id %d ch_offset %d, symbol_offset %d OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",
|
||||||
ue->frame_parms.Ncp,Ns,k, symbol);
|
proc->thread_id, gNB_id,ch_offset,symbol_offset,ue->frame_parms.ofdm_symbol_size, ue->frame_parms.Ncp,Ns,k, symbol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// generate pilot for gNB port number 1000+p
|
// generate pilot for gNB port number 1000+p
|
||||||
|
|||||||
@@ -403,7 +403,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (cpumeas(CPUMEAS_GETSTATE))
|
if (cpumeas(CPUMEAS_GETSTATE))
|
||||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,nr_slot_rx,slot,symbol,first_symbol_flag,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",
|
||||||
|
frame,nr_slot_rx,slot,symbol,first_symbol_flag,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
//--------------------- channel compensation ---------------
|
//--------------------- channel compensation ---------------
|
||||||
@@ -428,7 +429,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
measurements); // log2_maxh+I0_shift
|
measurements); // log2_maxh+I0_shift
|
||||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||||
if (cpumeas(CPUMEAS_GETSTATE))
|
if (cpumeas(CPUMEAS_GETSTATE))
|
||||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",
|
||||||
|
frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||||
|
|
||||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||||
|
|
||||||
@@ -464,7 +466,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
dl_ch_mag_ptr = pdsch_vars[gNB_id_i]->dl_ch_mag0;
|
dl_ch_mag_ptr = pdsch_vars[gNB_id_i]->dl_ch_mag0;
|
||||||
|
|
||||||
if (cpumeas(CPUMEAS_GETSTATE))
|
if (cpumeas(CPUMEAS_GETSTATE))
|
||||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine and zero forcing %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine and zero forcing %5.2f \n",
|
||||||
|
frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||||
|
|
||||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||||
/* Store the valid DL RE's */
|
/* Store the valid DL RE's */
|
||||||
@@ -544,7 +547,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||||
if (cpumeas(CPUMEAS_GETSTATE))
|
if (cpumeas(CPUMEAS_GETSTATE))
|
||||||
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
LOG_D(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",
|
||||||
|
frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||||
|
|
||||||
// Please keep it: useful for debugging
|
// Please keep it: useful for debugging
|
||||||
#ifdef DEBUG_PDSCH_RX
|
#ifdef DEBUG_PDSCH_RX
|
||||||
@@ -635,21 +639,21 @@ void nr_dlsch_deinterleaving(uint8_t symbol,
|
|||||||
//==============================================================================================
|
//==============================================================================================
|
||||||
|
|
||||||
void nr_dlsch_channel_compensation(int **rxdataF_ext,
|
void nr_dlsch_channel_compensation(int **rxdataF_ext,
|
||||||
int **dl_ch_estimates_ext,
|
int **dl_ch_estimates_ext,
|
||||||
int **dl_ch_mag,
|
int **dl_ch_mag,
|
||||||
int **dl_ch_magb,
|
int **dl_ch_magb,
|
||||||
int **dl_ch_magr,
|
int **dl_ch_magr,
|
||||||
int **rxdataF_comp,
|
int **rxdataF_comp,
|
||||||
int ***rho,
|
int ***rho,
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
uint8_t nb_aatx,
|
uint8_t nb_aatx,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
int length,
|
int length,
|
||||||
uint8_t first_symbol_flag,
|
uint8_t first_symbol_flag,
|
||||||
unsigned char mod_order,
|
unsigned char mod_order,
|
||||||
unsigned short nb_rb,
|
unsigned short nb_rb,
|
||||||
unsigned char output_shift,
|
unsigned char output_shift,
|
||||||
PHY_NR_MEASUREMENTS *measurements)
|
PHY_NR_MEASUREMENTS *measurements)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined(__i386) || defined(__x86_64)
|
#if defined(__i386) || defined(__x86_64)
|
||||||
@@ -1647,7 +1651,6 @@ void nr_dlsch_extract_rbs(int **rxdataF,
|
|||||||
} else {
|
} else {
|
||||||
int neg_length = frame_parms->ofdm_symbol_size - start_re;
|
int neg_length = frame_parms->ofdm_symbol_size - start_re;
|
||||||
int pos_length = nb_rb_pdsch * NR_NB_SC_PER_RB - neg_length;
|
int pos_length = nb_rb_pdsch * NR_NB_SC_PER_RB - neg_length;
|
||||||
|
|
||||||
memcpy(rxF_ext, &rxF[start_re], neg_length * sizeof(int32_t));
|
memcpy(rxF_ext, &rxF[start_re], neg_length * sizeof(int32_t));
|
||||||
memcpy(&rxF_ext[neg_length], rxF, pos_length * sizeof(int32_t));
|
memcpy(&rxF_ext[neg_length], rxF, pos_length * sizeof(int32_t));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
//*llr32 = *rxF;
|
//*llr32 = *rxF;
|
||||||
llr32->r = rxF->r >> 3;
|
llr32->r = rxF->r >> 3;
|
||||||
llr32->i = rxF->i >> 3;
|
llr32->i = rxF->i >> 3;
|
||||||
//printf("dlsch_qpsk_llr %d : (%d,%d)\n", i, llr32->r, llr32->i);
|
LOG_D(PHY,"dlsch_qpsk_llr %d : (%d,%d)\n", i, llr32->r, llr32->i);
|
||||||
rxF++;
|
rxF++;
|
||||||
llr32++;
|
llr32++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -534,8 +534,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
|||||||
int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16);
|
int32_t pdcch_est_size = ((((fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH))+15)/16)*16);
|
||||||
__attribute__ ((aligned(16))) int32_t pdcch_dl_ch_estimates[4*fp->nb_antennas_rx][pdcch_est_size];
|
__attribute__ ((aligned(16))) int32_t pdcch_dl_ch_estimates[4*fp->nb_antennas_rx][pdcch_est_size];
|
||||||
|
|
||||||
|
|
||||||
for(int n_ss = 0; n_ss<phy_pdcch_config.nb_search_space; n_ss++) {
|
for(int n_ss = 0; n_ss<phy_pdcch_config.nb_search_space; n_ss++) {
|
||||||
|
proc->nr_slot_rx = phy_pdcch_config.slot; // setting PDCCH slot to proc
|
||||||
uint8_t nb_symb_pdcch = phy_pdcch_config.pdcch_config[n_ss].coreset.duration;
|
uint8_t nb_symb_pdcch = phy_pdcch_config.pdcch_config[n_ss].coreset.duration;
|
||||||
int start_symb = phy_pdcch_config.pdcch_config[n_ss].coreset.StartSymbolIndex;
|
int start_symb = phy_pdcch_config.pdcch_config[n_ss].coreset.StartSymbolIndex;
|
||||||
for (uint16_t l=start_symb; l<start_symb+nb_symb_pdcch; l++) {
|
for (uint16_t l=start_symb; l<start_symb+nb_symb_pdcch; l++) {
|
||||||
|
|||||||
@@ -782,15 +782,15 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
|||||||
dlsch0->harq_processes[harq_pid]->Qm,
|
dlsch0->harq_processes[harq_pid]->Qm,
|
||||||
dlsch0->harq_processes[harq_pid]->Nl);
|
dlsch0->harq_processes[harq_pid]->Nl);
|
||||||
|
|
||||||
start_meas(&ue->dlsch_unscrambling_stats);
|
start_meas(&ue->dlsch_unscrambling_stats);
|
||||||
nr_dlsch_unscrambling(pdsch_vars->llr[0],
|
nr_dlsch_unscrambling(pdsch_vars->llr[0],
|
||||||
dlsch0->harq_processes[harq_pid]->G,
|
dlsch0->harq_processes[harq_pid]->G,
|
||||||
0,
|
0,
|
||||||
ue->frame_parms.Nid_cell,
|
ue->frame_parms.Nid_cell,
|
||||||
dlsch0->rnti);
|
dlsch0->rnti);
|
||||||
|
|
||||||
|
|
||||||
stop_meas(&ue->dlsch_unscrambling_stats);
|
stop_meas(&ue->dlsch_unscrambling_stats);
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -805,7 +805,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||||
|
|
||||||
ret = nr_dlsch_decoding(ue,
|
ret = nr_dlsch_decoding(ue,
|
||||||
proc,
|
proc,
|
||||||
|
|||||||
Reference in New Issue
Block a user