This page list the the methods we use to upload bof files (compiled models) to the ROACHs internal memory and program them to the FPGA.
You can upload bof files to ROACH1 using the secure copy command (scp) from terminal. You simply do:
scp <bof_path> root@<roach_ip>:/boffiles/
Or you can do it graphically using your favorite file manager software. Here is an example with Ubuntu's Nautilus:
The corr package provides a very handy function to upload a bof to the ROACH2 volatile memory and program it in one step. It does not work in ROACH1. In a python eviroment/file:
import corr
fpga = corr.katcp_wrapper.FpgaClient(<roach_ip>)
fpga.upload_program_bof(<bof path>, <upload port, e.g.:3000>)
If the previous method is not working for you, or you want to upload a bof into ROACH2 persistent memory you can use this telnet base method:
telnet <roach_ip> 7147
?listbof
?uploadbof 3000 <bof_filename.bof>
nc <roach_ip> 3000 < <bof_filename.bof>
The netcat (nc) command in the second terminal should be sent immediately after the 'uploadbof' is sent in the first terminal. If the uploading of the bof takes too long or didn't finish correctly, is probably because you need to erase some bofs from the ROACH's memory (try to always have less than 20 bofs in memory).
Update: Good news everyone, I made a script the does the above steps automatically. You can steal it from here. To use it just type in terminal:
python upload_program_roach2.py --ip <roach_ip> --bof <bof_path> --upload --program
Provided that the bof file is already in ROACH1 or 2 memory, you simply do:
import corr
fpga = corr.katcp_wrapper.FpgaClient(<roach_ip>)
fpga.progdev(<bof_filename.bof>)