SRSUE: Aesthetic changes

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent 96a47fb93a
commit bdef411855

@ -116,7 +116,7 @@ public:
} tx_request_t; } tx_request_t;
// MAC informs PHY about UL grant included in RAR PDU // MAC informs PHY about UL grant included in RAR PDU
virtual int set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS>) = 0; virtual int set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> packed_ul_grant) = 0;
// MAC instructs PHY to transmit MAC TB at the given TTI // MAC instructs PHY to transmit MAC TB at the given TTI
virtual int tx_request(const tx_request_t& request) = 0; virtual int tx_request(const tx_request_t& request) = 0;

@ -173,7 +173,7 @@ public:
const static int DEFAULT_WORKERS = 4; const static int DEFAULT_WORKERS = 4;
std::string get_type() final { return "lte_soft"; } std::string get_type() final { return "lte_soft"; }
int set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> array) final; int set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> packed_ul_grant) final;
void send_prach(uint32_t prach_occasion, uint32_t preamble_index, int preamble_received_target_power) final; void send_prach(uint32_t prach_occasion, uint32_t preamble_index, int preamble_received_target_power) final;
int tx_request(const tx_request_t& request) final; int tx_request(const tx_request_t& request) final;
void set_earfcn(std::vector<uint32_t> earfcns) final; void set_earfcn(std::vector<uint32_t> earfcns) final;

@ -128,7 +128,7 @@ uint32_t cc_worker::get_buffer_len()
void cc_worker::decode_pdcch_dl() void cc_worker::decode_pdcch_dl()
{ {
std::array<srslte_dci_dl_nr_t, 5> dci_rx = {}; std::array<srslte_dci_dl_nr_t, SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR> dci_rx = {};
uint16_t rnti = phy->stack->get_dl_sched_rnti(dl_slot_cfg.idx); uint16_t rnti = phy->stack->get_dl_sched_rnti(dl_slot_cfg.idx);
// Search for grants // Search for grants

@ -101,7 +101,7 @@ void worker_pool::send_prach(uint32_t prach_occasion, uint32_t preamble_index, i
prach_buffer->prepare_to_send(preamble_index); prach_buffer->prepare_to_send(preamble_index);
} }
int worker_pool::set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> array) int worker_pool::set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> packed_ul_grant)
{ {
// Copy DCI bits and setup DCI context // Copy DCI bits and setup DCI context
srslte_dci_msg_nr_t dci_msg = {}; srslte_dci_msg_nr_t dci_msg = {};
@ -109,7 +109,7 @@ int worker_pool::set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> arr
dci_msg.rnti_type = srslte_rnti_type_ra; dci_msg.rnti_type = srslte_rnti_type_ra;
dci_msg.rnti = phy_state.ra_rnti; dci_msg.rnti = phy_state.ra_rnti;
dci_msg.nof_bits = SRSLTE_RAR_UL_GRANT_NBITS; dci_msg.nof_bits = SRSLTE_RAR_UL_GRANT_NBITS;
srslte_vec_u8_copy(dci_msg.payload, array.data(), SRSLTE_RAR_UL_GRANT_NBITS); srslte_vec_u8_copy(dci_msg.payload, packed_ul_grant.data(), SRSLTE_RAR_UL_GRANT_NBITS);
srslte_dci_ul_nr_t dci_ul = {}; srslte_dci_ul_nr_t dci_ul = {};

@ -614,9 +614,9 @@ void phy::set_mch_period_stop(uint32_t stop)
common.set_mch_period_stop(stop); common.set_mch_period_stop(stop);
} }
int phy::set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> array) int phy::set_ul_grant(std::array<uint8_t, SRSLTE_RAR_UL_GRANT_NBITS> packed_ul_grant)
{ {
return nr_workers.set_ul_grant(array); return nr_workers.set_ul_grant(packed_ul_grant);
} }
void phy::send_prach(uint32_t prach_occasion, uint32_t preamble_index, int preamble_received_target_power) void phy::send_prach(uint32_t prach_occasion, uint32_t preamble_index, int preamble_received_target_power)

@ -97,7 +97,7 @@ int ue::init(const all_args_t& args_, srslte::logger* logger_)
} }
#ifdef HAVE_5GNR #ifdef HAVE_5GNR
srsue::phy_args_nr_t phy_args_nr; srsue::phy_args_nr_t phy_args_nr = {};
phy_args_nr.nof_prb = args.phy.nr_nof_prb; phy_args_nr.nof_prb = args.phy.nr_nof_prb;
phy_args_nr.nof_carriers = args.phy.nof_nr_carriers; phy_args_nr.nof_carriers = args.phy.nof_nr_carriers;
phy_args_nr.nof_phy_threads = args.phy.nof_phy_threads; phy_args_nr.nof_phy_threads = args.phy.nof_phy_threads;

Loading…
Cancel
Save