mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
use specific paramters for perform_symbol_rotation() instead of global frame parms
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
This commit is contained in:
@@ -107,7 +107,7 @@ struct timespec timespec_sub(struct timespec, struct timespec)
|
||||
return t;
|
||||
};
|
||||
|
||||
void perform_symbol_rotation(NR_DL_FRAME_PARMS *fp, double f0, c16_t *symbol_rotation)
|
||||
void perform_symbol_rotation(const int nsymb, const int numerology_index, double f0, c16_t *symbol_rotation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -568,8 +568,10 @@ int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp,
|
||||
|
||||
// ssb_offset_pointa points to the first RE where Sidelink-PSBCH starts
|
||||
fp->ssb_start_subcarrier = config->sl_bwp_config.sl_ssb_offset_point_a;
|
||||
|
||||
perform_symbol_rotation(fp, fp->sl_CarrierFreq, fp->symbol_rotation[link_type_sl]);
|
||||
perform_symbol_rotation(fp->symbols_per_slot * fp->slots_per_frame / 10,
|
||||
fp->numerology_index,
|
||||
fp->sl_CarrierFreq,
|
||||
fp->symbol_rotation[link_type_sl]);
|
||||
init_timeshift_rotation(fp);
|
||||
|
||||
// Not used for Sidelink
|
||||
|
||||
@@ -573,13 +573,12 @@ void nr_dft(c16_t *z, c16_t *d, uint32_t Msc_PUSCH)
|
||||
}
|
||||
}
|
||||
|
||||
void perform_symbol_rotation(NR_DL_FRAME_PARMS *fp, double f0, c16_t *symbol_rotation)
|
||||
void perform_symbol_rotation(const int nsymb, const int numerology_index, double f0, c16_t *symbol_rotation)
|
||||
{
|
||||
const int nsymb = fp->symbols_per_slot * fp->slots_per_frame / 10;
|
||||
const double Tc = (1 / 480e3 / 4096);
|
||||
const double Nu = 2048 * 64 * (1 / (float)(1 << fp->numerology_index));
|
||||
const double Ncp0 = 16 * 64 + (144 * 64 * (1 / (float)(1 << fp->numerology_index)));
|
||||
const double Ncp1 = (144 * 64 * (1 / (float)(1 << fp->numerology_index)));
|
||||
const double Nu = 2048 * 64 * (1 / (float)(1 << numerology_index));
|
||||
const double Ncp0 = 16 * 64 + (144 * 64 * (1 / (float)(1 << numerology_index)));
|
||||
const double Ncp1 = (144 * 64 * (1 / (float)(1 << numerology_index)));
|
||||
|
||||
LOG_D(PHY, "Doing symbol rotation calculation for TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
|
||||
|
||||
@@ -590,7 +589,7 @@ void perform_symbol_rotation(NR_DL_FRAME_PARMS *fp, double f0, c16_t *symbol_rot
|
||||
|
||||
for (int l = 0; l < nsymb; l++) {
|
||||
double Ncp;
|
||||
if (l == 0 || l == (7 * (1 << fp->numerology_index))) {
|
||||
if (l == 0 || l == (7 * (1 << numerology_index))) {
|
||||
Ncp = Ncp0;
|
||||
} else {
|
||||
Ncp = Ncp1;
|
||||
@@ -624,8 +623,7 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp)
|
||||
if (f0 == 0)
|
||||
continue;
|
||||
c16_t *rot = fp->symbol_rotation[ll];
|
||||
|
||||
perform_symbol_rotation(fp, f0, rot);
|
||||
perform_symbol_rotation(fp->symbols_per_slot * fp->slots_per_frame / 10, fp->numerology_index, f0, rot);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,8 +101,7 @@ void nr_ofdm_demod_and_rx_rotation(c16_t **rxdata,
|
||||
int slot_offsetF,
|
||||
enum nr_Link linktype,
|
||||
bool was_symbol_used[NR_SYMBOLS_PER_SLOT]);
|
||||
|
||||
void perform_symbol_rotation(NR_DL_FRAME_PARMS *fp, double f0, c16_t *symbol_rotation);
|
||||
void perform_symbol_rotation(const int nsymb, const int numerology_index, double f0, c16_t *symbol_rotation);
|
||||
|
||||
void init_symbol_rotation(NR_DL_FRAME_PARMS *fp);
|
||||
|
||||
|
||||
@@ -209,7 +209,10 @@ static void configure_SL_UE(PHY_VARS_NR_UE *UE, int mu, int N_RB, int ssb_offset
|
||||
|
||||
sl_init_frame_parameters(UE);
|
||||
sl_ue_phy_init(UE);
|
||||
perform_symbol_rotation(fp, fp->sl_CarrierFreq, fp->symbol_rotation[link_type_sl]);
|
||||
perform_symbol_rotation(fp->symbols_per_slot * fp->slots_per_frame / 10,
|
||||
fp->numerology_index,
|
||||
fp->sl_CarrierFreq,
|
||||
fp->symbol_rotation[link_type_sl]);
|
||||
init_timeshift_rotation(fp);
|
||||
LOG_I(PHY, "Dumping Sidelink Frame Parameters\n");
|
||||
nr_dump_frame_parms(fp);
|
||||
|
||||
Reference in New Issue
Block a user