These functions manage full configuration of the FPGA fabric from HPS software.
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_buf | A pointer to a buffer containing FPGA configuration bitstream data. |
cfg_buf_len | The length of the configuration bitstream data in bytes. |
- Return values
-
ALT_E_SUCCESS | FPGA configuration was successful. |
ALT_E_FPGA_CFG | FPGA configuration error detected. |
ALT_E_FPGA_CRC | FPGA CRC error detected. |
ALT_E_FPGA_PWR_OFF | FPGA is not powered on. |
ALT_E_FPGA_NO_SOC_CTRL | SoC 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_stream | A pointer to a callback function used to consecutively read configuration bitstream data from a user defined input stream. |
user_data | A 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_SUCCESS | FPGA configuration FPGA was successful. |
ALT_E_FPGA_CFG | FPGA configuration error detected. |
ALT_E_FPGA_CRC | FPGA CRC error detected. |
ALT_E_FPGA_CFG_STM | An error occurred on the FPGA configuration bitstream input source. |
ALT_E_FPGA_PWR_OFF | FPGA is not powered on. |
ALT_E_FPGA_NO_SOC_CTRL | SoC software is not in control of the FPGA. Use alt_fpga_control_enable() to gain control. |