Forum Discussion
MAX 10: Can an ASx1 RBF be written directly to internal CFM via on-chip flash Avalon-MM?
Hi,
I am implementing an in-system self-update mechanism for an Intel MAX 10 FPGA (10M16SAU169I7G) and I would like to confirm the correct configuration image format for programming the internal CFM through logic running inside the FPGA.
My setup
- Device: MAX 10 10M16SAU169I7G
- Current design already boots normally from internal flash
- Inside the running design, I receive a new FPGA image over UART
- I split the image into blocks, verify CRC, and then write the data into the internal CFM using the on-chip flash IP Avalon-MM data interface
- After the transfer is complete, I plan to power-cycle the board so the FPGA boots from the newly written image
What I am currently doing
I generate the update file using quartus_cpf from the .sof:
~.bat
'''
quartus_cpf ^
--option=bitstream_compression=off ^
--configuration_mode=ASx1 ^
-c ^
input.sof ^
output_file_active_serial.rbf
'''
Then I send this .rbf file to the FPGA and write it word-by-word into the internal CFM.
My question
Can a Raw Binary File (.rbf) generated from a MAX 10 .sof with --configuration_mode=ASx1 be written directly into the MAX 10 internal CFM through the on-chip flash Avalon-MM interface, and then be used successfully as a bootable configuration image after power cycle?
Or, stated differently:
- Is the ASx1 RBF byte layout identical to the internal CFM configuration image layout expected by MAX 10?
- If not, what is the correct file format / conversion flow for self-updating the internal CFM from user logic?
- Should I be using RBF, POF, or another file/image format for this purpose?
- Is there any official Intel example or application note showing the correct way to write a new configuration image into MAX 10 CFM from inside the running FPGA design?
Additional context
I already reviewed:
- MAX 10 FPGA Configuration User Guide
- Remote System Upgrade in Intel MAX 10 Devices
- Using the MAX 10 User Flash Memory
From the documentation, I understand that MAX 10 supports configuration from JTAG and internal flash, and that remote/dual configuration is supported. However, I could not find a clear statement confirming whether an ASx1-generated RBF is the correct binary image to write directly into CFM via Avalon-MM.
My main concern is avoiding a situation where:
- the UART transfer is correct,
- the CFM write completes,
- but the FPGA does not boot afterwards because the file format/layout written into CFM is not the expected one.
If anyone from Intel or anyone who has implemented MAX 10 self-update / remote update can clarify the correct image format and recommended flow, I would appreciate it.
Thank you.
Hi raulp,
MAX 10 CFM can be updated from user logic through the On-Chip Flash IP, but an ASx1 .rbf is not the recommended direct-CFM image. Generate the MAX 10 Raw Programming Data (.rpd) through Convert Programming Files, and use the .map file to identify the correct CFM data and address. Do not write the complete RPD blindly from address zero because it may contain ICB, CFM, and UFM data.
The update sequence should include erase/unprotect, status polling, the required per-byte bit reversal, and readback/CRC verification. For dual configuration, preserve CFM0 as the factory image and update CFM1/CFM2, then use the Dual Configuration IP to reconfigure.
The I2C Slave-to-Avalon-MM Master Bridge is not needed if UART/user RTL already provides an Avalon-MM master. It is required only for an external I2C-controlled update path.
Please use AN 741, Remote System Upgrade for MAX 10 FPGA Devices over UART with the Nios II Processor, as the primary reference and validate the exact device configuration and CFM addresses on a spare board first.
Regards,
Fakhrul
4 Replies
- raulp
New Contributor
Solved thanks to FvM and FakhrulA_altera
- raulp
New Contributor
Thanks Frank, your answer was very helpful and i already switch to that implementation.
Can you tell me if i need to set up the i2c slave to avalon-mm master bridge Intel fpga IP?- FakhrulA_altera
Regular Contributor
Hi raulp,
MAX 10 CFM can be updated from user logic through the On-Chip Flash IP, but an ASx1 .rbf is not the recommended direct-CFM image. Generate the MAX 10 Raw Programming Data (.rpd) through Convert Programming Files, and use the .map file to identify the correct CFM data and address. Do not write the complete RPD blindly from address zero because it may contain ICB, CFM, and UFM data.
The update sequence should include erase/unprotect, status polling, the required per-byte bit reversal, and readback/CRC verification. For dual configuration, preserve CFM0 as the factory image and update CFM1/CFM2, then use the Dual Configuration IP to reconfigure.
The I2C Slave-to-Avalon-MM Master Bridge is not needed if UART/user RTL already provides an Avalon-MM master. It is required only for an external I2C-controlled update path.
Please use AN 741, Remote System Upgrade for MAX 10 FPGA Devices over UART with the Nios II Processor, as the primary reference and validate the exact device configuration and CFM addresses on a spare board first.
Regards,
Fakhrul
- FvM
Super Contributor
Hi,
MAX10 doesn't use AS configuration or .rbf files. Raw binary files that can be directly written to CFM memory have .rpd file type. The best way to perform remote update with MAX10 is using dual configuration scheme, but I don't know if your application has sufficient flash to implement it. It's possible to rewrite single configuration flash in user mode, but there's no fallback mechanism. You can however read back image or perform a CRC check before rebooting.
Regards Frank