Commit c878bbcc authored by Ahmed Hussein's avatar Ahmed Hussein

Fixing ptrs time domain allocation in set_ptrs_symb_idx

parent 672937b4
...@@ -130,35 +130,30 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB) { ...@@ -130,35 +130,30 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB) {
void set_ptrs_symb_idx(uint16_t *ptrs_symbols, void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
uint8_t duration_in_symbols, uint8_t duration_in_symbols,
uint8_t start_symbol, uint8_t start_symbol,
uint8_t dmrs_type,
uint8_t L_ptrs, uint8_t L_ptrs,
uint8_t pusch_maxLength, uint16_t ul_dmrs_symb_pos) {
uint16_t ul_dmrs_symb_pos,
uint16_t ofdm_symbol_size) { uint8_t i = 0, last_symbol, is_dmrs_symbol, l_ref;
uint8_t i, last_symbol, is_dmrs_symbol1, is_dmrs_symbol2; int8_t l_counter;
int16_t l_ref; l_ref = start_symbol;
*ptrs_symbols = 0; last_symbol = start_symbol + duration_in_symbols - 1;
i = 0;
is_dmrs_symbol1 = 0;
is_dmrs_symbol2 = 0;
l_ref = start_symbol;
last_symbol = start_symbol + duration_in_symbols - 1;
while ( (l_ref + i*L_ptrs) <= last_symbol) { while ( (l_ref + i*L_ptrs) <= last_symbol) {
if((ul_dmrs_symb_pos >> max((l_ref + (i-1)*L_ptrs + 1), l_ref)) & 0x01) is_dmrs_symbol = 0;
is_dmrs_symbol1 = 1;
if((ul_dmrs_symb_pos >> (l_ref + i*L_ptrs)) & 0x01) for(l_counter = l_ref + i*L_ptrs; l_counter >= max(l_ref + (i-1)*L_ptrs + 1, l_ref); l_counter--) {
is_dmrs_symbol2 = 0;
if ( is_dmrs_symbol1 + is_dmrs_symbol2 > 0 ) { if((ul_dmrs_symb_pos >> l_counter) & 0x01) {
if (pusch_maxLength == 2) is_dmrs_symbol = 1;
l_ref = l_ref + i*L_ptrs + 1; break;
else }
l_ref = l_ref + i*L_ptrs;
}
i = 1; if (is_dmrs_symbol) {
l_ref = l_counter;
i = 1;
continue; continue;
} }
......
...@@ -54,11 +54,8 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB); ...@@ -54,11 +54,8 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB);
void set_ptrs_symb_idx(uint16_t *ptrs_symbols, void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
uint8_t duration_in_symbols, uint8_t duration_in_symbols,
uint8_t start_symbol, uint8_t start_symbol,
uint8_t dmrs_type,
uint8_t L_ptrs, uint8_t L_ptrs,
uint8_t pusch_maxLength, uint16_t ul_dmrs_symb_pos);
uint16_t ul_dmrs_symb_pos,
uint16_t ofdm_symbol_size);
uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs); uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs);
......
...@@ -1052,11 +1052,8 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -1052,11 +1052,8 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
set_ptrs_symb_idx(&gNB->pusch_vars[UE_id]->ptrs_symbols, set_ptrs_symb_idx(&gNB->pusch_vars[UE_id]->ptrs_symbols,
rel15_ul->nr_of_symbols, rel15_ul->nr_of_symbols,
rel15_ul->start_symbol_index, rel15_ul->start_symbol_index,
rel15_ul->dmrs_config_type,
L_ptrs, L_ptrs,
1, // only dmrs of length 1 is currently supported rel15_ul->ul_dmrs_symb_pos);
rel15_ul->ul_dmrs_symb_pos,
frame_parms->ofdm_symbol_size);
} }
} }
......
...@@ -295,11 +295,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, ...@@ -295,11 +295,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
set_ptrs_symb_idx(&ulsch_ue->ptrs_symbols, set_ptrs_symb_idx(&ulsch_ue->ptrs_symbols,
number_of_symbols, number_of_symbols,
start_symbol, start_symbol,
dmrs_type,
L_ptrs, L_ptrs,
number_dmrs_symbols, ul_dmrs_symb_pos);
ul_dmrs_symb_pos,
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