diff --git a/.github/scripts/build-examples.sh b/.github/scripts/build-examples.sh index 5e84a2c..eea3811 100755 --- a/.github/scripts/build-examples.sh +++ b/.github/scripts/build-examples.sh @@ -91,6 +91,14 @@ case "$fpga_family" in esac done ;; + ice40) for example in $examples; do + case $example in + "spectrum") tuttest_exec ${snippets} ice40/spectrum/README.rst:ice40-spectrum ;; + *) echo "ERROR: Unknown example name: $example" >&2 + exit 1 ;; + esac + done + ;; *) echo "ERROR: Unknown fpga_family: $fpga_family" >&2 exit 1 ;; diff --git a/.github/scripts/generate_job_matrices.py b/.github/scripts/generate_job_matrices.py index 18436d0..68418d9 100755 --- a/.github/scripts/generate_job_matrices.py +++ b/.github/scripts/generate_job_matrices.py @@ -105,6 +105,16 @@ def get_jobs( 'surelog': "-parse -DSYNTHESIS" if usesSurelog else "" } for osver in osvers]) + jobs.extend([{ + 'name': "Surelog" if usesSurelog else "Default", + 'runs-on': runs_on, + 'fpga-fam': "ice40", + 'os': osver[0], + 'os-version': osver[1], + 'example': "spectrum", + 'surelog': "-parse -DSYNTHESIS" if usesSurelog else "" + } for osver in osvers]) + return jobs for distribution in ['debian', 'ubuntu', 'fedora', 'centos']: diff --git a/docs/building-examples.rst b/docs/building-examples.rst index c15734d..de24b49 100644 --- a/docs/building-examples.rst +++ b/docs/building-examples.rst @@ -20,14 +20,21 @@ Select your FPGA family: .. code-block:: bash :name: fpga-fam-xc7 - FPGA_FAM="xc7" + export FPGA_FAM=xc7 .. group-tab:: EOS S3 .. code-block:: bash :name: fpga-fam-eos-s3 - FPGA_FAM="eos-s3" + export FPGA_FAM=eos-s3 + + .. group-tab:: ICE40 + + .. code-block:: bash + :name: fpga-fam-ice40 + + export FPGA_FAM=ice40 Next, prepare the environment: @@ -104,3 +111,15 @@ Enter the directory that contains examples for QuickLogic EOS S3: .. jinja:: eos-s3_btn_counter :file: templates/example.jinja + + +Lattice ICE40 +============= + +.. code-block:: bash + :name: enter-dir-ice40 + + cd ice40 + +.. jinja:: ice40-spectrum + :file: templates/example.jinja