GPRS_Components: ensure cyclic RA in f_init_gprs_ms()

Change-Id: I9896bb6bf1ceb592bae22139bf48c6aa7c0265bd
This commit is contained in:
Vadim Yanitskiy 2020-10-31 21:23:08 +07:00
parent 1cea9fdcb7
commit 7942580e23
1 changed files with 10 additions and 1 deletions

View File

@ -169,7 +169,7 @@ type component MS_BTS_IFACE_CT {
var uint4_t g_bs_cv_max := 4;
}
/* Generate a list of GprsMS (unique IMSI/TLLI) of the given size */
/* Generate a list of GprsMS (unique IMSI/TLLI, cyclic RA) of the given size */
function f_init_gprs_ms(integer num_ms := 1, template (value) GprsMS t_ms := t_GprsMS_def)
runs on MS_BTS_IFACE_CT {
for (var integer i := 0; i < num_ms; i := i + 1 ) {
@ -179,6 +179,15 @@ runs on MS_BTS_IFACE_CT {
ms.imsi := f_gen_imsi(i + 1);
ms.tlli := int2oct(i + 1, 4);
/* Ensure different RA for siblings */
if (ms.ra == bit2int(chan_req_def)) {
/* 01111 { 0xx | x0x | xx0 } */
f_ms_use_ra(ms, ms.ra + (i mod 7));
} else if (ms.ra == bit2int(chan_req_sb)) {
/* 01110xxx */
f_ms_use_ra(ms, ms.ra + (i mod 8));
}
/* Append to the global list */
g_ms := g_ms & { ms };
}