How to generate .rbf files in Altera Quartus?

14,830

Solution 1

With Quartus II GUI go to File => Convert Programming Files, where .rbf can then be selected as output file, and the .sof can be given as input file.

The conversion setup can be saved from the GUI for use in a command line like

> quartus_cpf -c convert_sof_to_rbf.cof

Solution 2

An RBF is a "Raw Binary File". It represents the raw data that will, for example, be loaded into a flash memory for initialising an FPGA on power-up.

A SOF is an "SRAM Object File". It contains the data required to initialise the FPGA directly.

Although you can output an RBF from Quartus (File -> Convert Programming Files...), I suspect from your question that you're looking for a way to directly convert a SOF to an RBF. This can be done using Altera's "NIOS II Command Shell", which can be run from the Quartus folder in the Start menu.

Note that although you need Quartus installed in order to do this, you don't need to pay for a subscription, because the NIOS II Command Shell works even if Quartus doesn't have a valid licence.

It's a two step process...

Step One

cd to the directory containing your SOF then type:

sof2flash --offset=0 --input="./your_file.sof" --output="./your_file.flash"

This converts the SOF file into a FLASH file, which is an ASCII representation of the desired RBF.

Step Two

Now type this:

nios2-elf-objcopy -I srec -O binary "./your_file.flash" "./your_file.rbf"

You will now have your RBF file, as required.

Share:
14,830
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    What are .rbf files and how can i generate them from the Quartus output file .sof on windows ?