abstractaccelerator/fpga
colin 3ba8533996 Add fpga 2022-02-02 03:43:53 +00:00
..
blink Add fpga 2022-02-02 03:43:53 +00:00
.gitignore Add fpga 2022-02-02 03:43:53 +00:00
Readme.md Add fpga 2022-02-02 03:43:53 +00:00

Readme.md

fpga demo from all open resource

install depends

sudo apt-get install build-essential clang bison flex libreadline-dev gawk tcl-dev libffi-dev git graphviz xdot pkg-config python3 libboost-system-dev libboost-python-dev libboost-filesystem-dev zlib1g-dev build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libboost-iostreams-dev python3.9-dev libboost-iostreams-dev libeigen3-dev libudev-dev cmake python3-pip gcc gdb autoconf automake libtool libusb-dev libusb-1.0-0-dev python2.7-dev

install yosys

git clone https://github.com/YosysHQ/yosys
make config-gcc
make -j
sudo make install

install Trellis for ECP5 devices support

git clone --recursive https://github.com/YosysHQ/prjtrellis \
&& cd prjtrellis && cd libtrellis \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr/local . && make -j \
&& sudo make install \
&& cd ../../

install nextpnr

git clone https://github.com/YosysHQ/nextpnr.git \
&& cd nextpnr \
&& cmake . -DARCH=ecp5 -DTRELLIS_INSTALL_PREFIX=/usr/local \
&& make -j \
&& sudo make install \
&& cd ..

build openocd with DAP

git clone https://github.com/signal11/hidapi.git \
&& cd hidapi \
&& ./bootstrap \
&& ./configure \
&& make -j \
&& sudo make install \
&& cd ..

git clone https://github.com/riscv/riscv-openocd.git \
&& cd riscv-openocd \
&& ./bootstrap \
&& ./configure --prefix=$RISCV --enable-cmsis-dap --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi --enable-jlink \
&& make \
&& sudo make install \
&& cd ..

test with office demo

At /home/colin/develop/Colorlight-FPGA-Projects/demo/i5

./../../tools/dapprog blink.svf