From 11329c06d0441c2cd15c29bae699865a3cde4361 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 17 Sep 2020 14:58:40 -0700 Subject: [PATCH 1/9] Attempt to roll tarball and Yosys packages for symbiflow-examples. Signed-off-by: Tim Callahan --- README.rst | 2 +- xc7/environment.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 660be00..96f0ca8 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,7 @@ This section describes how to install the toolchain. This procedure is divided i 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 + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/install conda deactivate * For the EOS S3 devices: diff --git a/xc7/environment.yml b/xc7/environment.yml index 0113bb2..ff52b3f 100644 --- a/xc7/environment.yml +++ b/xc7/environment.yml @@ -2,8 +2,8 @@ name: xc7 channels: - symbiflow dependencies: - - symbiflow::symbiflow-yosys=0.8_3925_g6bccd35a - - symbiflow::symbiflow-yosys-plugins=1.0.0.7_0032_g104f4fc + - symbiflow::symbiflow-yosys=0.8_6021_gd8b2d1a2 + - symbiflow::symbiflow-yosys-plugins=1.0.0.7_0117_g160b309 - symbiflow::symbiflow-vtr=8.0.0.rc2_4003_g8980e4621 - symbiflow::prjxray-db=0.0_0230_g485a837 - symbiflow::prjxray-tools From 3aece880b7f2750da6f0d5f46f3016cc2adb3e08 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 17 Sep 2020 16:25:55 -0700 Subject: [PATCH 2/9] Update yosys plugins package version to match symbiflow-arch-defs. Signed-off-by: Tim Callahan --- xc7/environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xc7/environment.yml b/xc7/environment.yml index ff52b3f..79ece8e 100644 --- a/xc7/environment.yml +++ b/xc7/environment.yml @@ -2,8 +2,8 @@ name: xc7 channels: - symbiflow dependencies: - - symbiflow::symbiflow-yosys=0.8_6021_gd8b2d1a2 - - symbiflow::symbiflow-yosys-plugins=1.0.0.7_0117_g160b309 + - symbiflow::symbiflow-yosys=0.8_6021_gd8b2d1a2=20200708_083630 + - symbiflow::symbiflow-yosys-plugins=1.0.0.7_0060_g7454cd6=20200902_114536 - symbiflow::symbiflow-vtr=8.0.0.rc2_4003_g8980e4621 - symbiflow::prjxray-db=0.0_0230_g485a837 - symbiflow::prjxray-tools From e82722554ad857224f6c6bc77f187dc8c971199c Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 17 Sep 2020 16:42:56 -0700 Subject: [PATCH 3/9] Update xc7/README.rst to match change in ./README.rst. Signed-off-by: Tim Callahan --- xc7/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xc7/README.rst b/xc7/README.rst index 74da718..ae5226b 100644 --- a/xc7/README.rst +++ b/xc7/README.rst @@ -22,7 +22,7 @@ Setting up the toolchain 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 + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/install conda deactivate .. toolchain_include_end_label From ee2a9fe24644dbdb3f022519aff7e9566a54983b Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 17 Sep 2020 20:23:30 -0700 Subject: [PATCH 4/9] Try newer prjxray-db package. Signed-off-by: Tim Callahan --- xc7/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xc7/environment.yml b/xc7/environment.yml index 79ece8e..24fc2b2 100644 --- a/xc7/environment.yml +++ b/xc7/environment.yml @@ -5,7 +5,7 @@ dependencies: - symbiflow::symbiflow-yosys=0.8_6021_gd8b2d1a2=20200708_083630 - symbiflow::symbiflow-yosys-plugins=1.0.0.7_0060_g7454cd6=20200902_114536 - symbiflow::symbiflow-vtr=8.0.0.rc2_4003_g8980e4621 - - symbiflow::prjxray-db=0.0_0230_g485a837 + - symbiflow::prjxray-db=0.0_0232_g303a61d=20200902_114536 - symbiflow::prjxray-tools - make - lxml From 13094b8d2b398251fe3f3d3892f6d69b21c05247 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 17 Sep 2020 21:32:54 -0700 Subject: [PATCH 5/9] Remove LOC constraint, and add Linux test for 100T. Signed-off-by: Tim Callahan --- xc7/README.rst | 1 + xc7/linux_litex_demo/Makefile | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/xc7/README.rst b/xc7/README.rst index ae5226b..85dabff 100644 --- a/xc7/README.rst +++ b/xc7/README.rst @@ -75,5 +75,6 @@ To build the linux-litex-demo example, run the following commands: .. code:: bash pushd xc7/linux_litex_demo && make && popd + pushd xc7/linux_litex_demo && TARGET=arty_100 make && popd .. build_examples_include_end_label diff --git a/xc7/linux_litex_demo/Makefile b/xc7/linux_litex_demo/Makefile index ba217e5..315f674 100644 --- a/xc7/linux_litex_demo/Makefile +++ b/xc7/linux_litex_demo/Makefile @@ -6,13 +6,22 @@ VERILOG := ${current_dir}/baselitex_arty.v \ MEM_INIT := ${current_dir}/mem.init \ ${current_dir}/mem_1.init \ ${current_dir}/mem_2.init -PARTNAME := xc7a35tcsg324-1 -DEVICE := xc7a50t_test BITSTREAM_DEVICE := artix7 PCF := ${current_dir}/arty.pcf SDC := ${current_dir}/arty.sdc XDC := ${current_dir}/arty.xdc -BUILDDIR := build +BUILDDIR_35 := build +BUILDDIR_100 := build + +ifeq ($(TARGET),arty_100) + PARTNAME := xc7a100tcsg324-1 + DEVICE := xc7a100t_test + BUILDDIR := ${BUILDDIR_100} +else + PARTNAME := xc7a35tcsg324-1 + DEVICE := xc7a50t_test + BUILDDIR := ${BUILDDIR_35} +endif all: ${BUILDDIR}/${TOP}.bit @@ -21,7 +30,7 @@ ${BUILDDIR}: ln -s ${MEM_INIT} ${BUILDDIR} ${BUILDDIR}/${TOP}.eblif: | ${BUILDDIR} - cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} 2>&1 > /dev/null + cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} ${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null @@ -39,5 +48,4 @@ ${BUILDDIR}/${TOP}.bit: ${BUILDDIR}/${TOP}.fasm cd ${BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit clean: - rm -rf ${BUILDDIR} - + rm -rf ${BUILDDIR_35} ${BUILDDIR_100} From 0a2ba746a12c595e9e6eea3729913d6818b815c3 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 17 Sep 2020 21:53:05 -0700 Subject: [PATCH 6/9] Update ./README.rst to get change in xc7/README.rst. Signed-off-by: Tim Callahan --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 96f0ca8..562010f 100644 --- a/README.rst +++ b/README.rst @@ -120,6 +120,7 @@ To build the linux-litex-demo example, run the following commands: .. code:: bash pushd xc7/linux_litex_demo && make && popd + pushd xc7/linux_litex_demo && TARGET=arty_100 make && popd Example design for the EOS S3 devices: ************************************** From 94e7544cfd66adfa8f3fd0e785911bc3f5e11903 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 17 Sep 2020 22:54:05 -0700 Subject: [PATCH 7/9] Really remove the LOC; try to get 100T linux demo to run. Restore output redirect for synth step (deleted by accident). Checking status w/ EOS-S3 updates .. DNM! Change instructions around INSTALL_DIR. Update formatting to rst not md. More formatting fixes, mostly for ..code. Now use $INSTALL_DIR/xc7 and $INSTALL_DIR/eos-s3. Formatting & instructions update. Signed-off-by: Tim Callahan --- .travis.yml | 17 ++- README.rst | 151 ++++++++++++++++---------- README.src.rst | 51 ++++++--- eos-s3/README.rst | 53 ++++++--- xc7/README.rst | 87 ++++++++++----- xc7/counter_test/Makefile | 4 +- xc7/linux_litex_demo/Makefile | 4 +- xc7/linux_litex_demo/baselitex_arty.v | 1 - 8 files changed, 244 insertions(+), 124 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89d4188..a27f5b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,24 +12,31 @@ addons: - python3-pip before_install: + - echo === before_install - sudo locale-gen "en_US.UTF-8" - export LANG="en_US.UTF-8" - source .github/travis/common.sh - rm README.rst && make README.rst && .github/travis/git-check.sh - pip install git+https://github.com/antmicro/tuttest - - tuttest README.rst unnamed0 | bash - + - tuttest README.rst wget-conda | bash -ex - jobs: include: - stage: SymbiFlow install: - - tuttest xc7/README.rst unnamed0 | bash - + - echo === stage symbiflow install + - export INSTALL_DIR=$PWD/../opt/symbiflow/xc7 + - tuttest xc7/README.rst xc7-setup-toolchain | bash -ex - script: - - tuttest xc7/README.rst unnamed1,unnamed2,unnamed3,unnamed4,unnamed5 | bash - + - export INSTALL_DIR=$PWD/../opt/symbiflow/xc7 + - tuttest xc7/README.rst xc7-prepare-env,xc7-counter,xc7-picosoc,xc7-litex,xc7-linux | bash -ex - + - # install: - - tuttest eos-s3/README.rst unnamed0 | bash - + - export INSTALL_DIR=$PWD/../opt/symbiflow/eos-s3 + - tuttest eos-s3/README.rst eoss3-setup-toolchain | bash -ex - script: - - tuttest eos-s3/README.rst unnamed1,unnamed2 | bash - + - export INSTALL_DIR=$PWD/../opt/symbiflow/eos-s3 + - tuttest eos-s3/README.rst eoss3-prepare-env,eoss3-counter | bash -ex - diff --git a/README.rst b/README.rst index 562010f..55d9d4f 100644 --- a/README.rst +++ b/README.rst @@ -22,46 +22,71 @@ The repository includes: * `.travis.yml <.travis.yml>`_ - Travis CI configuration file -Toolchain installation ----------------------- -This section describes how to install the toolchain. This procedure is divided in two steps: +Clone this repository +--------------------- -- Installing the Conda package manager -- Downloading the architecture definitions and installing the toolchain - -#. Conda +If you have not already done so, clone this repository and ``cd`` into it: .. code:: bash - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh + sudo apt install git + git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples -#. Toolchain + +Toolchain installation +---------------------- + +This section describes how to install the toolchain. This procedure is divided in three steps: + +- Installing the Conda package manager +- Choosing an installation directory +- Downloading the architecture definitions and installing the toolchain + +1. Conda + +.. code:: bash + :name: wget-conda + + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh + +2. Choose the install directory + +The install directory can either be in your home directory +such as `~/opt/symbiflow` or in a system directory such as `/opt/symbiflow`. +If you choose a system directory, you will need root permission to perform the installation, +and so you will need to add some `sudo` commands to the instructions below. + +.. code:: bash + + INSTALL_DIR=~/opt/symbiflow + +3. Toolchain * For the Artix-7 devices: .. code:: bash + :name: xc7-setup-toolchain - 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/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/install - conda deactivate + 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/environment.yml + conda activate xc7 + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/xc7/install + conda deactivate * For the EOS S3 devices: .. code:: bash + :name: eoss3-setup-toolchain - 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 + bash conda_installer.sh -b -p $INSTALL_DIR/eos-s3/conda + source "$INSTALL_DIR/eos-s3/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/eos-s3 + cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/ + conda deactivate Build Example Designs --------------------- @@ -72,75 +97,87 @@ The example designs are provided in separate directories: * ``xc7`` directory for the Artix-7 devices * ``eos-s3`` directory for the EOS S3 devices + + Example designs for the Artix-7 devices: **************************************** -* For the Artix-7 devices: - -Before building any example, prepare environment: +Before building any example, set the installation directory to match what you set it to earlier, .. code:: 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 + export INSTALL_DIR=~/opt/symbiflow -To build the counter example, run the following commands: +and prepare the environment: .. code:: bash + :name: xc7-prepare-env - 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 + # 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: + +.. code:: bash + :name: xc7-counter + + 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 To build the picosoc example, run the following commands: .. code:: bash + :name: xc7-picosoc - pushd xc7/picosoc_demo && make && popd + pushd xc7/picosoc_demo && make && popd To build the litex example, run the following commands: .. code:: bash + :name: xc7-litex - 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 + 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 To build the linux-litex-demo example, run the following commands: .. code:: bash + :name: xc7-linux - pushd xc7/linux_litex_demo && make && popd - pushd xc7/linux_litex_demo && TARGET=arty_100 make && popd + pushd xc7/linux_litex_demo && make && popd + pushd xc7/linux_litex_demo && TARGET="arty_100" make && popd Example design for the EOS S3 devices: ************************************** -* For the EOS S3 devices: - -Before building example, prepare environment: +Before building any example, set the installation directory to match what you set it to earlier, .. code:: 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 + export INSTALL_DIR=~/opt/symbiflow - git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples +and prepare the environment: + +.. code:: bash + :name: eoss3-prepare-env + + export PATH="$INSTALL_DIR/eos-s3/install/bin:$PATH" + source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" + conda activate eos-s3 To build the example, run the following command: .. code:: bash + :name: eoss3-counter - pushd eos-s3/btn_counter && make && popd + pushd eos-s3/btn_counter && make && popd diff --git a/README.src.rst b/README.src.rst index 9162f09..5774ed1 100644 --- a/README.src.rst +++ b/README.src.rst @@ -22,21 +22,46 @@ The repository includes: * `.travis.yml <.travis.yml>`_ - Travis CI configuration file -Toolchain installation ----------------------- -This section describes how to install the toolchain. This procedure is divided in two steps: +Clone this repository +--------------------- -- Installing the Conda package manager -- Downloading the architecture definitions and installing the toolchain - -#. Conda +If you have not already done so, clone this repository and ``cd`` into it: .. code:: bash - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh + sudo apt install git + git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples -#. Toolchain + +Toolchain installation +---------------------- + +This section describes how to install the toolchain. This procedure is divided in three steps: + +- Installing the Conda package manager +- Choosing an installation directory +- Downloading the architecture definitions and installing the toolchain + +1. Conda + +.. code:: bash + :name: wget-conda + + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh + +2. Choose the install directory + +The install directory can either be in your home directory +such as `~/opt/symbiflow` or in a system directory such as `/opt/symbiflow`. +If you choose a system directory, you will need root permission to perform the installation, +and so you will need to add some `sudo` commands to the instructions below. + +.. code:: bash + + INSTALL_DIR=~/opt/symbiflow + +3. Toolchain * For the Artix-7 devices: @@ -51,6 +76,7 @@ This section describes how to install the toolchain. This procedure is divided i :start-after:.. toolchain_include_begin_label :end-before:.. toolchain_include_end_label + Build Example Designs --------------------- @@ -60,20 +86,19 @@ The example designs are provided in separate directories: * ``xc7`` directory for the Artix-7 devices * ``eos-s3`` directory for the EOS S3 devices + + Example designs for the Artix-7 devices: **************************************** -* For the Artix-7 devices: - .. include:: xc7/README.rst :start-after:.. build_examples_include_begin_label :end-before:.. build_examples_include_end_label + Example design for the EOS S3 devices: ************************************** -* For the EOS S3 devices: - .. include:: eos-s3/README.rst :start-after:.. build_examples_include_begin_label :end-before:.. build_examples_include_end_label diff --git a/eos-s3/README.rst b/eos-s3/README.rst index 57b36c7..f795c47 100644 --- a/eos-s3/README.rst +++ b/eos-s3/README.rst @@ -3,21 +3,39 @@ SymbiFlow Toolchain Examples for QuickLogic EOS S3 #. ``btn_counter`` - simple 4-bit counter driving LEDs. The design targets the `EOS S3 FPGA `__. +Clone this repository +--------------------- +If you have not already done so, clone this repository and `cd` into it: + +.. code:: bash + + sudo apt install git + git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples + + Setting up the toolchain ------------------------ +Choose the installation directory (see the `README.rst <../README.rst>`_ one level up for details): + + +.. code:: bash + + export INSTALL_DIR=~/opt/symbiflow + + .. toolchain_include_begin_label .. code:: bash + :name: eoss3-setup-toolchain - 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 + bash conda_installer.sh -b -p $INSTALL_DIR/eos-s3/conda + source "$INSTALL_DIR/eos-s3/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/eos-s3 + cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/ + conda deactivate .. toolchain_include_end_label @@ -26,21 +44,26 @@ Building the examples .. build_examples_include_begin_label -Before building example, prepare environment: +Before building any example, set the installation directory to match what you set it to earlier, .. code:: 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 + export INSTALL_DIR=~/opt/symbiflow - git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples +and prepare the environment: + +.. code:: bash + :name: eoss3-prepare-env + + export PATH="$INSTALL_DIR/eos-s3/install/bin:$PATH" + source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" + conda activate eos-s3 To build the example, run the following command: .. code:: bash + :name: eoss3-counter - pushd eos-s3/btn_counter && make && popd + pushd eos-s3/btn_counter && make && popd .. build_examples_include_end_label diff --git a/xc7/README.rst b/xc7/README.rst index 85dabff..293d7d3 100644 --- a/xc7/README.rst +++ b/xc7/README.rst @@ -10,20 +10,40 @@ SymbiFlow Toolchain Examples for Xilinx 7 Series 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. + +Clone this repository +--------------------- +If you have not already done so, clone this repository and `cd` into it: + +.. code:: bash + + sudo apt install git + git clone https://github.com/SymbiFlow/symbiflow-examples.git && cd symbiflow-examples + + + Setting up the toolchain ------------------------ +Choose the installation directory (see the README_ one level up for details): + +.. _README: ../README.md + +.. code:: bash + + export INSTALL_DIR=~/opt/symbiflow + .. toolchain_include_begin_label .. code:: bash + :name: xc7-setup-toolchain - 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/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/install - conda deactivate + 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/environment.yml + conda activate xc7 + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/xc7/install + conda deactivate .. toolchain_include_end_label @@ -32,49 +52,58 @@ Building the examples .. build_examples_include_begin_label -Before building any example, prepare environment: +Before building any example, set the installation directory to match what you set it to earlier, .. code:: 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 + export INSTALL_DIR=~/opt/symbiflow -To build the counter example, run the following commands: +and prepare the environment: .. code:: bash + :name: xc7-prepare-env - 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 + # 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: + +.. code:: bash + :name: xc7-counter + + 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 To build the picosoc example, run the following commands: .. code:: bash + :name: xc7-picosoc - pushd xc7/picosoc_demo && make && popd + pushd xc7/picosoc_demo && make && popd To build the litex example, run the following commands: .. code:: bash + :name: xc7-litex - 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 + 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 To build the linux-litex-demo example, run the following commands: .. code:: bash + :name: xc7-linux - pushd xc7/linux_litex_demo && make && popd - pushd xc7/linux_litex_demo && TARGET=arty_100 make && popd + pushd xc7/linux_litex_demo && make && popd + pushd xc7/linux_litex_demo && TARGET="arty_100" make && popd .. build_examples_include_end_label diff --git a/xc7/counter_test/Makefile b/xc7/counter_test/Makefile index 078b6c1..cf03dae 100644 --- a/xc7/counter_test/Makefile +++ b/xc7/counter_test/Makefile @@ -25,10 +25,10 @@ ${BUILDDIR}: mkdir ${BUILDDIR} ${BUILDDIR}/${TOP}.eblif: | ${BUILDDIR} - cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} + cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} 2>&1 > /dev/null ${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif - cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} + cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null ${BUILDDIR}/${TOP}.place: ${BUILDDIR}/${TOP}.net cd ${BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -s ${SDC} 2>&1 > /dev/null diff --git a/xc7/linux_litex_demo/Makefile b/xc7/linux_litex_demo/Makefile index 315f674..2d06581 100644 --- a/xc7/linux_litex_demo/Makefile +++ b/xc7/linux_litex_demo/Makefile @@ -11,7 +11,7 @@ PCF := ${current_dir}/arty.pcf SDC := ${current_dir}/arty.sdc XDC := ${current_dir}/arty.xdc BUILDDIR_35 := build -BUILDDIR_100 := build +BUILDDIR_100 := build_100 ifeq ($(TARGET),arty_100) PARTNAME := xc7a100tcsg324-1 @@ -30,7 +30,7 @@ ${BUILDDIR}: ln -s ${MEM_INIT} ${BUILDDIR} ${BUILDDIR}/${TOP}.eblif: | ${BUILDDIR} - cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} + cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC} 2>&1 > /dev/null ${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -s ${SDC} 2>&1 > /dev/null diff --git a/xc7/linux_litex_demo/baselitex_arty.v b/xc7/linux_litex_demo/baselitex_arty.v index 9537b1a..da1d0b6 100644 --- a/xc7/linux_litex_demo/baselitex_arty.v +++ b/xc7/linux_litex_demo/baselitex_arty.v @@ -13454,7 +13454,6 @@ BUFG BUFG_5( wire eth_ref_clk_obuf; OBUF clk_eth_buf(.I(eth_ref_clk_obuf), .O(eth_ref_clk)); -(* LOC="IDELAYCTRL_X1Y0" *) IDELAYCTRL IDELAYCTRL( .REFCLK(clk200_clk), .RST(soc_ic_reset), From 0b3f9adfd8c5f6a8249e030e3dfc837f134a4aa5 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Wed, 23 Sep 2020 14:31:51 -0700 Subject: [PATCH 8/9] Fix ``, fix README links. Signed-off-by: Tim Callahan --- README.rst | 4 ++-- README.src.rst | 4 ++-- eos-s3/README.rst | 4 ++-- xc7/README.rst | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 55d9d4f..eb6a79a 100644 --- a/README.rst +++ b/README.rst @@ -53,9 +53,9 @@ This section describes how to install the toolchain. This procedure is divided i 2. Choose the install directory The install directory can either be in your home directory -such as `~/opt/symbiflow` or in a system directory such as `/opt/symbiflow`. +such as ``~/opt/symbiflow`` or in a system directory such as ``/opt/symbiflow``. If you choose a system directory, you will need root permission to perform the installation, -and so you will need to add some `sudo` commands to the instructions below. +and so you will need to add some ``sudo`` commands to the instructions below. .. code:: bash diff --git a/README.src.rst b/README.src.rst index 5774ed1..abbaf93 100644 --- a/README.src.rst +++ b/README.src.rst @@ -53,9 +53,9 @@ This section describes how to install the toolchain. This procedure is divided i 2. Choose the install directory The install directory can either be in your home directory -such as `~/opt/symbiflow` or in a system directory such as `/opt/symbiflow`. +such as ``~/opt/symbiflow`` or in a system directory such as ``/opt/symbiflow``. If you choose a system directory, you will need root permission to perform the installation, -and so you will need to add some `sudo` commands to the instructions below. +and so you will need to add some ``sudo`` commands to the instructions below. .. code:: bash diff --git a/eos-s3/README.rst b/eos-s3/README.rst index f795c47..0d769a0 100644 --- a/eos-s3/README.rst +++ b/eos-s3/README.rst @@ -16,12 +16,12 @@ If you have not already done so, clone this repository and `cd` into it: Setting up the toolchain ------------------------ -Choose the installation directory (see the `README.rst <../README.rst>`_ one level up for details): +Choose the installation directory (see the `README <../README.rst>`_ one level up for details): .. code:: bash - export INSTALL_DIR=~/opt/symbiflow + export INSTALL_DIR=~/opt/symbiflow # or somewhere else you choose .. toolchain_include_begin_label diff --git a/xc7/README.rst b/xc7/README.rst index 293d7d3..a3b5f48 100644 --- a/xc7/README.rst +++ b/xc7/README.rst @@ -25,13 +25,12 @@ If you have not already done so, clone this repository and `cd` into it: Setting up the toolchain ------------------------ -Choose the installation directory (see the README_ one level up for details): +Choose the installation directory (see the `README <../README.rst>`_ one level up for details): -.. _README: ../README.md .. code:: bash - export INSTALL_DIR=~/opt/symbiflow + export INSTALL_DIR=~/opt/symbiflow # or somewhere else you choose .. toolchain_include_begin_label From 4906fd96ddc834729ad7277aa1eeff6384f52167 Mon Sep 17 00:00:00 2001 From: Tim Callahan Date: Thu, 24 Sep 2020 11:11:34 -0700 Subject: [PATCH 9/9] Change indent to minimize diff for PR. Signed-off-by: Tim Callahan --- .travis.yml | 2 -- README.rst | 88 +++++++++++++++++++++++------------------------ eos-s3/README.rst | 28 +++++++-------- xc7/README.rst | 60 ++++++++++++++++---------------- 4 files changed, 88 insertions(+), 90 deletions(-) diff --git a/.travis.yml b/.travis.yml index a27f5b9..e430b99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ addons: - python3-pip before_install: - - echo === before_install - sudo locale-gen "en_US.UTF-8" - export LANG="en_US.UTF-8" - source .github/travis/common.sh @@ -23,7 +22,6 @@ jobs: include: - stage: SymbiFlow install: - - echo === stage symbiflow install - export INSTALL_DIR=$PWD/../opt/symbiflow/xc7 - tuttest xc7/README.rst xc7-setup-toolchain | bash -ex - diff --git a/README.rst b/README.rst index eb6a79a..e6cf601 100644 --- a/README.rst +++ b/README.rst @@ -66,27 +66,27 @@ and so you will need to add some ``sudo`` commands to the instructions below. * For the Artix-7 devices: .. code:: bash - :name: xc7-setup-toolchain + :name: xc7-setup-toolchain - 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/environment.yml - conda activate xc7 - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/xc7/install - conda deactivate + 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/environment.yml + conda activate xc7 + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/xc7/install + conda deactivate * For the EOS S3 devices: .. code:: bash - :name: eoss3-setup-toolchain + :name: eoss3-setup-toolchain - bash conda_installer.sh -b -p $INSTALL_DIR/eos-s3/conda - source "$INSTALL_DIR/eos-s3/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/eos-s3 - cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/ - conda deactivate + bash conda_installer.sh -b -p $INSTALL_DIR/eos-s3/conda + source "$INSTALL_DIR/eos-s3/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/eos-s3 + cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/ + conda deactivate Build Example Designs --------------------- @@ -111,50 +111,50 @@ Before building any example, set the installation directory to match what you se and prepare the environment: .. code:: bash - :name: xc7-prepare-env + :name: xc7-prepare-env - # 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 + # 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: .. code:: bash - :name: xc7-counter + :name: xc7-counter - 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 + 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 To build the picosoc example, run the following commands: .. code:: bash - :name: xc7-picosoc + :name: xc7-picosoc - pushd xc7/picosoc_demo && make && popd + pushd xc7/picosoc_demo && make && popd To build the litex example, run the following commands: .. code:: bash - :name: xc7-litex + :name: xc7-litex - 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 + 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 To build the linux-litex-demo example, run the following commands: .. code:: bash - :name: xc7-linux + :name: xc7-linux - pushd xc7/linux_litex_demo && make && popd - pushd xc7/linux_litex_demo && TARGET="arty_100" make && popd + pushd xc7/linux_litex_demo && make && popd + pushd xc7/linux_litex_demo && TARGET="arty_100" make && popd Example design for the EOS S3 devices: ************************************** @@ -168,16 +168,16 @@ Before building any example, set the installation directory to match what you se and prepare the environment: .. code:: bash - :name: eoss3-prepare-env + :name: eoss3-prepare-env - export PATH="$INSTALL_DIR/eos-s3/install/bin:$PATH" - source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" - conda activate eos-s3 + export PATH="$INSTALL_DIR/eos-s3/install/bin:$PATH" + source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" + conda activate eos-s3 To build the example, run the following command: .. code:: bash - :name: eoss3-counter + :name: eoss3-counter - pushd eos-s3/btn_counter && make && popd + pushd eos-s3/btn_counter && make && popd diff --git a/eos-s3/README.rst b/eos-s3/README.rst index 0d769a0..e379617 100644 --- a/eos-s3/README.rst +++ b/eos-s3/README.rst @@ -27,15 +27,15 @@ Choose the installation directory (see the `README <../README.rst>`_ one level u .. toolchain_include_begin_label .. code:: bash - :name: eoss3-setup-toolchain + :name: eoss3-setup-toolchain - bash conda_installer.sh -b -p $INSTALL_DIR/eos-s3/conda - source "$INSTALL_DIR/eos-s3/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/eos-s3 - cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/ - conda deactivate + bash conda_installer.sh -b -p $INSTALL_DIR/eos-s3/conda + source "$INSTALL_DIR/eos-s3/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/eos-s3 + cp -r $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/eos-s3/conda/envs/eos-s3/share/ + conda deactivate .. toolchain_include_end_label @@ -53,17 +53,17 @@ Before building any example, set the installation directory to match what you se and prepare the environment: .. code:: bash - :name: eoss3-prepare-env + :name: eoss3-prepare-env - export PATH="$INSTALL_DIR/eos-s3/install/bin:$PATH" - source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" - conda activate eos-s3 + export PATH="$INSTALL_DIR/eos-s3/install/bin:$PATH" + source "$INSTALL_DIR/eos-s3/conda/etc/profile.d/conda.sh" + conda activate eos-s3 To build the example, run the following command: .. code:: bash - :name: eoss3-counter + :name: eoss3-counter - pushd eos-s3/btn_counter && make && popd + pushd eos-s3/btn_counter && make && popd .. build_examples_include_end_label diff --git a/xc7/README.rst b/xc7/README.rst index a3b5f48..3c4758b 100644 --- a/xc7/README.rst +++ b/xc7/README.rst @@ -35,14 +35,14 @@ Choose the installation directory (see the `README <../README.rst>`_ one level u .. toolchain_include_begin_label .. code:: bash - :name: xc7-setup-toolchain + :name: xc7-setup-toolchain - 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/environment.yml - conda activate xc7 - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/xc7/install - conda deactivate + 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/environment.yml + conda activate xc7 + wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/66/20200914-111752/symbiflow-arch-defs-install-05d68df0.tar.xz | tar -xJ --one-top-level=$INSTALL_DIR/xc7/install + conda deactivate .. toolchain_include_end_label @@ -60,49 +60,49 @@ Before building any example, set the installation directory to match what you se and prepare the environment: .. code:: bash - :name: xc7-prepare-env + :name: xc7-prepare-env - # 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 + # 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: .. code:: bash - :name: xc7-counter + :name: xc7-counter - 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 + 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 To build the picosoc example, run the following commands: .. code:: bash - :name: xc7-picosoc + :name: xc7-picosoc - pushd xc7/picosoc_demo && make && popd + pushd xc7/picosoc_demo && make && popd To build the litex example, run the following commands: .. code:: bash - :name: xc7-litex + :name: xc7-litex - 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 + 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 To build the linux-litex-demo example, run the following commands: .. code:: bash - :name: xc7-linux + :name: xc7-linux - pushd xc7/linux_litex_demo && make && popd - pushd xc7/linux_litex_demo && TARGET="arty_100" make && popd + pushd xc7/linux_litex_demo && make && popd + pushd xc7/linux_litex_demo && TARGET="arty_100" make && popd .. build_examples_include_end_label