Change in osmo-ttcn3-hacks[master]: pcu: Support decoding Egprs Pkt Ul Ass on PDCH

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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu May 14 13:20:55 UTC 2020


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


Change subject: pcu: Support decoding Egprs Pkt Ul Ass on PDCH
......................................................................

pcu: Support decoding Egprs Pkt Ul Ass on PDCH

Change-Id: I30fb98aab67303997b803a0359ffc2e0b65ebf01
---
M library/RLCMAC_CSN1_Templates.ttcn
M library/RLCMAC_CSN1_Types.ttcn
M library/RLCMAC_Templates.ttcn
M pcu/PCU_Tests.ttcn
4 files changed, 131 insertions(+), 18 deletions(-)



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

diff --git a/library/RLCMAC_CSN1_Templates.ttcn b/library/RLCMAC_CSN1_Templates.ttcn
index 2c1bc04..772df13 100644
--- a/library/RLCMAC_CSN1_Templates.ttcn
+++ b/library/RLCMAC_CSN1_Templates.ttcn
@@ -167,27 +167,54 @@
 		return '1'B;
 	}
 
-	template PktUlAssGprs tr_PktUlAssGprsDynamic(template uint5_t tfi := ?) := {
+	template DynamicAllocation tr_DynamicAllocation(template uint5_t tfi:= ?) := {
+		extd_dyn_alloc := ?,
+		p0_present := ?,
+		p0 := *,
+		pr_mode := *,
+		usf_granularity := ?,
+		ul_tfi_ass_present := f_presence_bit_tfi(tfi),
+		ul_tfi_assignment := tfi,
+		reserved := '0'B,
+		tbf_starting_time_present := ?,
+		tbf_starting_time := *,
+		ts_allocation := ?
+	};
+
+	template PktUlAssGprs tr_PktUlAssGprsDynamic(template DynamicAllocation dyn_alloc := ?) := {
 		ch_coding_cmd := ?,
 		tlli_block_chan_coding := ?,
 		pkt_ta := ?,
 		freq_par_present := ?,
 		freq_par := *,
 		alloc_present := '01'B,
-		dyn_block_alloc := {
-			extd_dyn_alloc := ?,
-			p0_present := ?,
-			p0 := *,
-			pr_mode := *,
-			usf_granularity := ?,
-			ul_tfi_ass_present := f_presence_bit_tfi(tfi),
-			ul_tfi_assignment := tfi,
-			reserved := '0'B,
-			tbf_starting_time_present := ?,
-			tbf_starting_time := *,
-			ts_allocation := ?
-			},
+		dyn_block_alloc := dyn_alloc,
 		sgl_block_alloc := omit
 	};
 
+	template PktUlAssEgprs tr_PktUlAssEgprsDynamic(template DynamicAllocation dyn_alloc := ?) := {
+		dual_carrier := '00'B,
+		tlli_present := ?,
+		tlli := *,
+		compact_reduced_ma_present := ?,
+		compact_reduced_ma := *,
+		chan_coding_cmd := ?,
+		resegment := ?,
+		window_size := ?,
+		ats_present := ?,
+		ats := *, /* ? */
+		arac_retrans_req := ?,
+		tlli_block_chan_coding := ?,
+		bep_period2_present := ?,
+		bep_period2 := *,
+		pkt_ta := ?,
+		pkt_ext_ta_present := ?,
+		pkt_ext_ta := *,
+		freq_par_present := ?,
+		freq_par := *,
+		alloc_present := ?,
+		dyn_block_alloc := dyn_alloc,
+		multi_block_alloc := omit
+	};
+
 } with { encode "RAW"; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" };
diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn
index 447e52b..a74789d 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -233,6 +233,16 @@
 		variant (dyn_block_alloc) "PRESENCE(alloc_present = '01'B)"
 		variant (sgl_block_alloc) "PRESENCE(alloc_present = '10'B)"
 	};
+	type record COMPACTreducedMA {
+		uint7_t		ma_bitmap_length,
+		bitstring	ma_bitmap,
+		BIT1		maio_2_present,
+		BIT6		maio_2
+	} with {
+		variant (ma_bitmap_length) "LENGTHTO (ma_bitmap)"
+		variant (ma_bitmap_length) "UNIT(bits)"
+		variant (maio_2) "PRESENCE(maio_2_present = '1'B)"
+	};
 	type record of AccessTechnologiesRequest AccessTechnologiesRequestRepetition
 	with { variant "EXTENSION_BIT(reverse)" };
 	type record AccessTechnologiesRequest
@@ -240,16 +250,72 @@
 		BIT4	accessTechnType,
 		BIT1    extensionBit
 	} with { variant "FIELDORDER(msb)" };
