📡 MAC Layer TS 38.321

⚙️ Full HARQ entity modelling: DL async / UL sync, adaptive/non‑adaptive, soft buffer, NDI/RV.

🧠 Concept & interactive simulation

📐 HARQ Processes – full 3GPP model ⏺️ real‑time animation

📘 3GPP references

📋 LAB Configuration Guideline

1. How to configure:
- Set number of HARQ processes (1‑16).
- Choose direction: DL (asynchronous) or UL (synchronous, fixed 4‑slot delay).
- Set NACK probability, max retransmissions.
- Toggle adaptive/non‑adaptive retransmission.
- Adjust soft combining gain (0‑1, simulates LLR accumulation).
- Click New TX (random process) to start a transmission on an idle process.

2. What will be the flow:
- Each HARQ process has state: IDLE, WAIT_ACK (awaiting feedback), RETX (retransmission scheduled).
- NDI toggles for new transmissions; RV cycles 0‑1‑2‑3 for retransmissions.
- Soft buffer accumulates "energy" (mutual information) across transmissions; higher gain increases success probability.
- ACK/NACK feedback arrives after configurable delay (1 slot for DL, fixed 4 for UL).

3. What student can expect:
- Left: transmitter (gNB for DL, UE for UL). Right: receiver (UE for DL, gNB for UL).
- Process boxes show ID, state, NDI, RV, retx count, buffer fill.
- Arrows show transmission and feedback with ACK/NACK labels.
- Adaptive retx: can change MCS (simulated by colour intensity). Non‑adaptive: same colour as first TX.

4. Recommended button sequence:
- First: Click New TX to start a process.
- Then: Click Step Slot repeatedly – observe feedback arrival and potential retransmission.
- Toggle adaptive/non‑adaptive to see colour change on retx.
- Reset clears all processes.