DCI blind search takes Transmission mode in consideration and some _multi functions removed

master
Xavier Arteaga 7 years ago
parent 741f5b7a0a
commit 1486911e32

@ -245,7 +245,7 @@ int main(int argc, char **argv) {
fprintf(stderr, "Error initiating ue_sync\n"); fprintf(stderr, "Error initiating ue_sync\n");
return -1; return -1;
} }
if (srslte_ue_dl_init_multi(&ue_dl, cell, 1)) { if (srslte_ue_dl_init(&ue_dl, cell, 1)) {
fprintf(stderr, "Error initiating UE downlink processing module\n"); fprintf(stderr, "Error initiating UE downlink processing module\n");
return -1; return -1;
} }
@ -314,7 +314,7 @@ int main(int argc, char **argv) {
case DECODE_SIB: case DECODE_SIB:
/* We are looking for SI Blocks, search only in appropiate places */ /* We are looking for SI Blocks, search only in appropiate places */
if ((srslte_ue_sync_get_sfidx(&ue_sync) == 5 && (sfn%2)==0)) { if ((srslte_ue_sync_get_sfidx(&ue_sync) == 5 && (sfn%2)==0)) {
n = srslte_ue_dl_decode_multi(&ue_dl, sf_buffer, data, sfn*10+srslte_ue_sync_get_sfidx(&ue_sync), acks); n = srslte_ue_dl_decode(&ue_dl, sf_buffer, data, 0, sfn*10+srslte_ue_sync_get_sfidx(&ue_sync), acks);
if (n < 0) { if (n < 0) {
fprintf(stderr, "Error decoding UE DL\n");fflush(stdout); fprintf(stderr, "Error decoding UE DL\n");fflush(stdout);
return -1; return -1;

@ -242,6 +242,7 @@ void parse_args(prog_args_t *args, int argc, char **argv) {
break; break;
case 'v': case 'v':
srslte_verbose++; srslte_verbose++;
args->verbose = srslte_verbose;
break; break;
case 'Z': case 'Z':
args->decimate = atoi(argv[optind]); args->decimate = atoi(argv[optind]);
@ -486,7 +487,7 @@ int main(int argc, char **argv) {
exit(-1); exit(-1);
} }
if (srslte_ue_dl_init_multi(&ue_dl, cell, prog_args.rf_nof_rx_ant)) { // This is the User RNTI if (srslte_ue_dl_init(&ue_dl, cell, prog_args.rf_nof_rx_ant)) { // This is the User RNTI
fprintf(stderr, "Error initiating UE downlink processing module\n"); fprintf(stderr, "Error initiating UE downlink processing module\n");
exit(-1); exit(-1);
} }
@ -608,13 +609,30 @@ int main(int argc, char **argv) {
decode_pdsch = false; decode_pdsch = false;
} }
} }
if (decode_pdsch) {
INFO("Attempting DL decode SFN=%d\n", sfn); INFO("Attempting DL decode SFN=%d\n", sfn);
n = srslte_ue_dl_decode_multi(&ue_dl, if (decode_pdsch) {
sf_buffer, if (cell.nof_ports == 1) {
data, /* Transmission mode 1 */
sfn*10+srslte_ue_sync_get_sfidx(&ue_sync), n = srslte_ue_dl_decode(&ue_dl, sf_buffer, data, 0, sfn*10+srslte_ue_sync_get_sfidx(&ue_sync), acks);
} else {
if (prog_args.rf_nof_rx_ant == 1) {
/* Transmission mode 2 */
n = srslte_ue_dl_decode(&ue_dl, sf_buffer, data, 1, sfn * 10 + srslte_ue_sync_get_sfidx(&ue_sync),
acks);
} else {
/* Transmission mode 3 */
n = srslte_ue_dl_decode(&ue_dl, sf_buffer, data, 2, sfn * 10 + srslte_ue_sync_get_sfidx(&ue_sync),
acks); acks);
if (n < 1) {
/* Transmission mode 4 */
n = srslte_ue_dl_decode(&ue_dl, sf_buffer, data, 3, sfn * 10 + srslte_ue_sync_get_sfidx(&ue_sync),
acks);
}
}
}
if (n < 0) { if (n < 0) {
// fprintf(stderr, "Error decoding UE DL\n");fflush(stdout); // fprintf(stderr, "Error decoding UE DL\n");fflush(stdout);

@ -119,20 +119,12 @@ typedef struct SRSLTE_API {
/* This function shall be called just after the initial synchronization */ /* This function shall be called just after the initial synchronization */
SRSLTE_API int srslte_ue_dl_init(srslte_ue_dl_t *q, SRSLTE_API int srslte_ue_dl_init(srslte_ue_dl_t *q,
srslte_cell_t cell);
SRSLTE_API int srslte_ue_dl_init_multi(srslte_ue_dl_t *q,
srslte_cell_t cell, srslte_cell_t cell,
uint32_t nof_rx_antennas); uint32_t nof_rx_antennas);
SRSLTE_API void srslte_ue_dl_free(srslte_ue_dl_t *q); SRSLTE_API void srslte_ue_dl_free(srslte_ue_dl_t *q);
SRSLTE_API int srslte_ue_dl_decode_fft_estimate(srslte_ue_dl_t *q, SRSLTE_API int srslte_ue_dl_decode_fft_estimate(srslte_ue_dl_t *q,
cf_t *input,
uint32_t sf_idx,
uint32_t *cfi);
SRSLTE_API int srslte_ue_dl_decode_fft_estimate_multi(srslte_ue_dl_t *q,
cf_t *input[SRSLTE_MAX_PORTS], cf_t *input[SRSLTE_MAX_PORTS],
uint32_t sf_idx, uint32_t sf_idx,
uint32_t *cfi); uint32_t *cfi);
@ -155,12 +147,14 @@ SRSLTE_API int srslte_ue_dl_find_ul_dci(srslte_ue_dl_t *q,
srslte_dci_msg_t *dci_msg); srslte_dci_msg_t *dci_msg);
SRSLTE_API int srslte_ue_dl_find_dl_dci(srslte_ue_dl_t *q, SRSLTE_API int srslte_ue_dl_find_dl_dci(srslte_ue_dl_t *q,
uint32_t tm,
uint32_t cfi, uint32_t cfi,
uint32_t sf_idx, uint32_t sf_idx,
uint16_t rnti, uint16_t rnti,
srslte_dci_msg_t *dci_msg); srslte_dci_msg_t *dci_msg);
SRSLTE_API int srslte_ue_dl_find_dl_dci_type(srslte_ue_dl_t *q, SRSLTE_API int srslte_ue_dl_find_dl_dci_type(srslte_ue_dl_t *q,
uint32_t tm,
uint32_t cfi, uint32_t cfi,
uint32_t sf_idx, uint32_t sf_idx,
uint16_t rnti, uint16_t rnti,
@ -172,25 +166,17 @@ SRSLTE_API uint32_t srslte_ue_dl_get_ncce(srslte_ue_dl_t *q);
SRSLTE_API void srslte_ue_dl_set_sample_offset(srslte_ue_dl_t * q, SRSLTE_API void srslte_ue_dl_set_sample_offset(srslte_ue_dl_t * q,
float sample_offset); float sample_offset);
SRSLTE_API int srslte_ue_dl_decode(srslte_ue_dl_t * q, SRSLTE_API int srslte_ue_dl_decode(srslte_ue_dl_t *q,
cf_t *input,
uint8_t *data,
uint32_t tti);
SRSLTE_API int srslte_ue_dl_decode_multi(srslte_ue_dl_t * q,
cf_t *input[SRSLTE_MAX_PORTS], cf_t *input[SRSLTE_MAX_PORTS],
uint8_t *data[SRSLTE_MAX_CODEWORDS], uint8_t *data[SRSLTE_MAX_CODEWORDS],
uint32_t tti, bool acks[SRSLTE_MAX_CODEWORDS]); uint32_t tm,
SRSLTE_API int srslte_ue_dl_decode_rnti(srslte_ue_dl_t * q,
cf_t *input,
uint8_t *data,
uint32_t tti, uint32_t tti,
uint16_t rnti); bool acks[SRSLTE_MAX_CODEWORDS]);
SRSLTE_API int srslte_ue_dl_decode_rnti_multi(srslte_ue_dl_t * q, SRSLTE_API int srslte_ue_dl_decode_rnti(srslte_ue_dl_t *q,
cf_t *input[SRSLTE_MAX_PORTS], cf_t *input[SRSLTE_MAX_PORTS],
uint8_t *data[SRSLTE_MAX_CODEWORDS], uint8_t *data[SRSLTE_MAX_CODEWORDS],
uint32_t tm,
uint32_t tti, uint32_t tti,
uint16_t rnti, uint16_t rnti,
bool acks[SRSLTE_MAX_CODEWORDS]); bool acks[SRSLTE_MAX_CODEWORDS]);

@ -54,7 +54,7 @@ uint32_t sf_idx = 0;
srslte_dci_format_t dci_format = SRSLTE_DCI_FORMAT1A; srslte_dci_format_t dci_format = SRSLTE_DCI_FORMAT1A;
srslte_filesource_t fsrc; srslte_filesource_t fsrc;
srslte_ue_dl_t ue_dl; srslte_ue_dl_t ue_dl;
cf_t *input_buffer; cf_t *input_buffer[SRSLTE_MAX_PORTS];
void usage(char *prog) { void usage(char *prog) {
printf("Usage: %s [rovfcenmps] -i input_file\n", prog); printf("Usage: %s [rovfcenmps] -i input_file\n", prog);
@ -131,13 +131,13 @@ int base_init() {
flen = 2 * (SRSLTE_SLOT_LEN(srslte_symbol_sz(cell.nof_prb))); flen = 2 * (SRSLTE_SLOT_LEN(srslte_symbol_sz(cell.nof_prb)));
input_buffer = malloc(flen * sizeof(cf_t)); input_buffer[0] = malloc(flen * sizeof(cf_t));
if (!input_buffer) { if (!input_buffer[0]) {
perror("malloc"); perror("malloc");
exit(-1); exit(-1);
} }
if (srslte_ue_dl_init_multi(&ue_dl, cell, 1)) { if (srslte_ue_dl_init(&ue_dl, cell, 1)) {
fprintf(stderr, "Error initializing UE DL\n"); fprintf(stderr, "Error initializing UE DL\n");
return -1; return -1;
} }
@ -151,12 +151,13 @@ int base_init() {
void base_free() { void base_free() {
srslte_filesource_free(&fsrc); srslte_filesource_free(&fsrc);
srslte_ue_dl_free(&ue_dl); srslte_ue_dl_free(&ue_dl);
free(input_buffer); free(input_buffer[0]);
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
int nof_frames; int nof_frames;
int ret; int ret;
bool acks[SRSLTE_MAX_TB];
if (argc < 3) { if (argc < 3) {
usage(argv[0]); usage(argv[0]);
@ -169,15 +170,15 @@ int main(int argc, char **argv) {
exit(-1); exit(-1);
} }
uint8_t *data = malloc(100000); uint8_t *data[] = {malloc(100000)};
ret = -1; ret = -1;
nof_frames = 0; nof_frames = 0;
do { do {
srslte_filesource_read(&fsrc, input_buffer, flen); srslte_filesource_read(&fsrc, input_buffer[0], flen);
INFO("Reading %d samples sub-frame %d\n", flen, sf_idx); INFO("Reading %d samples sub-frame %d\n", flen, sf_idx);
ret = srslte_ue_dl_decode(&ue_dl, input_buffer, data, sf_idx); ret = srslte_ue_dl_decode(&ue_dl, input_buffer, data, 0, sf_idx, acks);
if(ret > 0) { if(ret > 0) {
printf("PDSCH Decoded OK!\n"); printf("PDSCH Decoded OK!\n");
} else if (ret == 0) { } else if (ret == 0) {
@ -190,6 +191,7 @@ int main(int argc, char **argv) {
} while (nof_frames <= max_frames && ret == 0); } while (nof_frames <= max_frames && ret == 0);
base_free(); base_free();
free(data[0]);
if (ret > 0) { if (ret > 0) {
exit(0); exit(0);
} else { } else {

@ -26,8 +26,6 @@
#include "srslte/phy/ue/ue_dl.h" #include "srslte/phy/ue/ue_dl.h"
#include <complex.h>
#include <math.h>
#include <string.h> #include <string.h>
@ -38,19 +36,21 @@
#define CURRENT_SFLEN_RE SRSLTE_SF_LEN_RE(q->cell.nof_prb, q->cell.cp) #define CURRENT_SFLEN_RE SRSLTE_SF_LEN_RE(q->cell.nof_prb, q->cell.cp)
static srslte_dci_format_t ue_formats[] = {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT1, SRSLTE_DCI_FORMAT2A, SRSLTE_DCI_FORMAT2}; // Only TM1, TM2, TM3 and TM4 are currently supported const static srslte_dci_format_t ue_dci_formats[8][2] = {
const uint32_t nof_ue_formats = 4; /* Mode 1 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT1},
/* Mode 2 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT1},
/* Mode 3 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT2A},
/* Mode 4 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT2},
/* Mode 5 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT1D},
/* Mode 6 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT1B},
/* Mode 7 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT1},
/* Mode 8 */ {SRSLTE_DCI_FORMAT1A, SRSLTE_DCI_FORMAT2B}
};
static srslte_dci_format_t common_formats[] = {SRSLTE_DCI_FORMAT1A,SRSLTE_DCI_FORMAT1C}; static srslte_dci_format_t common_formats[] = {SRSLTE_DCI_FORMAT1A,SRSLTE_DCI_FORMAT1C};
const uint32_t nof_common_formats = 2; const uint32_t nof_common_formats = 2;
int srslte_ue_dl_init(srslte_ue_dl_t *q, int srslte_ue_dl_init(srslte_ue_dl_t *q,
srslte_cell_t cell)
{
return srslte_ue_dl_init_multi(q, cell, 1);
}
int srslte_ue_dl_init_multi(srslte_ue_dl_t *q,
srslte_cell_t cell, srslte_cell_t cell,
uint32_t nof_rx_antennas) uint32_t nof_rx_antennas)
{ {
@ -118,7 +118,7 @@ int srslte_ue_dl_init_multi(srslte_ue_dl_t *q,
fprintf(stderr, "Error initiating SFO correct\n"); fprintf(stderr, "Error initiating SFO correct\n");
goto clean_exit; goto clean_exit;
} }
srslte_cfo_set_tol(&q->sfo_correct, 1e-5/q->fft.symbol_sz); srslte_cfo_set_tol(&q->sfo_correct, 1e-5f/q->fft.symbol_sz);
for (int j=0;j<nof_rx_antennas;j++) { for (int j=0;j<nof_rx_antennas;j++) {
q->sf_symbols_m[j] = srslte_vec_malloc(CURRENT_SFLEN_RE * sizeof(cf_t)); q->sf_symbols_m[j] = srslte_vec_malloc(CURRENT_SFLEN_RE * sizeof(cf_t));
@ -219,28 +219,12 @@ void srslte_ue_dl_set_sample_offset(srslte_ue_dl_t * q, float sample_offset) {
* - PDCCH decoding: Find DCI for RNTI given by previous call to srslte_ue_dl_set_rnti() * - PDCCH decoding: Find DCI for RNTI given by previous call to srslte_ue_dl_set_rnti()
* - PDSCH decoding: Decode TB scrambling with RNTI given by srslte_ue_dl_set_rnti() * - PDSCH decoding: Decode TB scrambling with RNTI given by srslte_ue_dl_set_rnti()
*/ */
int srslte_ue_dl_decode(srslte_ue_dl_t *q, cf_t *input, uint8_t *data, uint32_t tti) { int srslte_ue_dl_decode(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_PORTS], uint8_t *data[SRSLTE_MAX_CODEWORDS],
uint8_t *_data[SRSLTE_MAX_CODEWORDS]; uint32_t tm, uint32_t tti, bool acks[SRSLTE_MAX_CODEWORDS]) {
cf_t *_input[SRSLTE_MAX_PORTS]; return srslte_ue_dl_decode_rnti(q, input, data, tm, tti, q->current_rnti, acks);
bool acks[SRSLTE_MAX_CODEWORDS] = {false};
_data[0] = data;
_input[0] = input;
return srslte_ue_dl_decode_rnti_multi(q, _input, _data, tti, q->current_rnti, acks);
}
int srslte_ue_dl_decode_multi(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_PORTS], uint8_t *data[SRSLTE_MAX_CODEWORDS],
uint32_t tti, bool acks[SRSLTE_MAX_CODEWORDS]) {
return srslte_ue_dl_decode_rnti_multi(q, input, data, tti, q->current_rnti, acks);
} }
int srslte_ue_dl_decode_fft_estimate(srslte_ue_dl_t *q, cf_t *input, uint32_t sf_idx, uint32_t *cfi) int srslte_ue_dl_decode_fft_estimate(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_PORTS], uint32_t sf_idx, uint32_t *cfi)
{
cf_t *_input[SRSLTE_MAX_PORTS];
_input[0] = input;
return srslte_ue_dl_decode_fft_estimate_multi(q, _input, sf_idx, cfi);
}
int srslte_ue_dl_decode_fft_estimate_multi(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_PORTS], uint32_t sf_idx, uint32_t *cfi)
{ {
if (input && q && cfi && sf_idx < SRSLTE_NSUBFRAMES_X_FRAME) { if (input && q && cfi && sf_idx < SRSLTE_NSUBFRAMES_X_FRAME) {
@ -318,19 +302,9 @@ int srslte_ue_dl_cfg_grant(srslte_ue_dl_t *q, srslte_ra_dl_grant_t *grant, uint3
return srslte_pdsch_cfg_mimo(&q->pdsch_cfg, q->cell, grant, cfi, sf_idx, rvidx, mimo_type, pmi); return srslte_pdsch_cfg_mimo(&q->pdsch_cfg, q->cell, grant, cfi, sf_idx, rvidx, mimo_type, pmi);
} }
int srslte_ue_dl_decode_rnti(srslte_ue_dl_t *q, cf_t *input, uint8_t *data, uint32_t tti, uint16_t rnti) { int srslte_ue_dl_decode_rnti(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_PORTS],
uint8_t *_data[SRSLTE_MAX_CODEWORDS]; uint8_t *data[SRSLTE_MAX_CODEWORDS], uint32_t tm, uint32_t tti, uint16_t rnti,
cf_t *_input[SRSLTE_MAX_PORTS]; bool acks[SRSLTE_MAX_CODEWORDS]) {
bool acks[SRSLTE_MAX_CODEWORDS] = {false};
_input[0] = input;
_data[0] = data;
return srslte_ue_dl_decode_rnti_multi(q, _input, _data, tti, rnti, acks);
}
int srslte_ue_dl_decode_rnti_multi(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_PORTS],
uint8_t *data[SRSLTE_MAX_CODEWORDS], uint32_t tti, uint16_t rnti,
bool acks[SRSLTE_MAX_CODEWORDS])
{
srslte_mimo_type_t mimo_type; srslte_mimo_type_t mimo_type;
srslte_dci_msg_t dci_msg; srslte_dci_msg_t dci_msg;
srslte_ra_dl_dci_t dci_unpacked; srslte_ra_dl_dci_t dci_unpacked;
@ -339,7 +313,7 @@ int srslte_ue_dl_decode_rnti_multi(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_POR
uint32_t cfi; uint32_t cfi;
uint32_t sf_idx = tti%10; uint32_t sf_idx = tti%10;
if ((ret = srslte_ue_dl_decode_fft_estimate_multi(q, input, sf_idx, &cfi)) < 0) { if ((ret = srslte_ue_dl_decode_fft_estimate(q, input, sf_idx, &cfi)) < 0) {
return ret; return ret;
} }
@ -352,7 +326,7 @@ int srslte_ue_dl_decode_rnti_multi(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_POR
return SRSLTE_ERROR; return SRSLTE_ERROR;
} }
int found_dci = srslte_ue_dl_find_dl_dci(q, cfi, sf_idx, rnti, &dci_msg); int found_dci = srslte_ue_dl_find_dl_dci(q, tm, cfi, sf_idx, rnti, &dci_msg);
if (found_dci == 1) { if (found_dci == 1) {
if (srslte_dci_msg_to_dl_grant(&dci_msg, rnti, q->cell.nof_prb, q->cell.nof_ports, &dci_unpacked, &grant)) { if (srslte_dci_msg_to_dl_grant(&dci_msg, rnti, q->cell.nof_prb, q->cell.nof_ports, &dci_unpacked, &grant)) {
@ -630,7 +604,7 @@ int srslte_ue_dl_find_ul_dci(srslte_ue_dl_t *q, uint32_t cfi, uint32_t sf_idx, u
} }
} }
int srslte_ue_dl_find_dl_dci(srslte_ue_dl_t *q, uint32_t cfi, uint32_t sf_idx, uint16_t rnti, srslte_dci_msg_t *dci_msg) int srslte_ue_dl_find_dl_dci(srslte_ue_dl_t *q, uint32_t tm, uint32_t cfi, uint32_t sf_idx, uint16_t rnti, srslte_dci_msg_t *dci_msg)
{ {
srslte_rnti_type_t rnti_type; srslte_rnti_type_t rnti_type;
if (rnti == SRSLTE_SIRNTI) { if (rnti == SRSLTE_SIRNTI) {
@ -642,7 +616,7 @@ int srslte_ue_dl_find_dl_dci(srslte_ue_dl_t *q, uint32_t cfi, uint32_t sf_idx, u
} else { } else {
rnti_type = SRSLTE_RNTI_USER; rnti_type = SRSLTE_RNTI_USER;
} }
return srslte_ue_dl_find_dl_dci_type(q, cfi, sf_idx, rnti, rnti_type, dci_msg); return srslte_ue_dl_find_dl_dci_type(q, tm, cfi, sf_idx, rnti, rnti_type, dci_msg);
} }
// Blind search for SI/P/RA-RNTI // Blind search for SI/P/RA-RNTI
@ -666,12 +640,17 @@ static int find_dl_dci_type_siprarnti(srslte_ue_dl_t *q, uint32_t cfi, uint16_t
} }
// Blind search for C-RNTI // Blind search for C-RNTI
static int find_dl_dci_type_crnti(srslte_ue_dl_t *q, uint32_t cfi, uint32_t sf_idx, uint16_t rnti, srslte_dci_msg_t *dci_msg) static int find_dl_dci_type_crnti(srslte_ue_dl_t *q, uint32_t tm, uint32_t cfi,
{ uint32_t sf_idx, uint16_t rnti, srslte_dci_msg_t *dci_msg) {
int ret = SRSLTE_SUCCESS; int ret = SRSLTE_SUCCESS;
dci_blind_search_t search_space; dci_blind_search_t search_space;
dci_blind_search_t *current_ss = &search_space; dci_blind_search_t *current_ss = &search_space;
if (cfi < 1 || cfi > 3) {
ERROR("CFI must be 1 ≤ cfi ≤ 3", cfi);
return SRSLTE_ERROR;
}
// Search UE-specific search space // Search UE-specific search space
if (q->current_rnti == rnti) { if (q->current_rnti == rnti) {
current_ss = &q->current_ss_ue[cfi-1][sf_idx]; current_ss = &q->current_ss_ue[cfi-1][sf_idx];
@ -682,9 +661,13 @@ static int find_dl_dci_type_crnti(srslte_ue_dl_t *q, uint32_t cfi, uint32_t sf_i
srslte_pdcch_set_cfi(&q->pdcch, cfi); srslte_pdcch_set_cfi(&q->pdcch, cfi);
INFO("Searching DL C-RNTI in %d ue locations, %d formats\n", current_ss->nof_locations, nof_ue_formats); for (int f = 0; f < 2; f++) {
for (int f=0;f<nof_ue_formats;f++) { srslte_dci_format_t format = ue_dci_formats[tm][f];
current_ss->format = ue_formats[f];
INFO("Searching DL C-RNTI %s in %d ue locations\n", srslte_dci_format_string(format),
current_ss->nof_locations);
current_ss->format = format;
if ((ret = dci_blind_search(q, current_ss, rnti, dci_msg))) { if ((ret = dci_blind_search(q, current_ss, rnti, dci_msg))) {
return ret; return ret;
} }
@ -709,13 +692,13 @@ static int find_dl_dci_type_crnti(srslte_ue_dl_t *q, uint32_t cfi, uint32_t sf_i
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }
int srslte_ue_dl_find_dl_dci_type(srslte_ue_dl_t *q, uint32_t cfi, uint32_t sf_idx, int srslte_ue_dl_find_dl_dci_type(srslte_ue_dl_t *q, uint32_t tm, uint32_t cfi, uint32_t sf_idx,
uint16_t rnti, srslte_rnti_type_t rnti_type, srslte_dci_msg_t *dci_msg) uint16_t rnti, srslte_rnti_type_t rnti_type, srslte_dci_msg_t *dci_msg)
{ {
if (rnti_type == SRSLTE_RNTI_SI || rnti_type == SRSLTE_RNTI_PCH || rnti_type == SRSLTE_RNTI_RAR) { if (rnti_type == SRSLTE_RNTI_SI || rnti_type == SRSLTE_RNTI_PCH || rnti_type == SRSLTE_RNTI_RAR) {
return find_dl_dci_type_siprarnti(q, cfi, rnti, dci_msg); return find_dl_dci_type_siprarnti(q, cfi, rnti, dci_msg);
} else { } else {
return find_dl_dci_type_crnti(q, cfi, sf_idx, rnti, dci_msg); return find_dl_dci_type_crnti(q, tm, cfi, sf_idx, rnti, dci_msg);
} }
} }

@ -103,7 +103,7 @@ bool phch_worker::init_cell(srslte_cell_t cell_)
} }
} }
if (srslte_ue_dl_init_multi(&ue_dl, cell, phy->args->nof_rx_ant)) { if (srslte_ue_dl_init(&ue_dl, cell, phy->args->nof_rx_ant)) {
Error("Initiating UE DL\n"); Error("Initiating UE DL\n");
return false; return false;
} }
@ -334,7 +334,7 @@ bool phch_worker::extract_fft_and_pdcch_llr() {
srslte_chest_dl_set_noise_alg(&ue_dl.chest, SRSLTE_NOISE_ALG_PSS); srslte_chest_dl_set_noise_alg(&ue_dl.chest, SRSLTE_NOISE_ALG_PSS);
} }
if (srslte_ue_dl_decode_fft_estimate_multi(&ue_dl, signal_buffer, tti%10, &cfi) < 0) { if (srslte_ue_dl_decode_fft_estimate(&ue_dl, signal_buffer, tti%10, &cfi) < 0) {
Error("Getting PDCCH FFT estimate\n"); Error("Getting PDCCH FFT estimate\n");
return false; return false;
} }
@ -383,7 +383,8 @@ bool phch_worker::decode_pdcch_dl(srsue::mac_interface_phy::mac_grant_t* grant)
Debug("Looking for RNTI=0x%x\n", dl_rnti); Debug("Looking for RNTI=0x%x\n", dl_rnti);
if (srslte_ue_dl_find_dl_dci_type(&ue_dl, cfi, tti%10, dl_rnti, type, &dci_msg) != 1) { if (srslte_ue_dl_find_dl_dci_type(&ue_dl, phy->config->dedicated.antenna_info_explicit_value.tx_mode, cfi, tti%10,
dl_rnti, type, &dci_msg) != 1) {
return false; return false;
} }

Loading…
Cancel
Save