The following figure illustrates how the frequency offset value can be calculated when using the DFE PRACH core. It shows a 139 sample PRACH preamble which exists at a frequency start location of PRB 0.
In the example, the CC SCS is 30 kHz and the PRACH SCS is 15 kHz. This means there are two PRACH subcarriers (REs) for every one CC subcarrier. The PRACH channel occupies 144 PRACH Resource Elements (REs) – two guard bins at the lower frequency, 139 preamble bins, and three guard bins at the upper frequency. Therefore, the PRACH channel occupies six PRBs, beginning at PRB 0.
To set the demodulation frequency in the core two options exist, depending on the mode the core is operating in.
Static Mode
In static scheduling mode, the API must be informed of the center of the
PRACH channel. This is specified in units of half PRACH REs. This is provided by
setting the UserFreq field in the XDfePrach_NCO configuration structure. The API
converts this center frequency from a PRB/2 value to the Phase Increment, Dual Mod
and Single Mod values required to generate the demodulating frequency.
Alternatively, if an arbitrary demodulating frequency is required it is possible to overwrite, the Phase Increment, Dual Mod and Single Mod in the API, prior to them being sent to the core.
/* Add the RACH channel to the configuration */
result = XDfePrach_AddRCtoRCCfg(InstancePtr, &RCConfig,
CCID, RCId, RCId, &DdcCfg, &NcoCfg, &SchedCfg, &CCCfg);
/*After the XDfePrach_AddRCtoRCCfg, the NCO Phase Increment, Dual Mod and Single Mod can be over written:*/
RCConfig.NcoCfg[RCId].Frequency = DesiredPhaseIncrement;
RCConfig->NcoCfg[RCId].FreqSingleModCount = DesiredSingleModValue;
RCConfig->NcoCfg[RCId].FreqDualModCount = DesiredDualModValue;
/*Overwrite must take place before*/
result = XDfePrach_SetNextCfg(InstancePtr, &CCConfig, &RCConfig);
both methods above are supported.
The value of UserFreq used in the API (frequency offset of
the PRACH channel center frequency with respect to the CC center frequency) can be
determined as follows.
In Figure 1, the PRACH channel has a start frequency location of PRB 0 in a system with 106 PRBs. Relative to the center frequency, this start location is at -53 PRBs == -636 REs (CC) ==-1272 REs (PRACH). This figure gives the number of PRACH REs between the bottom of the PRACH channel and the center frequency.
The number of REs (PRACH) depends upon the SCS setting in the CC and the PRACH. The ratio of these two gives the number of REs (PRACH) per CC RE.
To find the center frequency, add the number of REs (PRACH) from the bottom to
the center. In the example given, the PRACH channel occupies 144 REs with two guard
REs at the beginning, therefore you must add 2+139/2=71.5 to the calculation.
Consequently, UserFreq must be set as
(-1272+71.5)*2 = -2401 half PRACH REs.
More generally, it is computed as:
UserFreq is set as: UserFreq =frequency_offset
where,
- StartPRB: the location of the PRACH channel within the CC resource map.
- NRB: Number of resource blocks in the CC resource map.
- NRB SC: Number of REs per RB, fixed at 12.
- SCSCC: Subcarrier spacing of the CC.
- SCSPRACH: Subcarrier spacing of the PRACH
- LRA = PRACH sequence length (for example, 139)
- Koffset = Frequency offset defined in 3GPP TS 38.211 (table 6.3.3.2-1)
The scaling constant of “2” is to convert from REs (PRACH) to half-REs as required by the core.
Dynamic Mode
In Dynamic mode, the API does not write the NCO frequency settings. Instead, those are set directly using the Dynamic Control Packet (DCP).
Three fields exist in the DCP, one for each of the Phase Increment (FCW), Dual Mod Count, and Single Mod Count values. These must be set to values which give the desired demodulation frequency.