2022-02-13 15:35:16 -05:00
|
|
|
.. _Building-Examples:
|
|
|
|
|
2020-12-08 07:11:13 -05:00
|
|
|
Building example designs
|
2022-02-13 15:43:00 -05:00
|
|
|
########################
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
Before building any example, set the installation directory to match what you
|
|
|
|
set it to earlier, for example:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
:name: export-install-dir
|
|
|
|
|
2022-05-26 05:42:34 -04:00
|
|
|
export F4PGA_INSTALL_DIR=~/opt/f4pga
|
2020-12-08 07:11:13 -05:00
|
|
|
|
2021-01-09 15:09:46 -05:00
|
|
|
Select your FPGA family:
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
.. tabs::
|
|
|
|
|
|
|
|
.. group-tab:: Artix-7
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
:name: fpga-fam-xc7
|
|
|
|
|
2022-08-02 04:46:18 -04:00
|
|
|
export FPGA_FAM="xc7"
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
.. group-tab:: EOS S3
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
:name: fpga-fam-eos-s3
|
|
|
|
|
2022-08-02 04:46:18 -04:00
|
|
|
export FPGA_FAM="eos-s3"
|
2020-12-08 07:11:13 -05:00
|
|
|
|
2021-01-09 15:09:46 -05:00
|
|
|
Next, prepare the environment:
|
2020-12-08 07:11:13 -05:00
|
|
|
|
2022-07-31 08:06:14 -04:00
|
|
|
.. code-block:: bash
|
|
|
|
:name: conda-prep-env
|
2020-12-08 07:11:13 -05:00
|
|
|
|
2022-07-31 08:06:14 -04:00
|
|
|
export PATH="$F4PGA_INSTALL_DIR/$FPGA_FAM/install/bin:$PATH";
|
|
|
|
source "$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh"
|
2020-12-08 07:11:13 -05:00
|
|
|
|
2021-01-09 15:09:46 -05:00
|
|
|
Finally, enter your working Conda environment:
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
:name: conda-act-env
|
|
|
|
|
|
|
|
conda activate $FPGA_FAM
|
|
|
|
|
2021-07-05 16:54:44 -04:00
|
|
|
.. tip::
|
|
|
|
|
2021-09-27 04:21:35 -04:00
|
|
|
You will need to run the commands for setting the path and source of your conda environment
|
|
|
|
each time you open a new terminal. You will also need to activate the Conda environment for
|
|
|
|
your hardware before you attempt to build your designs. It might be a good idea to add the
|
|
|
|
above commands to your ``.bashrc`` either as default commands that run each time you open a
|
|
|
|
new terminal or aliases to save yourself some repetitive typing.
|
2021-07-05 16:54:44 -04:00
|
|
|
|
2020-12-08 07:11:13 -05:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
If you don't know how to upload any of the following examples onto your
|
|
|
|
development board, please refer to the Running examples section.
|
|
|
|
|
2021-09-27 04:21:35 -04:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
Make sure you have executed all the above commands, or otherwise you may encounter errors when
|
|
|
|
building the designs.
|
|
|
|
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
Xilinx 7-Series
|
2022-02-13 15:43:00 -05:00
|
|
|
===============
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
Enter the directory that contains examples for Xilinx 7-Series FPGAs:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
:name: enter-dir-xc7
|
|
|
|
|
2021-06-01 16:40:57 -04:00
|
|
|
cd xc7
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
.. jinja:: xc7_counter_test
|
|
|
|
:file: templates/example.jinja
|
|
|
|
|
|
|
|
.. jinja:: xc7_picosoc_demo
|
|
|
|
:file: templates/example.jinja
|
|
|
|
|
2020-12-15 04:06:43 -05:00
|
|
|
.. jinja:: xc7_litex_demo
|
|
|
|
:file: templates/example.jinja
|
|
|
|
|
2020-12-08 07:11:13 -05:00
|
|
|
.. jinja:: xc7_linux_litex_demo
|
|
|
|
:file: templates/example.jinja
|
|
|
|
|
2021-07-22 15:46:39 -04:00
|
|
|
.. jinja:: xc7_timer
|
|
|
|
:file: templates/example.jinja
|
|
|
|
|
|
|
|
.. jinja:: xc7_pulse_width_led
|
2022-02-13 15:35:16 -05:00
|
|
|
:file: templates/example.jinja
|
2021-07-22 15:46:39 -04:00
|
|
|
|
|
|
|
|
2020-12-08 07:11:13 -05:00
|
|
|
QuickLogic EOS S3
|
2022-02-13 15:43:00 -05:00
|
|
|
=================
|
2020-12-08 07:11:13 -05:00
|
|
|
|
|
|
|
Enter the directory that contains examples for QuickLogic EOS S3:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
:name: enter-dir-eos-s3
|
|
|
|
|
|
|
|
cd eos-s3
|
|
|
|
|
|
|
|
.. jinja:: eos-s3_btn_counter
|
|
|
|
:file: templates/example.jinja
|