abstractaccelerator/fpga
colin 18c8352c09 Add ram test and verilator in fpga DEMO. 2022-02-09 12:47:35 +00:00
..
blink add ram test. 2022-02-08 03:00:40 +00:00
ram Add ram test and verilator in fpga DEMO. 2022-02-09 12:47:35 +00:00
verilator Add ram test and verilator in fpga DEMO. 2022-02-09 12:47:35 +00:00
.gitignore Add fpga 2022-02-02 03:43:53 +00:00
Readme.md Add ram test and verilator in fpga DEMO. 2022-02-09 12:47:35 +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 verilator form source to use new version

git clone https://github.com/verilator/verilator   # Only first time

# Every time you need to build:
unsetenv VERILATOR_ROOT  # For csh; ignore error if on bash
unset VERILATOR_ROOT  # For bash
cd verilator
git pull         # Make sure git repository is up-to-date
git tag          # See what versions exist
#git checkout master      # Use development branch (e.g. recent bug fixes)
#git checkout stable      # Use most recent stable release
#git checkout v{version}  # Switch to specified release version

autoconf         # Create ./configure script
./configure      # Configure and create Makefile
make -j `nproc`  # Build Verilator itself (if error, try just 'make')
sudo make install

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