Commit 10e3a299 authored by Ahmed Hussein's avatar Ahmed Hussein Committed by Thomas Schlichter

Restructuring "nr_slot_fep_ul"

- Now it takes input and output pointers instead of gNB struct
parent 3d9ae422
......@@ -55,14 +55,18 @@ void nr_layer_mapping(int16_t **mod_symbs,
/*!
\brief This function implements the OFDM front end processor on reception (FEP)
\param phy_vars_ue Pointer to PHY variables
\param frame_parms Pointer to frame parameters
\param rxdata Pointer to input data in time domain
\param rxdataF Pointer to output data in frequency domain
\param symbol symbol within slot (0..12/14)
\param Ns Slot number (0..19)
\param sample_offset offset within rxdata (points to beginning of subframe)
\param no_prefix if 1 prefix is removed by HW
*/
int nr_slot_fep_ul(PHY_VARS_gNB *phy_vars_gNB,
int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
int32_t *rxdata,
int32_t *rxdataF,
unsigned char symbol,
unsigned char Ns,
int sample_offset,
......
......@@ -200,17 +200,17 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
}
int nr_slot_fep_ul(PHY_VARS_gNB *gNB,
int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
int32_t *rxdata,
int32_t *rxdataF,
unsigned char symbol,
unsigned char Ns,
int sample_offset,
int no_prefix)
{
unsigned char aa;
uint32_t slot_offset;
uint32_t rxdata_offset;
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
unsigned int nb_prefix_samples = (no_prefix ? 0 : frame_parms->nb_prefix_samples);
unsigned int nb_prefix_samples0 = (no_prefix ? 0 : frame_parms->nb_prefix_samples0);
......@@ -256,15 +256,14 @@ int nr_slot_fep_ul(PHY_VARS_gNB *gNB,
slot_offset = Ns * frame_parms->samples_per_slot;
for (aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
if(symbol == 0)
rxdata_offset = slot_offset + nb_prefix_samples0 - SOFFSET;
else
rxdata_offset = slot_offset + nb_prefix_samples0 + (symbol * (frame_parms->ofdm_symbol_size + nb_prefix_samples)) - SOFFSET;
if(symbol == 0)
rxdata_offset = slot_offset + nb_prefix_samples0 - SOFFSET;
else
rxdata_offset = slot_offset + nb_prefix_samples0 + (symbol * (frame_parms->ofdm_symbol_size + nb_prefix_samples)) - SOFFSET;
dft((int16_t *)&gNB->common_vars.rxdata[aa][rxdata_offset],
(int16_t *)&gNB->common_vars.rxdataF[aa][symbol * frame_parms->ofdm_symbol_size], 1);
}
dft((int16_t *)&rxdata[rxdata_offset],
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
return(0);
}
......@@ -239,9 +239,19 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc, int UE_id,
void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc) {
uint8_t symbol;
unsigned char aa;
for(symbol = 0; symbol < NR_SYMBOLS_PER_SLOT; symbol++) {
nr_slot_fep_ul(gNB, symbol, proc->slot_rx, 0, 0);
// nr_slot_fep_ul(gNB, symbol, proc->slot_rx, 0, 0);
for (aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) {
nr_slot_fep_ul(&gNB->frame_parms,
gNB->common_vars.rxdata[aa],
gNB->common_vars.rxdataF[aa],
symbol,
proc->slot_rx,
0,
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