Repository navigation
changing the BOARD variable of a PYNQ OS image
Some RFSoC boards are almost identical:
- the ZCU216 and ZCU208 have different FPGA chips with different DAC and ADC counts and speeds
- the RFSoC4x2 and RFSoC2x4 have the same FPGA, but wire different DACs and ADCs to the SMA ports
These pairs of boards are compatible with each others' PYNQ OS SD images (but not firmware). This is useful because Xilinx provides prebuilt SD images for the ZCU208 and RFSoC4x2, but not the other two boards. However, you need to set the BOARD environment variable so the QICK library recognizes which board you are actually using. In other words: to use an RFSoC2x4, you should write the RFSoC4x2 image to an SD card but then set the BOARD variable to "RFSoC2x4".
To change the value of BOARD, follow the instructions in https://docs.qick.dev/latest/quick_start.html to get a root terminal using SSH or Jupyter, then use a text editor to open the file /etc/profile.d/boardname.sh. It should look like this:
if [ -z "$BOARD" ]; then
if [ -e /proc/device-tree/chosen/pynq_board ]; then
export BOARD=`cat /proc/device-tree/chosen/pynq_board | tr '\0' '\n'`
else
export BOARD=Unknown
fi
fiModify the file as shown below, to add one line at the beginning that sets BOARD to a hard-coded value (in this example, RFSoC2x4:
export BOARD=RFSoC2x4
if [ -z "$BOARD" ]; then
if [ -e /proc/device-tree/chosen/pynq_board ]; then
export BOARD=`cat /proc/device-tree/chosen/pynq_board | tr '\0' '\n'`
else
export BOARD=Unknown
fi
fiReboot or power-cycle the board. If now in a Jupyter notebook you run import os; print(os.environ['BOARD']), you should see RFSoC2x4 instead of RFSoC4x2.