|
|
@ -326,6 +326,11 @@ public:
|
|
|
|
uint32_t rach_problem = 0;
|
|
|
|
uint32_t rach_problem = 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class stack_dummy : public stack_interface_mac
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
void process_pdus() final {}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace srslte
|
|
|
|
} // namespace srslte
|
|
|
|
|
|
|
|
|
|
|
|
int mac_unpack_test()
|
|
|
|
int mac_unpack_test()
|
|
|
@ -361,10 +366,11 @@ int mac_unpack_test()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
|
|
|
|
|
|
|
|
// create dummy DL action and grant and push MAC PDU
|
|
|
|
// create dummy DL action and grant and push MAC PDU
|
|
|
|
mac_interface_phy_lte::tb_action_dl_t dl_action;
|
|
|
|
mac_interface_phy_lte::tb_action_dl_t dl_action;
|
|
|
@ -418,10 +424,11 @@ int mac_ul_sch_pdu_test1()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -486,10 +493,11 @@ int mac_ul_logical_channel_prioritization_test1()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -599,10 +607,11 @@ int mac_ul_logical_channel_prioritization_test2()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -699,10 +708,11 @@ int mac_ul_logical_channel_prioritization_test3()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -787,10 +797,11 @@ int mac_ul_sch_pdu_with_short_bsr_test()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -873,10 +884,11 @@ int mac_ul_sch_pdu_with_padding_bsr_test()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -968,10 +980,11 @@ int mac_ul_sch_pdu_one_byte_test()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -1028,10 +1041,11 @@ int mac_ul_sch_pdu_two_byte_test()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -1088,10 +1102,11 @@ int mac_ul_sch_pdu_three_byte_test()
|
|
|
|
phy_dummy phy;
|
|
|
|
phy_dummy phy;
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// the actual MAC
|
|
|
|
// the actual MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
const uint16_t crnti = 0x1001;
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
mac.set_ho_rnti(crnti, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -1331,6 +1346,7 @@ int mac_random_access_test()
|
|
|
|
phy.set_log(&phy_log);
|
|
|
|
phy.set_log(&phy_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rlc_dummy rlc(&rlc_log);
|
|
|
|
rrc_dummy rrc;
|
|
|
|
rrc_dummy rrc;
|
|
|
|
|
|
|
|
stack_dummy stack;
|
|
|
|
|
|
|
|
|
|
|
|
// Configure default RACH parameters
|
|
|
|
// Configure default RACH parameters
|
|
|
|
asn1::rrc::rach_cfg_common_s rach_cfg = {};
|
|
|
|
asn1::rrc::rach_cfg_common_s rach_cfg = {};
|
|
|
@ -1344,7 +1360,7 @@ int mac_random_access_test()
|
|
|
|
|
|
|
|
|
|
|
|
// Configure MAC
|
|
|
|
// Configure MAC
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac mac(&mac_log);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers);
|
|
|
|
mac.init(&phy, &rlc, &rrc, &timers, &stack);
|
|
|
|
srslte::mac_cfg_t mac_cfg;
|
|
|
|
srslte::mac_cfg_t mac_cfg;
|
|
|
|
set_mac_cfg_t_rach_cfg_common(&mac_cfg, rach_cfg);
|
|
|
|
set_mac_cfg_t_rach_cfg_common(&mac_cfg, rach_cfg);
|
|
|
|
mac.set_config(mac_cfg);
|
|
|
|
mac.set_config(mac_cfg);
|
|
|
|