|
|
##RFSoC4x2 Setup
|
|
|
You need to prepare an SD Card from which the rfsoc4x2 can boot Linux. The compressed image is hosted by BYU here https://casper.groups.et.byu.net/rfsoc4x2/rfsoc4x2_casper.img.tar.gz
|
|
|
|
|
|
The uncompressed image is 16GB so choose an appropriate sd card.
|
|
|
|
|
|
Uncompress the image with
|
|
|
|
|
|
$ tar -xzf rfsoc4x2_casper.img.tar.gz
|
|
|
|
|
|
Flash the sd card with the dd utility:
|
|
|
|
|
|
$ dd if=rfsoc4x2_casper.img of=/dev/<name of device> bs=32MB status=progress
|
|
|
|
|
|
!!!Warning, make sure /dev/... corresponds to your sd card, mistakes here could break your system
|
|
|
|
|
|
Insert the sd card into the rfsoc4x2 and position the adjacent switch to 'SD' so the board knows to boot from the sd card.
|
|
|
|
|
|
#Getting the IP address of the rfsoc4x2
|
|
|
If you know the ip address you can skip this step
|
|
|
With a micro-usb cable, establish a serial connection with the rfsoc4x2
|
|
|
Power on the board, the boot log should appear in the serial connection. After boot is complete, login with user: 'casper', password: 'casper'. Run
|
|
|
|
|
|
$ ip addr
|
|
|
|
|
|
and get the ip address of the board from the output.
|
|
|
|
|
|
Power off the rfsoc4x2. Connect it to a network over ethernet cable and power on the rfsoc4x2. Try to ssh into the rfsoc 4x2 with casper@<ip address> and password: 'casper'. If this works you can move on to the next step.
|
|
|
|
|
|
##Installing python and casperfpga
|
|
|
The python module casperfpga will allow you to communicate with the rfsoc4x2, including programming the fpga.
|
|
|
|
|
|
The following instructions explain how to setup a python environment using miniconda.
|
|
|
Miniconda is a lightweight version of anaconda. Before proceeding, download and install miniconda on your system.
|
|
|
|
|
|
We are going to create a shell environment that uses a specific version of python. Do so by running,
|
|
|
|
|
|
$ conda create -n casper python=3.8.20
|
|
|
|
|
|
Activate this environment by running
|
|
|
|
|
|
$ conda activate casper
|
|
|
|
|
|
Remember to activate the environment at the start of every new session.
|
|
|
|
|
|
We will now install casperfpga. The repository for casperfpga has been included. Navigate to its directory and run the following:
|
|
|
|
|
|
$ pip install -r requirements.txt
|
|
|
$ pip install .
|
|
|
|
|
|
Casperfpga is now installed! Test this by opening an ipython session
|
|
|
$ ipython
|
|
|
In the ipython session, import casperfpga:
|
|
|
|
|
|
import casperfpga
|
|
|
|
|
|
If no errors are thrown, then you installed casperfpga correctly.
|
|
|
|
|
|
#Programming the rfsoc4x2
|
|
|
This needs to be done every time the rfsoc4x2 boots up. We use casperfpga for programming. Once again enter an ipython session:
|
|
|
|
|
|
$ ipython
|
|
|
|
|
|
Create an object that connects to the board
|
|
|
|
|
|
import casperfpga
|
|
|
fpga = casperfpga.CasperFpga(<ip addr in quotes>)
|
|
|
|
|
|
Upload the provided .fpg file
|
|
|
|
|
|
fpga.upload_to_ram_and_program(<.fpg path>)
|
|
|
|
|
|
Program the clocks
|
|
|
|
|
|
rfdc = fpga.adcs['rfdc']
|
|
|
rfdc.init()
|
|
|
rfdc.progpll('lmk', 'rfsoc4x2_lmk_PL_125M_SYSREF_5M_LMXREF_250M.txt')
|
|
|
rfdc.progpll('lmx', 'rfsoc4x2_lmx_inputref_250M_outputref_250M.txt')
|
|
|
|
|
|
At this point the rfsoc4x2 is ready to go! The next section describes how to set up the Orin.
|
|
|
|
|
|
# Orin Board Setup and Installation
|
|
|
For the Orin board and getting the proper drivers/packages I took the following steps to get the board set up.
|
|
|
## System Flashing
|
... | ... | |