LiteX+ SymbiFlow

Language & Programming

LiteX+ SymbiFlow

First, we setup the folder structure and clone some repos:

export FPGA_FAM=xc7
export ROOT_DIR=~/Development
export LITEX_DIR=$ROOT_DIR/litex
export INSTALL_DIR=$ROOT_DIR/symbiflow-examples
export PATH=$INSTALL_DIR/$FPGA_FAM/install/bin:$PATH
cd $ROOT_DIR
git clone https://github.com/enjoy-digital/litex
git clone https://github.com/SymbiFlow/symbiflow-examples

In the next step, we download the symbiflow toolchain:

mkdir $INSTALL_DIR/xc7/install
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/112/20201208-080919/symbiflow-arch-defs-install-7c1267b7.tar.xz | tar -xJC $INSTALL_DIR/xc7/install
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/112/20201208-080919/symbiflow-arch-defs-xc7a50t_test-7c1267b7.tar.xz | tar -xJC $INSTALL_DIR/xc7/install
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/112/20201208-080919/symbiflow-arch-defs-xc7a100t_test-7c1267b7.tar.xz | tar -xJC $INSTALL_DIR/xc7/install
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/112/20201208-080919/symbiflow-arch-defs-xc7z010_test-7c1267b7.tar.xz | tar -xJC $INSTALL_DIR/xc7/install

Now we setup the conda environment and make sure that all LiteX modules are installed into it.

cd $INSTALL_DIR
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh
bash conda_installer.sh -u -b -p $INSTALL_DIR/$FPGA_FAM/conda
source "$INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh"
conda env create -f $FPGA_FAM/environment.yml
conda activate $FPGA_FAM
cd $LITEX_DIR/litex
./litex_setup.py install

Lastly, we build the LiteX SoC for our target, the Arty A7.

cd $LITEX_DIR/litex/litex/boards/targets
python3 ./arty.py --toolchain symbiflow --cpu-type vexriscv --sys-clk-freq 80e6 --build
python3 ./arty.py --toolchain symbiflow --cpu-type vexriscv --sys-clk-freq 80e6 --build

Leave a Reply

Your email address will not be published. Required fields are marked *