Commit a98cf887 authored by Florian Kaltenberger's avatar Florian Kaltenberger

fixing a mistake in the computation of the prach_start_symbol

parent fecf27e2
...@@ -1602,7 +1602,9 @@ void *ru_thread( void *param ) { ...@@ -1602,7 +1602,9 @@ void *ru_thread( void *param ) {
&config_period); &config_period);
for (int prach_oc = 0; prach_oc<ru->prach_list[prach_id].num_prach_ocas; prach_oc++) { for (int prach_oc = 0; prach_oc<ru->prach_list[prach_id].num_prach_ocas; prach_oc++) {
prachStartSymbol = ru->prach_list[prach_id].prachStartSymbol+prach_oc*N_dur+14*N_RA_slot; prachStartSymbol = ru->prach_list[prach_id].prachStartSymbol+prach_oc*N_dur;
//comment FK: the standard 38.211 section 5.3.2 has one extra term +14*N_RA_slot. This is because there prachStartSymbol is given wrt to start of the 15kHz slot or 60kHz slot. Here we work slot based, so this function is anyway only called in slots where there is PRACH. Its up to the MAC to schedule another PRACH PDU in the case there are there N_RA_slot \in {0,1}.
rx_nr_prach_ru(ru, rx_nr_prach_ru(ru,
ru->prach_list[prach_id].fmt, //could also use format ru->prach_list[prach_id].fmt, //could also use format
ru->prach_list[prach_id].numRA, ru->prach_list[prach_id].numRA,
......
...@@ -92,12 +92,13 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { ...@@ -92,12 +92,13 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
&N_RA_slot, &N_RA_slot,
&config_period); &config_period);
for(int prach_oc = 0; prach_oc < NUMBER_OF_NR_RU_PRACH_OCCASIONS_MAX; prach_oc++) { for(int prach_oc = 0; prach_oc < prach_pdu->num_prach_ocas; prach_oc++) {
for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) { for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) {
gNB->prach_vars.rxsigF[aa] = ru->prach_rxsigF[prach_oc][ru_aa]; gNB->prach_vars.rxsigF[aa] = ru->prach_rxsigF[prach_oc][ru_aa];
} }
prachStartSymbol = prach_pdu->prach_start_symbol+prach_oc*N_dur+14*N_RA_slot; prachStartSymbol = prach_pdu->prach_start_symbol+prach_oc*N_dur;
//comment FK: the standard 38.211 section 5.3.2 has one extra term +14*N_RA_slot. This is because there prachStartSymbol is given wrt to start of the 15kHz slot or 60kHz slot. Here we work slot based, so this function is anyway only called in slots where there is PRACH. Its up to the MAC to schedule another PRACH PDU in the case there are there N_RA_slot \in {0,1}.
rx_nr_prach(gNB, rx_nr_prach(gNB,
prach_pdu, prach_pdu,
...@@ -127,7 +128,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) { ...@@ -127,7 +128,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
max_preamble_energy[0]/10, max_preamble_energy[0]/10,
max_preamble_energy[0]%10, max_preamble_energy[0]%10,
max_preamble_delay[0], max_preamble_delay[0],
prach_pdu->prach_start_symbol, prachStartSymbol,
prach_pdu->num_ra); prach_pdu->num_ra);
T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(gNB->Mod_id), T_INT(frame), T_INT(slot), T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(gNB->Mod_id), T_INT(frame), T_INT(slot),
......
...@@ -467,11 +467,11 @@ void nr_initiate_ra_proc(module_id_t module_idP, ...@@ -467,11 +467,11 @@ void nr_initiate_ra_proc(module_id_t module_idP,
if (ra->state == RA_IDLE) { if (ra->state == RA_IDLE) {
uint8_t index = ssb_index_from_prach(module_idP, uint8_t index = ssb_index_from_prach(module_idP,
frameP, frameP,
slotP, slotP,
preamble_index, preamble_index,
freq_index, freq_index,
symbol); symbol);
NR_SSB_list_t *SSB_list = &nr_mac->SSB_list[index]; NR_SSB_list_t *SSB_list = &nr_mac->SSB_list[index];
int loop = 0; int loop = 0;
......
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