Changed rxdataF from int32_t to c16_t
This commit is contained in:
@@ -52,7 +52,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
unsigned char l,
|
||||
unsigned char Ns,
|
||||
int32_t rxdataF[][phy_vars_ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][phy_vars_ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
@@ -60,7 +60,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
unsigned char Ns,
|
||||
int sample_offset,
|
||||
bool pbch_decoded,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
|
||||
unsigned char l,
|
||||
|
||||
@@ -38,7 +38,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
unsigned char symbol,
|
||||
unsigned char Ns,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
NR_UE_COMMON *common_vars = &ue->common_vars;
|
||||
@@ -109,7 +109,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
|
||||
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
|
||||
c16_t *this_symbol = (c16_t *)&rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
|
||||
c16_t *this_symbol = &rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
|
||||
|
||||
if (frame_parms->N_RB_DL & 1) {
|
||||
rotate_cpx_vector(this_symbol, &rot2, this_symbol,
|
||||
@@ -153,7 +153,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
unsigned char Ns,
|
||||
int sample_offset,
|
||||
bool pbch_decoded,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
NR_UE_COMMON *common_vars = &ue->common_vars;
|
||||
@@ -242,7 +242,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
symbol+symb_offset,rot2.r,rot2.i);
|
||||
#endif
|
||||
|
||||
c16_t *this_symbol = (c16_t *)&rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
|
||||
c16_t *this_symbol = &rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
|
||||
rotate_cpx_vector(this_symbol, &rot2, this_symbol, frame_parms->ofdm_symbol_size, 15);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ int pss_ch_est_nr(PHY_VARS_NR_UE *ue,
|
||||
int32_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR],
|
||||
int32_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR]);
|
||||
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, int *freq_offset_sss, int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, int *freq_offset_sss, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
#undef INIT_VARIABLES_SSS_NR_H
|
||||
#undef EXTERN
|
||||
|
||||
@@ -67,7 +67,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
NR_DL_FRAME_PARMS *frame_params,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
uint8_t rxAnt = 0, idx = 0;
|
||||
prs_config_t *prs_cfg = &ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg;
|
||||
@@ -572,7 +572,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
||||
unsigned char symbol,
|
||||
int dmrss,
|
||||
NR_UE_SSB *current_ssb,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
int pilot[200] __attribute__((aligned(16)));
|
||||
unsigned short k;
|
||||
@@ -736,7 +736,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
int dmrss,
|
||||
uint8_t ssb_index,
|
||||
uint8_t n_hf,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
int pilot[200] __attribute__((aligned(16)));
|
||||
unsigned short k;
|
||||
@@ -1001,7 +1001,7 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
uint16_t BWPStart,
|
||||
int32_t pdcch_est_size,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
|
||||
unsigned char aarx;
|
||||
@@ -1250,7 +1250,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
unsigned short nb_rb_pdsch,
|
||||
uint32_t pdsch_est_size,
|
||||
int32_t dl_ch_estimates[][pdsch_est_size],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
int pilot[3280] __attribute__((aligned(16)));
|
||||
unsigned char aarx;
|
||||
|
||||
@@ -39,7 +39,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
NR_DL_FRAME_PARMS *frame_params,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
/* Generic function to find the peak of channel estimation buffer */
|
||||
void peak_estimator(int32_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t *peak_val);
|
||||
@@ -61,7 +61,7 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
uint16_t BWPStart,
|
||||
int32_t pdcch_est_size,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
@@ -70,7 +70,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
||||
unsigned char symbol,
|
||||
int dmrss,
|
||||
NR_UE_SSB *current_ssb,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
int estimateSz,
|
||||
@@ -83,7 +83,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
int dmrss,
|
||||
uint8_t ssb_index,
|
||||
uint8_t n_hf,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
@@ -100,7 +100,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
unsigned short nb_rb_pdsch,
|
||||
uint32_t pdsch_est_size,
|
||||
int32_t pdsch_dl_ch_estimates[][pdsch_est_size],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
@@ -122,12 +122,12 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
|
||||
uint8_t gNB_index,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t slot,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t slot,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue,
|
||||
uint32_t rx_power_fil_dB,
|
||||
|
||||
@@ -173,7 +173,7 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
|
||||
int ssb_index,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t slot,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
int k_start = 56;
|
||||
int k_end = 183;
|
||||
@@ -229,7 +229,7 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
|
||||
void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
uint8_t slot,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]){
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]){
|
||||
|
||||
uint8_t k;
|
||||
int aarx, nb_nulls;
|
||||
|
||||
@@ -191,7 +191,7 @@ int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue,
|
||||
int32_t csi_rs_received_signal[][ue->frame_parms.samples_per_slot_wCP],
|
||||
uint32_t *rsrp,
|
||||
int *rsrp_dBm,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
uint16_t meas_count = 0;
|
||||
@@ -218,7 +218,7 @@ int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue,
|
||||
for (int lp = 0; lp <= l_prime; lp++) {
|
||||
uint16_t symb = lp + l_overline[cdm_id];
|
||||
uint64_t symbol_offset = symb*frame_parms->ofdm_symbol_size;
|
||||
c16_t *rx_signal = (c16_t*)&rxdataF[ant_rx][symbol_offset];
|
||||
c16_t *rx_signal = &rxdataF[ant_rx][symbol_offset];
|
||||
c16_t *rx_csi_rs_signal = (c16_t*)&csi_rs_received_signal[ant_rx][symbol_offset];
|
||||
rx_csi_rs_signal[k].r = rx_signal[k].r;
|
||||
rx_csi_rs_signal[k].i = rx_signal[k].i;
|
||||
@@ -730,7 +730,7 @@ int nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue,
|
||||
const UE_nr_rxtx_proc_t *proc,
|
||||
const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu,
|
||||
uint32_t *interference_plus_noise_power,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
|
||||
@@ -764,7 +764,7 @@ int nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue,
|
||||
|
||||
for (int ant_rx = 0; ant_rx < frame_parms->nb_antennas_rx; ant_rx++) {
|
||||
|
||||
c16_t *rx_signal = (c16_t*)&rxdataF[ant_rx][symbol_offset];
|
||||
c16_t *rx_signal = &rxdataF[ant_rx][symbol_offset];
|
||||
|
||||
for (int rb = csiim_config_pdu->start_rb; rb < end_rb; rb++) {
|
||||
|
||||
@@ -800,7 +800,7 @@ int nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
if(!ue->csiim_vars[gNB_id]->active) {
|
||||
return -1;
|
||||
@@ -824,7 +824,7 @@ int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
if(!ue->csirs_vars[gNB_id]->active) {
|
||||
return -1;
|
||||
|
||||
@@ -341,7 +341,7 @@ void nr_pdcch_channel_level(int32_t rx_size,
|
||||
|
||||
// This function will extract the mapped DM-RS PDCCH REs as per 38.211 Section 7.4.1.3.2 (Mapping to physical resources)
|
||||
void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
|
||||
int32_t rxdataF[][rxdataF_sz],
|
||||
c16_t rxdataF[][rxdataF_sz],
|
||||
int32_t est_size,
|
||||
int32_t dl_ch_estimates[][est_size],
|
||||
int32_t rx_size,
|
||||
@@ -416,7 +416,7 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
|
||||
// first we set initial conditions for pointer to rxdataF depending on the situation of the first RB within the CORESET (c_rb = n_BWP_start)
|
||||
if (((c_rb + n_BWP_start) < (frame_parms->N_RB_DL >> 1)) && ((frame_parms->N_RB_DL & 1) == 0)) {
|
||||
//if RB to be treated is lower than middle system bandwidth then rxdataF pointed at (offset + c_br + symbol * ofdm_symbol_size): even case
|
||||
rxF = &rxdataF[aarx][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))+n_BWP_start*12];
|
||||
rxF = (int32_t *)&rxdataF[aarx][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))+n_BWP_start*12];
|
||||
LOG_DDD("in even case c_rb (%d) is lower than half N_RB_DL -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n",
|
||||
c_rb,aarx,(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))));
|
||||
}
|
||||
@@ -424,14 +424,14 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
|
||||
if (((c_rb + n_BWP_start) >= (frame_parms->N_RB_DL >> 1)) && ((frame_parms->N_RB_DL & 1) == 0)) {
|
||||
// number of RBs is even and c_rb is higher than half system bandwidth (we don't skip DC)
|
||||
// if these conditions are true the pointer has to be situated at the 1st part of the rxdataF
|
||||
rxF = &rxdataF[aarx][12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) + symbol * frame_parms->ofdm_symbol_size]; // we point at the 1st part of the rxdataF in symbol
|
||||
rxF = (int32_t *)&rxdataF[aarx][12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) + symbol * frame_parms->ofdm_symbol_size]; // we point at the 1st part of the rxdataF in symbol
|
||||
LOG_DDD("in even case c_rb (%d) is higher than half N_RB_DL (not DC) -> rxF = &rxdataF[aarx = (%d)][12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) + symbol * frame_parms->ofdm_symbol_size = (%d)]\n",
|
||||
c_rb,aarx,(12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) + symbol * frame_parms->ofdm_symbol_size));
|
||||
}
|
||||
|
||||
if (((c_rb + n_BWP_start) < (frame_parms->N_RB_DL >> 1)) && ((frame_parms->N_RB_DL & 1) != 0)) {
|
||||
//if RB to be treated is lower than middle system bandwidth then rxdataF pointed at (offset + c_br + symbol * ofdm_symbol_size): odd case
|
||||
rxF = &rxdataF[aarx][frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size];
|
||||
rxF = (int32_t *)&rxdataF[aarx][frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size];
|
||||
LOG_DDD("in odd case c_rb (%d) is lower or equal than half N_RB_DL -> rxF = &rxdataF[aarx = (%d)][frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size = (%d)]\n",
|
||||
c_rb,aarx,(frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size));
|
||||
}
|
||||
@@ -439,7 +439,7 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
|
||||
if (((c_rb + n_BWP_start) > (frame_parms->N_RB_DL >> 1)) && ((frame_parms->N_RB_DL & 1) != 0)) {
|
||||
// number of RBs is odd and c_rb is higher than half system bandwidth + 1
|
||||
// if these conditions are true the pointer has to be situated at the 1st part of the rxdataF just after the first IQ symbols of the RB containing DC
|
||||
rxF = &rxdataF[aarx][12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) - 6 + symbol * frame_parms->ofdm_symbol_size]; // we point at the 1st part of the rxdataF in symbol
|
||||
rxF = (int32_t *)&rxdataF[aarx][12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) - 6 + symbol * frame_parms->ofdm_symbol_size]; // we point at the 1st part of the rxdataF in symbol
|
||||
LOG_DDD("in odd case c_rb (%d) is higher than half N_RB_DL (not DC) -> rxF = &rxdataF[aarx = (%d)][12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) - 6 + symbol * frame_parms->ofdm_symbol_size = (%d)]\n",
|
||||
c_rb,aarx,(12*(c_rb + n_BWP_start - (frame_parms->N_RB_DL>>1)) - 6 + symbol * frame_parms->ofdm_symbol_size));
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
|
||||
if (((c_rb + n_BWP_start) == (frame_parms->N_RB_DL >> 1)) && ((frame_parms->N_RB_DL & 1) != 0)) { // treatment of RB containing the DC
|
||||
// if odd number RBs in system bandwidth and first RB to be treated is higher than middle system bandwidth (around DC)
|
||||
// we have to treat the RB in two parts: first part from i=0 to 5, the data is at the end of rxdataF (pointing at the end of the table)
|
||||
rxF = &rxdataF[aarx][frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size];
|
||||
rxF = (int32_t *)&rxdataF[aarx][frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size];
|
||||
LOG_DDD("in odd case c_rb (%d) is half N_RB_DL + 1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size = (%d)]\n",
|
||||
c_rb,aarx,(frame_parms->first_carrier_offset + 12 * (c_rb + n_BWP_start) + symbol * frame_parms->ofdm_symbol_size));
|
||||
j = 0;
|
||||
@@ -468,7 +468,7 @@ void nr_pdcch_extract_rbs_single(uint32_t rxdataF_sz,
|
||||
}
|
||||
|
||||
// then we point at the begining of the symbol part of rxdataF do process second part of RB
|
||||
rxF = &rxdataF[aarx][symbol * frame_parms->ofdm_symbol_size]; // we point at the 1st part of the rxdataF in symbol
|
||||
rxF = (int32_t *)&rxdataF[aarx][symbol * frame_parms->ofdm_symbol_size]; // we point at the 1st part of the rxdataF in symbol
|
||||
LOG_DDD("in odd case c_rb (%d) is half N_RB_DL +1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][symbol * frame_parms->ofdm_symbol_size = (%d)]\n",
|
||||
c_rb,aarx,(symbol * frame_parms->ofdm_symbol_size));
|
||||
for (; i < 12; i++) {
|
||||
@@ -673,7 +673,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
int16_t *pdcch_e_rx,
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
uint32_t frame = proc->frame_rx;
|
||||
uint32_t slot = proc->nr_slot_rx;
|
||||
|
||||
@@ -152,7 +152,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
int32_t dl_ch_mag[][rx_size],
|
||||
int32_t dl_ch_magb[][rx_size],
|
||||
int32_t dl_ch_magr[][rx_size],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP],
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP],
|
||||
uint32_t llr_offset[NR_SYMBOLS_PER_SLOT],
|
||||
int32_t *log2_maxh)
|
||||
{
|
||||
@@ -1591,7 +1591,7 @@ void nr_dlsch_channel_level_median(uint32_t rx_size,
|
||||
//==============================================================================================
|
||||
|
||||
void nr_dlsch_extract_rbs(uint32_t rxdataF_sz,
|
||||
int32_t rxdataF[][rxdataF_sz],
|
||||
c16_t rxdataF[][rxdataF_sz],
|
||||
uint32_t rx_size,
|
||||
int32_t dl_ch_estimates[][rx_size],
|
||||
int32_t rxdataF_ext[][rx_size],
|
||||
|
||||
@@ -101,7 +101,7 @@ void free_list(NR_UE_SSB *node) {
|
||||
}
|
||||
|
||||
|
||||
int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_initial_symbol, nr_phy_data_t *phy_data, int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_initial_symbol, nr_phy_data_t *phy_data, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
|
||||
int ret =-1;
|
||||
@@ -244,7 +244,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
|
||||
*/
|
||||
|
||||
const uint32_t rxdataF_sz = ue->frame_parms.samples_per_slot_wCP;
|
||||
__attribute__ ((aligned(32))) int32_t rxdataF[ue->frame_parms.nb_antennas_rx][rxdataF_sz];
|
||||
__attribute__ ((aligned(32))) c16_t rxdataF[ue->frame_parms.nb_antennas_rx][rxdataF_sz];
|
||||
cnt++;
|
||||
if (1){ // (cnt>100)
|
||||
cnt =0;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#define print_shorts(s,x) printf("%s : %d,%d,%d,%d,%d,%d,%d,%d\n",s,((int16_t*)x)[0],((int16_t*)x)[1],((int16_t*)x)[2],((int16_t*)x)[3],((int16_t*)x)[4],((int16_t*)x)[5],((int16_t*)x)[6],((int16_t*)x)[7])
|
||||
|
||||
static uint16_t nr_pbch_extract(uint32_t rxdataF_sz,
|
||||
int32_t rxdataF[][rxdataF_sz],
|
||||
c16_t rxdataF[][rxdataF_sz],
|
||||
const int estimateSz,
|
||||
struct complex16 dl_ch_estimates[][estimateSz],
|
||||
struct complex16 rxdataF_ext[][PBCH_MAX_RE_PER_SYMBOL],
|
||||
@@ -68,7 +68,7 @@ static uint16_t nr_pbch_extract(uint32_t rxdataF_sz,
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier;
|
||||
rx_offset = (rx_offset)%(frame_parms->ofdm_symbol_size);
|
||||
struct complex16 *rxF = (struct complex16 *)&rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size];
|
||||
struct complex16 *rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size];
|
||||
struct complex16 *rxF_ext = rxdataF_ext[aarx];
|
||||
#ifdef DEBUG_PBCH
|
||||
printf("extract_rbs (nushift %d): rx_offset=%d, symbol %u\n",frame_parms->nushift,
|
||||
@@ -394,7 +394,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
|
||||
MIMO_mode_t mimo_mode,
|
||||
nr_phy_data_t *phy_data,
|
||||
fapiPbch_t *result,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
int max_h=0;
|
||||
int symbol;
|
||||
|
||||
@@ -544,7 +544,7 @@ void nr_dlsch_256qam_llr(NR_DL_FRAME_PARMS *frame_parms,
|
||||
@param frame_parms Pointer to frame descriptor
|
||||
*/
|
||||
void nr_dlsch_extract_rbs(uint32_t rxdataF_sz,
|
||||
int rxdataF[][rxdataF_sz],
|
||||
c16_t rxdataF[][rxdataF_sz],
|
||||
uint32_t rx_size,
|
||||
int32_t dl_ch_estimates[][rx_size],
|
||||
int32_t rxdataF_ext[][rx_size],
|
||||
@@ -757,7 +757,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
int16_t *pdcch_e_rx,
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
|
||||
/*! \brief Performs detection of SSS to find cell ID and other framing parameters (FDD/TDD, normal/extended prefix)
|
||||
@@ -784,13 +784,13 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
|
||||
MIMO_mode_t mimo_mode,
|
||||
nr_phy_data_t *phy_data,
|
||||
fapiPbch_t* result,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_pbch_detection(UE_nr_rxtx_proc_t *proc,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
int pbch_initial_symbol,
|
||||
nr_phy_data_t *phy_data,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
|
||||
#ifndef modOrder
|
||||
@@ -892,7 +892,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
int32_t dl_ch_mag[][rx_size],
|
||||
int32_t dl_ch_magb[][rx_size],
|
||||
int32_t dl_ch_magr[][rx_size],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP],
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP],
|
||||
uint32_t llr_offset[NR_SYMBOLS_PER_SLOT],
|
||||
int32_t *log2_maxh);
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@ int do_pss_sss_extract_nr(PHY_VARS_NR_UE *ue,
|
||||
int32_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR],
|
||||
uint8_t doPss, uint8_t doSss,
|
||||
uint8_t subframe,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) // add flag to indicate extracting only PSS, only SSS, or both
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) // add flag to indicate extracting only PSS, only SSS, or both
|
||||
{
|
||||
uint8_t aarx;
|
||||
int32_t *pss_rxF,*pss_rxF_ext;
|
||||
@@ -334,8 +334,8 @@ int do_pss_sss_extract_nr(PHY_VARS_NR_UE *ue,
|
||||
|
||||
unsigned int ofdm_symbol_size = frame_parms->ofdm_symbol_size;
|
||||
|
||||
pss_rxF = &rxdataF[aarx][pss_symbol*ofdm_symbol_size];
|
||||
sss_rxF = &rxdataF[aarx][sss_symbol*ofdm_symbol_size];
|
||||
pss_rxF = (int32_t *)&rxdataF[aarx][pss_symbol*ofdm_symbol_size];
|
||||
sss_rxF = (int32_t *)&rxdataF[aarx][sss_symbol*ofdm_symbol_size];
|
||||
|
||||
pss_rxF_ext = &pss_ext[aarx][0];
|
||||
sss_rxF_ext = &sss_ext[aarx][0];
|
||||
@@ -401,7 +401,7 @@ int pss_sss_extract_nr(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
int32_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR],
|
||||
int32_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR],
|
||||
uint8_t subframe,
|
||||
int32_t rxdataF[][phy_vars_ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][phy_vars_ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
return do_pss_sss_extract_nr(phy_vars_ue, proc, pss_ext, sss_ext, 1 /* doPss */, 1 /* doSss */, subframe, rxdataF);
|
||||
}
|
||||
@@ -419,7 +419,7 @@ int pss_sss_extract_nr(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, int *freq_offset_sss, int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, int *freq_offset_sss, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
uint8_t i;
|
||||
int32_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR];
|
||||
|
||||
@@ -184,7 +184,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
NR_UE_DLSCH_t dlsch[2],
|
||||
int16_t *llr[2],
|
||||
int16_t *layer_llr[NR_MAX_NB_LAYERS],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
@@ -193,11 +193,11 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
nr_phy_data_t *phy_data,
|
||||
int n_ss,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t gNB_id, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ static void nr_ue_pbch_procedures(uint8_t gNB_id,
|
||||
int estimateSz,
|
||||
struct complex16 dl_ch_estimates[][estimateSz],
|
||||
nr_phy_data_t *phy_data,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
int ret = 0;
|
||||
DevAssert(ue);
|
||||
@@ -511,7 +511,7 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
nr_phy_data_t *phy_data,
|
||||
int n_ss,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
|
||||
{
|
||||
int frame_rx = proc->frame_rx;
|
||||
int nr_slot_rx = proc->nr_slot_rx;
|
||||
@@ -579,7 +579,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
NR_UE_DLSCH_t dlsch[2],
|
||||
int16_t *llr[2],
|
||||
int16_t *layer_llr[NR_MAX_NB_LAYERS],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
|
||||
int frame_rx = proc->frame_rx;
|
||||
int nr_slot_rx = proc->nr_slot_rx;
|
||||
@@ -1084,7 +1084,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
frame_rx%1024, nr_slot_rx);
|
||||
|
||||
const uint32_t rxdataF_sz = ue->frame_parms.samples_per_slot_wCP;
|
||||
__attribute__ ((aligned(32))) int32_t rxdataF[ue->frame_parms.nb_antennas_rx][rxdataF_sz];
|
||||
__attribute__ ((aligned(32))) c16_t rxdataF[ue->frame_parms.nb_antennas_rx][rxdataF_sz];
|
||||
// checking if current frame is compatible with SSB periodicity
|
||||
if (cfg->ssb_table.ssb_period == 0 ||
|
||||
!(frame_rx%(1<<(cfg->ssb_table.ssb_period-1)))){
|
||||
|
||||
@@ -88,7 +88,7 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
nr_phy_data_t *phy_data,
|
||||
int n_ss,
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
NR_UE_DLSCH_t dlsch[2],
|
||||
int16_t *llr[2],
|
||||
int16_t *layer_llr[NR_MAX_NB_LAYERS],
|
||||
int32_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ int main(int argc, char **argv)
|
||||
processingData_L1tx_t msgDataTx;
|
||||
// generate signal
|
||||
const uint32_t rxdataF_sz = UE->frame_parms.samples_per_slot_wCP;
|
||||
__attribute__ ((aligned(32))) int32_t rxdataF[UE->frame_parms.nb_antennas_rx][rxdataF_sz];
|
||||
__attribute__ ((aligned(32))) c16_t rxdataF[UE->frame_parms.nb_antennas_rx][rxdataF_sz];
|
||||
if (input_fd==NULL) {
|
||||
|
||||
for (i=0; i<frame_parms->Lmax; i++) {
|
||||
|
||||
Reference in New Issue
Block a user