AM stands for “Acknowledge Mode”.
In AM mode, RLC adds protocol header to the RLC SDU and if necessary, the RLC SDU can be segmented and then protocol header is updated.
AM mode expects ACK/NACK from the other party.
AM supports ARQ transmission. When the size of retransmitted RLC SDU does not match the size indicated by the MAC, the RLC SDDU can be divided or re-segmented.
From the image below, there are 2 additional elements when compared to UM mode i.e:
1. Retransmission buffer
2. RLC control.
After RLC PDU has been transmitted, a similar copy will be stored in Retransmission buffer. If the RLC get NACK or does not get any positive response, then the RLC packet from Retransmission buffer will be transmitted again.
If RLC gets an ACK, then that packet will be discarded.
iamge 125
AM Data Transfer Procedure
State variables for Transmitting AM entity
TX_Next_Ack: This variable points to the smallest SN expected to receive ACK. Example, if AMD PDU 1, 2, 3, 4. We receive positive ACK for 1, 2, 3, and then send AMD PDU 5, and receive +ve ACk for SN 5, but did not receive +ve ack for SN 4, then this variable will hold SH = 4.
TX_Next : This variable points to the SN of the AMD PDU to be constructed next.
POLL_SN: This variable is the largest SN in all AMD PDUs sent to the MAC layer.
State variables for Receiving AM entity
RX_Next : This variable points to the SN+1 that has been correctly received. Example if SN = 1, 2, 3 has been received and instead of SN=4, it receives SN=5, RX_Next will be 4, because it did not receive correctly.
RX_Next_Status_Trigger : This variable points to SN+1 that triggers t-Reassembly.
RX_Highest_Status : This variable indicates the highest possible SN that can be indicated by ACK_SN when constructing STATUS PDU.
RX_Next_Highest : This variable points to the largest SN+1 among all received RLC SDUs.
AM transmit operations
The transmitting side of AM RLC entity will prioritize the transmission as below:
1. RLC control PDUs over AMD PDUs
2. AMD PDUs containing previously transmitted RLC SDUs or RLC SDU segments
3. New AMD PDUs
The sender will maintain a transmitting window according to the state variable “TX_Next_Ack”: TX_Next_Ack <= SN < TX_Next_Ack + AM_Window_Size
AMD PDU falls outside this window will not be transmitted.
So it means that TX_Next_Ack is the lower boundary of the sending window.
When AM entity receives an RLC SDDU from upperlayer, then it will assign SN = TX_Next and construct AMD PDU with that SN. Then Increment TX_Next by one.
Then an AM RLC entity can receive +ve ack from the peer RLC entity by STATUS PDU and informs the upper layer of successful delivery of the RLC SDU.
Then set TX_Next_Ack equal to the SN of the RLC SDU with the smallest SN, whose SN falls within the range TX_Next_Ack <= SN <= TX_Next and for which a positive acknowledgment has not been received yet.
AM Receive operations
he receiving end will maintain a receiving window according to the state variable RX_Next as follows:
RX_Next <= SN < RX_Next + AM_Window_Size
So any AMD DPU received that is not in the receiving window or a duplicate SN, then it will be discarded.
else
AMD PDU containing the RLC SDU segment is placed in reception buffer.
Image 133
In the above image, SN = 0, 1, 2 and 4 have been received correctly. RX_Next = 3 and window size is 4. So the window range will be [3, 7). If we receive SN<3 and SN >=7 they will be discarded.
Actions when an AMD PDU is placed in the reception buffer
When an AMD PDU with SN = x is placed in the reception buffer,
If all the bytes for the RLC SDU with SN = x is received, then reassemble and remove RLC headers and deliver to upper layer.
Update RX_Next_Highest to x+ 1.
Then update RX_Highest_Status and RX_Next accordingly.
Start and stop of t-Reassembly timer
Start condition:
1. RX_Next_Highest> RX_Next +1
2. RX_Next_Highest = RX_Next + 1 and there is at least one missing byte segment of the SDU associated with SN = RX_Next before the last byte of all received segments of this SDU
Stop condition:
1. RX_Next_Status_Trigger = RX_Next;
2. RX_Next_Status_Trigger = RX_Next + 1 and there is no missing byte segment of the SDU associated with SN = RX_Next before the last byte of all received segments of this SDU
3. RX_Next_Status_Trigger falls outside of the receiving window and RX_Next_Status_Trigger is not equal to RX_Next + AM_Window_Size:
Actions when t-Reassembly expires
When t-Reassembly expires, the receiving side of an AM RLC entity shall:
1. update RX_Highest_Status to the SN of the first RLC SDU with SN >= RX_Next_Status_Trigger for which not all bytes have been received;
2. Start t-Reassembly timer if below conditions are met:
RX_Next_Highest> RX_Highest_Status +1: or
RX_Next_Highest = RX_Highest_Status + 1 and SN = RX_Highest_Status RLC SDU has not been collected.
RLC AM PDU
Data/Control (D/C) field
Polling bit (P) field
Segment Offset (SO) field
Segmentation Info (SI) field
Sequence Number (SN) field
Reserved (R) field
Control PDU Type (CPT) field
MD PDU consists of a Data field and an AMD PDU header. It means all AMD PDU will have a D/C field.
An AMD PDU header contains the SO field only when the
Data field consists of an RLC SDU segment which is not the first segment, in which case a 16 bit SO is present.
1. Below AMD PDU doesnot carry SO. So it means that this PDU is a non segmented PDU or the first segment of Segmented SDU.
2. Below AMD PDU carries SO as shown below:
STATUS PDU
Status PDU is sued to carry information like ACK sequence number, NACK sequence number or the location of the NACK in the unit of bytes.
Source TS 38.322