ROACH user's guide

The below are the instructions to get things up and running a design in the ROACH.

1 – Boot the ROACH

Open a putty/xterm window and connect to tofu as the serial cable on Roach is connected to Tofu. Login as yourself. Connect to minicom, power cycle the roach and boot the roach. When ROACH boots, interrupt it at the uBoot prompt. Boot the system through the network for that we use the command :

run netboot

After booting we get the following prompt

roach login: root

Given these details it will log into roach_# (# is 1,2 or 3 here in NRAO based on the roach board you are working with.

To look into the different folders and the boffiles present in the roach give the following commands

roach#:~ ls roach#:~ cd /boffiles roach#:/boffiles ls filename1.bof filename2.bof ….

2 – Running a Design

I'm planning on running the below shown simple design on roach. We have to build the design and get then the "filename.bof" and use it to program the ROACH.

roachInputTest.gif
|
Model file of the roach test design.
|

We can program a roach in two ways via the serial port or the ethernet port by using the xterm, connected to tofu. Before this we have to learn how to copy the files into the roach. The following are the commands to copy a bof file into the roach.

[user@tofu ~]$ ssh -l cicada tofu cd /export/home/tofu/cicadaroots/roach_#/etch/boffiles cp /users/cicada/models/filename/bit_files/filename.bof .

Once you have copied your BOF files,log on to your ROACH via minicom and execute your BOF file using the command :

roach#: /boffiles ./filename.bof &

A much better way would be to communicate using the ipython. To execute your BOF file using ipython open another putty/xterm/console window on tofu. Then give the following commands in the ipython shell:

To interact with a board from an iPython shell, you need to load the Corr library and instantiate an FpgaClient object:

[1]import corr

[2]roach = corr.katcp_wrapper.FpgaClient('roach#', 7147)(# is either 1,2 or 3)

To see what .bof files are available on a given ROACH:

[3]roach.listbof()

Out[3]: ['r_xaui_test_2009_Jun_19_1517.bof', 'r_r311b_xaui_test_2009_Jun_18_1506.bof', 'r_2x_8a_r311b_1_2009_Jun_25_1214.bof', 'roachtest_2009_Nov_06_1147.bof', 'rmspec_2009_Nov_06_0426.bof', 'test_2010_Feb_05_1139.bof', 'r_2x_8a_r312a_2009_Mar_31_1556.bof', ... 'r_xaui_test_2009_Jun_22_2018.bof']

To run one of the listed .bof files, you can program the FPGA:

In [4]:roach.progdev('test_2010_Feb_05_1139.bof')

Out[4]:'ok'

Once something is running on the FPGA, you can see what registers are available:

In [5]:roach.listdev()

Out[5]: ['softwareOut', …. 'sys_board_id']

To read or write to any one of the registers we have the following commands: We wrote a vale of 5 to the softwareIn register and read the value of softwareOut which has to be the same.

In [6]:roach.write_int('softwareIn', 5)

In [7]:roach.read_int('softwareOut')

Out[7]:5

To unload the boffile we have the command:

[8] roach.progdev('')

Out[8]: 'ok'

All the above commands are given on tofu as we have the Ethernet interface to roach via tofu.

3 – Data Acquisition

Open an xterm in the following network:

ssh -l cicada cicada2

This will open the access to cicada2. The 10Gbe cable from roach is connected to cicada2 to the port 10002. Therefore the data flow can be checked by looking at the “ifconfig” on cicada2.

Then to view the spectrum of the data open ipython and execute the file “roach_spec_1k.py”.

[cicada@cicada2 ~]$ipython

[1] execfile('roach_spec_1k.py”)

This will give you the GNU plot of the spectrum.

There is an another way to get the plot of the spectrum. Open the ssh telnet to cicada2 and give the following command:

cicada@cicada2$ MillionWeb.

Make sure all the commands related to data acquisition should be given in cicada2.
Topic attachments
I Attachment Action Size Date Who Comment
roachInputTest.gifgif roachInputTest.gif manage 19 K 2010-02-25 - 14:08 UnknownUser Model file of the roach test design.
Topic revision: r2 - 2010-02-25, ShilpaBollineni
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback