Commit 996a3013 authored by Guy De Souza's avatar Guy De Souza

Shift warning fixes

parent f5ce3af7
......@@ -58,9 +58,9 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
/// BPSK modulation
for (m=0; m<NR_PBCH_DMRS_LENGTH; m++) {
mod_dmrs[m<<1] = nr_mod_table[((1 + ((gold_pbch_dmrs[m>>5]&(1<<(m&0x1f)))>>(m&0x1f)))<<1)];
mod_dmrs[m<<1 + 1] = nr_mod_table[((1 + ((gold_pbch_dmrs[m>>5]&(1<<(m&0x1f)))>>(m&0x1f)))<<1) + 1];
mod_dmrs[(m<<1)+1] = nr_mod_table[((1 + ((gold_pbch_dmrs[m>>5]&(1<<(m&0x1f)))>>(m&0x1f)))<<1) + 1];
#ifdef DEBUG_PBCH
printf("m %d mod_dmrs %d %d\n", m, mod_dmrs[2*m], mod_dmrs[2*m + 1]);
printf("m %d mod_dmrs %d %d\n", m, mod_dmrs[2*m], mod_dmrs[2*m+1]);
#endif
}
......@@ -77,10 +77,10 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
for (m = 0; m < 60; m++) {
#ifdef DEBUG_PBCH
printf("Mapping m %d: %d %d at k %d of l %d\n", m,(a * mod_dmrs[m<<1]) >> 15, (a * mod_dmrs[m<<1 + 1]) >> 15, k, l);
printf("m %d at k %d of l %d\n", m, k, l);
#endif
((int16_t*)txdataF[aa])[(l*frame_parms->ofdm_symbol_size + k)<<1] = (a * mod_dmrs[m<<1]) >> 15;
((int16_t*)txdataF[aa])[(l*frame_parms->ofdm_symbol_size + k)<<1 + 1] = (a * mod_dmrs[m<<1 + 1]) >> 15;
((int16_t*)txdataF[aa])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (a * mod_dmrs[(m<<1) + 1]) >> 15;
k+=4;
if (k >= frame_parms->ofdm_symbol_size)
......@@ -93,10 +93,10 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
for (m = 60; m < 84; m++) {
#ifdef DEBUG_PBCH
printf("Mapping m %d: %d %d at k %d of l %d\n", m,(a * mod_dmrs[m<<1]) >> 15, (a * mod_dmrs[m<<1 + 1]) >> 15, k, l);
printf("m %d at k %d of l %d\n", m, k, l);
#endif
((int16_t*)txdataF[aa])[(l*frame_parms->ofdm_symbol_size + k)<<1] = (a * mod_dmrs[m<<1]) >> 15;
((int16_t*)txdataF[aa])[(l*frame_parms->ofdm_symbol_size + k)<<1 + 1] = (a * mod_dmrs[m<<1 + 1]) >> 15;
((int16_t*)txdataF[aa])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (a * mod_dmrs[(m<<1) + 1]) >> 15;
k+=(m==71)?148:4; // Jump from 44+nu to 192+nu
if (k >= frame_parms->ofdm_symbol_size)
......@@ -109,10 +109,10 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
for (m = 84; m < NR_PBCH_DMRS_LENGTH; m++) {
#ifdef DEBUG_PBCH
printf("Mapping m %d: %d %d at k %d of l %d\n", m,(a * mod_dmrs[m<<1]) >> 15, (a * mod_dmrs[m<<1 + 1]) >> 15, k, l);
printf("m %d at k %d of l %d\n", m, k, l);
#endif
((int16_t*)txdataF[aa])[(l*frame_parms->ofdm_symbol_size + k)<<1] = (a * mod_dmrs[m<<1]) >> 15;
((int16_t*)txdataF[aa])[(l*frame_parms->ofdm_symbol_size + k)<<1 + 1] = (a * mod_dmrs[m<<1 + 1]) >> 15;
((int16_t*)txdataF[aa])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1] = (a * mod_dmrs[(m<<1) + 1]) >> 15;
k+=4;
if (k >= frame_parms->ofdm_symbol_size)
......@@ -123,7 +123,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
#ifdef DEBUG_PBCH
write_output("txdataF.m", "txdataF", txdataF[0], frame_parms->samples_per_frame_wCP, 1, 1);
write_output("txdataF.m", "txdataF", txdataF[0], frame_parms->samples_per_frame_wCP>>1, 1, 1);
#endif
return (0);
}
......@@ -62,7 +62,6 @@ void nr_feptx0(RU_t *ru,int slot) {
NR_DL_FRAME_PARMS *fp = &ru->nr_frame_parms;
unsigned int aa,slot_offset;
int i, tx_offset;
int slot_sizeF = fp->ofdm_symbol_size * fp->symbols_per_slot;
int subframe = ru->proc.subframe_tx;
......
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