pcu: Introduce test TC_mcs_max_dl

Change-Id: If6c58cc18b537c4a1354f1b8263db8321347fbd7
changes/28/21128/6
Pau Espin 2 years ago
parent 454d792388
commit 1b9aa78ee0
  1. 65
      pcu/PCU_Tests.ttcn

@ -868,14 +868,25 @@ testcase TC_cs_initial_dl() runs on RAW_PCU_Test_CT {
}
/* Verify scheduling of multiple Downlink data blocks, enough to reach CS4 */
function f_dl_data_exp_cs(template CodingScheme exp_cs := ?) runs on RAW_PCU_Test_CT {
var octetstring data := f_rnd_octstring(1000);
function f_dl_data_exp_cs(template CodingScheme exp_final_cs := ?, template MSRadioAccessCapabilityV_BSSGP ms_racap := omit) runs on RAW_PCU_Test_CT {
var octetstring data := f_rnd_octstring(1400);
var RlcmacDlBlock prev_dl_block, dl_block;
var uint32_t ack_fn;
var uint32_t fn;
var GprsMS ms;
var integer tx_data_remain := 5;
var integer tx_data_remain := 10;
var integer bsn := 0;
var boolean using_egprs := f_rlcmac_cs_mcs_is_mcs(valueof(exp_final_cs));
var integer bsn_mod;
var template CodingScheme exp_tmp_csmcs;
if (using_egprs) {
exp_tmp_csmcs := mcs_egprs_any;
bsn_mod := 2048;
} else {
exp_tmp_csmcs := cs_gprs_any;
bsn_mod := 128;
}
/* Establish BSSGP connection to the PCU */
f_bssgp_establish();
@ -884,14 +895,14 @@ function f_dl_data_exp_cs(template CodingScheme exp_cs := ?) runs on RAW_PCU_Tes
f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
/* SGSN sends some DL data, PCU will page on CCCH (PCH) */
BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data));
BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data, ms_racap));
f_ms_exp_dl_tbf_ass_ccch(ms, PCU_IF_SAPI_PCH);
/* Wait timer X2002 and DL block is available after CCCH IMM ASS */
f_sleep(X2002);
for (var integer i := 0; i < 250; i := i + 1) {
bsn := i mod 128;
for (var integer i := 0; i < 800; i := i + 1) {
bsn := i mod bsn_mod;
f_rx_rlcmac_dl_block(dl_block, fn);
if (match(dl_block, tr_RLCMAC_DUMMY_CTRL)) {
@ -899,15 +910,15 @@ function f_dl_data_exp_cs(template CodingScheme exp_cs := ?) runs on RAW_PCU_Tes
break;
}
f_rlcmac_dl_block_exp_data(dl_block, ?, bsn, cs_gprs_any);
f_rlcmac_dl_block_exp_data(dl_block, ?, bsn, exp_tmp_csmcs);
/* Keep Ack/Nack description updated */
f_acknackdesc_ack_block(ms.dl_tbf.acknack_desc, dl_block);
f_dltbf_ack_block(ms.dl_tbf, dl_block);
/* TDMA frame number on which we are supposed to send the ACK */
if (dl_block.data.mac_hdr.mac_hdr.rrbp_valid) {
if (f_dl_block_rrbp_valid(dl_block)) {
ack_fn := f_dl_block_ack_fn(dl_block, fn);
f_ms_tx_ul_block(ms, ts_RLCMAC_DL_ACK_NACK(ms.dl_tbf.tfi, ms.dl_tbf.acknack_desc), ack_fn);
f_ms_tx_ul_block(ms, f_dltbf_ts_RLCMAC_DL_ACK_NACK(ms.dl_tbf, using_egprs), ack_fn);
if (tx_data_remain != 0) {
/* Submit more data from time to time to keep the TBF ongoing */
BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data));
@ -917,8 +928,8 @@ function f_dl_data_exp_cs(template CodingScheme exp_cs := ?) runs on RAW_PCU_Tes
prev_dl_block := dl_block;
}
bsn := (bsn + 127) mod 128; /* previous bsn: bsn -1 */
f_rlcmac_dl_block_exp_data(prev_dl_block, ?, bsn, exp_cs);
bsn := (bsn + (bsn_mod-1)) mod bsn_mod; /* previous bsn: bsn -1 */
f_rlcmac_dl_block_exp_data(prev_dl_block, ?, bsn, exp_final_cs);
f_shutdown(__BFILE__, __LINE__, final := true);
@ -1150,6 +1161,35 @@ testcase TC_mcs_initial_dl() runs on RAW_PCU_Test_CT {
f_shutdown(__BFILE__, __LINE__, final := true);
}
/* Verify DL MCS above "mcs max" set by VTY is never used */
testcase TC_mcs_max_dl() runs on RAW_PCU_Test_CT {
/* Initialize NS/BSSGP side */
f_init_bssgp();
/* Initialize GPRS MS side */
f_init_gprs_ms();
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename());
/* Set maximum allowed DL CS to 3 */
g_mcs_initial_dl := 1;
g_mcs_max_dl := 3;
f_pcuvty_set_allowed_cs_mcs();
f_pcuvty_set_link_quality_ranges();
var MultislotCap_GPRS_BSSGP mscap_gprs := {
gprsmultislotclass := '00011'B,
gprsextendeddynalloccap := '0'B
};
var MultislotCap_EGPRS_BSSGP mscap_egprs := {
egprsmultislotclass := '00011'B,
egprsextendeddynalloccap := '0'B
};
var MSRadioAccessCapabilityV_BSSGP ms_racap := { valueof(ts_RaCapRec_BSSGP('0001'B /* E-GSM */, mscap_gprs, mscap_egprs)) };
f_dl_data_exp_cs(f_rlcmac_block_int2cs_mcs(g_mcs_max_dl, true), ms_racap);
}
/* Verify PCU drops TBF after some time of inactivity. */
testcase TC_t3169() runs on RAW_PCU_Test_CT {
var PCUIF_info_ind info_ind;
@ -3392,6 +3432,7 @@ control {
execute( TC_mcs_initial_ul() );
execute( TC_mcs_max_ul() );
execute( TC_mcs_initial_dl() );
execute( TC_mcs_max_dl() );
execute( TC_t3169() );
execute( TC_t3193() );
execute( TC_countdown_procedure() );

Loading…
Cancel
Save