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