Merge pull request #50 from tcal-x/rollnew

Attempt to roll tarball and Yosys packages for symbiflow-examples.  Name the code blocks.   Address issue #48.
This commit is contained in:
litghost 2020-09-24 15:51:01 -07:00 committed by GitHub
commit fc736813bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 211 additions and 84 deletions

View File

@ -17,19 +17,24 @@ before_install:
- 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 -
- 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 -

View File

@ -22,45 +22,70 @@ 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"
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/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/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"
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
cp -r $INSTALL_DIR/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/conda/envs/eos-s3/share/
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,25 +97,31 @@ 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"
export INSTALL_DIR=~/opt/symbiflow
and prepare the environment:
.. code:: bash
:name: xc7-prepare-env
# adding symbiflow toolchain binaries to PATH
export PATH="$INSTALL_DIR/install/bin:$PATH"
source "$INSTALL_DIR/conda/etc/profile.d/conda.sh"
export PATH="$INSTALL_DIR/xc7/install/bin:$PATH"
source "$INSTALL_DIR/xc7/conda/etc/profile.d/conda.sh"
conda activate xc7
git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples
To build the counter example, run the following commands:
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
@ -99,12 +130,14 @@ To build the counter example, run the following commands:
To build the picosoc example, run the following commands:
.. code:: bash
:name: xc7-picosoc
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
@ -118,28 +151,33 @@ To build the litex example, run the following commands:
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
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

View File

@ -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

View File

@ -3,20 +3,38 @@ SymbiFlow Toolchain Examples for QuickLogic EOS S3
#. ``btn_counter`` - simple 4-bit counter driving LEDs. The design targets the `EOS S3 FPGA <https://www.quicklogic.com/products/eos-s3/>`__.
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 <../README.rst>`_ one level up for details):
.. code:: bash
export INSTALL_DIR=~/opt/symbiflow # or somewhere else you choose
.. 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"
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
cp -r $INSTALL_DIR/conda/envs/eos-s3/share/yosys/* $INSTALL_DIR/conda/envs/eos-s3/share/
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,20 +44,25 @@ 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

View File

@ -10,19 +10,38 @@ SymbiFlow Toolchain Examples for Xilinx 7 Series
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.
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 <../README.rst>`_ one level up for details):
.. code:: bash
export INSTALL_DIR=~/opt/symbiflow # or somewhere else you choose
.. 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"
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/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/xc7/install
conda deactivate
.. toolchain_include_end_label
@ -32,20 +51,26 @@ 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"
export INSTALL_DIR=~/opt/symbiflow
and prepare the environment:
.. code:: bash
:name: xc7-prepare-env
# adding symbiflow toolchain binaries to PATH
export PATH="$INSTALL_DIR/install/bin:$PATH"
source "$INSTALL_DIR/conda/etc/profile.d/conda.sh"
export PATH="$INSTALL_DIR/xc7/install/bin:$PATH"
source "$INSTALL_DIR/xc7/conda/etc/profile.d/conda.sh"
conda activate xc7
git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples
To build the counter example, run the following commands:
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
@ -54,12 +79,14 @@ To build the counter example, run the following commands:
To build the picosoc example, run the following commands:
.. code:: bash
:name: xc7-picosoc
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
@ -73,7 +100,9 @@ To build the litex example, run the following commands:
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
.. build_examples_include_end_label

View File

@ -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

View File

@ -2,10 +2,10 @@ 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=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

View File

@ -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_100
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
@ -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}

View File

@ -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),