Commit c042f7c2 authored by Raymond Knopp's avatar Raymond Knopp

fixed issue related to scheduing of PRACH for long sequence (only gets done in...

fixed issue related to scheduing of PRACH for long sequence (only gets done in last slot of subframe now, not both) and start point of DFT in RU processing for long-sequence. Removes fatal segfault.
parent d37f0770
...@@ -150,6 +150,7 @@ void rx_nr_prach_ru(RU_t *ru, ...@@ -150,6 +150,7 @@ void rx_nr_prach_ru(RU_t *ru,
int16_t **rxsigF=NULL; int16_t **rxsigF=NULL;
NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms; NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms;
int slot2=slot;
int16_t *prach[ru->nb_rx]; int16_t *prach[ru->nb_rx];
int prach_sequence_length = ru->config.prach_config.prach_sequence_length.value; int prach_sequence_length = ru->config.prach_config.prach_sequence_length.value;
...@@ -159,9 +160,10 @@ void rx_nr_prach_ru(RU_t *ru, ...@@ -159,9 +160,10 @@ void rx_nr_prach_ru(RU_t *ru,
rxsigF = ru->prach_rxsigF; rxsigF = ru->prach_rxsigF;
AssertFatal(ru->if_south == LOCAL_RF,"we shouldn't call this if if_south != LOCAL_RF\n"); AssertFatal(ru->if_south == LOCAL_RF,"we shouldn't call this if if_south != LOCAL_RF\n");
for (int aa=0; aa<ru->nb_rx; aa++) for (int aa=0; aa<ru->nb_rx; aa++){
prach[aa] = (int16_t*)&ru->common.rxdata[aa][(slot*fp->get_samples_per_slot(slot,fp))-ru->N_TA_offset]; if (prach_sequence_length == 0) slot2=(slot/fp->slots_per_subframe)*fp->slots_per_subframe;
prach[aa] = (int16_t*)&ru->common.rxdata[aa][(slot2*fp->get_samples_per_slot(slot,fp))-ru->N_TA_offset];
}
int mu = fp->numerology_index; int mu = fp->numerology_index;
...@@ -170,7 +172,7 @@ void rx_nr_prach_ru(RU_t *ru, ...@@ -170,7 +172,7 @@ void rx_nr_prach_ru(RU_t *ru,
if (prach_sequence_length == 0) { if (prach_sequence_length == 0) {
LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %d, msg1_frequencyStart %d\n", LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %d, msg1_frequencyStart %d\n",
ru->idx,frame,slot,prachFormat,msg1_frequencystart); ru->idx,frame,slot2,prachFormat,msg1_frequencystart);
AssertFatal(prachFormat<4,"Illegal prach format %d for length 839\n",prachFormat); AssertFatal(prachFormat<4,"Illegal prach format %d for length 839\n",prachFormat);
switch (prachFormat) { switch (prachFormat) {
case 0: case 0:
......
...@@ -944,7 +944,7 @@ int get_nr_prach_info_from_index(uint8_t index, ...@@ -944,7 +944,7 @@ int get_nr_prach_info_from_index(uint8_t index,
s_map = table_6_3_3_2_3_prachConfig_Index[index][4]; s_map = table_6_3_3_2_3_prachConfig_Index[index][4];
if ( (s_map>>subframe)&0x01 ) { if ( (s_map>>subframe)&0x01 ) {
if (mu == 1) { if (mu == 1) {
if ( (table_6_3_3_2_3_prachConfig_Index[index][6] == 1) && (slot%2 == 0) ) if ( (table_6_3_3_2_3_prachConfig_Index[index][6] <= 1) && (slot%2 == 0) )
return 0; // no prach in even slots @ 30kHz for 1 prach per subframe return 0; // no prach in even slots @ 30kHz for 1 prach per subframe
} }
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){ if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
...@@ -954,9 +954,9 @@ int get_nr_prach_info_from_index(uint8_t index, ...@@ -954,9 +954,9 @@ int get_nr_prach_info_from_index(uint8_t index,
if (table_6_3_3_2_3_prachConfig_Index[index][1] != -1) if (table_6_3_3_2_3_prachConfig_Index[index][1] != -1)
format2 = (uint8_t) table_6_3_3_2_3_prachConfig_Index[index][1]; format2 = (uint8_t) table_6_3_3_2_3_prachConfig_Index[index][1];
*format = ((uint8_t) table_6_3_3_2_3_prachConfig_Index[index][0]) | (format2<<8); *format = ((uint8_t) table_6_3_3_2_3_prachConfig_Index[index][0]) | (format2<<8);
LOG_D(MAC,"Frame %d slot %d: Getting PRACH info from index %d absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u \n", frame, LOG_D(MAC,"Frame %d slot %d: Getting PRACH info from index %d (col 6 %d) absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u \n", frame,
slot, slot,
index, index, table_6_3_3_2_3_prachConfig_Index[index][6],
pointa, pointa,
mu, mu,
unpaired, unpaired,
...@@ -980,7 +980,7 @@ int get_nr_prach_info_from_index(uint8_t index, ...@@ -980,7 +980,7 @@ int get_nr_prach_info_from_index(uint8_t index,
s_map = table_6_3_3_2_2_prachConfig_Index[index][4]; s_map = table_6_3_3_2_2_prachConfig_Index[index][4];
if ( (s_map>>subframe)&0x01 ) { if ( (s_map>>subframe)&0x01 ) {
if (mu == 1) { if (mu == 1) {
if ( (table_6_3_3_2_2_prachConfig_Index[index][6] == 1) && (slot%2 == 0) ) if ( (table_6_3_3_2_2_prachConfig_Index[index][6] <= 1) && (slot%2 == 0) )
return 0; // no prach in even slots @ 30kHz for 1 prach per subframe return 0; // no prach in even slots @ 30kHz for 1 prach per subframe
} }
if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){ if (start_symbol != NULL && N_t_slot != NULL && N_dur != NULL && format != NULL){
......
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