GPRS_Components: ensure cyclic RA in f_init_gprs_ms()

Change-Id: I9896bb6bf1ceb592bae22139bf48c6aa7c0265bd
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index f48eae1..d6abf6d 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -169,7 +169,7 @@
 	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 @@
 		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 };
 	}