A repository for Simons Observatory UK FPGA firmware and control software.
- Ubuntu 20.04
- Xilinx Vivado System Edition 2021.2
- MATLAB/Simulink 2021a
- Clone this repository
- Clone submodules:
git submodule update --init --recursive
- Create a local environment specification file
firmware/startsg.local. - From
firmware/, runstartsg(if your environment file is calledstartsg.local) orstartsg <my_local_environment_file.local>.
firmware/-- Firmware source files and librariessoftware/-- Libraries providing communication to FPGA hardware and firmwaredocs/-- Documentation
- Obtain a copy of the CASPER KRM-appropriate OS image, available hosted on Google Drive
- Copy this image to SD card. Be careful, this command will wipe your SD card (or your hard disk if you enter the wrong device)
dd if=<casper_image_file.img> of=/dev/<your-SD-card-device>
for example: dd if=casper.img of=/dev/sdb
3. Insert the SD card into the KRM board.
- Consult the KRM BMC guide for detailed instructions on interfacing with the KRM RFSoC SoM
- Connect to the micro-USB-B port on the KRM board
- Connect to the BMC controller serial interface at 115200 baud (which seems to be the "second" serial device). Eg, in Linux:
picocom /dev/ttyUSB1 -b 115200 - Set the board to boot from SD card:
returns
# List boot modes: krm4:bboot mode invalid option possible selections are: 0 - JTAG 1 - QSPI24 2 - QSPI32 5 - SD1 6 - eMMC18 7 - USB0 8 - PJTAG0 e - SD1-LSreturns# Boot from SD card krm4:b5boot mode SD1 - Save boot settings to flash
krm4:f - Power cycle board
At this point, the board should boot to Linux from the SD card. You can watch the boot process via the "other" (/dev /ttyUSB0, for example) serial interface at 115200 baud.
By default, the provided image will configure the KRM board's Ethernet interface to have two IP addresses. One is obtained automatically via DHCP. The other is statically defined, and is 10.11.11.11/24. Note that, at present, the provided OS image does not include a statically defined MAC address for the interface, so after a power cycles the board is likely to be allocated a new IP address.
- Connect via SSH
ssh casper@10.11.11.11 # password is casper
- SSH into the RFSoC and activate an appropriate Python 3 environment
ssh casper@<RFSoC Board IP
source ~/p38venv/bin/activate- Update source code
cd ~/src/souk-firmware
git checkout main
git pull
git submodule update --recursive --init software/*- Install
casperfpgaand SOUK control library
cd ~/src/souk-firmware/software/casperfpga
pip install .
cd ../control_sw
pip install .- Install
tcpborphserver3
cd ~/src/souk-firmware/software/zynq
cd katcp_devel/rfdc
make clean
make -f Makefile.Linux
cd ..
make clean
RFSOC_PLATFORM=ZCU216 IS_RFSOC=1 make
sudo make install
cd tcpborphserver3
sudo make install- Reboot
sudo reboot now