Add initial support for Packet Uplink Ack/nack EGPRS Struct

Some stuff like EGPRS Ack/Nack description is still not implemented, but
it's enouh for now to be able to match against this kind of ACK blocks.

Change-Id: I8066fba0e71911f0c6344c1540a501f1853daa7f
This commit is contained in:
Pau Espin 2020-05-17 00:25:37 +02:00 committed by laforge
parent aedc51186b
commit 692222cb99
4 changed files with 102 additions and 21 deletions

View File

@ -217,4 +217,32 @@ module RLCMAC_CSN1_Templates {
multi_block_alloc := omit
};
template UlAckNackGprs tr_UlAckNackGprs(template GprsTlli tlli := *) := {
ch_coding_cmd := ?,
ack_nack_desc := ?,
cont_res_tlli_present := ?,
cont_res_tlli := tlli,
pkt_ta_present := ?,
pkt_ta := *,
pwr_ctrl_present := ?,
pwr_ctrl := *
};
template UlAckNackEgprs tr_UlAckNackEgprs(template GprsTlli tlli := *) := {
ch_coding_cmd := ?,
resegment := ?,
preemptive_tx := ?,
prr_retrans_req := ?,
arac_retrans_req := ?,
cont_res_tlli_present := ?,
cont_res_tlli := tlli,
tbf_est := ?,
pkt_ta_present := ?,
pkt_ta := *,
pkt_ext_ta_present := ?,
pkt_ext_ta := *,
pwr_ctrl_present := ?,
pwr_ctrl := *
};
} with { encode "RAW"; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" };

View File

@ -395,14 +395,44 @@ module RLCMAC_CSN1_Types {
variant (pwr_ctrl) "PRESENCE(pwr_ctrl_present = '1'B)"
variant (cont_res_tlli) "BYTEORDER(first)"
};
type record UlAckNackEgprs {
EgprsChCodingCommand ch_coding_cmd,
BIT1 resegment,
BIT1 preemptive_tx,
BIT1 prr_retrans_req,
BIT1 arac_retrans_req,
BIT1 cont_res_tlli_present,
GprsTlli cont_res_tlli optional,
BIT1 tbf_est,
BIT1 pkt_ta_present,
PacketTimingAdvance pkt_ta optional,
BIT1 pkt_ext_ta_present,
BIT2 pkt_ext_ta optional,
BIT1 pwr_ctrl_present,
PowerControlParameters pwr_ctrl optional
/* TODO: TS 44.060 12.3.1 EGPRS Ack/Nack Description */
/* EgprsAckNackDescription ack_nack_desc, */
/* BIT1 not_used('0'B) */
/* TODO: Extension Bits, Rel5 ,... */
} with {
variant (cont_res_tlli) "PRESENCE(cont_res_tlli_present = '1'B)"
variant (pkt_ta) "PRESENCE(pkt_ta_present = '1'B)"
variant (pkt_ext_ta) "PRESENCE(pkt_ext_ta_present = '1'B)"
variant (pwr_ctrl) "PRESENCE(pwr_ctrl_present = '1'B)"
variant (cont_res_tlli) "BYTEORDER(first)"
};
type record PacketUlAckNack {
PageMode page_mode,
BIT2 msg_excape ('00'B),
uint5_t uplink_tfi,
BIT1 is_egprs ('0'B), /* msg escape */
UlAckNackGprs gprs optional
BIT1 is_egprs,
UlAckNackGprs gprs optional,
UlAckNackEgprs egprs optional
/* TODO: EGPRS */
} with { variant (gprs) "PRESENCE(is_egprs = '0'B)" };
} with {
variant (gprs) "PRESENCE(is_egprs = '0'B)"
variant (egprs) "PRESENCE(is_egprs = '1'B)"
};
/* 11.2.8 Packet Downlink Dummy Control Block */
type record PacketDlDummy {

View File

@ -508,7 +508,7 @@ module RLCMAC_Templates {
}
/* Receive Template for Uplink ACK/NACK */
template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK(template uint5_t ul_tfi, template GprsTlli tlli := ?) := {
template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK(template uint5_t ul_tfi) := {
ctrl := {
mac_hdr := {
payload_type := (MAC_PT_RLCMAC_NO_OPT, MAC_PT_RLCMAC_OPT),
@ -524,22 +524,44 @@ module RLCMAC_Templates {
page_mode := ?,
msg_excape := ?,
uplink_tfi := ul_tfi,
is_egprs := '0'B,
gprs := {
ch_coding_cmd := ?,
ack_nack_desc := ?,
cont_res_tlli_present := ?,
cont_res_tlli := tlli,
pkt_ta_present := ?,
pkt_ta := *,
pwr_ctrl_present := ?,
pwr_ctrl := *
}
is_egprs := ?,
gprs := *,
egprs := *
}
}
}
}
}
};
template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK_GPRS(template uint5_t ul_tfi, template UlAckNackGprs gprs := tr_UlAckNackGprs(*))
modifies tr_RLCMAC_UL_ACK_NACK := {
ctrl := {
payload := {
u := {
ul_ack_nack := {
is_egprs := '0'B,
gprs := gprs,
egprs := omit
}
}
}
}
};
template RlcmacDlBlock tr_RLCMAC_UL_ACK_NACK_EGPRS(template uint5_t ul_tfi, template UlAckNackEgprs egprs := tr_UlAckNackEgprs(*))
modifies tr_RLCMAC_UL_ACK_NACK := {
ctrl := {
payload := {
u := {
ul_ack_nack := {
is_egprs := '1'B,
gprs := omit,
egprs := egprs
}
}
}
}
};
template RlcmacDlBlock tr_RLCMAC_PACKET_PAG_REQ(template uint3_t usf := ?) := {
ctrl := {

View File

@ -418,12 +418,13 @@ runs on MS_BTS_IFACE_CT {
var uint32_t dl_fn;
f_rx_rlcmac_dl_block(dl_block, dl_fn);
if (not match(dl_block, tr_RLCMAC_UL_ACK_NACK(ul_tfi := ?, tlli := ?))) {
setverdict(fail, "Failed to match Packet Uplink ACK / NACK");
f_shutdown(__BFILE__, __LINE__);
if (match(dl_block, tr_RLCMAC_UL_ACK_NACK_GPRS(ul_tfi := ?)) or
match(dl_block, tr_RLCMAC_UL_ACK_NACK_EGPRS(ul_tfi := ?))) {
poll_fn := f_rrbp_ack_fn(dl_fn, dl_block.ctrl.mac_hdr.rrbp);
return;
}
poll_fn := f_rrbp_ack_fn(dl_fn, dl_block.ctrl.mac_hdr.rrbp);
setverdict(fail, "Failed to match Packet Uplink ACK / NACK:", dl_block);
f_shutdown(__BFILE__, __LINE__);
}
function f_rx_rlcmac_dl_block_exp_dummy(out RlcmacDlBlock dl_block)