Commit 421eb65a authored by Thomas Schlichter's avatar Thomas Schlichter

NR_UE: fix ulsch precoding for RB crossing DC (odd number of RB)

parent e28fccc7
......@@ -495,7 +495,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint8_t pmi=pusch_pdu->Tpmi;
if (pmi == 0) {//unitary Precoding
if(ap< pusch_pdu->nrOfLayers)
if (k + NR_NB_SC_PER_RB <= frame_parms->ofdm_symbol_size) { // RB does not cross DC
if (ap<pusch_pdu->nrOfLayers)
memcpy((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + k],
(void*)&tx_precoding[ap][2*(l*frame_parms->ofdm_symbol_size + k)],
NR_NB_SC_PER_RB*sizeof(int32_t));
......@@ -503,7 +504,25 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
memset((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + k],
0,
NR_NB_SC_PER_RB*sizeof(int32_t));
} else { // RB does cross DC
int neg_length = frame_parms->ofdm_symbol_size - k;
int pos_length = NR_NB_SC_PER_RB - neg_length;
if (ap<pusch_pdu->nrOfLayers) {
memcpy((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + k],
(void*)&tx_precoding[ap][2*(l*frame_parms->ofdm_symbol_size + k)],
neg_length*sizeof(int32_t));
memcpy((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size],
(void*)&tx_precoding[ap][2*(l*frame_parms->ofdm_symbol_size)],
pos_length*sizeof(int32_t));
} else {
memset((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + k],
0,
neg_length*sizeof(int32_t));
memset((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size],
0,
pos_length*sizeof(int32_t));
}
}
k += NR_NB_SC_PER_RB;
if (k >= frame_parms->ofdm_symbol_size) {
k -= frame_parms->ofdm_symbol_size;
......
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