Commit 948dc6b1 authored by Rakesh's avatar Rakesh

bug fix in channel estimation

parent 0b757348
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
//#define DEBUG_PBCH 1 //#define DEBUG_PBCH
//#define DEBUG_PBCH_ENCODING //#define DEBUG_PBCH_ENCODING
#ifdef OPENAIR2 #ifdef OPENAIR2
...@@ -61,7 +61,8 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -61,7 +61,8 @@ uint16_t nr_pbch_extract(int **rxdataF,
int nushiftmod4 = frame_parms->nushift; int nushiftmod4 = frame_parms->nushift;
unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; //and unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; //and
if (rx_offset>= frame_parms->ofdm_symbol_size) rx_offset-=frame_parms->ofdm_symbol_size; // if (rx_offset>= frame_parms->ofdm_symbol_size) rx_offset-=frame_parms->ofdm_symbol_size;
rx_offset=(rx_offset)%(frame_parms->ofdm_symbol_size);
AssertFatal(symbol>=1 && symbol<5, AssertFatal(symbol>=1 && symbol<5,
"symbol %d illegal for PBCH extraction\n", "symbol %d illegal for PBCH extraction\n",
...@@ -103,8 +104,8 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -103,8 +104,8 @@ uint16_t nr_pbch_extract(int **rxdataF,
j++; j++;
} }
//rx_offset=(rx_offset+1)&(frame_parms->ofdm_symbol_size-1); rx_offset=(rx_offset+1)%(frame_parms->ofdm_symbol_size);
rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1); //rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1);
} }
rxF_ext+=9; rxF_ext+=9;
...@@ -126,12 +127,14 @@ uint16_t nr_pbch_extract(int **rxdataF, ...@@ -126,12 +127,14 @@ uint16_t nr_pbch_extract(int **rxdataF,
j++; j++;
} }
//rx_offset=(rx_offset+1)&(frame_parms->ofdm_symbol_size-1); rx_offset=(rx_offset+1)%(frame_parms->ofdm_symbol_size);
rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1); //rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 1) : (rx_offset+1);
} }
rxF_ext+=9; rxF_ext+=9;
} else rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 12) : (rx_offset+12);//rx_offset = (rx_offset+12)&(frame_parms->ofdm_symbol_size-1); } else{ //rx_offset = (rx_offset >= frame_parms->ofdm_symbol_size) ? (rx_offset - frame_parms->ofdm_symbol_size + 12) : (rx_offset+12);
rx_offset = (rx_offset+12)%(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