+	type record MultiBlockAllocation {
+		uint3_t			timeslot_nr,
+		BIT1			alpha_gamma_present,
+		uint4_t			alpha optional,
+		uint5_t			gamma_tn optional,
+		BIT1			p0_present,
+		uint4_t			p0 optional,
+		BIT1			reserved ('0'B) optional,
+		BIT1			pr_mode optional,
+		StartingFnDesc		tbf_starting_time,
+		uint2_t			num_radio_blocks_alloc
+	} with {
+		variant (alpha)		"PRESENCE(alpha_gamma_present = '1'B)"
+		variant (gamma_tn)		"PRESENCE(alpha_gamma_present = '1'B)"
+		variant (p0)		"PRESENCE(p0_present = '1'B)"
+		variant (reserved)	"PRESENCE(p0_present = '1'B)"
+		variant (pr_mode)	"PRESENCE(p0_present = '1'B)"
+	};
+	type record PktUlAssEgprs {
+		BIT2			dual_carrier('00'B), /*TODO 01       -- Message escape for dual carrier, RTTI, BTTI with FANR activated, EGPRS2 */
+		BIT1			tlli_present,
+		GprsTlli		tlli optional,
+		BIT1			compact_reduced_ma_present,
+		COMPACTreducedMA	compact_reduced_ma optional,
+		EgprsChCodingCommand	chan_coding_cmd,
+		BIT1			resegment,
+		EgprsWindowSize		window_size,
+		BIT1			ats_present,
+		AccessTechnologiesRequestRepetition ats optional, /* ? */
+		BIT1			arac_retrans_req,
+		BIT1			tlli_block_chan_coding,
+		BIT1			bep_period2_present,
+		BIT4			bep_period2 optional,
+		PacketTimingAdvance	pkt_ta,
+		BIT1			pkt_ext_ta_present,
+		BIT2			pkt_ext_ta optional,
+		BIT1			freq_par_present,
+		FrequencyParameters	freq_par optional,
+		BIT2			alloc_present,
+		DynamicAllocation	dyn_block_alloc optional,
+		MultiBlockAllocation	multi_block_alloc optional
+		/* TODO: Additions for Rel-5  and more */
+	} with {
+		variant (tlli) "PRESENCE(tlli_present = '1'B)"
+		variant (compact_reduced_ma) "PRESENCE(compact_reduced_ma_present = '1'B)"
+		variant (ats) "PRESENCE(ats_present = '1'B)"
+		variant (bep_period2) "PRESENCE(bep_period2_present = '1'B)"
+		variant (pkt_ext_ta) "PRESENCE(pkt_ext_ta_present = '1'B)"
+		variant (freq_par) "PRESENCE(freq_par_present = '1'B)"
+		variant (dyn_block_alloc) "PRESENCE(alloc_present = '01'B)"
+		variant (multi_block_alloc) "PRESENCE(alloc_present = '10'B)"
+	};
 	type record PacketUlAssignment {
 		PageMode		page_mode,
 		BIT1			persistence_levels_present,
 		PersistenceLevels	persistence_levels optional,
 		PktUlAssUnion		identity,
 		BIT1			is_egprs,	/* msg escape */
-		PktUlAssGprs		gprs optional
+		PktUlAssGprs		gprs optional,
+		PktUlAssEgprs		egprs optional
+		/* TODO: Table 11.2.29.1: PACKET UPLINK ASSIGNMENT information elements
+			https://www.etsi.org/deliver/etsi_ts/144000_144099/144060/09.03.00_60/ts_144060v090300p.pdf */
 	} with {
 		variant (persistence_levels) "PRESENCE(persistence_levels_present = '1'B)"
 		variant (gprs) "PRESENCE(is_egprs = '0'B)"
+		variant (egprs) "PRESENCE(is_egprs = '1'B)"
 	};
 
 	/* 11.2.10 Packet Paging Request */
diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn
index 0bd9792..be751d7 100644
--- a/library/RLCMAC_Templates.ttcn
+++ b/library/RLCMAC_Templates.ttcn
@@ -429,7 +429,8 @@
 						persistence_levels := *,
 						identity := ?,
 						is_egprs := ?,  /* msg escape */
-						gprs := *
+						gprs := *,
+						egprs := *
 					}
 				}
 			}
@@ -443,7 +444,23 @@
 				u := {
 					ul_assignment := {
 						is_egprs := '0'B,
-						gprs := gprs
+						gprs := gprs,
+						egprs := omit
+					}
+				}
+			}
+		}
+	}
+
+	template RlcmacDlBlock tr_RLCMAC_UL_PACKET_ASS_EGPRS(template uint3_t usf := ?, template PktUlAssEgprs egprs := ?)
+		modifies tr_RLCMAC_UL_PACKET_ASS := {
+		ctrl := {
+			payload := {
+				u := {
+					ul_assignment := {
+						is_egprs := '1'B,
+						gprs := omit,
+						egprs := egprs
 					}
 				}
 			}
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 5b822bb..18189fa 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -250,9 +250,12 @@
 	} else if (ischosen(dl_block.data_egprs)) {
 		return dl_block.data_egprs.mac_hdr.tfi;
 	} else { /* Ctrl block */
-		if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_GPRS(?, tr_PktUlAssGprsDynamic(?)))) {
+		if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_GPRS(?, tr_PktUlAssGprsDynamic(tr_DynamicAllocation(?))))) {
 			return dl_block.ctrl.payload.u.ul_assignment.gprs.dyn_block_alloc.ul_tfi_assignment;
 		}
+		if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_EGPRS(?, tr_PktUlAssEgprsDynamic(tr_DynamicAllocation(?))))) {
+			return dl_block.ctrl.payload.u.ul_assignment.egprs.dyn_block_alloc.ul_tfi_assignment;
+		}
 	}
 	setverdict(fail, "DlBlock doesn't contain a TFI:", dl_block);
 	f_shutdown(__BFILE__, __LINE__);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252
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: I30fb98aab67303997b803a0359ffc2e0b65ebf01
Gerrit-Change-Number: 18252
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200514/3ada2639/attachment.htm>


More information about the gerrit-log mailing list