Commit 56315583 authored by francescomani's avatar francescomani

fix SIB1 detection in slot different than 0

moving slot assignment before pdcch functions
parent a1de5e3d
......@@ -739,8 +739,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
int re_offset = k;
#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,
ue->frame_parms.Ncp,Ns,k, symbol);
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, ue->frame_parms.Ncp,Ns,k, symbol);
#endif
// generate pilot for gNB port number 1000+p
......
......@@ -403,7 +403,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#endif
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 ---------------
......@@ -428,7 +429,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
measurements); // log2_maxh+I0_shift
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
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]);
......@@ -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;
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]);
/* 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]);
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
#ifdef DEBUG_PDSCH_RX
......@@ -635,21 +639,21 @@ void nr_dlsch_deinterleaving(uint8_t symbol,
//==============================================================================================
void nr_dlsch_channel_compensation(int **rxdataF_ext,
int **dl_ch_estimates_ext,
int **dl_ch_mag,
int **dl_ch_magb,
int **dl_ch_magr,
int **rxdataF_comp,
int ***rho,
NR_DL_FRAME_PARMS *frame_parms,
uint8_t nb_aatx,
unsigned char symbol,
int length,
uint8_t first_symbol_flag,
unsigned char mod_order,
unsigned short nb_rb,
unsigned char output_shift,
PHY_NR_MEASUREMENTS *measurements)
int **dl_ch_estimates_ext,
int **dl_ch_mag,
int **dl_ch_magb,
int **dl_ch_magr,
int **rxdataF_comp,
int ***rho,
NR_DL_FRAME_PARMS *frame_parms,
uint8_t nb_aatx,
unsigned char symbol,
int length,
uint8_t first_symbol_flag,
unsigned char mod_order,
unsigned short nb_rb,
unsigned char output_shift,
PHY_NR_MEASUREMENTS *measurements)
{
#if defined(__i386) || defined(__x86_64)
......@@ -1647,7 +1651,6 @@ void nr_dlsch_extract_rbs(int **rxdataF,
} else {
int neg_length = frame_parms->ofdm_symbol_size - start_re;
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[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->r = rxF->r >> 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++;
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);
__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++) {
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;
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++) {
......
......@@ -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]->Nl);
start_meas(&ue->dlsch_unscrambling_stats);
nr_dlsch_unscrambling(pdsch_vars->llr[0],
dlsch0->harq_processes[harq_pid]->G,
0,
ue->frame_parms.Nid_cell,
dlsch0->rnti);
start_meas(&ue->dlsch_unscrambling_stats);
nr_dlsch_unscrambling(pdsch_vars->llr[0],
dlsch0->harq_processes[harq_pid]->G,
0,
ue->frame_parms.Nid_cell,
dlsch0->rnti);
stop_meas(&ue->dlsch_unscrambling_stats);
stop_meas(&ue->dlsch_unscrambling_stats);
#if 0
......@@ -805,7 +805,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
#endif
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
ret = nr_dlsch_decoding(ue,
proc,
......
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