C Model Interface - 2.0 English

RFSoC DFE PRACH LogiCORE IP Product Guide (PG391)

Document ID
Release Date
2.0 English

The API of the C model is defined in the header file xdfe_nr_prach_v2_0_bitacc_cmodel.h. This interface consists of data structures and functions as described in the following sections.

To use the C model:

  1. Create a model configuration structure and initialize the values within it according to your application.
  2. Use this model configuration structure to create an instance of the model.
  3. Create and initialize configuration structures for each CC and RACH channel to be processed.
  4. Allocate and initialize arrays for input and output samples.
  5. Call the 'do'-function of the model to process blocks of data for the RACH channels, passing in a pointer to the relevant configuration structure.
  6. When finished, destroy the model instance and deallocate memory as necessary.

When configuring the NCO for each RACH capture, the frequency control word is set as a multiple of half the PRACH sub-carrier spacing. The PRACH SCS is set as part of the PRACH configuration. The model converts the frequency control word into the correct NCO settings for the desired demodulation frequency.

One call to xdfe_nr_prach_v2_0_do will process all of the PRACH capture operations in the models configuration. The model accepts input data which allows up to 16 CCs to be defined across each of up to three bands. Each band can be configured with up to eight antennas.

The PRACH configuration supplied to the model defines up to 16 PRACH captures, these can be allocated to any of the CCs, on any of the bands in the input data structure. The model will generate an output structure with an array of samples for each RCID.

The xdfe_nr_prach_v2_0_do function takes three separate complex array structures. Each structure represents the CC data for a single band. Each structure contains data from up to 16 CCs and up to eight antennas. Additionally, the xdfe_nr_prach_v2_0_do function takes a xdfe_nr_prach_v2_0_rach_config structure, which defines all of the captures being modeled.

xdfe_nr_prach_v2_0_rach_config contains an array, rach_channel_init_flag, which allows the radio frame start to be indicated. This indicates which sample in the input data structure should be considered the first in the radio frame. This will reset the model to align to the start of the radio frame.

An example C++ file called run_bitacc_cmodel.c is included in the ZIP file. This demonstrates how to call the PRACH C model. Refer to this file for examples of using the interface described below.