Fixed the check for msg3 delay to account for retxs

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent 5330249625
commit afd7ea9e83

@ -140,6 +140,11 @@ int test_scell_activation(test_scell_activation_params params)
generator.step_tti();
generator.add_dl_data(rnti1, msg4_size);
tester.test_next_ttis(generator.tti_events);
while (not tester.ue_tester->get_user_state(rnti1)->msg4_tic.is_valid() or
tester.ue_tester->get_user_state(rnti1)->msg4_tic.tti_rx() > generator.tti_counter) {
generator.step_tti();
tester.test_next_ttis(generator.tti_events);
}
// Event (20 TTIs): Data back and forth
auto generate_data = [&](uint32_t nof_ttis, float prob_dl, float prob_ul, float rand_exp) {

@ -471,8 +471,9 @@ int user_state_sched_tester::test_ra(uint32_t enb_
// Msg3 scheduled. No UL alloc allowed unless it is a newtx (the Msg3 itself)
for (uint32_t i = 0; i < ul_result.nof_dci_elems; ++i) {
// Needs PDCCH - filters out UL retxs
CONDERROR(ul_result.pusch[i].needs_pdcch and ul_result.pusch[i].dci.rnti == rnti,
"No UL newtxs allowed before user received Msg4\n");
bool msg3_retx = ((tic_tx_ul - userinfo.msg3_tic) % (FDD_HARQ_DELAY_UL_MS + FDD_HARQ_DELAY_DL_MS)) == 0;
CONDERROR(ul_result.pusch[i].dci.rnti == rnti and not msg3_retx,
"No UL txs allowed except for Msg3 before user received Msg4\n");
}
} else if (not userinfo.msg3_tic.is_valid()) {
// Not Msg3 sched TTI
@ -737,6 +738,8 @@ int common_sched_tester::process_ack_txs()
tester_log->info(
"DL ACK tti=%u rnti=0x%x pid=%d\n", tti_info.tti_params.tti_rx, dl_ack.rnti, dl_ack.dl_harq.get_id());
} else {
tester_log->info(
"DL NACK tti=%u rnti=0x%x pid=%d\n", tti_info.tti_params.tti_rx, dl_ack.rnti, dl_ack.dl_harq.get_id());
CONDERROR(h.is_empty() and hack.nof_retx(0) + 1 < hack.max_nof_retx(), "NACKed DL harq got emptied\n");
}
}
@ -765,6 +768,7 @@ int common_sched_tester::process_ack_txs()
tester_log->info("UL ACK tti=%u rnti=0x%x pid=%d\n", tti_info.tti_params.tti_rx, ul_ack.rnti, hack.get_id());
} else {
// NACK
tester_log->info("UL NACK tti=%u rnti=0x%x pid=%d\n", tti_info.tti_params.tti_rx, ul_ack.rnti, hack.get_id());
CONDERROR(!h->is_empty() and !h->has_pending_retx(), "If NACKed, UL harq has to have pending retx\n");
CONDERROR(h->is_empty() and hack.nof_retx(0) + 1 < hack.max_nof_retx(), "Nacked UL harq did get emptied\n");
}

Loading…
Cancel
Save