Commit 76eaed3b authored by luis_pereira87's avatar luis_pereira87

Address review comments by correctly re-formatting a piece of code using clang-format

parent 5a32092d
...@@ -137,29 +137,33 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue, ...@@ -137,29 +137,33 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
if (config_type > 1) if (config_type > 1)
LOG_E(PHY,"Bad PDSCH DMRS config type %d\n", config_type); LOG_E(PHY,"Bad PDSCH DMRS config type %d\n", config_type);
if ((p>=1000) && (p<((config_type==NFAPI_NR_DMRS_TYPE1) ? 1008 : 1012))) { if ((p >= 1000) && (p < ((config_type == NFAPI_NR_DMRS_TYPE1) ? 1008 : 1012))) {
if (ue->frame_parms.Ncp == NORMAL) { if (ue->frame_parms.Ncp == NORMAL) {
for (int i = 0; i < nb_pdsch_rb * ((config_type == NFAPI_NR_DMRS_TYPE1) ? 6 : 4); i++) {
w = (wf[p - 1000][i & 1]) * (wt[p - 1000][lp]);
mod_table = (w == 1) ? nr_rx_mod_table : nr_rx_nmod_table;
for (int i=0; i<nb_pdsch_rb*((config_type==NFAPI_NR_DMRS_TYPE1) ? 6:4); i++) { idx = ((((nr_gold_pdsch[(i << 1) >> 5]) >> ((i << 1) & 0x1f)) & 1) << 1) ^ (((nr_gold_pdsch[((i << 1) + 1) >> 5]) >> (((i << 1) + 1) & 0x1f)) & 1);
((int16_t *)output)[i << 1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx) << 1];
w = (wf[p-1000][i&1])*(wt[p-1000][lp]); ((int16_t *)output)[(i << 1) + 1] = mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx) << 1) + 1];
mod_table = (w==1) ? nr_rx_mod_table : nr_rx_nmod_table;
idx = ((((nr_gold_pdsch[(i<<1)>>5])>>((i<<1)&0x1f))&1)<<1) ^ (((nr_gold_pdsch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1);
((int16_t*)output)[i<<1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1];
((int16_t*)output)[(i<<1)+1] = mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1) + 1];
#ifdef DEBUG_PDSCH #ifdef DEBUG_PDSCH
printf("nr_pdsch_dmrs_rx dmrs config type %d port %d nb_pdsch_rb %d\n", config_type, p, nb_pdsch_rb); printf("nr_pdsch_dmrs_rx dmrs config type %d port %d nb_pdsch_rb %d\n", config_type, p, nb_pdsch_rb);
printf("wf[%d] = %d wt[%d]= %d\n", i&1, wf[p-1000][i&1], lp, wt[p-1000][lp]); printf("wf[%d] = %d wt[%d]= %d\n", i & 1, wf[p - 1000][i & 1], lp, wt[p - 1000][lp]);
printf("i %d idx %d pdsch gold %u b0-b1 %d-%d mod_dmrs %d %d\n", i, idx, nr_gold_pdsch[(i<<1)>>5], (((nr_gold_pdsch[(i<<1)>>5])>>((i<<1)&0x1f))&1), printf("i %d idx %d pdsch gold %u b0-b1 %d-%d mod_dmrs %d %d\n",
(((nr_gold_pdsch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1), ((int16_t*)output)[i<<1], ((int16_t*)output)[(i<<1)+1]); i,
idx,
nr_gold_pdsch[(i << 1) >> 5],
(((nr_gold_pdsch[(i << 1) >> 5]) >> ((i << 1) & 0x1f)) & 1),
(((nr_gold_pdsch[((i << 1) + 1) >> 5]) >> (((i << 1) + 1) & 0x1f)) & 1),
((int16_t *)output)[i << 1],
((int16_t *)output)[(i << 1) + 1]);
#endif #endif
} }
} else { } else {
LOG_E(PHY,"extended cp not supported for PDSCH DMRS yet\n"); LOG_E(PHY, "extended cp not supported for PDSCH DMRS yet\n");
} }
} else { } else {
LOG_E(PHY,"Illegal p %d PDSCH DMRS port\n",p); LOG_E(PHY, "Illegal p %d PDSCH DMRS port\n", p);
} }
return(0); return(0);
......
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