counter
- simple 4-bit counter driving LEDs. The design targets the Basys3 board and the Arty boards.picosoc
- picorv32 based SoC. The design targets the Basys3 board.linux_litex
- LiteX based system with Linux capable VexRiscv core. The design includes DDR and Ethernet controllers. The design targets the Arty boards.
The Linux images for the linux_litex
example can be built following the linux on litex vexriscv instructions.
The linux_litex
example is already provided with working Linux images.
If you have not already done so, clone this repository and cd into it:
sudo apt install git
git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples
Choose the installation directory (see the README one level up for details):
export INSTALL_DIR=~/opt/symbiflow # or somewhere else you choose
bash conda_installer.sh -b -p $INSTALL_DIR/xc7/conda
source "$INSTALL_DIR/xc7/conda/etc/profile.d/conda.sh"
conda env create -f xc7/conda_lock.yml -n xc7
conda activate xc7
mkdir -p $INSTALL_DIR/xc7/install
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/presubmit/install/1049/20201123-030526/symbiflow-arch-defs-install-05bd35c7.tar.xz | tar -xJC $INSTALL_DIR/xc7/install
mkdir -p $INSTALL_DIR/xc7/install/share/symbiflow/arch
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/presubmit/install/1049/20201123-030526/symbiflow-xc7a50t_test.tar.xz | tar -xJC $INSTALL_DIR/xc7/install/share/symbiflow/arch
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/presubmit/install/1049/20201123-030526/symbiflow-xc7a100t_test.tar.xz | tar -xJC $INSTALL_DIR/xc7/install/share/symbiflow/arch
conda deactivate
Before building any example, set the installation directory to match what you set it to earlier,
export INSTALL_DIR=~/opt/symbiflow
and prepare the environment:
# adding symbiflow toolchain binaries to PATH
export PATH="$INSTALL_DIR/xc7/install/bin:$PATH"
source "$INSTALL_DIR/xc7/conda/etc/profile.d/conda.sh"
conda activate xc7
To build the counter example, run any or all of the following commands:
pushd xc7/counter_test && TARGET="arty_35" make && popd
pushd xc7/counter_test && TARGET="arty_100" make && popd
pushd xc7/counter_test && TARGET="basys3" make && popd
To build the picosoc example, run the following commands:
pushd xc7/picosoc_demo && make && popd
To build the litex example, run the following commands:
mkdir xc7/litex_demo
pushd xc7/litex_demo
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
chmod +x litex_setup.py
./litex_setup.py init
./litex_setup.py install
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz
tar -xf riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz
export PATH=$PATH:$PWD/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14/bin/
pushd litex/litex/boards/targets && ./arty.py --toolchain symbiflow --cpu-type vexriscv --sys-clk-freq 80e6 --no-ident-version --build && popd
popd
To build the linux-litex-demo example, run the following commands:
pushd xc7/linux_litex_demo && make && popd
pushd xc7/linux_litex_demo && TARGET="arty_100" make && popd