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.
This commit is contained in:
@@ -354,9 +354,6 @@ void init_gNB_Tpool(int inst) {
|
||||
// ULSCH decoder result FIFO
|
||||
initNotifiedFIFO(&gNB->respPuschSymb);
|
||||
initNotifiedFIFO(&gNB->respDecode);
|
||||
// PUSCH channel estimation result FIFO
|
||||
initNotifiedFIFO(&gNB->respPuschAarx);
|
||||
|
||||
|
||||
// L1 RX result FIFO
|
||||
initNotifiedFIFO(&gNB->resp_L1);
|
||||
|
||||
@@ -499,6 +499,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
delay_arr[i] = *delay;
|
||||
}
|
||||
|
||||
notifiedFIFO_t respPuschAarx;
|
||||
initNotifiedFIFO(&respPuschAarx);
|
||||
start_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
|
||||
int numAntennas = gNB->dmrs_num_antennas_per_thread;
|
||||
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,
|
||||
id.p = 1 + aarx;
|
||||
notifiedFIFO_elt_t *req = newNotifiedFIFO_elt(sizeof(puschAntennaProc_t),
|
||||
id.p,
|
||||
&gNB->respPuschAarx,
|
||||
&respPuschAarx,
|
||||
&nr_pusch_antenna_processing); // create a job for Tpool
|
||||
puschAntennaProc_t *rdata = (puschAntennaProc_t *)NotifiedFifoData(req); // data for the job
|
||||
|
||||
@@ -537,7 +539,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
} // Antenna Loop
|
||||
|
||||
while (nbAarx > 0) {
|
||||
notifiedFIFO_elt_t *req = pullTpool(&gNB->respPuschAarx, &gNB->threadPool);
|
||||
notifiedFIFO_elt_t *req = pullTpool(&respPuschAarx, &gNB->threadPool);
|
||||
nbAarx--;
|
||||
delNotifiedFIFO_elt(req);
|
||||
}
|
||||
|
||||
@@ -554,7 +554,6 @@ typedef struct PHY_VARS_gNB_s {
|
||||
time_stats_t srs_beam_report_stats;
|
||||
time_stats_t srs_iq_matrix_stats;
|
||||
|
||||
notifiedFIFO_t respPuschAarx;
|
||||
notifiedFIFO_t respPuschSymb;
|
||||
notifiedFIFO_t respDecode;
|
||||
notifiedFIFO_t resp_L1;
|
||||
|
||||
@@ -573,7 +573,6 @@ int main(int argc, char *argv[])
|
||||
initNotifiedFIFO(&gNB->respDecode);
|
||||
|
||||
initNotifiedFIFO(&gNB->respPuschSymb);
|
||||
initNotifiedFIFO(&gNB->respPuschAarx);
|
||||
initNotifiedFIFO(&gNB->L1_tx_free);
|
||||
initNotifiedFIFO(&gNB->L1_tx_filled);
|
||||
initNotifiedFIFO(&gNB->L1_tx_out);
|
||||
|
||||
Reference in New Issue
Block a user