static int dci_blind_search(srslte_ue_dl_t* q, srslte_dl_sf_cfg_t* sf, uint16_t rnti, dci_blind_search_t* search_space, srslte_dci_cfg_t* dci_cfg, srslte_dci_msg_t dci_msg[SRSLTE_MAX_DCI_MSG]) { uint32_t nof_dci = 0; if (rnti) { int i = 0; while ((dci_cfg->cif_enabled || !nof_dci) && (i < search_space->nof_locations) && (nof_dci < SRSLTE_MAX_DCI_MSG)) { DEBUG("Searching format %s in %d,%d (%d/%d)\n", srslte_dci_format_string(search_space->format), search_space->loc[i].ncce, search_space->loc[i].L, i, search_space->nof_locations); dci_msg[nof_dci].location = search_space->loc[i]; dci_msg[nof_dci].format = search_space->format; dci_msg[nof_dci].rnti = 0; if (srslte_pdcch_decode_msg(&q->pdcch, sf, dci_cfg, &dci_msg[nof_dci])) { ERROR("Error decoding DCI msg\n"); return SRSLTE_ERROR; } if ((dci_msg[nof_dci].rnti == rnti) && (dci_msg[nof_dci].nof_bits > 0)) { dci_msg[nof_dci].rnti = rnti; // If searching for Format1A but found Format0 save it for later if (dci_msg[nof_dci].format == SRSLTE_DCI_FORMAT0 && search_space->format == SRSLTE_DCI_FORMAT1A) { /* If there is space for accumulate another UL DCI dci and it was not detected before, then store it */ if (q->pending_ul_dci_count < SRSLTE_MAX_CARRIERS && !find_dci(q->pending_ul_dci_msg, q->pending_ul_dci_count, &dci_msg[nof_dci])) { srslte_dci_msg_t* pending_ul_dci_msg = &q->pending_ul_dci_msg[q->pending_ul_dci_count]; pending_ul_dci_msg->format = dci_msg[nof_dci].format; pending_ul_dci_msg->location = dci_msg[nof_dci].location; pending_ul_dci_msg->nof_bits = dci_msg[nof_dci].nof_bits; pending_ul_dci_msg->rnti = dci_msg[nof_dci].rnti; memcpy(pending_ul_dci_msg->payload, dci_msg[nof_dci].payload, dci_msg[nof_dci].nof_bits); q->pending_ul_dci_count++; } // Else if we found it, save location and keep going if required } else if (dci_msg[nof_dci].format == search_space->format) { /* Check if the DCI is duplicated */ if (!find_dci(dci_msg, (uint32_t)nof_dci, &dci_msg[nof_dci])) { nof_dci++; } } } i++; } } else { ERROR("RNTI not specified\n"); } return nof_dci; }
int srslte_ue_dl_find_dl_dci_type(srslte_ue_dl_t *q, srslte_dci_msg_t *dci_msg, uint32_t cfi, uint32_t sf_idx, uint16_t rnti, srslte_rnti_type_t rnti_type) { srslte_dci_location_t locations[MAX_CANDIDATES]; uint32_t nof_locations; uint32_t nof_formats; srslte_dci_format_t *formats = NULL; /* Generate PDCCH candidates */ if (rnti_type == SRSLTE_RNTI_SI || rnti_type == SRSLTE_RNTI_PCH || rnti_type == SRSLTE_RNTI_RAR) { nof_locations = srslte_pdcch_common_locations(&q->pdcch, locations, MAX_CANDIDATES, q->cfi); formats = common_formats; nof_formats = nof_common_formats; } else { nof_locations = srslte_pdcch_ue_locations(&q->pdcch, locations, MAX_CANDIDATES, sf_idx, q->cfi, rnti); formats = ue_formats; nof_formats = nof_ue_formats; } uint16_t crc_rem = 0; for (int f=0;f<nof_formats && crc_rem != rnti;f++) { for (int i=0;i<nof_locations && crc_rem != rnti;i++) { DEBUG("Trying format %s (nbits=%d), location L=%d, ncce=%d\n", srslte_dci_format_string(formats[f]), srslte_dci_format_sizeof_lut(formats[f], q->cell.nof_prb), locations[i].L, locations[i].ncce); q->last_n_cce = locations[i].ncce; if (srslte_pdcch_decode_msg(&q->pdcch, dci_msg, &locations[i], formats[f], &crc_rem)) { fprintf(stderr, "Error decoding DCI msg\n"); return SRSLTE_ERROR; } if (crc_rem == rnti) { INFO("Found DCI nCCE: %d, L: %d, n_bits=%d\n", locations[i].ncce, locations[i].L, srslte_dci_format_sizeof_lut(formats[f], q->cell.nof_prb)); memcpy(&q->last_location, &locations[i], sizeof(srslte_dci_location_t)); } if (crc_rem == rnti && formats[f] == SRSLTE_DCI_FORMAT1A && dci_msg->data[0] != 1) { /* Save Format 0 msg. Recovered next call to srslte_ue_dl_find_ul_dci() */ q->pending_ul_dci_rnti = crc_rem; memcpy(&q->pending_ul_dci_msg, dci_msg, sizeof(srslte_dci_msg_t)); crc_rem = 0; } DEBUG("Decoded DCI message RNTI: 0x%x\n", crc_rem); } } if (crc_rem == rnti) { return 1; } else { INFO("Couldn't find any DCI for RNTI=0x%x\n", rnti); return 0; } }
static int dci_blind_search(srslte_ue_dl_t *q, dci_blind_search_t *search_space, uint16_t rnti, uint32_t cfi, srslte_dci_msg_t *dci_msg) { int ret = SRSLTE_ERROR; uint16_t crc_rem = 0; if (rnti) { ret = 0; int i=0; while (!ret && i < search_space->nof_locations) { DEBUG("Searching format %s in %d,%d (%d/%d)\n", srslte_dci_format_string(search_space->format), search_space->loc[i].ncce, search_space->loc[i].L, i, search_space->nof_locations); if (srslte_pdcch_decode_msg(&q->pdcch, dci_msg, &search_space->loc[i], search_space->format, cfi, &crc_rem)) { fprintf(stderr, "Error decoding DCI msg\n"); return SRSLTE_ERROR; } if (crc_rem == rnti) { // If searching for Format1A but found Format0 save it for later if (dci_msg->format == SRSLTE_DCI_FORMAT0 && search_space->format == SRSLTE_DCI_FORMAT1A) { if (!q->pending_ul_dci_rnti) { q->pending_ul_dci_rnti = crc_rem; memcpy(&q->pending_ul_dci_msg, dci_msg, sizeof(srslte_dci_msg_t)); memcpy(&q->last_location_ul, &search_space->loc[i], sizeof(srslte_dci_location_t)); } // Else if we found it, save location and leave } else if (dci_msg->format == search_space->format) { ret = 1; if (dci_msg->format == SRSLTE_DCI_FORMAT0) { memcpy(&q->last_location_ul, &search_space->loc[i], sizeof(srslte_dci_location_t)); } else { memcpy(&q->last_location, &search_space->loc[i], sizeof(srslte_dci_location_t)); } } } i++; } } else { fprintf(stderr, "RNTI not specified\n"); } return ret; }
int srslte_ue_dl_find_dl_dci(srslte_ue_dl_t *q, srslte_dci_msg_t *dci_msg, uint32_t cfi, uint32_t sf_idx, uint16_t rnti) { srslte_dci_location_t locations[MAX_CANDIDATES]; uint32_t nof_locations; uint32_t nof_formats; srslte_dci_format_t *formats = NULL; /* Generate PDCCH candidates */ if (rnti == SRSLTE_SIRNTI) { nof_locations = srslte_pdcch_common_locations(&q->pdcch, locations, MAX_CANDIDATES, q->cfi); formats = common_formats; nof_formats = nof_common_formats; } else { nof_locations = srslte_pdcch_ue_locations(&q->pdcch, locations, MAX_CANDIDATES, sf_idx, q->cfi, rnti); formats = ue_formats; nof_formats = nof_ue_formats; } uint16_t crc_rem = 0; for (int f=0;f<nof_formats && crc_rem != rnti;f++) { INFO("Trying format %s\n", srslte_dci_format_string(formats[f])); for (int i=0;i<nof_locations && crc_rem != rnti;i++) { q->last_n_cce = locations[i].ncce; if (srslte_pdcch_decode_msg(&q->pdcch, dci_msg, &locations[i], formats[f], &crc_rem)) { fprintf(stderr, "Error decoding DCI msg\n"); return SRSLTE_ERROR; } if (formats[f] == SRSLTE_DCI_FORMAT1A) { if (dci_msg->data[0] != 1) { crc_rem = 0; } } DEBUG("Decoded DCI message RNTI: 0x%x\n", crc_rem); } } if (crc_rem == rnti) { return 1; } else { return 0; } }
int srslte_ue_dl_find_ul_dci(srslte_ue_dl_t *q, srslte_dci_msg_t *dci_msg, uint32_t cfi, uint32_t sf_idx, uint16_t rnti) { srslte_dci_location_t locations[MAX_CANDIDATES]; uint32_t nof_locations = srslte_pdcch_ue_locations(&q->pdcch, locations, MAX_CANDIDATES, sf_idx, cfi, rnti); uint16_t crc_rem = 0; for (uint32_t i=0;i<nof_locations && crc_rem != rnti;i++) { if (srslte_pdcch_decode_msg(&q->pdcch, dci_msg, &locations[i], SRSLTE_DCI_FORMAT0, &crc_rem)) { fprintf(stderr, "Error decoding DCI msg\n"); return SRSLTE_ERROR; } if (dci_msg->data[0] != 0) { crc_rem = 0; } DEBUG("Decoded DCI message RNTI: 0x%x\n", crc_rem); } if (crc_rem == rnti) { return 1; } else { return 0; } }
int srslte_ue_dl_find_ul_dci(srslte_ue_dl_t *q, srslte_dci_msg_t *dci_msg, uint32_t cfi, uint32_t sf_idx, uint16_t rnti) { srslte_dci_location_t locations[MAX_CANDIDATES]; uint32_t nof_locations = srslte_pdcch_ue_locations(&q->pdcch, locations, MAX_CANDIDATES, sf_idx, cfi, rnti); uint16_t crc_rem = 0; if (rnti) { /* Do not search if an UL DCI is already pending */ if (q->pending_ul_dci_rnti == rnti) { q->pending_ul_dci_rnti = 0; memcpy(dci_msg, &q->pending_ul_dci_msg, sizeof(srslte_dci_msg_t)); return 1; } for (uint32_t i=0;i<nof_locations && crc_rem != rnti;i++) { if (srslte_pdcch_decode_msg(&q->pdcch, dci_msg, &locations[i], SRSLTE_DCI_FORMAT0, &crc_rem)) { fprintf(stderr, "Error decoding DCI msg\n"); return SRSLTE_ERROR; } if (dci_msg->data[0] != 0) { crc_rem = 0; } DEBUG("Decoded DCI message RNTI: 0x%x\n", crc_rem); if (crc_rem == rnti) { memcpy(&q->last_location, &locations[i], sizeof(srslte_dci_location_t)); } } if (crc_rem == rnti) { return 1; } else { return 0; } } else { return 0; } }
int main(int argc, char **argv) { srslte_ra_dl_dci_t ra_dl; int i; int frame_cnt; int ret; srslte_dci_location_t locations[MAX_CANDIDATES]; uint32_t nof_locations; srslte_dci_msg_t dci_msg; if (argc < 3) { usage(argv[0]); exit(-1); } parse_args(argc,argv); if (base_init()) { fprintf(stderr, "Error initializing memory\n"); exit(-1); } ret = -1; frame_cnt = 0; do { srslte_filesource_read(&fsrc, input_buffer, flen); INFO("Reading %d samples sub-frame %d\n", flen, frame_cnt); srslte_ofdm_rx_sf(&fft, input_buffer, fft_buffer); /* Get channel estimates for each port */ srslte_chest_dl_estimate(&chest, fft_buffer, ce, frame_cnt %10); uint16_t crc_rem = 0; if (srslte_pdcch_extract_llr(&pdcch, fft_buffer, ce, srslte_chest_dl_get_noise_estimate(&chest), frame_cnt %10, cfi)) { fprintf(stderr, "Error extracting LLRs\n"); return -1; } if (rnti == SRSLTE_SIRNTI) { INFO("Initializing common search space for SI-RNTI\n",0); nof_locations = srslte_pdcch_common_locations(&pdcch, locations, MAX_CANDIDATES, cfi); } else { INFO("Initializing user-specific search space for RNTI: 0x%x\n", rnti); nof_locations = srslte_pdcch_ue_locations(&pdcch, locations, MAX_CANDIDATES, frame_cnt %10, cfi, rnti); } for (i=0;i<nof_locations && crc_rem != rnti;i++) { if (srslte_pdcch_decode_msg(&pdcch, &dci_msg, &locations[i], dci_format, &crc_rem)) { fprintf(stderr, "Error decoding DCI msg\n"); return -1; } } if (crc_rem == rnti) { srslte_dci_msg_type_t type; if (srslte_dci_msg_get_type(&dci_msg, &type, cell.nof_prb, rnti)) { fprintf(stderr, "Can't get DCI message type\n"); exit(-1); } printf("MSG %d: ",i); srslte_dci_msg_type_fprint(stdout, type); switch(type.type) { case SRSLTE_DCI_MSG_TYPE_PDSCH_SCHED: bzero(&ra_dl, sizeof(srslte_ra_dl_dci_t)); if (srslte_dci_msg_unpack_pdsch(&dci_msg, &ra_dl, cell.nof_prb, rnti != SRSLTE_SIRNTI)) { fprintf(stderr, "Can't unpack DCI message\n"); } else { srslte_ra_pdsch_fprint(stdout, &ra_dl, cell.nof_prb); if (ra_dl.alloc_type == SRSLTE_RA_ALLOC_TYPE2 && ra_dl.type2_alloc.mode == SRSLTE_RA_TYPE2_LOC && ra_dl.type2_alloc.riv == 11 && ra_dl.rv_idx == 0 && ra_dl.harq_process == 0 && ra_dl.mcs_idx == 2) { printf("This is the file signal.1.92M.amar.dat\n"); ret = 0; } } break; default: fprintf(stderr, "Unsupported message type\n"); break; } } frame_cnt++; } while (frame_cnt <= max_frames); base_free(); exit(ret); }
int main(int argc, char** argv) { srslte_chest_dl_res_t chest_dl_res; srslte_pdcch_t pdcch_tx, pdcch_rx; testcase_dci_t testcases[10]; srslte_regs_t regs; int i; int nof_re; cf_t *slot_symbols[SRSLTE_MAX_PORTS]; int nof_dcis; bzero(&testcases, sizeof(testcase_dci_t)*10); int ret = -1; parse_args(argc, argv); nof_re = SRSLTE_CP_NORM_NSYMB * cell.nof_prb * SRSLTE_NRE; if (test_dci_payload_size()) { exit(-1); } /* init memory */ srslte_chest_dl_res_init(&chest_dl_res, cell.nof_prb); srslte_chest_dl_res_set_identity(&chest_dl_res); for (i = 0; i < SRSLTE_MAX_PORTS; i++) { slot_symbols[i] = malloc(sizeof(cf_t) * nof_re); if (!slot_symbols[i]) { perror("malloc"); exit(-1); } bzero(slot_symbols[i], sizeof(cf_t) * nof_re); } if (srslte_regs_init(®s, cell)) { ERROR("Error initiating regs\n"); exit(-1); } if (srslte_pdcch_init_enb(&pdcch_tx, cell.nof_prb)) { ERROR("Error creating PDCCH object\n"); exit(-1); } if (srslte_pdcch_set_cell(&pdcch_tx, ®s, cell)) { ERROR("Error setting cell in PDCCH object\n"); exit(-1); } if (srslte_pdcch_init_ue(&pdcch_rx, cell.nof_prb, nof_rx_ant)) { ERROR("Error creating PDCCH object\n"); exit(-1); } if (srslte_pdcch_set_cell(&pdcch_rx, ®s, cell)) { ERROR("Error setting cell in PDCCH object\n"); exit(-1); } /* Resource allocate init */ nof_dcis = 0; srslte_dci_dl_t dci; ZERO_OBJECT(dci); dci.pid = 5; dci.tb[0].mcs_idx = 5; dci.tb[0].ndi = 0; dci.tb[0].rv = 1; dci.alloc_type = SRSLTE_RA_ALLOC_TYPE0; dci.type0_alloc.rbg_bitmask = 0x5; dci.cif_present = dci_cfg.cif_enabled; if (dci_cfg.cif_enabled) { dci.cif = (uint32_t)(random() & 0x7); } /* Format 1 Test case */ if (cell.nof_ports == 1) { testcases[nof_dcis].dci_format = SRSLTE_DCI_FORMAT1; if (dci_cfg.cif_enabled) { dci.cif = (uint32_t)(random() & 0x7); } testcases[nof_dcis].ra_dl_tx = dci; nof_dcis++; /* Format 1 Test case */ dci.tb[0].mcs_idx = 15; testcases[nof_dcis].dci_format = SRSLTE_DCI_FORMAT1; if (dci_cfg.cif_enabled) { dci.cif = (uint32_t)(random() & 0x7); } testcases[nof_dcis].ra_dl_tx = dci; nof_dcis++; } /* Tx Diversity Test case */ if (cell.nof_ports > 1) { dci.tb[1].mcs_idx = 13; dci.tb[1].rv = 3; dci.tb[1].ndi = true; testcases[nof_dcis].dci_format = SRSLTE_DCI_FORMAT2A; if (dci_cfg.cif_enabled) { dci.cif = (uint32_t)(random() & 0x7); } testcases[nof_dcis].ra_dl_tx = dci; nof_dcis++; } /* CDD Spatial Multiplexing Test case */ if (cell.nof_ports > 1) { dci.tb[1].mcs_idx = 28; dci.tb[1].rv = 1; dci.tb[1].ndi = false; testcases[nof_dcis].dci_format = SRSLTE_DCI_FORMAT2; if (dci_cfg.cif_enabled) { dci.cif = (uint32_t)(random() & 0x7); } testcases[nof_dcis].ra_dl_tx = dci; nof_dcis++; } srslte_dci_cfg_t dci_cfg; ZERO_OBJECT(dci_cfg); srslte_dl_sf_cfg_t dl_sf; ZERO_OBJECT(dl_sf); dl_sf.cfi = cfi; for (int s=0;s<10;s++) { dl_sf.tti = s; printf("Encoding %d DCIs for sf_idx=%d\n", nof_dcis, s); /* Execute Rx */ for (i=0;i<nof_dcis;i++) { testcases[i].ra_dl_tx.rnti = (uint16_t) (1234 + i); testcases[i].ra_dl_tx.format = testcases[i].dci_format; srslte_dci_msg_pack_pdsch(&cell, &dl_sf, &dci_cfg, &testcases[i].ra_dl_tx, &testcases[i].dci_tx); srslte_dci_location_set(&testcases[i].dci_location, 0, (uint32_t) i); testcases[i].dci_tx.format = testcases[i].dci_format; testcases[i].dci_tx.location = testcases[i].dci_location; // Enable just 1 TB per default if (testcases[i].dci_format < SRSLTE_DCI_FORMAT2) { for (int j=1;j<SRSLTE_MAX_CODEWORDS;j++) { SRSLTE_DCI_TB_DISABLE(testcases[i].ra_dl_tx.tb[j]); } } if (srslte_pdcch_encode(&pdcch_tx, &dl_sf, &testcases[i].dci_tx, slot_symbols)) { ERROR("Error encoding DCI message\n"); goto quit; } } /* Execute 'Rx' */ if (srslte_pdcch_extract_llr(&pdcch_rx, &dl_sf, &chest_dl_res, slot_symbols)) { ERROR("Error extracting LLRs\n"); goto quit; } /* Decode DCIs */ for (i=0;i<nof_dcis;i++) { testcases[i].dci_rx.format = testcases[i].dci_format; testcases[i].dci_rx.location = testcases[i].dci_location; if (srslte_pdcch_decode_msg(&pdcch_rx, &dl_sf, &dci_cfg, &testcases[i].dci_rx)) { ERROR("Error decoding DCI message\n"); goto quit; } if (srslte_dci_msg_unpack_pdsch(&cell, &dl_sf, &dci_cfg, &testcases[i].dci_rx, &testcases[i].ra_dl_rx)) { ERROR("Error unpacking DCI message\n"); goto quit; } if (testcases[i].dci_rx.rnti >= 1234 && testcases[i].dci_rx.rnti < 1234 + nof_dcis) { testcases[i].dci_rx.rnti -= 1234; } else { printf("Received invalid DCI CRC %d\n", testcases[i].dci_rx.rnti); goto quit; } } /* Compare Tx and Rx */ for (i = 0; i < nof_dcis; i++) { if (memcmp(testcases[i].dci_tx.payload, testcases[i].dci_rx.payload, testcases[i].dci_tx.nof_bits)) { printf("Error in DCI %d: Received data does not match\n", i); goto quit; } #if SRSLTE_DCI_HEXDEBUG // Ignore Hex str bzero(testcases[i].ra_dl_rx.hex_str, sizeof(testcases[i].ra_dl_rx.hex_str)); testcases[i].ra_dl_rx.nof_bits = 0; #endif // Ignore DCI location testcases[i].ra_dl_rx.location = testcases[i].ra_dl_tx.location; // Ignore cw_idx for (int j=0;j<SRSLTE_MAX_CODEWORDS;j++) { testcases[i].ra_dl_rx.tb[j].cw_idx = testcases[i].ra_dl_tx.tb[j].cw_idx; } if (memcmp(&testcases[i].ra_dl_tx, &testcases[i].ra_dl_rx, sizeof(srslte_dci_dl_t))) { uint8_t *x=(uint8_t*) &testcases[i].ra_dl_rx; uint8_t *y=(uint8_t*) &testcases[i].ra_dl_tx; for (int j=0;j<sizeof(srslte_dci_dl_t);j++) { if (x[j] != y[j]) { printf("error in byte %d, rx=%d, tx=%d\n", j, x[j], y[j]); } } printf("tx: "); srslte_vec_fprint_byte(stdout, (uint8_t*) &testcases[i].ra_dl_tx, sizeof(srslte_dci_dl_t)); printf("rx: "); srslte_vec_fprint_byte(stdout, (uint8_t*) &testcases[i].ra_dl_rx, sizeof(srslte_dci_dl_t)); printf("Error in RA %d: Received data does not match\n", i); printf(" Field | Tx | Rx \n"); printf("--------------+----------+----------\n"); if (testcases[i].ra_dl_tx.cif) { printf(" cif | %8d | %8d\n", testcases[i].ra_dl_tx.cif, testcases[i].ra_dl_rx.cif); } printf(" harq_process | %8d | %8d\n", testcases[i].ra_dl_tx.pid, testcases[i].ra_dl_rx.pid); printf(" mcs_idx | %8d | %8d\n", testcases[i].ra_dl_tx.tb[0].mcs_idx, testcases[i].ra_dl_rx.tb[0].mcs_idx); printf(" rv_idx | %8d | %8d\n", testcases[i].ra_dl_tx.tb[0].rv, testcases[i].ra_dl_rx.tb[0].rv); printf(" ndi | %8d | %8d\n", testcases[i].ra_dl_tx.tb[0].ndi, testcases[i].ra_dl_rx.tb[0].ndi); printf(" mcs_idx_1 | %8d | %8d\n", testcases[i].ra_dl_tx.tb[1].mcs_idx, testcases[i].ra_dl_rx.tb[1].mcs_idx); printf(" rv_idx_1 | %8d | %8d\n", testcases[i].ra_dl_tx.tb[1].rv, testcases[i].ra_dl_rx.tb[1].rv); printf(" ndi_1 | %8d | %8d\n", testcases[i].ra_dl_tx.tb[1].ndi, testcases[i].ra_dl_rx.tb[1].ndi); printf(" tb_cw_swap | %8d | %8d\n", testcases[i].ra_dl_tx.tb_cw_swap, testcases[i].ra_dl_rx.tb_cw_swap); printf(" sram_id | %8d | %8d\n", testcases[i].ra_dl_tx.sram_id, testcases[i].ra_dl_rx.sram_id); printf(" pinfo | %8d | %8d\n", testcases[i].ra_dl_tx.pinfo, testcases[i].ra_dl_rx.pinfo); printf(" pconf | %8d | %8d\n", testcases[i].ra_dl_tx.pconf, testcases[i].ra_dl_rx.pconf); printf(" power_offset | %8d | %8d\n", testcases[i].ra_dl_tx.power_offset, testcases[i].ra_dl_rx.power_offset); printf(" tpc_pucch | %8d | %8d\n", testcases[i].ra_dl_tx.tpc_pucch, testcases[i].ra_dl_rx.tpc_pucch); goto quit; } } } ret = 0; quit: srslte_pdcch_free(&pdcch_tx); srslte_pdcch_free(&pdcch_rx); srslte_chest_dl_res_free(&chest_dl_res); srslte_regs_free(®s); for (i = 0; i < SRSLTE_MAX_PORTS; i++) { free(slot_symbols[i]); } if (ret) { printf("Error\n"); } else { printf("Ok\n"); } srslte_dft_exit(); exit(ret); }