Section: 5.4.2.2 HARQ process
Content: Each HARQ process is associated with a HARQ buffer. For synchronous HARQ, each HARQ process shall maintain a state variable CURRENT_TX_NB, which indicates the number of transmissions that have taken place for the MAC PDU currently in the buffer, and a state variable HARQ_FEEDBACK, which indicates the HARQ feedback for the MAC PDU currently in the buffer. When the HARQ process is established, CURRENT_TX_NB shall be initialized to 0. The sequence of redundancy versions is 0, 2, 3, 1. The variable CURRENT_IRV is an index into the sequence of redundancy versions. This variable is up-dated modulo 4. For serving cells configured with pusch-EnhancementsConfig, BL UEs or UEs in enhanced coverage see clause 8.6.1 in TS 36.213[ Evolved Universal Terrestrial Radio Access (E-UTRA); Physical layer procedures ]  [2] for the sequence of redundancy versions and redundancy version determination. For NB-IoT UEs see clause 16.5.1.2 in TS 36.213[ Evolved Universal Terrestrial Radio Access (E-UTRA); Physical layer procedures ]  [2] for the sequence of redundancy versions and redundancy version determination. For an SPS configuration with totalNumberPUSCH-SPS-STTI-UL-Repetitions or totalNumberPUSCH-SPS-UL-Repetitions (TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [8]), the redundancy version for each transmission within a bundle are determined by rv-SPS-STTI-UL-Repetitions or rv-SPS-UL-Repetitions in the SPS configuration (TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [8]). For NB-IoT UEs, BL UEs or UEs in enhanced coverage for UL_REPETITION_NUMBER for Mode B operation, the same redundancy version is used multiple times before cycling to the next redundancy version as specified in clauses 16.5.1.2, 8.6.1 and 7.1.7.1 in TS 36.213[ Evolved Universal Terrestrial Radio Access (E-UTRA); Physical layer procedures ]  [2]. New transmissions are performed on the resource and with the MCS indicated on PDCCH or Random Access Response. Adaptive retransmissions are performed on the resource and, if provided, with the MCS indicated on PDCCH. Non-adaptive retransmission is performed on the same resource and with the same MCS as was used for the last made transmission attempt. For synchronous HARQ, the MAC entity is configured with a maximum number of HARQ transmissions and a maximum number of Msg3 HARQ transmissions by RRC: maxHARQ-Tx and maxHARQ-Msg3Tx respectively. For transmissions on all HARQ processes and all logical channels except for transmission of a MAC PDU stored in the Msg3 buffer, the maximum number of transmissions shall be set to maxHARQ-Tx. For transmission of a MAC PDU stored in the Msg3 buffer, the maximum number of transmissions shall be set to maxHARQ-Msg3Tx. For autonomous HARQ, each HARQ process shall maintain a state variable HARQ_FEEDBACK, which indicates the HARQ feedback for the MAC PDU currently in the buffer, and a timer aul-RetransmissionTimer which prohibits new transmission or retransmission for the same HARQ process on the configured autonomous uplink when the timer is running. When the HARQ feedback is received for this TB, the HARQ process shall: - set HARQ_FEEDBACK to the received value; - if running, stop the aul-RetransmissionTimer. When an uplink grant addressed to C-RNTI is received for this HARQ process and if the UL HARQ operation is autonomous, the HARQ process shall: - if running, stop the aul-RetransmissionTimer. When PUSCH transmission is performed for this TB and if the uplink grant is a configured grant for the MAC entity's AUL C-RNTI, the HARQ process shall: - start or restart the aul-RetransmissionTimer. If the HARQ entity requests a new transmission, the HARQ process shall: - if UL HARQ operation is synchronous: - set CURRENT_TX_NB to 0; - set HARQ_FEEDBACK to NACK; - set CURRENT_IRV to 0; - else: - if UL HARQ operation is autonomous asychronous: - set HARQ_FEEDBACK to NACK. - if the uplink grant was addressed to the AUL C-RNTI: - set CURRENT_IRV to 0. - else: - set CURRENT_IRV to the index corresponding to the redundancy version value provided in the HARQ information; - store the MAC PDU in the associated HARQ buffer; - store the uplink grant received from the HARQ entity; - generate a transmission as described below. If the HARQ entity requests a retransmission, the HARQ process shall: - if UL HARQ operation is synchronous: - increment CURRENT_TX_NB by 1; - if the HARQ entity requests an adaptive retransmission: - store the uplink grant received from the HARQ entity; - set CURRENT_IRV to the index corresponding to the redundancy version value provided in the HARQ information; - if UL HARQ operation is synchronous; or - if UL HARQ operation is autonomous: - set HARQ_FEEDBACK to NACK; - generate a transmission as described below. - else if the HARQ entity requests a non-adaptive retransmission: - if UL HARQ operation is asynchronous or HARQ_FEEDBACK = NACK: - if both skipUplinkTxSPS and fixedRV-NonAdaptive are configured and the uplink grant of the initial transmission of this HARQ process was performed on a configured grant and UL HARQ operation is not autonomous; or - if the uplink grant is a preallocated uplink grant: - set CURRENT_IRV to 0; - else if UL HARQ operation is autonomous: - set CURRENT_IRV to the index corresponding to the redundancy version value selected by the UE implementation. - generate a transmission as described below. NOTE 1: When receiving a HARQ ACK alone, the MAC entity keeps the data in the HARQ buffer. NOTE 2: When no UL-SCH transmission can be made due to the occurrence of a measurement gap or a Sidelink Discovery Gap for Transmission, or prioritization of V2X sidelink communication transmission described in clause 5.14.1.2.2, no HARQ feedback can be received and a non-adaptive retransmission follows. NOTE 3: For asynchronous HARQ operation, UL retransmissions are triggered only by adaptive retransmission grants, except for retransmissions within a bundle. To generate a transmission, the HARQ process shall: - if the MAC PDU was obtained from the Msg3 buffer; or - if Sidelink Discovery Gaps for Transmission are not configured by upper layers, and there is no measurement gap at the time of the transmission and, in case of retransmission, the retransmission does not collide with a transmission for a MAC PDU obtained from the Msg3 buffer in this TTI; or - if Sidelink Discovery Gaps for Transmission are configured by upper layers, and there is no measurement gap at the time of the transmission and, in case of retransmission, the retransmission does not collide with a transmission for a MAC PDU obtained from the Msg3 buffer, and there is no Sidelink Discovery Gap for Transmission in this TTI; or - if Sidelink Discovery Gaps for Transmission are configured by upper layers, and there is no measurement gap at the time of the transmission and, in case of retransmission, the retransmission does not collide with a transmission for a MAC PDU obtained from the Msg3 buffer, and there is a Sidelink Discovery Gap for Transmission, and there is no configured grant for transmission on SL-DCH in this TTI: - if there is neither transmission of V2X sidelink communication on SL-SCH nor transmission of NR sidelink communication in this TTI; or - if the transmission of the MAC PDU is prioritized over sidelink transmission: - instruct the physical layer to generate a transmission according to the stored uplink grant with the redundancy version corresponding to the CURRENT_IRV value; - increment CURRENT_IRV by 1 if UL HARQ operation is not autonomous; - if UL HARQ operation is synchronous and there is a measurement gap or Sidelink Discovery Gap for Reception at the time of the HARQ feedback reception for this transmission and if the MAC PDU was not obtained from the Msg3 buffer: - set HARQ_FEEDBACK to ACK at the time of the HARQ feedback reception for this transmission. After performing above actions, if UL HARQ operation is synchronous the HARQ process then shall: - if CURRENT_TX_NB = maximum number of transmissions – 1: - flush the HARQ buffer; The transmission of the MAC PDU is prioritized over sidelink transmission or can be performed simultaneously with sidelink transmission if one of the following conditions is met: - if there are both a configured grant for transmission of V2X sidelink communication on SL-SCH in this TTI and a sidelink grant for transmission of NR sidelink communication as described in clause 5.22.1.1 of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24] at the time of the transmission, and neither the transmissions of V2X sidelink communication is prioritized as described in clause 5.14.1.2.2 nor the transmission of NR sidelink communication is prioritized as described in clause 5.22.1.3.1a of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24]; or - if there are both a configured grant for transmission of V2X sidelink communication on SL-SCH in this TTI and a sidelink grant for transmission of NR sidelink communication as described in clause 5.22.1.1 of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24] at the time of the transmission, and the MAC entity is able to perform this UL transmission simultaneously with the transmissions of V2X sidelink communication and/or the transmission of NR sidelink communication; or - if there is only configured grant(s) for transmission of V2X sidelink communication on SL-SCH in this TTI, and either none of the transmissions of V2X sidelink communication is prioritized or the MAC entity is able to perform this UL transmission and the transmissions of V2X sidelink communication simultaneously; or - if there is only a sidelink grant for transmission of NR sidelink communication in this TTI as described in clause 5.22.1.1 of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24], and either no transmission of NR sidelink communication is prioritized as described in clause 5.22.1.3.1a of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24] or the MAC entity is able to perform this UL transmission simultaneously with the transmission of NR sidelink communication; or - if there are both a configured grant for transmission of V2X sidelink communication on SL-SCH in this TTI and a sidelink grant for transmission of NR sidelink communication as described in clause 5.22.1.1 of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24] at the time of the transmission, and either only the transmissions of V2X sidelink communication is prioritized as described in clause 5.14.1.2.2 or only the transmission of NR sidelink communication is prioritized as described in clause 5.22.1.3.1a of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24] and the MAC entity is able to perform this UL transmission simultaneously with the prioritized transmission of V2X sidelink communication or NR sidelink communication. NOTE 4: Among the UL transmissions where the MAC entity is able to perform all transmissions of V2X sidelink communication prioritized simultaneously, if there are more than one UL transmission which the MAC entity is not able to perform simultaneously, it is up to UE implementation whether this UL transmission is performed. NOTE 5: Among the UL transmissions that the MAC entity is able to perform simultaneously with the transmission of NR sidelink communication prioritized, if there are more than one UL transmission which the MAC entity is not able to perform simultaneously, it is up to UE implementation whether this UL transmission is performed. NOTE 6: Among the UL transmissions where the MAC entity is able to perform all transmissions of V2X sidelink communication prioritized simultaneously with the transmission of NR sidelink communication prioritized, if there are more than one UL transmission which the MAC entity is not able to perform simultaneously, it is up to UE implementation whether this UL transmission is performed. NOTE 7: If there is a sidelink grant for transmission of NR sidelink communication in this TTI as described in clause 5.22.1.1 of TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [24] and the MAC entity is not able to perform this UL transmission simultaneously with the transmission of NR sidelink communication, and prioritization-related information is not available prior to the time of the transmission due to processing time restriction, it is up to UE implementation whether this UL transmission is performed.