Commit d196529c authored by Sagar Parsawar's avatar Sagar Parsawar Committed by Eurecom

OAI UE: PRS mutliple gNB fixes

parent b880e449
......@@ -335,8 +335,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
AssertFatal(((prs_vars[idx]->prs_ch_estimates!=NULL) || (prs_vars[idx]->prs_ch_estimates_time!=NULL)), "NR UE init: PRS channel estimates malloc failed\n");
for (i=0; i<fp->nb_antennas_rx; i++) {
prs_vars[idx]->prs_ch_estimates[i] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*NR_MAX_NUM_PRS_SYMB*sizeof(int32_t));
prs_vars[idx]->prs_ch_estimates_time[i] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*NR_MAX_NUM_PRS_SYMB*sizeof(int32_t));
prs_vars[idx]->prs_ch_estimates[i] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*NR_SYMBOLS_PER_SLOT*sizeof(int32_t));
prs_vars[idx]->prs_ch_estimates_time[i] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*NR_SYMBOLS_PER_SLOT*sizeof(int32_t));
AssertFatal(((prs_vars[idx]->prs_ch_estimates[i]!=NULL) || (prs_vars[idx]->prs_ch_estimates_time[i]!=NULL)), "NR UE init: PRS channel estimates malloc failed %d\n", i);
}
}
......
......@@ -36,7 +36,7 @@
//#define DEBUG_PDCCH
//#define DEBUG_CH
//#define DEBUG_PRS_CHEST
#define DEBUG_PRS_PRINTS
//#define DEBUG_PRS_PRINTS
extern short nr_qpsk_mod_table[8];
int nr_prs_channel_estimation(uint8_t gNB_id,
......@@ -436,11 +436,11 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
#endif
// T tracer dump
T(T_UE_PHY_DL_CHANNEL_ESTIMATE_FREQ, T_INT(0),
T(T_UE_PHY_DL_CHANNEL_ESTIMATE_FREQ, T_INT(gNB_id),
T_INT(proc->frame_rx), T_INT(proc->nr_slot_rx),
T_INT(rxAnt), T_BUFFER(&prs_chestF[rxAnt][prs_cfg->SymbolStart*frame_params->ofdm_symbol_size], prs_cfg->NumPRSSymbols*frame_params->ofdm_symbol_size*sizeof(int32_t)));
T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(0),
T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(gNB_id),
T_INT(proc->frame_rx), T_INT(proc->nr_slot_rx),
T_INT(rxAnt), T_BUFFER(&prs_chestT[rxAnt][prs_cfg->SymbolStart*frame_params->ofdm_symbol_size], prs_cfg->NumPRSSymbols*frame_params->ofdm_symbol_size*sizeof(int32_t)));
......
......@@ -387,6 +387,7 @@ typedef struct {
prs_data_t prs_cfg;
int32_t **prs_ch_estimates;
int32_t **prs_ch_estimates_time;
int64_t reserved;
} NR_UE_PRS;
#define NR_PDCCH_DEFS_NR_UE
......
......@@ -375,22 +375,22 @@ struct NR_DL_FRAME_PARMS {
};
// PRS structures prototype
typedef struct prs {
int PRSResourceSetPeriod[2]; //[slot period, slot offset]
int PRSResourceOffset; // array if more than one resource sets.slot offset (0...511) (default 0)
int PRSResourceRepetition;// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
int PRSResourceTimeGap; // slot offset (1 (default), 2, 4, 6, 8, 16, 32)
int NumRB; //number of RBs in freq domain a scalar =< 275 RB
int NumPRSSymbols; //number of PRS symbols in time domain
int SymbolStart; //starting OFDM symbol of PRS resource in time domain
int RBOffset; //Starting PRB index of all PRS resources in a PRS resource set.
int CombSize; //RE density of all PRS resources in a PRS resource set. i∈{2,4,6,12}
int REOffset; //Starting RE offset in the first OFDM symbol of each PRS resource in a PRS resource set.
int MutingPattern1[2]; //Muting bit pattern option-1, specified as [] or a binary-valued vector of length 2, 4, 6, 8, 16, or 32.
int MutingPattern2[2];
int MutingBitRepetition;
int NPRSID;
} prs_data_t;
typedef struct {
uint16_t PRSResourceSetPeriod[2]; //[slot period, slot offset]
uint8_t PRSResourceOffset; // array if more than one resource sets.slot offset (0...511) (default 0)
uint8_t PRSResourceRepetition;// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
uint8_t PRSResourceTimeGap; // slot offset (1 (default), 2, 4, 6, 8, 16, 32)
uint8_t NumRB; //number of RBs in freq domain a scalar =< 275 RB
uint8_t NumPRSSymbols; //number of PRS symbols in time domain
uint8_t SymbolStart; //starting OFDM symbol of PRS resource in time domain
uint8_t RBOffset; //Starting PRB index of all PRS resources in a PRS resource set.
uint8_t CombSize; //RE density of all PRS resources in a PRS resource set. i∈{2,4,6,12}
uint8_t REOffset; //Starting RE offset in the first OFDM symbol of each PRS resource in a PRS resource set.
uint32_t MutingPattern1[2]; //Muting bit pattern option-1, specified as [] or a binary-valued vector of length 2, 4, 6, 8, 16, or 32.
uint32_t MutingPattern2[2];
uint8_t MutingBitRepetition;
uint16_t NPRSID;
} prs_data_t; //32bytes
#define KHz (1000UL)
#define MHz (1000*KHz)
......
......@@ -1313,7 +1313,7 @@ void RCconfig_nrUE_prs(void *cfg)
ue->prs_vars[gNB_id]->prs_cfg.NPRSID = *(PRS_ParamList.paramarray[j][PRS_ID].uptr);
LOG_I(PHY, "--------------------------\n");
LOG_I(PHY, "PRS Config for gNB_id %d\n", gNB_id);
LOG_I(PHY, "PRS Config for gNB_id %d @ %p\n", gNB_id, &ue->prs_vars[gNB_id]->prs_cfg);
LOG_I(PHY, "--------------------------\n");
LOG_I(PHY, "PRSResourceSetPeriod0 %d\n", ue->prs_vars[gNB_id]->prs_cfg.PRSResourceSetPeriod[0]);
LOG_I(PHY, "PRSResourceSetPeriod1 %d\n", ue->prs_vars[gNB_id]->prs_cfg.PRSResourceSetPeriod[1]);
......
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