aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-14 15:16:40 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-15 13:29:10 +0200
commit45b664b8af4683990a2f221011b4d88284619690 (patch)
tree67af87b6b09014f3d6d043555483678cd739d70c
parent2ec84fd0e5886c2b216d82d2903fcb5e0978bc79 (diff)
pcu: Support decoding Egprs Pkt Ul Ass on PDCH
-rw-r--r--library/RLCMAC_CSN1_Templates.ttcn55
-rw-r--r--library/RLCMAC_CSN1_Types.ttcn68
-rw-r--r--library/RLCMAC_Templates.ttcn21
-rw-r--r--pcu/PCU_Tests.ttcn5
4 files changed, 131 insertions, 18 deletions
diff --git a/library/RLCMAC_CSN1_Templates.ttcn b/library/RLCMAC_CSN1_Templates.ttcn
index 2c1bc049..772df137 100644
--- a/library/RLCMAC_CSN1_Templates.ttcn
+++ b/library/RLCMAC_CSN1_Templates.ttcn
@@ -167,27 +167,54 @@ module RLCMAC_CSN1_Templates {
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 447e52b3..d4c6efd1 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -233,6 +233,16 @@ module RLCMAC_CSN1_Types {
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 @@ module RLCMAC_CSN1_Types {
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 0bd97923..be751d7b 100644
--- a/library/RLCMAC_Templates.ttcn
+++ b/library/RLCMAC_Templates.ttcn
@@ -429,7 +429,8 @@ module RLCMAC_Templates {
persistence_levels := *,
identity := ?,
is_egprs := ?, /* msg escape */
- gprs := *
+ gprs := *,
+ egprs := *
}
}
}
@@ -443,7 +444,23 @@ module RLCMAC_Templates {
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 5b822bb6..18189fa7 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -250,9 +250,12 @@ runs on RAW_PCU_Test_CT return uint5_t {
} 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__);