sd_fec
Xilinx SDK Drivers API Documentation
sd_fec Documentation

SD-FEC standalone driver software API summary

Initialization and Configuration

The XSdFec_Config structure is used by the driver to configure the FEC mode and interface parameters defined for each SD-FEC device. The configuration structure is created by the tool-chain based on HW build properties.

To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in one of two ways:

  • XSdFecInitialize(InstancePtr, DeviceId) - The driver looks up its own configuration structure created by the tool-chain based on an ID provided by the tool-chain.
  • XSdFecCfgInitialize(InstancePtr, CfgPtr) - Uses a configuration structure provided by the caller.

Data Structures

One or more device specific headers are produced during the generation of the board support package, defining further device specific configuration parameters:

  • When the device is configured for Turbo Decode, the header x<ipinst_name>_turbo_params.h, contains an XSdFecturbo_parameters structure which is populated to match the corresponding IP GUI configuration.
  • When the device is configured for LDPC a header is generated per LDPC code specified on the corresponding IP GUI; x<ipinst_name >_<code_id>_params.h. Each header defines an XSdFecldpc_parameters structure populated with the configuration data required for the corresponding LDPC code.

API

The driver provides the following functions:

  • XSdFecSetTurboParams(InstancePtr, ParamsPtr) - Set Turbo parameters on a device
  • XSdFecadd_ldpc_params(InstancePtr, CodeId, SCOffset, LAOffset, QCOffset, ParamsPtr) - Add LDPC parameters to a device
  • XSdFecShareTableSize(ParamsPtr, SCSizePtr, LASizePtr, QCSizePtr) - Calculate share table size for a LDPC code
  • XSdFecInterruptClassifier(InstancePtr) - Classify interrupts

In addition, the driver provides set and get functions for all the individual registers defined for the SD-FEC.

Example

The processor based example design output by the SD-FEC IP instance also includes an example application demonstrating a basic use case of the software driver.