Commit 7f4b6a29 authored by Sakthivel Velumani's avatar Sakthivel Velumani

updated slot fep for numerology 0

fixed a bug in UE
parent 4d33b341
......@@ -748,7 +748,7 @@ void *UE_thread(void *arg) {
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
rxp[i] = (void *)&UE->common_vars.rxdata[i][UE->frame_parms.ofdm_symbol_size+
- UE->frame_parms.nb_prefix_samples0+UE->frame_parms.
UE->frame_parms.nb_prefix_samples0+UE->frame_parms.
get_samples_slot_timestamp(slot_nr,&UE->frame_parms,0)];
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
......@@ -893,4 +893,4 @@ int8_t find_dlsch(uint16_t rnti,
abort();
}
void multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP) {}
\ No newline at end of file
void multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP) {}
......@@ -184,7 +184,7 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
case 90:
case 100:
default:
AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", fp->N_RB_DL, mu, fp);
AssertFatal(1==0,"Bandwidth of %d MHz undefined for mu %d, frame parms = %p\n", bw, mu, fp);
}
break;
......@@ -223,10 +223,14 @@ void set_scs_parameters (NR_DL_FRAME_PARMS *fp, int mu, uint16_t bw)
uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp)
{
if(slot%(fp->slots_per_subframe/2))
return fp->samples_per_slotN0;
uint32_t samp_count;
if(fp->numerology_index == 0)
samp_count = fp->samples_per_subframe;
else
return fp->samples_per_slot0;
samp_count = (slot%(fp->slots_per_subframe/2)) ? fp->samples_per_slotN0 : fp->samples_per_slot0;
return samp_count;
}
uint32_t get_samples_slot_timestamp(int slot, NR_DL_FRAME_PARMS* fp, uint8_t sl_ahead)
......
......@@ -46,6 +46,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
unsigned char aa;
unsigned int nb_prefix_samples;
unsigned int nb_prefix_samples0;
unsigned int abs_symbol;
if (ue->is_synchronized) {
nb_prefix_samples = (no_prefix ? 0 : frame_parms->nb_prefix_samples);
nb_prefix_samples0 = (no_prefix ? 0 : frame_parms->nb_prefix_samples0);
......@@ -125,7 +126,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
memset(&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int));
rx_offset = sample_offset + slot_offset + nb_prefix_samples0 - SOFFSET;
rx_offset = sample_offset + slot_offset - SOFFSET;
// Align with 256 bit
// rx_offset = rx_offset&0xfffffff8;
......@@ -135,8 +136,16 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
ue->proc.proc_rxtx[(Ns)&1].frame_rx, Ns, symbol, nb_prefix_samples, nb_prefix_samples0, slot_offset, sample_offset, rx_offset, frame_length_samples);
#endif
if (symbol==0) {
abs_symbol = Ns * frame_parms->symbols_per_slot + symbol;
for (int idx_symb = Ns*frame_parms->symbols_per_slot; idx_symb < abs_symbol; idx_symb++)
rx_offset += (abs_symbol%(0x7<<frame_parms->numerology_index)) ? nb_prefix_samples : nb_prefix_samples0;
rx_offset += frame_parms->ofdm_symbol_size * symbol;
if (abs_symbol%(0x7<<frame_parms->numerology_index)) {
rx_offset += nb_prefix_samples0;
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
memcpy((short*) &common_vars->rxdata[aa][frame_length_samples],
(short*) &common_vars->rxdata[aa][0],
......@@ -161,9 +170,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
}
} else {
rx_offset += (frame_parms->ofdm_symbol_size+nb_prefix_samples)*symbol;
// + (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1);
rx_offset += frame_parms->nb_prefix_samples;
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
memcpy((void *) &common_vars->rxdata[aa][frame_length_samples],
(void *) &common_vars->rxdata[aa][0],
......
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