Merge remote-tracking branch 'origin/develop' into nr_prs

This commit is contained in:
Sagar Parsawar
2022-09-07 09:15:36 +02:00
180 changed files with 5716 additions and 3212 deletions
+27 -16
View File
@@ -345,30 +345,41 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
}
void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
int16_t* trxdata,
int16_t* txdataF,
int slot,
int first_symbol,
int nsymb,
int length) {
int nsymb)
{
int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot;
c16_t *symbol_rotation = fp->symbol_rotation[0];
c16_t *symbol_rotation = fp->symbol_rotation[0] + symb_offset;
for (int sidx=0;sidx<nsymb;sidx++) {
for (int sidx = first_symbol; sidx < first_symbol + nsymb; sidx++) {
c16_t *this_rotation = symbol_rotation + sidx;
c16_t *this_symbol = ((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size;
LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d, length %d (%d,%d)\n",
first_symbol + sidx,
LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d (%d,%d)\n",
sidx,
slot,
sidx + first_symbol + symb_offset,
length,
symbol_rotation[sidx + first_symbol + symb_offset].r,
symbol_rotation[sidx + first_symbol + symb_offset].i);
sidx + symb_offset,
this_rotation->r,
this_rotation->i);
rotate_cpx_vector(((c16_t*) trxdata) + sidx * length,
symbol_rotation + sidx + first_symbol + symb_offset,
((c16_t*) trxdata) + sidx * length,
length,
15);
if (fp->N_RB_DL & 1) {
rotate_cpx_vector(this_symbol, this_rotation, this_symbol,
(fp->N_RB_DL + 1) * 6, 15);
rotate_cpx_vector(this_symbol + fp->first_carrier_offset - 6,
this_rotation,
this_symbol + fp->first_carrier_offset - 6,
(fp->N_RB_DL + 1) * 6, 15);
} else {
rotate_cpx_vector(this_symbol, this_rotation, this_symbol,
fp->N_RB_DL * 6, 15);
rotate_cpx_vector(this_symbol + fp->first_carrier_offset,
this_rotation,
this_symbol + fp->first_carrier_offset,
fp->N_RB_DL * 6, 15);
}
}
}