Renamed NR-PHY state and fix license headers

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent c4a50b7de0
commit b150e45129

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
#include "srsenb/hdr/phy/lte/worker_pool.h" #include "srsenb/hdr/phy/lte/worker_pool.h"

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
#include "srsenb/hdr/phy/nr/worker_pool.h" #include "srsenb/hdr/phy/nr/worker_pool.h"

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
@ -23,131 +14,16 @@
#define SRSLTE_NR_CC_WORKER_H #define SRSLTE_NR_CC_WORKER_H
#include "srslte/common/log.h" #include "srslte/common/log.h"
#include "srslte/srslte.h"
#include "srsue/hdr/phy/phy_common.h" #include "srsue/hdr/phy/phy_common.h"
#include <array> #include "state.h"
#include <vector>
namespace srsue { namespace srsue {
namespace nr { namespace nr {
typedef struct {
uint32_t nof_carriers;
srslte_ue_dl_nr_args_t dl;
} phy_nr_args_t;
typedef struct {
srslte_pdsch_cfg_nr_t pdsch;
srslte_prach_cfg_t prach;
srslte_ue_dl_nr_cfg_t pdcch;
} phy_nr_cfg_t;
class phy_nr_state
{
public:
srslte_carrier_nr_t carrier = {};
phy_nr_args_t args = {};
phy_nr_cfg_t cfg = {};
int32_t test_rnti = 0x1234; // Fix PDSCH RNTI for testing
phy_nr_state()
{
carrier.id = 500;
carrier.nof_prb = 100;
carrier.max_mimo_layers = 1;
// Default arguments
args.nof_carriers = 1;
args.dl.nof_rx_antennas = 1;
args.dl.nof_max_prb = 100;
args.dl.pdsch.measure_evm = true;
args.dl.pdsch.measure_time = true;
args.dl.pdsch.sch.disable_simd = false;
// Default PDSCH configuration
cfg.pdsch.sch_cfg.mcs_table = srslte_mcs_table_256qam;
// Default PRACH configuration
cfg.prach.is_nr = true;
cfg.prach.config_idx = 16;
cfg.prach.root_seq_idx = 1;
cfg.prach.freq_offset = 0;
cfg.prach.zero_corr_zone = 0;
cfg.prach.num_ra_preambles = 64;
cfg.prach.hs_flag = false;
// commonControlResourceSet
// controlResourceSetId: 1
// frequencyDomainResources: ff0000000000
// duration: 1
// cce-REG-MappingType: nonInterleaved (1)
// nonInterleaved: NULL
// precoderGranularity: sameAsREG-bundle (0)
cfg.pdcch.coreset[1].coreset_id = 1;
cfg.pdcch.coreset[1].precoder_granularity = srslte_coreset_precoder_granularity_reg_bundle;
cfg.pdcch.coreset[1].duration = 1;
cfg.pdcch.coreset[1].mapping_type = srslte_coreset_mapping_type_non_interleaved;
for (uint32_t i = 0; i < SRSLTE_CORESET_FREQ_DOMAIN_RES_SIZE; i++) {
cfg.pdcch.coreset[1].freq_resources[i] = (i < 8);
}
cfg.pdcch.coreset_present[1] = true;
// SearchSpace
// searchSpaceId: 1
// controlResourceSetId: 1
// monitoringSlotPeriodicityAndOffset: sl1 (0)
// sl1: NULL
// monitoringSymbolsWithinSlot: 8000 [bit length 14, 2 LSB pad bits, 1000 0000 0000 00.. decimal value 8192]
// nrofCandidates
// aggregationLevel1: n0 (0)
// aggregationLevel2: n0 (0)
// aggregationLevel4: n1 (1)
// aggregationLevel8: n0 (0)
// aggregationLevel16: n0 (0)
// searchSpaceType: common (0)
// common
// dci-Format0-0-AndFormat1-0
srslte_search_space_t search_space1 = {};
search_space1.id = 1;
search_space1.coreset_id = 1;
search_space1.nof_candidates[0] = 0;
search_space1.nof_candidates[1] = 0;
search_space1.nof_candidates[2] = 1;
search_space1.nof_candidates[3] = 0;
search_space1.nof_candidates[4] = 0;
search_space1.type = srslte_search_space_type_common_3;
cfg.pdcch.search_space[1] = search_space1;
cfg.pdcch.search_space_present[1] = true;
// ra-SearchSpace: 1
cfg.pdcch.ra_rnti = 0x16; //< Supposed to be deduced from PRACH configuration
cfg.pdcch.ra_search_space = search_space1;
cfg.pdcch.ra_search_space.type = srslte_search_space_type_common_1;
cfg.pdcch.ra_search_space_present = true;
// pdsch-ConfigCommon: setup (1)
// setup
// pdsch-TimeDomainAllocationList: 2 items
// Item 0
// PDSCH-TimeDomainResourceAllocation
// mappingType: typeA (0)
// startSymbolAndLength: 40
// Item 1
// PDSCH-TimeDomainResourceAllocation
// mappingType: typeA (0)
// startSymbolAndLength: 57
cfg.pdsch.common_pdsch_time_ra[0].mapping_type = srslte_sch_mapping_type_A;
cfg.pdsch.common_pdsch_time_ra[0].sliv = 40;
cfg.pdsch.common_pdsch_time_ra[1].mapping_type = srslte_sch_mapping_type_A;
cfg.pdsch.common_pdsch_time_ra[1].sliv = 57;
cfg.pdsch.nof_common_pdsch_time_ra = 2;
}
};
class cc_worker class cc_worker
{ {
public: public:
cc_worker(uint32_t cc_idx, srslog::basic_logger& log, phy_nr_state* phy_state_); cc_worker(uint32_t cc_idx, srslog::basic_logger& log, state* phy_state_);
~cc_worker(); ~cc_worker();
bool set_carrier(const srslte_carrier_nr_t* carrier); bool set_carrier(const srslte_carrier_nr_t* carrier);
@ -166,7 +42,7 @@ private:
std::array<cf_t*, SRSLTE_MAX_PORTS> rx_buffer = {}; std::array<cf_t*, SRSLTE_MAX_PORTS> rx_buffer = {};
std::array<cf_t*, SRSLTE_MAX_PORTS> tx_buffer = {}; std::array<cf_t*, SRSLTE_MAX_PORTS> tx_buffer = {};
uint32_t buffer_sz = 0; uint32_t buffer_sz = 0;
phy_nr_state* phy_state = nullptr; state* phy = nullptr;
srslte_ue_dl_nr_t ue_dl = {}; srslte_ue_dl_nr_t ue_dl = {};
srslog::basic_logger& logger; srslog::basic_logger& logger;

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
@ -40,7 +31,7 @@ namespace nr {
class sf_worker final : public srslte::thread_pool::worker class sf_worker final : public srslte::thread_pool::worker
{ {
public: public:
sf_worker(phy_common* phy, phy_nr_state* phy_state_, srslog::basic_logger& logger); sf_worker(phy_common* phy, state* phy_state_, srslog::basic_logger& logger);
~sf_worker() = default; ~sf_worker() = default;
bool set_carrier_unlocked(uint32_t cc_idx, const srslte_carrier_nr_t* carrier_); bool set_carrier_unlocked(uint32_t cc_idx, const srslte_carrier_nr_t* carrier_);
@ -61,7 +52,7 @@ private:
std::vector<std::unique_ptr<cc_worker> > cc_workers; std::vector<std::unique_ptr<cc_worker> > cc_workers;
phy_common* phy = nullptr; phy_common* phy = nullptr;
phy_nr_state* phy_state = nullptr; state* phy_state = nullptr;
srslog::basic_logger& logger; srslog::basic_logger& logger;
cf_t* prach_ptr = nullptr; cf_t* prach_ptr = nullptr;

@ -0,0 +1,141 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#ifndef SRSLTE_STATE_H
#define SRSLTE_STATE_H
#include "srslte/adt/circular_array.h"
#include "srslte/common/common.h"
#include "srslte/srslte.h"
#include <array>
#include <mutex>
#include <vector>
namespace srsue {
namespace nr {
typedef struct {
uint32_t nof_carriers;
srslte_ue_dl_nr_args_t dl;
} phy_nr_args_t;
typedef struct {
srslte_pdsch_cfg_nr_t pdsch;
srslte_prach_cfg_t prach;
srslte_ue_dl_nr_cfg_t pdcch;
} phy_nr_cfg_t;
class state
{
public:
srslte_carrier_nr_t carrier = {};
phy_nr_args_t args = {};
phy_nr_cfg_t cfg = {};
int32_t test_rnti = 0x1234; // Fix PDSCH RNTI for testing
state()
{
carrier.id = 500;
carrier.nof_prb = 100;
carrier.max_mimo_layers = 1;
// Default arguments
args.nof_carriers = 1;
args.dl.nof_rx_antennas = 1;
args.dl.nof_max_prb = 100;
args.dl.pdsch.measure_evm = true;
args.dl.pdsch.measure_time = true;
args.dl.pdsch.sch.disable_simd = false;
// Default PDSCH configuration
cfg.pdsch.sch_cfg.mcs_table = srslte_mcs_table_256qam;
// Default PRACH configuration
cfg.prach.is_nr = true;
cfg.prach.config_idx = 16;
cfg.prach.root_seq_idx = 1;
cfg.prach.freq_offset = 0;
cfg.prach.zero_corr_zone = 0;
cfg.prach.num_ra_preambles = 64;
cfg.prach.hs_flag = false;
// commonControlResourceSet
// controlResourceSetId: 1
// frequencyDomainResources: ff0000000000
// duration: 1
// cce-REG-MappingType: nonInterleaved (1)
// nonInterleaved: NULL
// precoderGranularity: sameAsREG-bundle (0)
cfg.pdcch.coreset[1].coreset_id = 1;
cfg.pdcch.coreset[1].precoder_granularity = srslte_coreset_precoder_granularity_reg_bundle;
cfg.pdcch.coreset[1].duration = 1;
cfg.pdcch.coreset[1].mapping_type = srslte_coreset_mapping_type_non_interleaved;
for (uint32_t i = 0; i < SRSLTE_CORESET_FREQ_DOMAIN_RES_SIZE; i++) {
cfg.pdcch.coreset[1].freq_resources[i] = (i < 8);
}
cfg.pdcch.coreset_present[1] = true;
// SearchSpace
// searchSpaceId: 1
// controlResourceSetId: 1
// monitoringSlotPeriodicityAndOffset: sl1 (0)
// sl1: NULL
// monitoringSymbolsWithinSlot: 8000 [bit length 14, 2 LSB pad bits, 1000 0000 0000 00.. decimal value 8192]
// nrofCandidates
// aggregationLevel1: n0 (0)
// aggregationLevel2: n0 (0)
// aggregationLevel4: n1 (1)
// aggregationLevel8: n0 (0)
// aggregationLevel16: n0 (0)
// searchSpaceType: common (0)
// common
// dci-Format0-0-AndFormat1-0
srslte_search_space_t search_space1 = {};
search_space1.id = 1;
search_space1.coreset_id = 1;
search_space1.nof_candidates[0] = 0;
search_space1.nof_candidates[1] = 0;
search_space1.nof_candidates[2] = 1;
search_space1.nof_candidates[3] = 0;
search_space1.nof_candidates[4] = 0;
search_space1.type = srslte_search_space_type_common_3;
cfg.pdcch.search_space[1] = search_space1;
cfg.pdcch.search_space_present[1] = true;
// ra-SearchSpace: 1
cfg.pdcch.ra_rnti = 0x16; //< Supposed to be deduced from PRACH configuration
cfg.pdcch.ra_search_space = search_space1;
cfg.pdcch.ra_search_space.type = srslte_search_space_type_common_1;
cfg.pdcch.ra_search_space_present = true;
// pdsch-ConfigCommon: setup (1)
// setup
// pdsch-TimeDomainAllocationList: 2 items
// Item 0
// PDSCH-TimeDomainResourceAllocation
// mappingType: typeA (0)
// startSymbolAndLength: 40
// Item 1
// PDSCH-TimeDomainResourceAllocation
// mappingType: typeA (0)
// startSymbolAndLength: 57
cfg.pdsch.common_pdsch_time_ra[0].mapping_type = srslte_sch_mapping_type_A;
cfg.pdsch.common_pdsch_time_ra[0].sliv = 40;
cfg.pdsch.common_pdsch_time_ra[1].mapping_type = srslte_sch_mapping_type_A;
cfg.pdsch.common_pdsch_time_ra[1].sliv = 57;
cfg.pdsch.nof_common_pdsch_time_ra = 2;
}
};
} // namespace nr
} // namespace srsue
#endif // SRSLTE_STATE_H

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
@ -34,7 +25,7 @@ class worker_pool
private: private:
srslte::thread_pool pool; srslte::thread_pool pool;
std::vector<std::unique_ptr<sf_worker> > workers; std::vector<std::unique_ptr<sf_worker> > workers;
phy_nr_state phy_state; state phy_state;
std::unique_ptr<prach> prach_buffer = nullptr; std::unique_ptr<prach> prach_buffer = nullptr;
public: public:

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
#include "srsue/hdr/phy/lte/worker_pool.h" #include "srsue/hdr/phy/lte/worker_pool.h"

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
@ -24,13 +15,13 @@
namespace srsue { namespace srsue {
namespace nr { namespace nr {
cc_worker::cc_worker(uint32_t cc_idx_, srslog::basic_logger& log, phy_nr_state* phy_state_) : cc_worker::cc_worker(uint32_t cc_idx_, srslog::basic_logger& log, state* phy_state_) :
cc_idx(cc_idx_), phy_state(phy_state_), logger(log) cc_idx(cc_idx_), phy(phy_state_), logger(log)
{ {
cf_t* buffer_c[SRSLTE_MAX_PORTS] = {}; cf_t* buffer_c[SRSLTE_MAX_PORTS] = {};
// Allocate buffers // Allocate buffers
buffer_sz = SRSLTE_SF_LEN_PRB(phy_state->args.dl.nof_max_prb) * 5; buffer_sz = SRSLTE_SF_LEN_PRB(phy->args.dl.nof_max_prb) * 5;
for (uint32_t i = 0; i < phy_state_->args.dl.nof_rx_antennas; i++) { for (uint32_t i = 0; i < phy_state_->args.dl.nof_rx_antennas; i++) {
rx_buffer[i] = srslte_vec_cf_malloc(buffer_sz); rx_buffer[i] = srslte_vec_cf_malloc(buffer_sz);
tx_buffer[i] = srslte_vec_cf_malloc(buffer_sz); tx_buffer[i] = srslte_vec_cf_malloc(buffer_sz);
@ -73,13 +64,13 @@ bool cc_worker::set_carrier(const srslte_carrier_nr_t* carrier)
return false; return false;
} }
if (srslte_ue_dl_nr_set_config(&ue_dl, &phy_state->cfg.pdcch) < SRSLTE_SUCCESS) { if (srslte_ue_dl_nr_set_config(&ue_dl, &phy->cfg.pdcch) < SRSLTE_SUCCESS) {
ERROR("Error setting carrier"); ERROR("Error setting carrier");
return false; return false;
} }
// Set default PDSCH config // Set default PDSCH config
phy_state->cfg.pdsch.rbg_size_cfg_1 = false; phy->cfg.pdsch.rbg_size_cfg_1 = false;
return true; return true;
} }
@ -91,7 +82,7 @@ void cc_worker::set_tti(uint32_t tti)
cf_t* cc_worker::get_rx_buffer(uint32_t antenna_idx) cf_t* cc_worker::get_rx_buffer(uint32_t antenna_idx)
{ {
if (antenna_idx >= phy_state->args.dl.nof_rx_antennas) { if (antenna_idx >= phy->args.dl.nof_rx_antennas) {
return nullptr; return nullptr;
} }
@ -105,7 +96,7 @@ uint32_t cc_worker::get_buffer_len()
bool cc_worker::work_dl() bool cc_worker::work_dl()
{ {
srslte_pdsch_cfg_nr_t pdsch_hl_cfg = phy_state->cfg.pdsch; srslte_pdsch_cfg_nr_t pdsch_hl_cfg = phy->cfg.pdsch;
// Run FFT // Run FFT
srslte_ue_dl_nr_estimate_fft(&ue_dl, &dl_slot_cfg); srslte_ue_dl_nr_estimate_fft(&ue_dl, &dl_slot_cfg);
@ -115,10 +106,10 @@ bool cc_worker::work_dl()
uint32_t nof_found_dci = 0; uint32_t nof_found_dci = 0;
// Search for RA DCI // Search for RA DCI
if (phy_state->cfg.pdcch.ra_search_space_present) { if (phy->cfg.pdcch.ra_search_space_present) {
int n_ra = srslte_ue_dl_nr_find_dl_dci(&ue_dl, int n_ra = srslte_ue_dl_nr_find_dl_dci(&ue_dl,
&dl_slot_cfg, &dl_slot_cfg,
phy_state->cfg.pdcch.ra_rnti, phy->cfg.pdcch.ra_rnti,
&dci_dl_rx[nof_found_dci], &dci_dl_rx[nof_found_dci],
(uint32_t)dci_dl_rx.size() - nof_found_dci); (uint32_t)dci_dl_rx.size() - nof_found_dci);
if (n_ra < SRSLTE_SUCCESS) { if (n_ra < SRSLTE_SUCCESS) {
@ -129,10 +120,10 @@ bool cc_worker::work_dl()
} }
// Search for test RNTI // Search for test RNTI
if (phy_state->test_rnti > 0) { if (phy->test_rnti > 0) {
int n_test = srslte_ue_dl_nr_find_dl_dci(&ue_dl, int n_test = srslte_ue_dl_nr_find_dl_dci(&ue_dl,
&dl_slot_cfg, &dl_slot_cfg,
(uint16_t)phy_state->test_rnti, (uint16_t)phy->test_rnti,
&dci_dl_rx[nof_found_dci], &dci_dl_rx[nof_found_dci],
(uint32_t)dci_dl_rx.size() - nof_found_dci); (uint32_t)dci_dl_rx.size() - nof_found_dci);
if (n_test < SRSLTE_SUCCESS) { if (n_test < SRSLTE_SUCCESS) {

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
@ -35,7 +26,7 @@ static int plot_worker_id = -1;
namespace srsue { namespace srsue {
namespace nr { namespace nr {
sf_worker::sf_worker(phy_common* phy_, phy_nr_state* phy_state_, srslog::basic_logger& log) : sf_worker::sf_worker(phy_common* phy_, state* phy_state_, srslog::basic_logger& log) :
phy_state(phy_state_), phy(phy_), logger(log) phy_state(phy_state_), phy(phy_), logger(log)
{ {
for (uint32_t i = 0; i < phy_state->args.nof_carriers; i++) { for (uint32_t i = 0; i < phy_state->args.nof_carriers; i++) {

@ -0,0 +1,17 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2020 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#include "srsue/hdr/phy/nr/state.h"
namespace srsue {
namespace nr {}
} // namespace srsue

@ -1,21 +1,12 @@
/* /**
* Copyright 2013-2020 Software Radio Systems Limited
*
* This file is part of srsLTE.
* *
* srsLTE is free software: you can redistribute it and/or modify * \section COPYRIGHT
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
* *
* srsLTE is distributed in the hope that it will be useful, * Copyright 2013-2020 Software Radio Systems Limited
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* A copy of the GNU Affero General Public License can be found in * By using this file, you agree to the terms and conditions set
* the LICENSE file in the top-level directory of this distribution * forth in the LICENSE file which can be found at the top level of
* and at http://www.gnu.org/licenses/. * the distribution.
* *
*/ */
#include "srsue/hdr/phy/nr/worker_pool.h" #include "srsue/hdr/phy/nr/worker_pool.h"

Loading…
Cancel
Save