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

2019-09-20 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15410 )

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


Patch Set 9:

I like the test case, but I think we shouldn't redefine acronyms that already 
have a meaning in the context of 3GPP specs/systems.  "PRACH" is a specific 
logical channel, and we're not testing it here.  We're testing a RACH for 
packet switched services, right?


--
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: 9
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 20 Sep 2019 15:33:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


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

2019-09-19 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15410 )

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


Patch Set 9: Code-Review+2


--
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: 9
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 19 Sep 2019 08:32:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2019-09-18 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15410 )

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


Patch Set 9:

This change is ready for review.


--
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: 9
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 18 Sep 2019 21:17:47 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


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

2019-09-04 Thread fixeria
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 */
IaRestOctetsrest_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, vis