Page 1 of 1

Error Loading FPGA with Quartus GUI Built bitstream

Posted: Mon Jan 01, 2018 8:55 pm
by novemberstorm
I have been trying to get the Quartus GUI to create a .rbf file that can be loaded into the bladeRF FPGA. I was successful in compiling and loading into the FPGA the hostedx40.rbf compiled through build_bladerf.sh at the command line. I was also successful in compiling the bladerf_hosted.vhdl in Quartus II Prime 17.0 (lite edition) (0 errors 108 warnings) but the generated .rbf file fails to load into the FPGA using bladeRF-cli -l hostedx40.rbf. Instead I get the following error and the bladeRF locks up until the power is cycled.

Loading fpga from hostedx40.rbf...
[WARNING @ "/build/bladerf-zjSF8E/bladerf-2017.12-rc1/host/libraries/libbladeRF/src/fpga.c":53] FPGA v0.0.0 was detected. Firmware v1.9.1 requires FPGA v0.0.2 or later. Please load a different FPGA version before continuing.

Any suggestions on what I can do to get the GUI to create a valid FPGA bitstream from bladerf-hosted.vhd for the BladeRF?

Re: Error Loading FPGA with Quartus GUI Built bitstream

Posted: Wed Jan 03, 2018 9:54 am
by bglod
This is something I've also come across and was unable to figure out why this happens. Granted, I didn't spend much time trying to figure it out. The best I can tell you at this time is to use the "Convert Programming Files..." tool in the "File" menu to convert the .sof to a .rbf. The command-line equivalent is "quartus_cpf".

Re: Error Loading FPGA with Quartus GUI Built bitstream

Posted: Fri Jan 26, 2018 8:14 pm
by novemberstorm
I tried to use the "convert programming files" option to create the .rbf but it still failed to load into the bladeRF FPGA. I did more study and discovered that when the bladerf-hosted.vhd file is complied using the build_bladerf.sh script a bladerf.qpf is generated. This file can be loaded into Quartus Prime using FIle->Open Project... The whole environment shows up to include the file hierarchy, pin assignments, and configurations. I compiled the project and it output a .rbf file that successfully imported into the bladeRF FPGA. So, I had to initially use the build script to create the .qpf project file that then could be loaded into Quartus and used for subsequent builds.

Re: Error Loading FPGA with Quartus GUI Built bitstream

Posted: Fri Jan 26, 2018 11:15 pm
by bglod
Was that not what you were doing before? I'm a little surprised you were able to get Quartus to output an RBF otherwise -- there are a load of options that you'd have to change in a new project in order to get the design to compile without errors, let alone generate an RBF!

What I was referring to earlier is that, in at least previous versions of Quartus, creating the .qpf via the build script, opening that .qpf in the GUI, and then (re)building the design via the GUI may yield a nonfunctional RBF. Judging from your response, however, that issue may have been resolved in newer version(s) of Quartus...so that's good to hear!

At any rate, I'm glad you were able to figure everything out! :D