Move UL_INFO structure allocation local to a rx slot processing
Use UL_INFO on the stack, to simplify the code. move in the same struct the associated rach, pdu, crc, srs arrays that where pointed from directly in gNB structure Keep in nfapi the existing logic that make malloc for theses rach, pdu, crc, srs array lists Pass only relevant fields, where appropriate. Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit is contained in:
committed by
Robert Schmidt
co-authored by
Robert Schmidt
parent
f9bff3d6a0
commit
b4bc7c96ba
@@ -575,7 +575,6 @@ int main(int argc, char **argv)
|
||||
printf("\n");
|
||||
exit(-1);
|
||||
#endif
|
||||
|
||||
nr_ulsch_decoding(gNB, frame_parms, frame, subframe, &G, &UE_id, 1);
|
||||
bool crc_valid = check_crc(harq_process_gNB->b, lenWithCrc(1, (harq_process_gNB->TBS) << 3), crcType(1, (harq_process_gNB->TBS) << 3));
|
||||
if (!crc_valid) {
|
||||
|
||||
@@ -602,11 +602,11 @@ int main(int argc, char *argv[])
|
||||
gNB->msgDataTx = msgDataTx;
|
||||
//gNB_config = &gNB->gNB_config;
|
||||
|
||||
//memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO));
|
||||
gNB->UL_INFO.rx_ind.pdu_list = (nfapi_nr_rx_data_pdu_t *)malloc(NB_UE_INST*sizeof(nfapi_nr_rx_data_pdu_t));
|
||||
gNB->UL_INFO.crc_ind.crc_list = (nfapi_nr_crc_t *)malloc(NB_UE_INST*sizeof(nfapi_nr_crc_t));
|
||||
gNB->UL_INFO.rx_ind.number_of_pdus = 0;
|
||||
gNB->UL_INFO.crc_ind.number_crcs = 0;
|
||||
NR_UL_IND_t UL_INFO = {0};
|
||||
UL_INFO.crc_ind.crc_list = UL_INFO.crc_pdu_list;
|
||||
UL_INFO.rx_ind.pdu_list = UL_INFO.rx_pdu_list;
|
||||
UL_INFO.rx_ind.number_of_pdus = 0;
|
||||
UL_INFO.crc_ind.number_crcs = 0;
|
||||
gNB->max_ldpc_iterations = max_ldpc_iterations;
|
||||
gNB->pusch_thres = -20;
|
||||
frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH)
|
||||
@@ -1256,9 +1256,9 @@ int main(int argc, char *argv[])
|
||||
//----------------------------------------------------------
|
||||
//------------------- gNB phy procedures -------------------
|
||||
//----------------------------------------------------------
|
||||
gNB->UL_INFO.rx_ind.number_of_pdus = 0;
|
||||
gNB->UL_INFO.crc_ind.number_crcs = 0;
|
||||
gNB->UL_INFO.srs_ind.number_of_pdus = 0;
|
||||
UL_INFO.rx_ind.number_of_pdus = 0;
|
||||
UL_INFO.crc_ind.number_crcs = 0;
|
||||
UL_INFO.srs_ind.number_of_pdus = 0;
|
||||
|
||||
for(uint8_t symbol = 0; symbol < (gNB->frame_parms.Ncp == EXTENDED ? 12 : 14); symbol++) {
|
||||
for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++)
|
||||
@@ -1281,7 +1281,7 @@ int main(int argc, char *argv[])
|
||||
gNB->frame_parms.Ncp == EXTENDED ? 12 : 14);
|
||||
}
|
||||
|
||||
ul_proc_error = phy_procedures_gNB_uespec_RX(gNB, frame, slot);
|
||||
ul_proc_error = phy_procedures_gNB_uespec_RX(gNB, frame, slot, &UL_INFO);
|
||||
|
||||
if (n_trials == 1 && round == 0) {
|
||||
LOG_M("rxsig0.m", "rx0", &rxdata[0][slot_offset], slot_length, 1, 1);
|
||||
|
||||
Reference in New Issue
Block a user