Coherence bandwidth & why hopping works
Multipath makes the channel frequency-selective — some RBs are strong, some sit in a deep fade. The coherence bandwidth Bc ≈ 1/(5·τrms) is the frequency span over which the channel stays roughly constant. Hopping only helps if the two hops are further apart than Bc — then they see independent channels, so a fade in one rarely coincides with a fade in the other. Crank the delay spread and watch Bc shrink.
Intra-slot hopping — exact formula
The slot is split in two. The first hop uses ⌊Nsymb/2⌋ symbols at RBstart; the second hop uses the rest at (RBstart + RBoffset) mod NBWP. Each hop carries its own front-loaded DM-RS. Drive the inputs — the grid and the symbol split follow the spec.
Inter-slot hopping — exact formula
Here the whole slot stays put, but the position alternates by slot number: even slots at RBstart, odd slots at the offset. This pairs naturally with PUSCH repetition / slot aggregation so each repetition rides a different part of the band. Step through the slots.
The offset configuration
RBoffset isn't arbitrary — the network configures a small list (frequencyHoppingOffsetLists) and the DCI picks one entry with 1 or 2 bits. The list size depends on the BWP size: a small BWP gets 2 candidate offsets (1 bit), a large BWP gets 4 (2 bits). Pick a BWP size.
Each hop gets its own DM-RS
Because the two hops sit on de-correlated frequencies, they experience different channels — so a single estimate would be useless on the other hop. NR therefore front-loads a separate DM-RS in each hop, letting the receiver estimate and equalise the two halves independently. That is the whole reason hopping doesn't wreck demodulation.
PUCCH hopping
PUCCH gets the same medicine: with intra-slot hopping it moves between the two band edges across its two halves (secondHopPRB), giving control-channel frequency diversity — important because a dropped HARQ-ACK is expensive.
Beating the fade
Two hops on de-correlated frequencies mean only part of the codeword sees any given dip — and the channel code repairs the rest. Toggle hopping to compare the decoded-SNR distribution and its outage tail.