|
|
|
@ -22,7 +22,8 @@ static srslte_carrier_nr_t carrier = {
|
|
|
|
|
0, // cell_id
|
|
|
|
|
0, // numerology
|
|
|
|
|
SRSLTE_MAX_PRB_NR, // nof_prb
|
|
|
|
|
0 // start
|
|
|
|
|
0, // start
|
|
|
|
|
1 // max_mimo_layers
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static uint32_t n_prb = 0; // Set to 0 for steering
|
|
|
|
@ -37,7 +38,7 @@ void usage(char* prog)
|
|
|
|
|
printf("\t-m MCS PRB, set to >28 for steering [Default %d]\n", mcs);
|
|
|
|
|
printf("\t-T Provide MCS table (64qam, 256qam, 64qamLowSE) [Default %s]\n",
|
|
|
|
|
srslte_mcs_table_to_str(pdsch_cfg.sch_cfg.mcs_table));
|
|
|
|
|
printf("\t-L Provide number of layers [Default %d]\n", pdsch_cfg.sch_cfg.max_mimo_layers);
|
|
|
|
|
printf("\t-L Provide number of layers [Default %d]\n", carrier.max_mimo_layers);
|
|
|
|
|
printf("\t-v [set srslte_verbose to debug, default none]\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -56,7 +57,7 @@ int parse_args(int argc, char** argv)
|
|
|
|
|
pdsch_cfg.sch_cfg.mcs_table = srslte_mcs_table_from_str(argv[optind]);
|
|
|
|
|
break;
|
|
|
|
|
case 'L':
|
|
|
|
|
pdsch_cfg.sch_cfg.max_mimo_layers = (uint32_t)strtol(argv[optind], NULL, 10);
|
|
|
|
|
carrier.max_mimo_layers = (uint32_t)strtol(argv[optind], NULL, 10);
|
|
|
|
|
break;
|
|
|
|
|
case 'v':
|
|
|
|
|
srslte_verbose++;
|
|
|
|
@ -85,7 +86,7 @@ int main(int argc, char** argv)
|
|
|
|
|
|
|
|
|
|
// Set default PDSCH configuration
|
|
|
|
|
pdsch_cfg.sch_cfg.mcs_table = srslte_mcs_table_64qam;
|
|
|
|
|
pdsch_cfg.sch_cfg.max_mimo_layers = 1;
|
|
|
|
|
|
|
|
|
|
if (parse_args(argc, argv) < SRSLTE_SUCCESS) {
|
|
|
|
|
goto clean_exit;
|
|
|
|
|
}
|
|
|
|
@ -104,17 +105,17 @@ int main(int argc, char** argv)
|
|
|
|
|
goto clean_exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (srslte_pdsch_nr_set_carrier(&pdsch_tx, &carrier, &pdsch_cfg.sch_cfg)) {
|
|
|
|
|
if (srslte_pdsch_nr_set_carrier(&pdsch_tx, &carrier)) {
|
|
|
|
|
ERROR("Error setting SCH NR carrier\n");
|
|
|
|
|
goto clean_exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (srslte_pdsch_nr_set_carrier(&pdsch_rx, &carrier, &pdsch_cfg.sch_cfg)) {
|
|
|
|
|
if (srslte_pdsch_nr_set_carrier(&pdsch_rx, &carrier)) {
|
|
|
|
|
ERROR("Error setting SCH NR carrier\n");
|
|
|
|
|
goto clean_exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (uint32_t i = 0; i < pdsch_cfg.sch_cfg.max_mimo_layers; i++) {
|
|
|
|
|
for (uint32_t i = 0; i < carrier.max_mimo_layers; i++) {
|
|
|
|
|
sf_symbols[i] = srslte_vec_cf_malloc(SRSLTE_SLOT_LEN_RE_NR(carrier.nof_prb));
|
|
|
|
|
if (sf_symbols[i] == NULL) {
|
|
|
|
|
ERROR("Error malloc\n");
|
|
|
|
@ -154,7 +155,7 @@ int main(int argc, char** argv)
|
|
|
|
|
ERROR("Error loading default grant\n");
|
|
|
|
|
goto clean_exit;
|
|
|
|
|
}
|
|
|
|
|
pdsch_grant.nof_layers = pdsch_cfg.sch_cfg.max_mimo_layers;
|
|
|
|
|
pdsch_grant.nof_layers = carrier.max_mimo_layers;
|
|
|
|
|
pdsch_grant.dci_format = srslte_dci_format_nr_1_0;
|
|
|
|
|
|
|
|
|
|
uint32_t n_prb_start = 1;
|
|
|
|
|