Dobrica Pavlinušić's random unstructured stuff
cfu-playground: Revision 8
{toc: }

^ video

* https://www.youtube.com/watch?v=_1yrxrl61o4
* https://www.youtube.com/watch?v=kRTs6B-kEOE

^ git

.pre
dpavlin@klin:/klin/FPGA/CFU-Playground$ git remote -v
origin https://github.com/google/CFU-Playground.git (fetch)
origin https://github.com/google/CFU-Playground.git (push)
dpavlin@klin:/klin/FPGA/CFU-Playground$ git submodule init
dpavlin@klin:/klin/FPGA/CFU-Playground$ git submodule update
.pre

^ ulx3s board

https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/radiona_ulx3s.py

.pre
dpavlin@klin:/klin/FPGA/CFU-Playground$ find . -name radiona_ulx3s.py
./third_party/python/litex_boards/litex_boards/targets/radiona_ulx3s.py
./third_party/python/litex_boards/litex_boards/platforms/radiona_ulx3s.py
# edit fpga settings here
dpavlin@klin:/klin/FPGA/CFU-Playground$ vi ./third_party/python/litex_boards/litex_boards/targets/radiona_ulx3s.py
.pre

modifications for 85F {file: litex-85f.diff}

^ build

.pre
klin:/klin/FPGA/CFU-Playground/proj/avg_pdti8# cat env.sh
#!/bin/sh -xe

echo https://github.com/google/CFU-Playground

export PATH=/klin/FPGA/saxonsoc/xpack-riscv-none-embed-gcc-8.3.0-1.2/bin/:/klin/FPGA/saxonsoc/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6/bin/:$PATH
export TARGET=radiona_ulx3s
make prog

.pre

^^ sumulation

.pre
dpavlin@klin:/klin/FPGA/CFU-Playground/proj/avg_pdti8$ time make PLATFORM=sim load -j 4
.pre

^^ boot over serial using network

^^^ host with ulx3s connected

root@pihdmi:/home/pi# socat /dev/ttyUSB0,b115200,raw,echo=0 TCP:10.60.0.92:2003

^^^ machine running litex

dpavlin@klin:/klin/FPGA/CFU-Playground/proj/hps_accel$ socat TCP-LISTEN:2003 PTY,link=ttyV2,raw

# re-run terminal with new virtal ttyV2

.pre
dpavlin@klin:/klin/FPGA/CFU-Playground/proj/hps_accel$ /klin/FPGA/CFU-Playground/soc/bin/litex_term --speed 115200 --serial-boot --kernel /klin/FPGA/CFU-Playground/proj/hps_accel/build/software.bin ttyV2

litex> serialboot
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
[LXTERM] Received firmware download request from the device.
[LXTERM] Uploading /klin/FPGA/CFU-Playground/proj/hps_accel/build/software.bin to 0x40000000 (1313688 bytes)...
[LXTERM] Upload complete (9.9KB/s).
[LXTERM] Booting the device.
[LXTERM] Done.
Executing booted program at 0x40000000

--============= Liftoff! ===============--
Hello, World!
.pre