Commit 910c1860 authored by Parminder Singh's avatar Parminder Singh

DMRS estimation default value is moved outside slot processing

 - in PTRS processing the default value for DMRS is set outside slot
   processing.
parent 03db617c
...@@ -563,8 +563,21 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB, ...@@ -563,8 +563,21 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
phase_per_symbol = (int16_t*)gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[aarx]; phase_per_symbol = (int16_t*)gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[aarx];
ptrs_re_symbol = &gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot; ptrs_re_symbol = &gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot;
*ptrs_re_symbol = 0; *ptrs_re_symbol = 0;
phase_per_symbol[2*symbol] = 0; // Real
phase_per_symbol[(2*symbol)+1] = 0; // Imag phase_per_symbol[(2*symbol)+1] = 0; // Imag
/* set DMRS estimates to 0 angle with magnitude 1 */
if(is_dmrs_symbol(symbol,*dmrsSymbPos))
{
/* set DMRS real estimation to 32767 */
phase_per_symbol[2*symbol]=(int16_t)((1<<15)-1); // 32767
#ifdef DEBUG_UL_PTRS
printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[2*symbol],phase_per_symbol[(2*symbol)+1]);
#endif
}
else// real ptrs value is set to 0
{
phase_per_symbol[2*symbol] = 0; // Real
}
if(symbol == *startSymbIndex) if(symbol == *startSymbIndex)
{ {
*ptrsSymbPos = 0; *ptrsSymbPos = 0;
......
...@@ -365,16 +365,6 @@ int8_t nr_ptrs_process_slot(uint16_t dmrsSymbPos, ...@@ -365,16 +365,6 @@ int8_t nr_ptrs_process_slot(uint16_t dmrsSymbPos,
int8_t tmp = 0; int8_t tmp = 0;
for(uint8_t symb = startSymbIdx; symb <symbInSlot; symb ++) for(uint8_t symb = startSymbIdx; symb <symbInSlot; symb ++)
{ {
/* set DMRS estimates to 0 angle with magnitude 1 */
if(is_dmrs_symbol(symb,dmrsSymbPos))
{
/* set DMRS estimation */
estPerSymb[symb*2]=(int16_t)((1<<15)-1); // 32767
estPerSymb[(symb*2)+1]= 0; // no angle
#ifdef DEBUG_PTRS
printf("[PHY][PTRS]: DMRS Symbol %d :(%4d %4d)\n", symb, estPerSymb[symb*2],estPerSymb[(symb*2)+1]);
#endif
}
/* Update left and right reference from an estimated symbol */ /* Update left and right reference from an estimated symbol */
if((is_ptrs_symbol(symb, ptrsSymbPos)) || (is_dmrs_symbol(symb,dmrsSymbPos))) if((is_ptrs_symbol(symb, ptrsSymbPos)) || (is_dmrs_symbol(symb,dmrsSymbPos)))
{ {
......
...@@ -1028,8 +1028,21 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue, ...@@ -1028,8 +1028,21 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
phase_per_symbol = (int16_t*)pdsch_vars[eNB_id]->ptrs_phase_per_slot[aarx]; phase_per_symbol = (int16_t*)pdsch_vars[eNB_id]->ptrs_phase_per_slot[aarx];
ptrs_re_symbol = (int32_t*)pdsch_vars[eNB_id]->ptrs_re_per_slot[aarx]; ptrs_re_symbol = (int32_t*)pdsch_vars[eNB_id]->ptrs_re_per_slot[aarx];
ptrs_re_symbol[symbol] = 0; ptrs_re_symbol[symbol] = 0;
phase_per_symbol[2*symbol] = 0; // Real
phase_per_symbol[(2*symbol)+1] = 0; // Imag phase_per_symbol[(2*symbol)+1] = 0; // Imag
/* set DMRS estimates to 0 angle with magnitude 1 */
if(is_dmrs_symbol(symbol,*dmrsSymbPos))
{
/* set DMRS real estimation to 32767 */
phase_per_symbol[2*symbol]=(int16_t)((1<<15)-1); // 32767
#ifdef DEBUG_DL_PTRS
printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[2*symbol],phase_per_symbol[(2*symbol)+1]);
#endif
}
else// real ptrs value is set to 0
{
phase_per_symbol[2*symbol] = 0; // Real
}
if(dlsch0_harq->status == ACTIVE) if(dlsch0_harq->status == ACTIVE)
{ {
if(symbol == *startSymbIndex) if(symbol == *startSymbIndex)
......
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