Commit ba0cad20 authored by Robert Schmidt's avatar Robert Schmidt

Move respPuschAarx response queue to stack of nr_pusch_channel_estimation()

The queue for finished jobs of PUSCH channel estimation is only used inside
nr_pusch_channel_estimation(). Since initialization is fast, it can be
declared on the stack in the function where it is used.
parent fe10c902
...@@ -354,9 +354,6 @@ void init_gNB_Tpool(int inst) { ...@@ -354,9 +354,6 @@ void init_gNB_Tpool(int inst) {
// ULSCH decoder result FIFO // ULSCH decoder result FIFO
initNotifiedFIFO(&gNB->respPuschSymb); initNotifiedFIFO(&gNB->respPuschSymb);
initNotifiedFIFO(&gNB->respDecode); initNotifiedFIFO(&gNB->respDecode);
// PUSCH channel estimation result FIFO
initNotifiedFIFO(&gNB->respPuschAarx);
// L1 RX result FIFO // L1 RX result FIFO
initNotifiedFIFO(&gNB->resp_L1); initNotifiedFIFO(&gNB->resp_L1);
......
...@@ -499,6 +499,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, ...@@ -499,6 +499,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
delay_arr[i] = *delay; delay_arr[i] = *delay;
} }
notifiedFIFO_t respPuschAarx;
initNotifiedFIFO(&respPuschAarx);
start_meas(&gNB->pusch_channel_estimation_antenna_processing_stats); start_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
int numAntennas = gNB->dmrs_num_antennas_per_thread; int numAntennas = gNB->dmrs_num_antennas_per_thread;
for (int aarx = 0; aarx < gNB->frame_parms.nb_antennas_rx; aarx += numAntennas) { for (int aarx = 0; aarx < gNB->frame_parms.nb_antennas_rx; aarx += numAntennas) {
...@@ -506,7 +508,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, ...@@ -506,7 +508,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
id.p = 1 + aarx; id.p = 1 + aarx;
notifiedFIFO_elt_t *req = newNotifiedFIFO_elt(sizeof(puschAntennaProc_t), notifiedFIFO_elt_t *req = newNotifiedFIFO_elt(sizeof(puschAntennaProc_t),
id.p, id.p,
&gNB->respPuschAarx, &respPuschAarx,
&nr_pusch_antenna_processing); // create a job for Tpool &nr_pusch_antenna_processing); // create a job for Tpool
puschAntennaProc_t *rdata = (puschAntennaProc_t *)NotifiedFifoData(req); // data for the job puschAntennaProc_t *rdata = (puschAntennaProc_t *)NotifiedFifoData(req); // data for the job
...@@ -537,7 +539,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, ...@@ -537,7 +539,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
} // Antenna Loop } // Antenna Loop
while (nbAarx > 0) { while (nbAarx > 0) {
notifiedFIFO_elt_t *req = pullTpool(&gNB->respPuschAarx, &gNB->threadPool); notifiedFIFO_elt_t *req = pullTpool(&respPuschAarx, &gNB->threadPool);
nbAarx--; nbAarx--;
delNotifiedFIFO_elt(req); delNotifiedFIFO_elt(req);
} }
......
...@@ -554,7 +554,6 @@ typedef struct PHY_VARS_gNB_s { ...@@ -554,7 +554,6 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t srs_beam_report_stats; time_stats_t srs_beam_report_stats;
time_stats_t srs_iq_matrix_stats; time_stats_t srs_iq_matrix_stats;
notifiedFIFO_t respPuschAarx;
notifiedFIFO_t respPuschSymb; notifiedFIFO_t respPuschSymb;
notifiedFIFO_t respDecode; notifiedFIFO_t respDecode;
notifiedFIFO_t resp_L1; notifiedFIFO_t resp_L1;
......
...@@ -573,7 +573,6 @@ int main(int argc, char *argv[]) ...@@ -573,7 +573,6 @@ int main(int argc, char *argv[])
initNotifiedFIFO(&gNB->respDecode); initNotifiedFIFO(&gNB->respDecode);
initNotifiedFIFO(&gNB->respPuschSymb); initNotifiedFIFO(&gNB->respPuschSymb);
initNotifiedFIFO(&gNB->respPuschAarx);
initNotifiedFIFO(&gNB->L1_tx_free); initNotifiedFIFO(&gNB->L1_tx_free);
initNotifiedFIFO(&gNB->L1_tx_filled); initNotifiedFIFO(&gNB->L1_tx_filled);
initNotifiedFIFO(&gNB->L1_tx_out); initNotifiedFIFO(&gNB->L1_tx_out);
......
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