Section: 5.4.1 UL Grant reception
Content: In order to transmit on the UL-SCH the MAC entity must have a valid uplink grant (except for non-adaptive HARQ retransmissions) which it may receive dynamically on the PDCCH or in a Random Access Response or which may be configured semi-persistently or preallocated by RRC or provided by RRC for transmission using PUR (see clause 5.4.7). To perform requested transmissions, the MAC layer receives HARQ information from lower layers. When the physical layer is configured for uplink spatial multiplexing, the MAC layer can receive up to two grants (one per HARQ process) for the same TTI from lower layers. If the MAC entity has a C-RNTI, a Semi-Persistent Scheduling C-RNTI, a UL Semi-Persistent Scheduling V-RNTI, a AUL C-RNTI, or a Temporary C-RNTI, the MAC entity shall for each TTI and for each Serving Cell belonging to a TAG that has a running timeAlignmentTimer and for each grant received for this TTI and for each SPS configuration that is indicated by the PDCCH addressed to UL Semi-Persistent Scheduling V-RNTI; or if the MAC entity has Preconfigured Uplink Resource RNTI, the MAC entity shall for each TTI and for each grant received for this TTI: - if an uplink grant for this TTI and this Serving Cell has been received on the PDCCH for the MAC entity's C-RNTI, Preconfigured Uplink Resource RNTI or Temporary C-RNTI; or - if an uplink grant for this TTI has been received in a Random Access Response: - if the uplink grant is for MAC entity's C-RNTI and if the previous uplink grant delivered to the HARQ entity for the same HARQ process was either an uplink grant received for the MAC entity's Semi-Persistent Scheduling C-RNTI, for the MAC entity's UL Semi-Persistent Scheduling V-RNTI, or a configured uplink grant for which the UL HARQ operation was not autonomous: - consider the NDI to have been toggled for the corresponding HARQ process regardless of the value of the NDI. - deliver the uplink grant and the associated HARQ information to the HARQ entity for this TTI. - else, if an uplink grant for this TTI has been received for this Serving Cell on the PDCCH for the MAC entity's Semi-Persistent Scheduling C-RNTI or for the MAC entity's UL Semi-Persistent Scheduling V-RNTI; or if an uplink grant for this TTI has been received for this Serving Cell on the PDCCH for the MAC entity's AUL C-RNTI: - if the NDI in the received HARQ information is 1: - consider the NDI for the corresponding HARQ process not to have been toggled; - deliver the uplink grant and the associated HARQ information to the HARQ entity for this TTI. - else if the NDI in the received HARQ information is 0: - if PDCCH contents indicate AUL release: - trigger an AUL confirmation; - if an uplink grant for this TTI has been configured: - consider the NDI bit for the corresponding HARQ process to have been toggled; - deliver the configured uplink grant and the associated HARQ information to the HARQ entity for this TTI; - else if PDCCH contents indicate AUL activation: - trigger an AUL confirmation; - store the uplink grant and the associated HARQ information as configured uplink grant; - initialise (if not active) or re-initialise (if already active) the configured uplink grant to start in this TTI and to recur according to rules in clause 5.23; - consider the NDI bit for the corresponding HARQ process to have been toggled; - deliver the configured uplink grant and the associated HARQ information to the HARQ entity for this TTI. - else if PDCCH contents indicate SPS release: - if the MAC entity is configured with skipUplinkTxSPS: - trigger an SPS confirmation; - if an uplink grant for this TTI has been configured: - consider the NDI bit for the corresponding HARQ process to have been toggled; - deliver the configured uplink grant and the associated HARQ information to the HARQ entity for this TTI; - else: - clear the corresponding configured uplink grant (if any). - else: - if the MAC entity is configured with skipUplinkTxSPS: - trigger an SPS confirmation; - store the uplink grant and the associated HARQ information as configured uplink grant; - initialise (if not active) or re-initialise (if already active) the configured uplink grant to start in this TTI, or in TTI according to N=0 in clause 5.10.2 for short TTI, and to recur according to rules in clause 5.10.2; - if UL HARQ operation is asynchronous, set the HARQ Process ID to the HARQ Process ID associated with this TTI; - consider the NDI bit for the corresponding HARQ process to have been toggled; - deliver the configured uplink grant and the associated HARQ information to the HARQ entity for this TTI. - else, if an uplink grant for this TTI has been configured for the Serving Cell and if UL HARQ operation is autonomous for the corresponding HARQ process: - if the HARQ_FEEDBACK is set to ACK for the corresponding HARQ process or if there is no uplink grant previously delivered to the HARQ entity for the same HARQ process: - consider the NDI bit for the corresponding HARQ process to have been toggled. - if the aul-RetransmissionTimer is not running: - if there is no uplink grant previously delivered to the HARQ entity for the same HARQ process; or - if the previous uplink grant delivered to the HARQ entity for the same HARQ process was not an uplink grant received for the MAC entity's C-RNTI; or - if the HARQ_FEEDBACK is set to ACK for the corresponding HARQ process: - deliver the configured uplink grant, and the associated HARQ information to the HARQ entity for this TTI. - else: - if this Serving Cell is the SpCell and an uplink grant for this TTI has been preallocated for the SpCell; or - except for preconfigured uplink grant for PUR, if an uplink grant for this TTI has been configured for this Serving Cell: - if UL HARQ operation is asynchronous, set the HARQ Process ID to the HARQ Process ID associated with this TTI; - consider the NDI bit for the corresponding HARQ process to have been toggled; - deliver the configured or preallocated uplink grant, and the associated HARQ information to the HARQ entity for this TTI. NOTE 1: The period of configured uplink grants is expressed in TTIs. NOTE 2: If the MAC entity receives both a grant in a Random Access Response and a grant for its C-RNTI or Semi persistent scheduling C-RNTI requiring transmissions on the SpCell in the same UL subframe, the MAC entity may choose to continue with either the grant for its RA-RNTI or the grant for its C-RNTI or Semi persistent scheduling C-RNTI. NOTE 3: When a configured uplink grant is indicated during a measurement gap and indicates an UL-SCH transmission during a measurement gap, the MAC entity processes the grant but does not transmit on UL-SCH. When a configured uplink grant is indicated during a Sidelink Discovery gap for reception and indicates an UL-SCH transmission during a Sidelink Discovery gap for transmission with a SL-DCH transmission, the MAC entity processes the grant but does not transmit on UL-SCH. When a configured uplink grant indicates an UL-SCH transmission during a V2X sidelink communication transmission and transmission of V2X sidelink communication is prioritized as described in clause 5.14.1.2.2, the MAC entity processes the grant but does not transmit on UL-SCH. NOTE 4: The NDI transmitted in the PDCCH for the MAC entity's AUL C-RNTI is set to '0' (TS 36.212[ Evolved Universal Terrestrial Radio Access (E-UTRA); Multiplexing and channel coding ]  [5]). Except for NB-IoT, for configured uplink grants without harq-ProcID-offset, if UL HARQ operation is not autonomous, the HARQ Process ID associated with this TTI is derived from the following equation for asynchronous UL HARQ operation: - if the TTI is a subframe TTI: - HARQ Process ID = [floor(CURRENT_TTI/semiPersistSchedIntervalUL)] modulo numberOfConfUlSPS-Processes, where CURRENT_TTI=[(SFN * 10) + subframe number] and it refers to the subframe where the first transmission of a bundle takes place. - else: - HARQ Process ID = [floor(CURRENT_TTI/semiPersistSchedIntervalUL-sTTI)] modulo numberOfConfUlSPS-Processes-sTTI, where CURRENT_TTI = [(SFN * 10 * sTTI_Number_Per_Subframe) + subframe number * sTTI_Number_Per_Subframe + sTTI_number] and it refers to the short TTI occasion where the first transmission of a bundle takes place. Refer to 5.10.2 for sTTI_Number_Per_Subframe and sTTI_number. For preallocated uplink grants the HARQ Process ID associated with this TTI is derived from the following equation for asynchronous UL HARQ operation: HARQ Process ID = [floor(CURRENT_TTI/ul-SchedInterval)] modulo numberOfConfUL-Processes, where CURRENT_TTI=subframe number and it refers to the subframe where the first transmission of a bundle takes place. For configured uplink grants, if UL HARQ operation is autonomous, the HARQ Process ID associated with this TTI for transmission on this Serving Cell is selected by the UE implementation from the HARQ process IDs that are configured for autonomous UL HARQ operation by upper layers in aul-HARQ-Processes (TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [8]). For configured uplink grants with harq-ProcID-offset, the HARQ Process ID associated with this TTI is derived from the following equation for asynchronous UL HARQ operation: - if the TTI is a subframe TTI: - HARQ Process ID = [floor(CURRENT_TTI/semiPersistSchedIntervalUL)] modulo numberOfConfUlSPS-Processes + harq-ProcID-offset, where CURRENT_TTI = [(SFN * 10) + subframe number] and it refers to the subframe where the first transmission of a bundle takes place. - else: - HARQ Process ID = [floor(CURRENT_TTI/semiPersistSchedIntervalUL-sTTI)] modulo numberOfConfUlSPS-Processes-sTTI + harq-ProcID-offset, where CURRENT_TTI = [(SFN * 10 * sTTI_Number_Per_Subframe) + subframe number * sTTI_Number_Per_Subframe + sTTI_number] and it refers to the short TTI occasion where the first transmission of a bundle takes place. Refer to 5.10.2 for sTTI_Number_Per_Subframe and sTTI_number. For NB-IoT, for configured uplink grants for BSR, the HARQ Process ID is set to 0. If the MAC entity is configured with Short Processing Time or short TTI and if current_TTI is a subframe TTI, the HARQ Process ID associated with this TTI is derived from the following equation for synchronous UL HARQ operation: HARQ Process ID = [SFN * number_of_UL_PUSCH_SFs_per_radio_frame + index_of_UL_PUSCH_SF] modulo number_of_UL_HARQ_processes. where number_of_UL_PUSCH_SFs_per_radio_frame is the number of subframes that can be used for PUSCH (UL PUSCH subframe) per radio frame: - For FDD serving cells and serving cells operating according to Frame structure Type 3, all 10 subframes in a radio frame represent UL PUSCH subframes; - For TDD serving cells, all uplink subframes of the TDD UL/DL configuration indicated by tdd-Config, as specified in TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [8] of the cell represent UL PUSCH subframes and additionally the subframes including UpPTS if the cell is configured with symPUSCH-UpPts-r14; and index_of_UL_PUSCH_SF is the index of a subframe that can be used for PUSCH within the radio frame, and number_of_UL_HARQ_processes is the number of parallel HARQ processes per HARQ entity for subframe TTI as specified in TS 36.213[ Evolved Universal Terrestrial Radio Access (E-UTRA); Physical layer procedures ]  [2], clause 8.