Changing and Compiling FPGA Code
I have no previous experience with FPGAs or hardware programming and I would therefore like to start getting familiar with my redpitaya by compiling the existing FPGA code (later on, I will then make small adjustments to the code and check if everything behaves as planned etc.). However, I have a number of problems and questions that came up in the context of this undertaking, which I'd like to list in the following.
1.) I have installed Vivado 2013.3 on an ubuntu-based virtual machine on my computer. According to the "FPGA develpment environment" section, I should be able to compile the FPGA code by first using the command "source /usr/local/xilinx/Vivado/2013.3/settings64.sh" (which I altered to match the corresponding directory on my computer) in the TCL window (?) and then just open the redpitaya project file to compile the code (with synthesis, implementation and bitstream generation being performed using the vivado GUI). However, I already get an error message when trying to set the working environment:
Code: Select all
source /opt/Xilinx/Vivado/2013.3/settings64.sh can't read "_": no such variable while executing "XIL_ARG_=$_" (file "/opt/Xilinx/Vivado/2013.3/settings64.sh" line 3)
2.) Interestingly enough, I can on the other hand generate the red_pitaya_top.bit file by using the GNU make mechanism and the corresponding makefile in RedPitaya/FPGA/release1/fpga (note: this also produces a lot of warnings but no critical ones or errors). However, while the 'make [...] fpga' command works, I get another error message when trying to execute the 'make [...] sw_package' command, which looks something like this:
Code: Select all
make: libgen: Command not found make: *** [ps7_cortexa9_0/lib/libxil.a] Error 127 make: Target `all' not remade because of errors. make: Leaving directory `/home/labuser/VivadoCompilationTest/RedPitaya/FPGA/release1/fpga/vivado/red_pitaya.sdk/SDK/SDK_Export/fsbl_bsp' make: *** [fsbl_bsp] Error 2
3.) This may be a stupid question but even if everything compiled nicely, I would still not be sure which files I would actually need to copy where onto the RedPitaya to implement the compiled code on the system. Also, I am rather unsure about the meaning of the 'fpga.bit' files in the individual application folders in the repository, which are said to have a size of 0 bytes by both github and my file system on the computer. So if anybody could shortly describe how to get compiled FPGA code onto the redpitaya such that it works, I would be very thankful.
Please accept my aplogies in case any of the above should be covered in some documentation but I couldn't find any help on the wiki pages so far. Thanks in advance for any help!