Wednesday, January 29, 2014

Programming the FPGA of the bladeRFis not so simple

Programming the FPGA of bladeRF

The last few weeks I am trying to program the FPGA.
With the marvelous software Quartus of Altera I managed to make some *.rbf files and transfer them to the FPGA. Well, first I had .sof files but they can be transformed into .rbf files.

I read many manuals, performed some courses from Altera (very instructive by the way!) and experimented a lot. I used some files from the VHDL-bladeRF-subdirectory.

However, I did not manage to blink the LEDs.
Tonight I finally saw why.

C4_CLK running at 38.4 MHz

There is a clock c4_clk running at 38.4 MHz. I tried to reduce that clock with a counter to about 1 Hz. Yes: the blinking LED, the equivalent of Hello World!

I did not have a clock! There was no 38.4 MH signal. Why not?

The clock-signal is derived from a chip, the Si5338. That chip has to be initialised, programmed, setup.

So, there is not a simple way to use the FPGA in an easy way. With easy I mean, a few simple files that grow in time, become more complicated as I understand more and more of the system.

Nuand: use revisions

OK, there is no simple way to experiment with the FPGA. What I want to accomplish is:
  • get the rf-output from the LMS-chip
  • digitize that signal
  • make some hardware with VHDL (correlator, Costas-loop)
  • downconvert the signal
  • send to the laptop with USB
  • do the final processing on the laptop
The FPGA firmware is compiled without the Quartus GUI. I think the nuand-people do that with linux. I want to use Quartus with the GUI in Windows 7 on my laptop.

I have to find out how to tell Quartus to use the files in the master-bladerf-directory.
Nuand advises to use the standard bladerf software and make revisions to that software. Yes, but how to compile the FPGA firmware?

There is no easy way

So, I will do a lot more reading, some more Quartus tutorials and then figure out how to set up a bladerf-Windows-Quartus-project resulting in a nice hostedx115.rbf file!

Please help me

I am not desperate yet, I have to study a lot. But I would love to get some hints, some help, some advice! In the meantime, I will read, think, experiment, and blog about my findings.


  1. In Windows, you should be able to open the Nios II Command Shell (look in your Start menu). You can then navigate to the hdl/quartus directory and use the script to build your project.

    You can open the resulting project using the GUI in the work directory that gets created by the script.

    Also note there is a README in the HDL directory to help with compilation. We currently use Quartus II 13.1 for building. Please make sure you are up to date.

    I keep an eye on your blog and love what you're doing. Please keep it up! :)

  2. Brian, thanks a lot! I tried $ bash etcetera with the Nios II Command Shell and after a few minutes I had a working fresh brandnew hostedx115.rbf
    This is great!!
    I'll post my findings soon, and thanks again, you made my day (well till many hours after midnight) ;>)))