2020-09-09 03:38:20 -04:00
|
|
|
SymbiFlow examples
|
|
|
|
==================
|
|
|
|
|
2021-06-30 11:06:12 -04:00
|
|
|
Please refer to the `project documentation <https://symbiflow-examples.readthedocs.io>`_
|
|
|
|
for a proper guide on how to run these examples as well as instructions on how to build and
|
|
|
|
compile your own HDL designs using the symbiflow toolchain.
|
|
|
|
|
2020-12-14 10:51:24 -05:00
|
|
|
.. image:: https://github.com/symbiflow/symbiflow-examples/workflows/doc-test/badge.svg?branch=master
|
2020-12-14 08:35:15 -05:00
|
|
|
:target: https://github.com/SymbiFlow/symbiflow-examples/actions
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-14 11:08:57 -05:00
|
|
|
.. image:: https://readthedocs.org/projects/symbiflow-examples/badge/?version=latest
|
|
|
|
:target: https://symbiflow-examples.readthedocs.io/en/latest/?badge=latest
|
|
|
|
:alt: Documentation Status
|
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
This repository provides example FPGA designs that can be built using the
|
|
|
|
SymbiFlow open source toolchain. These examples target the Xilinx 7-Series and
|
|
|
|
the QuickLogic EOS S3 devices.
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
The repository includes:
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
* `xc7/ <./xc7>`_ and `eos-s3/ <./eos-s3>`_ - Examples for Xilinx 7-Series and EOS-S3 devices, including:
|
2020-09-09 03:38:20 -04:00
|
|
|
|
|
|
|
* Verilog code
|
|
|
|
* Pin constraints files
|
|
|
|
* Timing constraints files
|
|
|
|
* Makefiles for running the SymbiFlow toolchain
|
2020-12-08 07:35:12 -05:00
|
|
|
* `docs/ <./docs>`_ - Guide on how to get started with SymbiFlow and build provided examples
|
|
|
|
* `.github/ <./.github>`_ - Directory with CI configuration and scripts
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2021-06-30 11:06:12 -04:00
|
|
|
The examples provided by this repository are automatically built by extracting
|
|
|
|
necessary code snippets with `tuttest <https://github.com/antmicro/tuttest>`_.
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
Building those docs
|
|
|
|
-------------------
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
To build Sphinx documentation, you need at least Python 3.6. You will also need
|
|
|
|
to install Sphinx v3.3.0 and additional dependencies, which you can get with
|
|
|
|
``pip``::
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
pip install -r docs/requirements.txt
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
Next, just run::
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
make -C docs html
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
The output will be found in the ``docs/_build/html`` directory.
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
Running "CI" locally
|
|
|
|
--------------------
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
The CI uses a bunch of scripts in the `.github/scripts/ <./.github/scripts>`_
|
|
|
|
directory to execute the needed tests. You can use the same scripts locally
|
|
|
|
to test without having to wait for the online CIs to pass if you
|
|
|
|
want to quickly test stuff.
|
2020-09-18 01:54:05 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
For this, you will need `tuttest <https://github.com/antmicro/tuttest/>`_,
|
|
|
|
which you can install with::
|
2020-09-18 01:54:05 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
pip install git+https://github.com/antmicro/tuttest
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
* ``<fpga-family>`` is one of ``{eos-s3, xc7}`` (the two currently
|
|
|
|
covered platforms - EOS-S3 and Xilinx series 7).
|
2020-12-11 07:07:14 -05:00
|
|
|
* ``<os>`` is one of ``{ubuntu, debian, centos}`` (currently supported operating systems).
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
To install the toolchain (just the first time), run::
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
.github/scripts/install-toolchain.sh <fpga-family> <os> | bash -c "$(cat /dev/stdin)"
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
To build all the examples locally, just run::
|
2020-09-09 03:38:20 -04:00
|
|
|
|
2020-12-08 07:35:12 -05:00
|
|
|
.github/scripts/build-examples.sh <fpga-family> | bash -c "$(cat /dev/stdin)"
|