srsLTE: sidelink minor corrections

master
Xavier Arteaga 5 years ago committed by Andre Puschmann
parent 7de51c8236
commit 0912701cb0

@ -80,30 +80,30 @@ typedef struct {
} srslte_chest_sl_t;
int srslte_chest_sl_init_psbch_dmrs(srslte_chest_sl_t* q);
int srslte_chest_sl_gen_psbch_dmrs(srslte_chest_sl_t* q, srslte_sl_tm_t txMode, uint32_t N_sl_id);
int srslte_chest_sl_put_psbch_dmrs(srslte_chest_sl_t* q,
cf_t* sf_buffer,
srslte_sl_tm_t tx_mode,
uint32_t nof_prb,
srslte_cp_t cp);
void srslte_chest_sl_psbch_ls_estimate_equalize(srslte_chest_sl_t* q,
cf_t* sf_buffer,
cf_t* sf_buffer_rx,
uint32_t nof_prb,
srslte_sl_tm_t txMode,
srslte_cp_t cp);
int srslte_chest_sl_get_psbch_dmrs(srslte_chest_sl_t* q,
cf_t* sf_buffer_rx,
cf_t** dmrs_received,
srslte_sl_tm_t tx_mode,
uint32_t nof_prb,
srslte_cp_t cp);
void srslte_chest_sl_free(srslte_chest_sl_t* q);
SRSLTE_API int srslte_chest_sl_init_psbch_dmrs(srslte_chest_sl_t* q);
SRSLTE_API int srslte_chest_sl_gen_psbch_dmrs(srslte_chest_sl_t* q, srslte_sl_tm_t txMode, uint32_t N_sl_id);
SRSLTE_API int srslte_chest_sl_put_psbch_dmrs(srslte_chest_sl_t* q,
cf_t* sf_buffer,
srslte_sl_tm_t tx_mode,
uint32_t nof_prb,
srslte_cp_t cp);
SRSLTE_API void srslte_chest_sl_psbch_ls_estimate_equalize(srslte_chest_sl_t* q,
cf_t* sf_buffer,
cf_t* sf_buffer_rx,
uint32_t nof_prb,
srslte_sl_tm_t txMode,
srslte_cp_t cp);
SRSLTE_API int srslte_chest_sl_get_psbch_dmrs(srslte_chest_sl_t* q,
cf_t* sf_buffer_rx,
cf_t** dmrs_received,
srslte_sl_tm_t tx_mode,
uint32_t nof_prb,
srslte_cp_t cp);
SRSLTE_API void srslte_chest_sl_free(srslte_chest_sl_t* q);
#endif

@ -74,8 +74,6 @@ typedef struct SRSLTE_API {
float* llr;
// interleaving
uint8_t* temp_g_bits;
uint32_t* interleaver;
uint32_t* interleaver_lut;
// scrambling

@ -65,7 +65,7 @@ void parse_args(int argc, char** argv)
while ((opt = getopt(argc, argv, "cdeisptv")) != -1) {
switch (opt) {
case 'c':
N_sl_id = atoi(argv[optind]);
N_sl_id = (int32_t)strtol(argv[optind], NULL, 10);
break;
case 'd':
use_standard_lte_rates = true;
@ -80,10 +80,10 @@ void parse_args(int argc, char** argv)
input_file_name = argv[optind];
break;
case 'p':
nof_prb = atoi(argv[optind]);
nof_prb = (uint32_t)strtol(argv[optind], NULL, 10);
break;
case 't':
switch (atoi(argv[optind])) {
switch (strtol(argv[optind], NULL, 10)) {
case 1:
tm = SRSLTE_SIDELINK_TM1;
break;
@ -99,7 +99,6 @@ void parse_args(int argc, char** argv)
default:
usage(argv[0]);
exit(-1);
break;
}
break;
case 'v':

@ -51,16 +51,16 @@ void parse_args(int argc, char** argv)
while ((opt = getopt(argc, argv, "ceiptv")) != -1) {
switch (opt) {
case 'c':
N_sl_id = atoi(argv[optind]);
N_sl_id = (int32_t)strtol(argv[optind], NULL, 10);
break;
case 'e':
cp = SRSLTE_CP_EXT;
break;
case 'p':
nof_prb = atoi(argv[optind]);
nof_prb = (uint32_t)strtol(argv[optind], NULL, 10);
break;
case 't':
switch (atoi(argv[optind])) {
switch (strtol(argv[optind], NULL, 10)) {
case 1:
tm = SRSLTE_SIDELINK_TM1;
break;

@ -71,13 +71,13 @@ void parse_args(int argc, char** argv)
max_subframes = strtoul(argv[optind], NULL, 0);
break;
case 'p':
nof_prb = atoi(argv[optind]);
nof_prb = (uint32_t)strtol(argv[optind], NULL, 10);
break;
case 's':
snr = atof(argv[optind]);
snr = strtof(argv[optind], NULL);
break;
case 't':
switch (atoi(argv[optind])) {
switch (strtol(argv[optind], NULL, 10)) {
case 1:
tm = SRSLTE_SIDELINK_TM1;
break;
@ -93,7 +93,6 @@ void parse_args(int argc, char** argv)
default:
usage(argv[0]);
exit(-1);
break;
}
break;
case 'v':

@ -67,7 +67,7 @@ void parse_args(int argc, char** argv)
while ((opt = getopt(argc, argv, "cdefiopstv")) != -1) {
switch (opt) {
case 'c':
N_sl_id = atoi(argv[optind]);
N_sl_id = (int32_t)strtol(argv[optind], NULL, 10);
break;
case 'd':
use_standard_lte_rates = true;
@ -76,22 +76,22 @@ void parse_args(int argc, char** argv)
cp = SRSLTE_CP_EXT;
break;
case 'f':
frequency_offset = atof(argv[optind]);
frequency_offset = strtof(argv[optind], NULL);
break;
case 'i':
input_file_name = argv[optind];
break;
case 'o':
offset = atoi(argv[optind]);
offset = (uint32_t)strtol(argv[optind], NULL, 10);
break;
case 'p':
nof_prb = atoi(argv[optind]);
nof_prb = (uint32_t)strtol(argv[optind], NULL, 10);
break;
case 's':
snr = atof(argv[optind]);
snr = strtof(argv[optind], NULL);
break;
case 't':
switch (atoi(argv[optind])) {
switch (strtol(argv[optind], NULL, 10)) {
case 1:
tm = SRSLTE_SIDELINK_TM1;
break;
@ -107,7 +107,6 @@ void parse_args(int argc, char** argv)
default:
usage(argv[0]);
exit(-1);
break;
}
break;
case 'v':
@ -235,7 +234,7 @@ int main(int argc, char** argv)
if (samples_read != samples_to_read) {
printf("Couldn't read %i samples\n", samples_to_read);
return SRSLTE_ERROR;
goto clean_exit;
}
// Find sync signals
@ -262,7 +261,6 @@ int main(int argc, char** argv)
(int)t[0].tv_sec * 1e6 + (int)t[0].tv_usec);
sync = true;
break;
}
} else {
// Sample offset correction
@ -278,6 +276,7 @@ int main(int argc, char** argv)
}
}
clean_exit:
srslte_filesource_free(&fsrc);
srslte_ofdm_tx_free(&ifft);
srslte_ssss_free(&ssss);

Loading…
Cancel
Save