diff --git a/.travis.yml b/.travis.yml index ab3c343..6293756 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,14 +20,14 @@ jobs: include: - stage: SymbiFlow install: - - tuttest README.md unnamed1 | bash - + - tuttest xc7/README.md unnamed0 | bash - script: - - tuttest README.md unnamed3 | bash - + - tuttest xc7/README.md unnamed1 | bash - - # install: - - tuttest README.md unnamed2 | bash - + - tuttest eos-s3/README.md unnamed0 | bash - script: - - tuttest README.md unnamed4 | bash - + - tuttest eos-s3/README.md unnamed1 | bash - diff --git a/README.md b/README.md index 84dc9ad..f0f1425 100644 --- a/README.md +++ b/README.md @@ -36,29 +36,10 @@ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O co 2. Toolchain -FIXME: This should be included from xc7/README.md +* For the Artix-7 devices see [xc7/README.md](xc7/README.md#setting-up-the-toolchain). -For the Artix-7 devices: -```bash -INSTALL_DIR="/opt/symbiflow/xc7" -bash conda_installer.sh -b -p $INSTALL_DIR/conda && rm conda_installer.sh -source "$INSTALL_DIR/conda/etc/profile.d/conda.sh" -conda env create -f xc7/environment.yml -conda activate xc7 -wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/presubmit/install/477/20200714-082108/symbiflow-arch-defs-install-8eb88e76.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/install -conda deactivate -``` - -FIXME: This should be included from eos-s3/README.md - -For the EOS S3 devices: - -```bash -export INSTALL_DIR="/opt/symbiflow/eos-s3" -wget 'https://github.com/QuickLogic-Corp/quicklogic-fpga-toolchain/releases/download/v1.1.0/Symbiflow_v1.1.0.gz.run' -bash Symbiflow_v1.1.0.gz.run -``` +* For the EOS S3 devices see [eos-s3/README.md](eos-s3/README.md#setting-up-the-toolchain). ## Build Example Designs @@ -70,56 +51,9 @@ The example designs are provided in separate directories: ### Example designs for the Artix-7 devices: - -1. `counter` - simple 4-bit counter driving LEDs. The design targets the [Basys3 board](https://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/) and the [Arty board](https://store.digilentinc.com/arty-a7-artix-7-fpga-development-board-for-makers-and-hobbyists/). -1. `picosoc` - [picorv32](https://github.com/cliffordwolf/picorv32) based SoC. The design targets the [Basys3 board](https://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/). -1. `linux_litex` - [LiteX](https://github.com/enjoy-digital/litex) based system with Linux capable [VexRiscv core](https://github.com/SpinalHDL/VexRiscv). The design includes [DDR](https://github.com/enjoy-digital/litedram) and [Ethernet](https://github.com/enjoy-digital/liteeth) controllers. The design targets the [Arty board](https://store.digilentinc.com/arty-a7-artix-7-fpga-development-board-for-makers-and-hobbyists/). - -The Linux images for the `linux_litex` example can be built following the [linux on litex vexriscv](https://github.com/litex-hub/linux-on-litex-vexriscv) instructions. -The `linux_litex` example is already provided with working Linux images. - -To build the examples, run the following commands: - -```bash -export INSTALL_DIR="/opt/symbiflow/xc7" -# adding symbiflow toolchain binaries to PATH -export PATH="$INSTALL_DIR/install/bin:$PATH" -source "$INSTALL_DIR/conda/etc/profile.d/conda.sh" -conda activate xc7 -git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples -# counter example -pushd xc7/counter_test && TARGET="arty_50" make && popd -pushd xc7/counter_test && TARGET="arty_100" make && popd -pushd xc7/counter_test && make clean && TARGET="basys3" make && popd -# picosoc example -pushd xc7/picosoc_demo && make && popd -# litex example -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 --build && popd -# linux litex example -pushd xc7/linux_litex_demo && make && popd -``` +* For the Artix-7 devices see [xc7/README.md](xc7/README.md#building-the-examples). ### Example design for the EOS S3 devices: -FIXME: This should be included from eos-s3/README.md +* For the EOS S3 devices see [eos-s3/README.md](eos-s3/README.md#building-the-examples). -1. `btn_counter` - simple 4-bit counter driving LEDs. The design targets the [EOS S3 FPGA](https://www.quicklogic.com/products/eos-s3/). - -To build the example, run the following commands: - -```bash -export INSTALL_DIR="/opt/symbiflow/eos-s3" -export PATH="$INSTALL_DIR/install/bin:$INSTALL_DIR/install/bin/python:$PATH" -source "$INSTALL_DIR/conda/etc/profile.d/conda.sh" -conda activate - -git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples -pushd eos-s3 && make && popd -``` diff --git a/eos-s3/README.md b/eos-s3/README.md index a2dc18a..c4aed4f 100644 --- a/eos-s3/README.md +++ b/eos-s3/README.md @@ -1,11 +1,31 @@ # SymbiFlow Toolchain Examples for QuickLogic EOS S3 -FIXME: put stuff here +1. `btn_counter` - simple 4-bit counter driving LEDs. The design targets the [EOS S3 FPGA](https://www.quicklogic.com/products/eos-s3/). ## Setting up the toolchain -FIXME: put stuff here +```bash +export INSTALL_DIR="/opt/symbiflow/eos-s3" +bash conda_installer.sh -b -p $INSTALL_DIR/conda && rm conda_installer.sh +source "$INSTALL_DIR/conda/etc/profile.d/conda.sh" +conda env create -f eos-s3/environment.yml +conda activate eos-s3 +wget -qO- https://quicklogic-my.sharepoint.com/:u:/p/kkumar/Eb7341Bq-XRAukVQ6oQ6PrgB-qdFbrsrPEON1yTa4krFSA?download=1 | tar -xJ -C $INSTALL_DIR +cp -r $INSTALL_DIR/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/conda/envs/eos-s3/share/ +conda deactivate +``` ## Building the examples -FIXME: put stuff here +To build the examples, run the following commands: + +```bash +export INSTALL_DIR="/opt/symbiflow/eos-s3" +export PATH="$INSTALL_DIR/install/bin:$PATH" +source "$INSTALL_DIR/conda/etc/profile.d/conda.sh" +conda activate eos-s3 + +git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples +pushd eos-s3/btn_counter && make && popd +``` + diff --git a/eos-s3/Makefile b/eos-s3/btn_counter/Makefile similarity index 100% rename from eos-s3/Makefile rename to eos-s3/btn_counter/Makefile diff --git a/eos-s3/btn_counter.v b/eos-s3/btn_counter/btn_counter.v similarity index 100% rename from eos-s3/btn_counter.v rename to eos-s3/btn_counter/btn_counter.v diff --git a/eos-s3/chandalar.pcf b/eos-s3/btn_counter/chandalar.pcf similarity index 100% rename from eos-s3/chandalar.pcf rename to eos-s3/btn_counter/chandalar.pcf diff --git a/eos-s3/environment.yml b/eos-s3/environment.yml index 1e43f56..f28ee91 100644 --- a/eos-s3/environment.yml +++ b/eos-s3/environment.yml @@ -1,10 +1,11 @@ name: eos-s3 channels: - - antmicro/label/ql + - conda-forge + - quicklogic-corp dependencies: - - antmicro/label/ql::yosys - - antmicro/label/ql::yosys-plugins - - antmicro/label/ql::vtr + - quicklogic-corp::yosys=0.6.0_0013_g2478b28 + - quicklogic-corp::yosys-plugins=0.1.0_0005_g6bbbc9b + - quicklogic-corp::vtr=v8.0.0_rc2_4006_g36a4d4b - make - lxml - simplejson diff --git a/eos-s3/quickfeather.pcf b/eos-s3/quickfeather.pcf deleted file mode 100644 index b9a2aef..0000000 --- a/eos-s3/quickfeather.pcf +++ /dev/null @@ -1,5 +0,0 @@ -set_io clk 63 -set_io led(0) 34 -set_io led(1) 39 -set_io led(2) 38 -set_io led(3) 25 diff --git a/eos-s3/requirements.txt b/eos-s3/requirements.txt index fc75d5e..3042694 100644 --- a/eos-s3/requirements.txt +++ b/eos-s3/requirements.txt @@ -1,4 +1,2 @@ python-constraint -git+https://github.com/symbiflow/fasm -git+https://github.com/antmicro/quicklogic-fasm -git+https://github.com/antmicro/quicklogic-fasm-utils +git+https://github.com/QuickLogic-Corp/quicklogic-fasm diff --git a/xc7/README.md b/xc7/README.md index a57036d..266dedb 100644 --- a/xc7/README.md +++ b/xc7/README.md @@ -1,11 +1,51 @@ # SymbiFlow Toolchain Examples for Xilinx 7 Series -FIXME: put stuff here +1. `counter` - simple 4-bit counter driving LEDs. The design targets the [Basys3 board](https://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/) and the [Arty board](https://store.digilentinc.com/arty-a7-artix-7-fpga-development-board-for-makers-and-hobbyists/). +1. `picosoc` - [picorv32](https://github.com/cliffordwolf/picorv32) based SoC. The design targets the [Basys3 board](https://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/). +1. `linux_litex` - [LiteX](https://github.com/enjoy-digital/litex) based system with Linux capable [VexRiscv core](https://github.com/SpinalHDL/VexRiscv). The design includes [DDR](https://github.com/enjoy-digital/litedram) and [Ethernet](https://github.com/enjoy-digital/liteeth) controllers. The design targets the [Arty board](https://store.digilentinc.com/arty-a7-artix-7-fpga-development-board-for-makers-and-hobbyists/). + +The Linux images for the `linux_litex` example can be built following the [linux on litex vexriscv](https://github.com/litex-hub/linux-on-litex-vexriscv) instructions. +The `linux_litex` example is already provided with working Linux images. ## Setting up the toolchain -FIXME: put stuff here +```bash +INSTALL_DIR="/opt/symbiflow/xc7" +bash conda_installer.sh -b -p $INSTALL_DIR/conda && rm conda_installer.sh +source "$INSTALL_DIR/conda/etc/profile.d/conda.sh" +conda env create -f xc7/environment.yml +conda activate xc7 +wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/presubmit/install/477/20200714-082108/symbiflow-arch-defs-install-8eb88e76.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/install +conda deactivate +``` ## Building the examples -FIXME: put stuff here +To build the example, run the following commands: + +```bash +export INSTALL_DIR="/opt/symbiflow/xc7" +# adding symbiflow toolchain binaries to PATH +export PATH="$INSTALL_DIR/install/bin:$PATH" +source "$INSTALL_DIR/conda/etc/profile.d/conda.sh" +conda activate xc7 +git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples +# counter example +pushd xc7/counter_test && make clean && TARGET="arty_50" make && popd +pushd xc7/counter_test && make clean && TARGET="arty_100" make && popd +pushd xc7/counter_test && make clean && TARGET="basys3" make && popd +# picosoc example +pushd xc7/picosoc_demo && make && popd +# litex example +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 --build && popd +# linux litex example +pushd xc7/linux_litex_demo && make && popd +``` +