mirror of https://github.com/pvnis/srsRAN_4G.git
sched,nr: extend sched nr testing suite. restrict paralllelization for correct DAI generation
parent
323703c2f3
commit
1535e6b205
@ -0,0 +1,54 @@
|
||||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2021 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 "sched_nr_ue_ded_test_suite.h"
|
||||
#include "srsenb/hdr/stack/mac/nr/sched_nr_pdcch.h"
|
||||
#include "srsran/common/test_common.h"
|
||||
|
||||
namespace srsenb {
|
||||
|
||||
using namespace srsenb::sched_nr_impl;
|
||||
|
||||
void test_dl_sched_result(const sim_nr_enb_ctxt_t& enb_ctxt, const sched_nr_cc_output_res_t& cc_out)
|
||||
{
|
||||
tti_point pdcch_tti = cc_out.tti;
|
||||
const pdcch_dl_list_t& pdcchs = cc_out.dl_cc_result->pdcch_dl;
|
||||
|
||||
// Iterate over UE PDCCH allocations
|
||||
for (const pdcch_dl_t& pdcch : pdcchs) {
|
||||
if (pdcch.dci.ctx.rnti_type != srsran_rnti_type_c) {
|
||||
continue;
|
||||
}
|
||||
const sim_nr_ue_ctxt_t& ue = *enb_ctxt.ue_db.at(pdcch.dci.ctx.rnti);
|
||||
uint32_t k1 = ue.ue_cfg.phy_cfg.harq_ack
|
||||
.dl_data_to_ul_ack[pdcch_tti.sf_idx() % ue.ue_cfg.phy_cfg.harq_ack.nof_dl_data_to_ul_ack];
|
||||
|
||||
// CHECK: Carrier activation
|
||||
TESTASSERT(ue.ue_cfg.carriers[cc_out.cc].active);
|
||||
|
||||
// CHECK: Coreset chosen/DCI content
|
||||
TESTASSERT(ue.ue_cfg.phy_cfg.pdcch.coreset_present[pdcch.dci.ctx.coreset_id]);
|
||||
const auto& coreset = ue.ue_cfg.phy_cfg.pdcch.coreset[pdcch.dci.ctx.coreset_id];
|
||||
TESTASSERT(coreset.id == pdcch.dci.ctx.coreset_id);
|
||||
TESTASSERT(pdcch.dci.ctx.format == srsran_dci_format_nr_1_0 or pdcch.dci.ctx.format == srsran_dci_format_nr_1_1);
|
||||
|
||||
// CHECK: UCI
|
||||
if (pdcch.dci.ctx.format == srsran_dci_format_nr_1_0) {
|
||||
TESTASSERT(pdcch.dci.harq_feedback == k1 - 1);
|
||||
} else {
|
||||
TESTASSERT(pdcch.dci.harq_feedback == pdcch_tti.sf_idx());
|
||||
}
|
||||
TESTASSERT(ue.cc_list[cc_out.cc].pending_acks[(pdcch_tti + k1).to_uint()] % 4 == pdcch.dci.dai);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace srsenb
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2021 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 SRSRAN_SCHED_NR_UE_DED_TEST_SUITE_H
|
||||
#define SRSRAN_SCHED_NR_UE_DED_TEST_SUITE_H
|
||||
|
||||
#include "sched_nr_sim_ue.h"
|
||||
|
||||
namespace srsenb {
|
||||
|
||||
void test_dl_sched_result(const sim_nr_enb_ctxt_t& enb_ctxt, const sched_nr_cc_output_res_t& cc_out);
|
||||
|
||||
}
|
||||
|
||||
#endif // SRSRAN_SCHED_NR_UE_DED_TEST_SUITE_H
|
Loading…
Reference in New Issue