Change in ...osmo-ttcn3-hacks[master]: PCU_Tests_RAW.ttcn: introduce TC_ta_init_prach to test initial TA

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Thu Sep 5 00:15:06 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15410


Change subject: PCU_Tests_RAW.ttcn: introduce TC_ta_init_prach to test initial TA
......................................................................

PCU_Tests_RAW.ttcn: introduce TC_ta_init_prach to test initial TA

Change-Id: I21f76ae723519c0eb54515922a05ca8045b00ade
---
M library/GSM_RR_Types.ttcn
M pcu/PCU_Tests_RAW.ttcn
2 files changed, 68 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/15410/1

diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn
index 457f0f5..987f808 100644
--- a/library/GSM_RR_Types.ttcn
+++ b/library/GSM_RR_Types.ttcn
@@ -589,7 +589,8 @@
 		/* TODO: starting time TLV */
 		IaRestOctets			rest_octets optional
 	} with { variant (chan_desc) "PRESENCE(ded_or_tbf.tbf = false)"
-		 variant (pkt_chan_desc) "PRESENCE(ded_or_tbf.tbf = true)" };
+		 variant (pkt_chan_desc) "PRESENCE(ded_or_tbf.tbf = true)"
+		 variant "PADDING(184), PADDING_PATTERN('00101011'B)" };
 
 	/* 9.1.20 */
 	type record ReqRefWaitInd {
@@ -766,6 +767,31 @@
 		}
 	};
 
+	template GsmRrMessage tr_IMM_TBF_ASS(template boolean dl := ?,
+					     template uint8_t ra := ?,
+					     template GsmFrameNumber fn := ?,
+					     template TimingAdvance ta := ?,
+					     template PacketChannelDescription ch_desc := ?,
+					     template IaRestOctets rest := ?) := {
+		header := t_RrHeader(IMMEDIATE_ASSIGNMENT, ?),
+		payload := {
+			imm_ass := {
+				ded_or_tbf := {
+					spare := ?,
+					tma := ?,
+					downlink := dl,
+					tbf := true
+				},
+				page_mode := PAGE_MODE_NORMAL,
+				chan_desc := omit,
+				pkt_chan_desc := ch_desc,
+				req_ref := tr_compute_ReqRef(ra, fn),
+				timing_advance := ta,
+				mobile_allocation := ?,
+				rest_octets := rest
+			}
+		}
+	};
 
 	template (value) GsmRrL3Message ts_MEAS_REP(boolean valid, uint6_t rxl_f, uint6_t rxl_s,
 						  uint3_t rxq_f, uint3_t rxq_s,
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 4732da6..03d914c 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -438,6 +438,44 @@
 	setverdict(pass);
 }
 
+/* Test of correct Timing Advance at the time of TBF establishment
+ * (derived from timing offset during PRACH request). */
+testcase TC_ta_init_prach() runs on RAW_Test_CT {
+	/* Initialize NS codec
+	 * TODO: do we really need it? */
+	f_init_ns_codec();
+
+	/* Initialize PCU interface (emulate the BTS) */
+	f_init_pcuif();
+
+	/* Packet Immediate Assignment on AGCH */
+	var template PCUIF_Message data_req_tpl := tr_PCUIF_DATA_REQ(
+		bts_nr := 0, trx_nr := 0, ts_nr := 0,
+		sapi := PCU_IF_SAPI_AGCH);
+
+	for (var integer ta := 0; ta < 64; ta := ta + 16) {
+		/* Send an Access Burst (8-bit)
+		 * FIXME: properly encode RA,
+		 * HACK: we're using the same TDMA FN */
+		f_pcuif_tx(ts_PCUIF_RACH_IND(bts_nr := 0, ra := oct2int('3A'O), is_11bit := 0,
+					     burst_type := BURST_TYPE_0,
+					     fn := 1337, arfcn := 871,
+					     qta := ta * 4));
+
+		/* Expect Immediate (TBF) Assignment on TS0/AGCH */
+		data_req_tpl.u.data_req.data := decmatch tr_IMM_TBF_ASS(
+			dl := false, ra := oct2int('3A'O), fn := 1337, ta := ta);
+		alt {
+		[] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, data_req_tpl)) {
+			log("Rx Immediate Assignment for UL TBF");
+			setverdict(pass);
+			}
+		[] PCU.receive(t_SD_PCUIF(g_pcu_conn_id, PCUIF_Message:?)) {
+			repeat;
+			}
+		}
+	}
+}
 
 control {
 	execute( TC_ns_reset() );
@@ -450,6 +488,9 @@
 	execute( TC_ns_so_block() );
 
 	execute( TC_pcuif_suspend() );
+
+	/* Timing Advance tests (see GSM TS 43.064, section 6) */
+	execute( TC_ta_init_prach() );
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15410
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I21f76ae723519c0eb54515922a05ca8045b00ade
Gerrit-Change-Number: 15410
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190905/cb1cd69a/attachment.htm>


More information about the gerrit-log mailing list