Commit aab23817 authored by Francesco Mani's avatar Francesco Mani

taking into account trashed frames (and commenting ghost frame addition)

parent 41b18e21
...@@ -1019,6 +1019,8 @@ typedef struct { ...@@ -1019,6 +1019,8 @@ typedef struct {
NR_DL_FRAME_PARMS frame_parms_before_ho; NR_DL_FRAME_PARMS frame_parms_before_ho;
NR_UE_COMMON common_vars; NR_UE_COMMON common_vars;
int16_t trashed_frames;
nr_ue_if_module_t *if_inst; nr_ue_if_module_t *if_inst;
nr_downlink_indication_t dl_indication; nr_downlink_indication_t dl_indication;
......
...@@ -2978,6 +2978,8 @@ void nr_ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * ...@@ -2978,6 +2978,8 @@ void nr_ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
ue->high_speed_flag); ue->high_speed_flag);
if (ret==0) { if (ret==0) {
ue->trashed_frames = 0;
ue->pbch_vars[eNB_id]->pdu_errors_conseq = 0; ue->pbch_vars[eNB_id]->pdu_errors_conseq = 0;
...@@ -5098,6 +5100,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -5098,6 +5100,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
ssb_frame_periodicity = ssb_periodicity/10 ; // 10ms is the frame length ssb_frame_periodicity = ssb_periodicity/10 ; // 10ms is the frame length
frame_rx += ue->trashed_frames;
// looking for pbch only in frames according to ssb periodicity // looking for pbch only in frames according to ssb periodicity
if ( (nr_tti_rx == 0) && (ue->decode_MIB == 1) && !((frame_rx-(pbch_config.system_frame_number))%ssb_frame_periodicity)) if ( (nr_tti_rx == 0) && (ue->decode_MIB == 1) && !((frame_rx-(pbch_config.system_frame_number))%ssb_frame_periodicity))
{ {
...@@ -5183,7 +5187,7 @@ start_meas(&ue->generic_stat); ...@@ -5183,7 +5187,7 @@ start_meas(&ue->generic_stat);
if(nr_tti_rx==5 && ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->current_harq_pid]->nb_rb > 20){ if(nr_tti_rx==5 && ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->current_harq_pid]->nb_rb > 20){
//write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0); //write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0);
//write_output("llr.m","llr", &ue->pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0); //write_output("llr.m","llr", &ue->pdsch_vars[eNB_id]->llr[0][0],(14*nb_rb*12*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm),1,0);
openair1/SCHED_NR/phy_procedures_nr_gNB.c
write_output("rxdataF0_current.m" , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); write_output("rxdataF0_current.m" , "rxdataF0", &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
//write_output("rxdataF0_previous.m" , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1); //write_output("rxdataF0_previous.m" , "rxdataF0_prev_sss", &ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF[0][0],14*ue->frame_parms.ofdm_symbol_size,1,1);
......
...@@ -456,7 +456,7 @@ static void *UE_thread_synch(void *arg) { ...@@ -456,7 +456,7 @@ static void *UE_thread_synch(void *arg) {
#else #else
LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode); LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
#endif #endif
UE->trashed_frames = 0;
if (nr_initial_sync( UE, UE->mode ) == 0) { if (nr_initial_sync( UE, UE->mode ) == 0) {
//write_output("txdata_sym.m", "txdata_sym", UE->common_vars.rxdata[0], (10*UE->frame_parms.samples_per_slot), 1, 1); //write_output("txdata_sym.m", "txdata_sym", UE->common_vars.rxdata[0], (10*UE->frame_parms.samples_per_slot), 1, 1);
freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync freq_offset = UE->common_vars.freq_offset; // frequency offset computed with pss in initial sync
...@@ -936,6 +936,7 @@ void *UE_thread(void *arg) { ...@@ -936,6 +936,7 @@ void *UE_thread(void *arg) {
} else { } else {
// grab 10 ms of signal into dummy buffer to wait result of sync detection // grab 10 ms of signal into dummy buffer to wait result of sync detection
trashFrame(UE, &timestamp); trashFrame(UE, &timestamp);
UE->trashed_frames++;
} }
} }
...@@ -949,12 +950,12 @@ void *UE_thread(void *arg) { ...@@ -949,12 +950,12 @@ void *UE_thread(void *arg) {
syncInFrame(UE, &timestamp); syncInFrame(UE, &timestamp);
UE->rx_offset=0; UE->rx_offset=0;
UE->time_sync_cell=0; UE->time_sync_cell=0;
UE->proc.proc_rxtx[0].frame_rx++; /*UE->proc.proc_rxtx[0].frame_rx++;
//UE->proc.proc_rxtx[1].frame_rx++; //UE->proc.proc_rxtx[1].frame_rx++;
for (th_id=1; th_id < RX_NB_TH; th_id++) { for (th_id=1; th_id < RX_NB_TH; th_id++) {
UE->proc.proc_rxtx[th_id].frame_rx = UE->proc.proc_rxtx[0].frame_rx; UE->proc.proc_rxtx[th_id].frame_rx = UE->proc.proc_rxtx[0].frame_rx;
} }*/
//printf("first stream frame rx %d\n",UE->proc.proc_rxtx[0].frame_rx); //printf("first stream frame rx %d\n",UE->proc.proc_rxtx[0].frame_rx);
// read in first symbol // read in first symbol
......
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