Commit 59cb6021 authored by Thomas Schlichter's avatar Thomas Schlichter

review changes

parent 63106069
...@@ -348,39 +348,33 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, ...@@ -348,39 +348,33 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
{ {
int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot; 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 (%d,%d)\n", LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d (%d,%d)\n",
first_symbol + sidx, sidx,
slot, slot,
sidx + first_symbol + symb_offset, sidx + symb_offset,
symbol_rotation[sidx + first_symbol + symb_offset].r, this_rotation->r,
symbol_rotation[sidx + first_symbol + symb_offset].i); this_rotation->i);
if (fp->N_RB_DL & 1) { if (fp->N_RB_DL & 1) {
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size, rotate_cpx_vector(this_symbol, this_rotation, this_symbol,
symbol_rotation + sidx + first_symbol + symb_offset, (fp->N_RB_DL + 1) * 6, 15);
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size, rotate_cpx_vector(this_symbol + fp->first_carrier_offset - 6,
(fp->N_RB_DL + 1) * 6, this_rotation,
15); this_symbol + fp->first_carrier_offset - 6,
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset - 6, (fp->N_RB_DL + 1) * 6, 15);
symbol_rotation + sidx + first_symbol + symb_offset,
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset - 6,
(fp->N_RB_DL + 1) * 6,
15);
} else { } else {
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size, rotate_cpx_vector(this_symbol, this_rotation, this_symbol,
symbol_rotation + sidx + first_symbol + symb_offset, fp->N_RB_DL * 6, 15);
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size, rotate_cpx_vector(this_symbol + fp->first_carrier_offset,
fp->N_RB_DL * 6, this_rotation,
15); this_symbol + fp->first_carrier_offset,
rotate_cpx_vector(((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset, fp->N_RB_DL * 6, 15);
symbol_rotation + sidx + first_symbol + symb_offset,
((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size + fp->first_carrier_offset,
fp->N_RB_DL * 6,
15);
} }
} }
} }
......
...@@ -108,53 +108,34 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, ...@@ -108,53 +108,34 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
#endif #endif
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation; c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
c16_t *this_symbol = (c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
if (frame_parms->N_RB_DL & 1) { if (frame_parms->N_RB_DL & 1) {
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], rotate_cpx_vector(this_symbol, &rot2, this_symbol,
(frame_parms->N_RB_DL + 1) * 6, 15);
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6,
&rot2, &rot2,
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], this_symbol + frame_parms->first_carrier_offset - 6,
(frame_parms->N_RB_DL + 1) * 6, (frame_parms->N_RB_DL + 1) * 6, 15);
15); multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset - 6], 1, (frame_parms->N_RB_DL + 1) * 6, 15);
&rot2, multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset - 6],
(frame_parms->N_RB_DL + 1) * 6,
15);
multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
(int16_t *)shift_rot,
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
1,
(frame_parms->N_RB_DL + 1) * 6,
15);
multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset - 6],
(int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6), (int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6),
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset - 6], (int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
1, 1, (frame_parms->N_RB_DL + 1) * 6, 15);
(frame_parms->N_RB_DL + 1) * 6,
15);
} else { } else {
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], rotate_cpx_vector(this_symbol, &rot2, this_symbol,
frame_parms->N_RB_DL * 6, 15);
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset,
&rot2, &rot2,
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], this_symbol + frame_parms->first_carrier_offset,
frame_parms->N_RB_DL * 6, frame_parms->N_RB_DL * 6, 15);
15); multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset], 1, frame_parms->N_RB_DL * 6, 15);
&rot2, multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset),
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset],
frame_parms->N_RB_DL * 6,
15);
multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
(int16_t *)shift_rot,
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
1,
frame_parms->N_RB_DL * 6,
15);
multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset],
(int16_t *)(shift_rot + frame_parms->first_carrier_offset), (int16_t *)(shift_rot + frame_parms->first_carrier_offset),
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol + frame_parms->first_carrier_offset], (int16_t *)(this_symbol + frame_parms->first_carrier_offset),
1, 1, frame_parms->N_RB_DL * 6, 15);
frame_parms->N_RB_DL * 6,
15);
} }
} }
...@@ -258,11 +239,8 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, ...@@ -258,11 +239,8 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
symbol+symb_offset,rot2.r,rot2.i); symbol+symb_offset,rot2.r,rot2.i);
#endif #endif
rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol], c16_t *this_symbol = (c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol];
&rot2, rotate_cpx_vector(this_symbol, &rot2, this_symbol, frame_parms->ofdm_symbol_size, 15);
(c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
frame_parms->ofdm_symbol_size,
15);
} }
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
...@@ -348,53 +326,34 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, ...@@ -348,53 +326,34 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,rot2.i); LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,rot2.i);
c16_t *shift_rot = frame_parms->timeshift_symbol_rotation; c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
c16_t *this_symbol = (c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)];
if (frame_parms->N_RB_UL & 1) { if (frame_parms->N_RB_UL & 1) {
rotate_cpx_vector((c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)], rotate_cpx_vector(this_symbol, &rot2, this_symbol,
&rot2, (frame_parms->N_RB_UL + 1) * 6, 15);
(c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)], rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6,
(frame_parms->N_RB_UL + 1) * 6,
15);
rotate_cpx_vector((c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset-6],
&rot2, &rot2,
(c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset-6], this_symbol + frame_parms->first_carrier_offset - 6,
(frame_parms->N_RB_UL + 1) * 6, (frame_parms->N_RB_UL + 1) * 6, 15);
15); multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
multadd_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)], 1, (frame_parms->N_RB_UL+1) * 6, 15);
(int16_t *)shift_rot, multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
1,
(frame_parms->N_RB_UL+1) * 6,
15);
multadd_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset-6],
(int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6), (int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6),
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset-6], (int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6),
1, 1, (frame_parms->N_RB_UL+1) * 6, 15);
(frame_parms->N_RB_UL+1) * 6,
15);
} else { } else {
rotate_cpx_vector((c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)], rotate_cpx_vector(this_symbol, &rot2, this_symbol,
&rot2, frame_parms->N_RB_UL * 6, 15);
(c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)], rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset,
frame_parms->N_RB_UL * 6,
15);
rotate_cpx_vector((c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset],
&rot2, &rot2,
(c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset], this_symbol + frame_parms->first_carrier_offset,
frame_parms->N_RB_UL * 6, frame_parms->N_RB_UL * 6, 15);
15); multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol,
multadd_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)], 1, frame_parms->N_RB_UL * 6, 15);
(int16_t *)shift_rot, multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset),
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
1,
frame_parms->N_RB_UL * 6,
15);
multadd_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset],
(int16_t *)(shift_rot + frame_parms->first_carrier_offset), (int16_t *)(shift_rot + frame_parms->first_carrier_offset),
(int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)+frame_parms->first_carrier_offset], (int16_t *)(this_symbol + frame_parms->first_carrier_offset),
1, 1, frame_parms->N_RB_UL * 6, 15);
frame_parms->N_RB_UL * 6,
15);
} }
} }
} }
...@@ -597,34 +597,27 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, ...@@ -597,34 +597,27 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot; int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
for(ap = 0; ap < n_antenna_ports; ap++) { for(ap = 0; ap < n_antenna_ports; ap++) {
for (int s=0;s<NR_NUMBER_OF_SYMBOLS_PER_SLOT;s++){ for (int s=0;s<NR_NUMBER_OF_SYMBOLS_PER_SLOT;s++){
c16_t rot=((c16_t*)frame_parms->symbol_rotation[1])[s + symb_offset]; c16_t *this_symbol = (c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s];
c16_t rot=frame_parms->symbol_rotation[1][s + symb_offset];
LOG_D(PHY,"rotating txdataF symbol %d (%d) => (%d.%d)\n", LOG_D(PHY,"rotating txdataF symbol %d (%d) => (%d.%d)\n",
s, s,
s + symb_offset, s + symb_offset,
rot.r, rot.i); rot.r, rot.i);
if (frame_parms->N_RB_UL & 1) { if (frame_parms->N_RB_UL & 1) {
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s], rotate_cpx_vector(this_symbol, &rot, this_symbol,
(frame_parms->N_RB_UL + 1) * 6, 15);
rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6,
&rot, &rot,
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s], this_symbol + frame_parms->first_carrier_offset - 6,
(frame_parms->N_RB_UL + 1) * 6, (frame_parms->N_RB_UL + 1) * 6, 15);
15);
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset - 6],
&rot,
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset - 6],
(frame_parms->N_RB_UL + 1) * 6,
15);
} else { } else {
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s], rotate_cpx_vector(this_symbol, &rot, this_symbol,
&rot, frame_parms->N_RB_UL * 6, 15);
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s], rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset,
frame_parms->N_RB_UL * 6,
15);
rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset],
&rot, &rot,
(c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s + frame_parms->first_carrier_offset], this_symbol + frame_parms->first_carrier_offset,
frame_parms->N_RB_UL * 6, frame_parms->N_RB_UL * 6, 15);
15);
} }
} }
} }
......
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