From 63b50544327b1755c50b78bf4f1430c8e28e8c25 Mon Sep 17 00:00:00 2001 From: Joshua Fife Date: Sat, 4 Sep 2021 15:50:24 -0600 Subject: [PATCH] fixed CI and spacing Signed-off-by: Joshua Fife --- .github/scripts/build-examples.sh | 5 +- .github/scripts/build-projF.sh | 76 ------------------- .github/workflows/sphinx-tuttest.yml | 7 +- docs/project-f.rst | 4 - projf-makefiles/hello/hello-arty/A/Makefile | 4 +- projf-makefiles/hello/hello-arty/A/README.rst | 12 +++ 6 files changed, 17 insertions(+), 91 deletions(-) delete mode 100755 .github/scripts/build-projF.sh create mode 100644 projf-makefiles/hello/hello-arty/A/README.rst diff --git a/.github/scripts/build-examples.sh b/.github/scripts/build-examples.sh index 353b55d..5c9ef90 100755 --- a/.github/scripts/build-examples.sh +++ b/.github/scripts/build-examples.sh @@ -53,9 +53,9 @@ elif [ "$fpga_family" == "eos-s3" -a -z "$examples" ]; then fi # activate conda and enter example dir - snippets="docs/building-examples.rst:export-install-dir,fpga-fam-$fpga_family,conda-prep-env-$fpga_family,conda-act-env,enter-dir-$fpga_family" additionalDesigns="docs/building-examples.rst:export-install-dir,fpga-fam-$fpga_family,conda-prep-env-$fpga_family,conda-act-env,enter-dir-$fpga_family,additional_examples" +projfDesigns="docs/building-examples.rst:export-install-dir,fpga-fam-$fpga_family,conda-prep-env-$fpga_family,conda-act-env" # Xilinx 7-Series examples if [ "$fpga_family" = "xc7" ]; then @@ -83,10 +83,11 @@ if [ "$fpga_family" = "xc7" ]; then ;; "timer") snippets="${snippets} xc7/timer/README.rst:example-watch-basys3" + ;; # Project F examples "hello-a") - TARGET="arty_35" make -C projf-makefiles/hello/hello-arty/A + snippets="${projfDesigns} projf-makefiles/hello/hello-arty/A/README.rst:hello-arty-A" ;; *) echo "ERROR: Unknown example name: $example" >&2 diff --git a/.github/scripts/build-projF.sh b/.github/scripts/build-projF.sh deleted file mode 100755 index 2cfec0b..0000000 --- a/.github/scripts/build-projF.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2020 The SymbiFlow Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - -set -e - -CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -source ${CURRENT_DIR}/common.sh - -# -- validate input ---------------------------------------------------------- - -function help() { - echo - echo "Build examples from the repository" - echo - echo "Syntax: $0 fpga_family [examples]..." - echo "Arguments:" - echo " fpga_family - A supported FPGA family" - echo " examples - A name of an available example from project F" - echo -} - -if [[ ! $# -ge 1 ]]; then - echo "Invalid number of arguments!" - help - exit 1 -fi - -# -- tuttest ----------------------------------------------------------------- - -fpga_family=$1 -shift - -examples="$@" -if [ "$fpga_family" == "xc7" -a -z "$examples" ]; then - examples="hello-a" -fi - -# activate conda and enter example dir - -snippets="docs/building-examples.rst:export-install-dir,fpga-fam-$fpga_family,conda-prep-env-$fpga_family,conda-act-env" - -# call tuttest to activate conda -tuttest_exec ${snippets} - -# import project F -tuttest_exec "docs/project-f.rst:import-projectf" - -# Xilinx 7-Series examples -if [ "$fpga_family" = "xc7" ]; then - for example in $examples; do - case $example in - "hello-a") - TARGET="arty_35" make -C projf-makefiles/hello/hello-arty/A - ;; - *) - echo "ERROR: Unknown example name: $example" >&2 - exit 1 - ;; - esac - done -fi diff --git a/.github/workflows/sphinx-tuttest.yml b/.github/workflows/sphinx-tuttest.yml index bf8a0f0..9691302 100644 --- a/.github/workflows/sphinx-tuttest.yml +++ b/.github/workflows/sphinx-tuttest.yml @@ -58,7 +58,6 @@ jobs: - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "litex_linux"} - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "litex_linux"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "button_controller"} - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "button_controller"} - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "button_controller"} @@ -85,8 +84,7 @@ jobs: - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "timer"} - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "timer"} - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "timer"} - - + - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "hello-a"} - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "hello-a"} - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "hello-a"} @@ -124,9 +122,6 @@ jobs: - name: Build examples run: bash .github/scripts/build-examples.sh ${{matrix.fpga-fam}} ${{matrix.example}} - - name: Build Project F - run: bash .github/scripts/build-projF.sh ${{matrix-projF.fpga-fam}} ${{matrix-projF.example}} - - uses: actions/upload-artifact@v2 with: name: symbiflow-examples-bitstreams diff --git a/docs/project-f.rst b/docs/project-f.rst index e6c7829..08c46a4 100644 --- a/docs/project-f.rst +++ b/docs/project-f.rst @@ -45,7 +45,3 @@ For example to download the first design from hello arty: cd hello-build/A openocd -f ${INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" - - - - diff --git a/projf-makefiles/hello/hello-arty/A/Makefile b/projf-makefiles/hello/hello-arty/A/Makefile index dfa2af1..60f803d 100644 --- a/projf-makefiles/hello/hello-arty/A/Makefile +++ b/projf-makefiles/hello/hello-arty/A/Makefile @@ -5,8 +5,6 @@ BUILDDIR := ${current_dir}/../../../../hello-build TOP := top SOURCES := ${proj_f_dir}/top.sv - XDC := ${proj_f_dir}/arty.xdc - -include ${current_dir}/../../../common.mk \ No newline at end of file +include ${current_dir}/../../../common.mk diff --git a/projf-makefiles/hello/hello-arty/A/README.rst b/projf-makefiles/hello/hello-arty/A/README.rst new file mode 100644 index 0000000..98b92db --- /dev/null +++ b/projf-makefiles/hello/hello-arty/A/README.rst @@ -0,0 +1,12 @@ +Part 1 Design A +=============== + +This design allows you to turn the first led on the arty board on and off by toggling switch 0. +To build this design run the following command in main symbiflow directory: + +.. code:: bash + :name: hello-arty-A + + TARGET="arty_35" make -C projf-makefiles/hello/hello-arty/A" + +You can then find the bitstream under ``symbiflow-examples/hello-build/A``.