Altera HWLIB  16.0
The Altera HW Manager API Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
FPGA Full Configuration

Description

These functions manage full configuration of the FPGA fabric from HPS software.

Functions

ALT_STATUS_CODE alt_fpga_configure (const void *cfg_buf, size_t cfg_buf_len)
 
ALT_STATUS_CODE alt_fpga_istream_configure (alt_fpga_istream_t cfg_stream, void *user_data)
 

Function Documentation

ALT_STATUS_CODE alt_fpga_configure ( const void *  cfg_buf,
size_t  cfg_buf_len 
)

Perform a full configuration of the FPGA from the specified configuration bitstream located in addressable memory.

Due to the nature of FPGA configuration, there may be intermittent and recoverable errors during the process. When the API returns ALT_E_FPGA_CFG, it is advisable to retry configuration up to 5 times. If the error still persists, there may be an unrecoverable configuration error or a problem with configuration image bitstream data.

Parameters
cfg_bufA pointer to a buffer containing FPGA configuration bitstream data.
cfg_buf_lenThe length of the configuration bitstream data in bytes.
Return values
ALT_E_SUCCESSFPGA configuration was successful.
ALT_E_FPGA_CFGFPGA configuration error detected.
ALT_E_FPGA_CRCFPGA CRC error detected.
ALT_E_FPGA_PWR_OFFFPGA is not powered on.
ALT_E_FPGA_NO_SOC_CTRLSoC software is not in control of the FPGA. Use alt_fpga_control_enable() to gain control.
ALT_STATUS_CODE alt_fpga_istream_configure ( alt_fpga_istream_t  cfg_stream,
void *  user_data 
)

Perform a full configuration of the FPGA from the user defined configuration bitstream input source.

Due to the nature of FPGA configuration, there may be intermittent and recoverable errors during the process. When the API returns ALT_E_FPGA_CFG, it is advisable to retry configuration up to 5 times. If the error still persists, there may be an unrecoverable configuration error or a problem with configuration image bitstream data.

Parameters
cfg_streamA pointer to a callback function used to consecutively read configuration bitstream data from a user defined input stream.
user_dataA 32-bit user defined data word. The content of this parameter is user defined. The FPGA Manager merely forwards the user_data value when it invokes the cfg_stream callback.
Return values
ALT_E_SUCCESSFPGA configuration FPGA was successful.
ALT_E_FPGA_CFGFPGA configuration error detected.
ALT_E_FPGA_CRCFPGA CRC error detected.
ALT_E_FPGA_CFG_STMAn error occurred on the FPGA configuration bitstream input source.
ALT_E_FPGA_PWR_OFFFPGA is not powered on.
ALT_E_FPGA_NO_SOC_CTRLSoC software is not in control of the FPGA. Use alt_fpga_control_enable() to gain control.