├── .github └── workflows │ └── containers-conda-f4pga.yml ├── CONTEXT.md └── README.md /.github/workflows/containers-conda-f4pga.yml: -------------------------------------------------------------------------------- 1 | # Authors: 2 | # Unai Martinez-Corral 3 | # 4 | # Copyright 2021-2022 Unai Martinez-Corral 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | 20 | name: How to build F4PGA examples in CI using conda/f4pga/* containers from hdl/containers 21 | 22 | on: 23 | schedule: 24 | - cron: '0 0 * * 5' 25 | workflow_dispatch: 26 | 27 | jobs: 28 | 29 | 30 | xc7_String: 31 | runs-on: ubuntu-latest 32 | env: 33 | IMAGE: gcr.io/hdl-containers/conda/f4pga/xc7/a100t 34 | steps: 35 | - uses: actions/checkout@v2 36 | with: 37 | repository: chipsalliance/f4pga-examples 38 | 39 | - run: docker pull "$IMAGE" 40 | 41 | - run: >- 42 | docker run --rm -v $(pwd):/wrk -w /wrk "$IMAGE" bash -lec 43 | 'TARGET="arty_100" make -C xc7/picosoc_demo' 44 | 45 | 46 | xc7_HereFile: 47 | runs-on: ubuntu-latest 48 | env: 49 | IMAGE: gcr.io/hdl-containers/conda/f4pga/xc7/a100t 50 | steps: 51 | - uses: actions/checkout@v2 52 | with: 53 | repository: chipsalliance/f4pga-examples 54 | 55 | - run: docker pull "$IMAGE" 56 | 57 | - run: | 58 | docker run --rm -i -v $(pwd):/wrk -w /wrk "$IMAGE" bash -le <<'EOF' 59 | TARGET=arty_100 make -C xc7/picosoc_demo 60 | EOF 61 | 62 | 63 | xc7_File: 64 | runs-on: ubuntu-latest 65 | env: 66 | IMAGE: gcr.io/hdl-containers/conda/f4pga/xc7/a100t 67 | steps: 68 | - uses: actions/checkout@v2 69 | with: 70 | repository: chipsalliance/f4pga-examples 71 | 72 | - run: docker pull "$IMAGE" 73 | 74 | - run: | 75 | cat > f4pga-examples-tests.sh <<'EOF' 76 | cd $(dirname "$0") 77 | TARGET=arty_100 make -C xc7/picosoc_demo 78 | EOF 79 | 80 | - run: docker run --rm -v $(pwd):/wrk "$IMAGE" bash -le /wrk/f4pga-examples-tests.sh 81 | 82 | 83 | xc7_Shebang: 84 | runs-on: ubuntu-latest 85 | env: 86 | IMAGE: gcr.io/hdl-containers/conda/f4pga/xc7/a100t 87 | steps: 88 | - uses: actions/checkout@v2 89 | with: 90 | repository: chipsalliance/f4pga-examples 91 | 92 | - run: docker pull "$IMAGE" 93 | 94 | - run: | 95 | cat > f4pga-examples-tests.sh <<'EOF' 96 | #!/usr/bin/env -S bash -le 97 | cd $(dirname "$0") 98 | TARGET=arty_100 make -C xc7/picosoc_demo 99 | EOF 100 | chmod +x f4pga-examples-tests.sh 101 | 102 | - run: docker run --rm -v $(pwd):/wrk "$IMAGE" /wrk/f4pga-examples-tests.sh 103 | 104 | 105 | eos-s3_String: 106 | runs-on: ubuntu-latest 107 | env: 108 | IMAGE: gcr.io/hdl-containers/conda/f4pga/eos-s3 109 | steps: 110 | - uses: actions/checkout@v2 111 | with: 112 | repository: chipsalliance/f4pga-examples 113 | 114 | - run: docker pull "$IMAGE" 115 | 116 | - run: >- 117 | docker run --rm -v $(pwd):/wrk -w /wrk "$IMAGE" bash -lec 118 | 'make -C eos-s3/btn_counter' 119 | 120 | 121 | eos-s3_HereFile: 122 | runs-on: ubuntu-latest 123 | env: 124 | IMAGE: gcr.io/hdl-containers/conda/f4pga/eos-s3 125 | steps: 126 | - uses: actions/checkout@v2 127 | with: 128 | repository: chipsalliance/f4pga-examples 129 | 130 | - run: docker pull "$IMAGE" 131 | 132 | - run: | 133 | docker run --rm -i -v $(pwd):/wrk -w /wrk "$IMAGE" bash -le <<'EOF' 134 | make -C eos-s3/btn_counter 135 | EOF 136 | 137 | 138 | eos-s3_File: 139 | runs-on: ubuntu-latest 140 | env: 141 | IMAGE: gcr.io/hdl-containers/conda/f4pga/eos-s3 142 | steps: 143 | - uses: actions/checkout@v2 144 | with: 145 | repository: chipsalliance/f4pga-examples 146 | 147 | - run: docker pull "$IMAGE" 148 | 149 | - run: | 150 | cat > f4pga-examples-tests.sh <<'EOF' 151 | cd $(dirname "$0") 152 | make -C eos-s3/btn_counter 153 | EOF 154 | 155 | - run: docker run --rm -v $(pwd):/wrk "$IMAGE" bash -le /wrk/f4pga-examples-tests.sh 156 | 157 | 158 | eos-s3_Shebang: 159 | runs-on: ubuntu-latest 160 | env: 161 | IMAGE: gcr.io/hdl-containers/conda/f4pga/eos-s3 162 | steps: 163 | - uses: actions/checkout@v2 164 | with: 165 | repository: chipsalliance/f4pga-examples 166 | 167 | - run: docker pull "$IMAGE" 168 | 169 | - run: | 170 | cat > f4pga-examples-tests.sh <<'EOF' 171 | #!/usr/bin/env -S bash -le 172 | cd $(dirname "$0") 173 | make -C eos-s3/btn_counter 174 | EOF 175 | chmod +x f4pga-examples-tests.sh 176 | 177 | - run: docker run --rm -v $(pwd):/wrk "$IMAGE" /wrk/f4pga-examples-tests.sh 178 | -------------------------------------------------------------------------------- /CONTEXT.md: -------------------------------------------------------------------------------- 1 | # Context 2 | 3 | **NOTE** Find a more detailed document at [docs.google.com: Building, packaging and installing Open Source EDA tooling for mixed HDL designs](https://docs.google.com/document/d/10_MqFjTIYVVuOJlusJydsp4KOcmrrHk03__7ME5thOI/). 4 | 5 | Each GNU/Linux distribution has a default package manager: `apt-get`/`apt` on Debian/Ubuntu/LinuxMint, `yum/dnf` on RedHat/CentOS/Fedora, `pacman` on ArchLinux, etc. Therefore, the most natural procedure is to install tooling through the system package manager, since that ensures the best compatibility and stability. However, on the one hand, it is a huge effort to develop and maintain multiple recipes for each tool and for each officially supported architecture on each distribution. On the other hand, the release schedule and packaging guidelines of some distributions make it unfeasible to keep bleeding-edge projects up to date. That is the case of e.g. Debian or CentOS, which are known to be stable and slowly updating environments. Therefore, some projects provide non-official recipes for users to build their own `deb`/`rpm`/`tar.xz` packages. On Windows, it is easier to upstream recipes because `pacman` is the only supported Unix alike package manager. 6 | 7 | Several alternatives arised in the open source EDA community for making it easier to get latest working toolchains involving several projects. The following solutions trade either features and/or platform/architecture portability for achieving working bleeding-edge environments: 8 | 9 | ## Statically pre-built packages 10 | 11 | This provides the easiest setup approach and it allows having multiple versions of the toolchains, without running into conflicts. However, some features are limited when tools are built statically. See [YosysHQ/fpga-toolchain: DEVELOPMENT.md > General guidelines](https://github.com/YosysHQ/fpga-toolchain/blob/main/DEVELOPMENT.md#general-guidelines). 12 | 13 | ## OCI container images 14 | 15 | This provides the less invasive solution, because no tools are installed on the host, besides the container runtime. Moreover, the behaviour of the tools is exactly the same, regardless of the host OS. However, on Windows, accessing USB devices from containers is not straightforward. See [ ghdl/docker: usbip/README.md > USB/IP protocol support for Docker Desktop](https://github.com/ghdl/docker/tree/master/usbip). 16 | 17 | ## Conda packages 18 | 19 | Conda is an *open source package management system and environment management system that runs on Windows, macOS and Linux*. However, for Conda packages to install/configure tools, those need to be previously compiled or available as pre-built packages. Therefore, Conda packages can indeed be wrappers around some of the previous solutions. 20 | 21 | ## CIPD (Chrome Infrastructure Package Deployment) 22 | 23 | [github.com/luci/luci-go/tree/master/cipd](https://github.com/luci/luci-go/tree/master/cipd) 24 | 25 | ## Bazel rules 26 | 27 | Bazel is an open-source build and test tool similar to Make, Maven, and Gradle, which supports projects in multiple languages and builds outputs for multiple platforms. 28 | 29 | ## Termux recipes (Android) 30 | 31 | "*Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager*". 32 | 33 | ## WebAssembly packages 34 | 35 | [YoWASP](http://yowasp.org/) aims to distribute tools from [YosysHQ](https://github.com/YosysHQ/) compiled to [WebAssembly](https://webassembly.org/) via language package managers like Python’s [PyPI](https://pypi.org/). 36 | 37 | --- 38 | 39 | Apart from building and distributing tools using any of the solutions above, those need to be then used somehow. As discussed in [eine/vhdl-cfg](https://github.com/eine/vhdl-cfg), there are currently about a dozen projects for managing the execution of EDA tools. Any of those might rely on any of the distribution solutions explained above. In this regard, [SymbiFlow/make-env](https://github.com/SymbiFlow/make-env) is an *environment provider* meant for bootstraping the tools along with tool management projects. 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 4 |

5 | 6 | # Packages for electronic design automation (EDA) 7 | 8 | This repository is an index for several projects providing *great prepackaged/prebuilt and easy-to-set-up* bleeding-edge packages/environments of [electronic design automation (EDA)](https://en.wikipedia.org/wiki/Electronic_design_automation) tools/projects. Find a discussion about the different approaches in [CONTEXT.md](CONTEXT.md). 9 | 10 | **NOTE** Shield/badges below indicate which projects (packaging strategies) do have a corresponding repository in this organisation, for coordination and discussion. If you want to contribute to any of those packaging solutions, go ahead and jump to the corresponding repository. Should you be willing to contribute to any other packaging project, please [open an issue](https://github.com/hdl/packages/issues/new) or [ask in the chat](https://gitter.im/hdl/community). 11 | 12 | --- 13 | 14 | - OCI container images (aka [Docker](https://www.docker.com/)/[Podman](https://podman.io/)) [![](https://img.shields.io/badge/hdl-containers-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/containers) [![](https://img.shields.io/website.svg?label=hdl.github.io%2Fcontainers&longCache=true&style=flat-square&url=http%3A%2F%2Fhdl.github.io%2Fcontainers%2Findex.html)](https://hdl.github.io/containers) 15 | - Multiplatform package managers 16 | - [Bazel](https://bazel.build/) rules [![](https://img.shields.io/badge/hdl-bazel__rules__hdl-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/bazel_rules_hdl) 17 | - [Conda](https://conda.io) packages 18 | - [![](https://img.shields.io/badge/hdl-conda--eda-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/conda-eda) [![](https://img.shields.io/badge/hdl-conda--compilers-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/conda-compilers) [![](https://img.shields.io/badge/hdl-conda--prog-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/conda-prog) [![](https://img.shields.io/badge/hdl-conda--misc-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/conda-misc) 19 | - [litex-hub/litex-conda-packages](https://github.com/litex-hub/litex-conda-packages) 20 | - System package managers 21 | - PKGBUILD (`pacman`) 22 | - [Arch Linux](https://archlinux.org) 23 | - [archlinux.org/packages](https://archlinux.org/packages/) 24 | - [aur.archlinux.org/packages](https://aur.archlinux.org/packages) 25 | - [SymbiFlow/symbiflow-arch-pkgs](https://github.com/SymbiFlow/symbiflow-arch-pkgs) 26 | - [MSYS2](https://www.msys2.org/) (Windows) [![](https://img.shields.io/badge/hdl-MINGW--packages-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/MINGW-packages) [![](https://img.shields.io/website.svg?label=hdl.github.io%2FMINGW-packages&longCache=true&style=flat-square&url=http%3A%2F%2Fhdl.github.io%2FMINGW-packages%2Findex.html)](https://hdl.github.io/MINGW-packages) 27 | - [sylefeb/fpga-binutils](https://github.com/sylefeb/fpga-binutils) 28 | - ebuild (`portage` | `layman`, [gentoo](https://www.gentoo.org/)) 29 | - [packages.gentoo.org](https://packages.gentoo.org/) 30 | - [overlays.gentoo.org](https://overlays.gentoo.org/) 31 | - DEB (`apt` | `apt-get`) 32 | - [Debian](https://www.debian.org/) 33 | - [packages.debian.org: buster/debian-electronics](https://packages.debian.org/source/buster/debian-electronics) 34 | - [salsa.debian.org/electronics-team](https://salsa.debian.org/electronics-team) 35 | - [Termux](https://termux.com/) ([Android](https://www.android.com/)) [![](https://img.shields.io/badge/hdl-Termux--packages-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/Termux-packages) 36 | - RPM 37 | - `dnf` | `yum` ([Fedora](https://getfedora.org)) 38 | - [src.fedoraproject.org](https://src.fedoraproject.org/) 39 | - [fedoraproject.org/wiki: Electronic Lab](https://fedoraproject.org/wiki/Electronic_Lab) a [lab/spin](https://labs.fedoraproject.org) not available anymore 40 | - [copr.fedorainfracloud.org](https://copr.fedorainfracloud.org) 41 | - [rezso/HDL](https://copr.fedorainfracloud.org/coprs/rezso/HDL) (CentOS and Fedora; x86_64, aarch64 and ppc64le) 42 | - `zypper` | `yast` ([OpenSUSE](https://www.opensuse.org/)) 43 | - [build.opensuse.org | hardware:FPGA](https://build.opensuse.org/project/show/hardware:FPGA) 44 | - [SymbiFlow/ideas#59](https://github.com/SymbiFlow/ideas/issues/59) 45 | - NIX ([NixOS](https://nixos.org/)) 46 | - [NixOS/nixpkgs](https://github.com/NixOS/nixpkgs) 47 | - `brew` (macOS) 48 | - [ktemkin/homebrew-oss-fpga](https://github.com/ktemkin/homebrew-oss-fpga) 49 | - [WebAssembly](https://webassembly.org/) packages 50 | - [YoWASP](http://yowasp.org/) 51 | - Custom bundles 52 | - With statically linked packages 53 | - [YosysHQ/fpga-toolchain](https://github.com/YosysHQ/fpga-toolchain) (GNU/Linux, ~~Windows~~ [YosysHQ/fpga-toolchain#78](https://github.com/YosysHQ/fpga-toolchain/issues/78) and macOS; x64) 54 | - With dynamically linked packages 55 | - [YosysHQ/oss-cad-suite-build](https://github.com/YosysHQ/oss-cad-suite-build) (GNU/Linux, Windows and macOS; x64, arm, armd64 and riscv64) 56 | - [YosysHQ/setup-oss-cad-suite](https://github.com/YosysHQ/setup-oss-cad-suite) 57 | - [git.libre-soc.org/?p=dev-env-setup](https://git.libre-soc.org/?p=dev-env-setup.git;a=tree;hb=HEAD) (focused on reproducible stable builds) 58 | - CIPD (Chrome Infrastructure Package Deployment) 59 | 60 | --- 61 | 62 | Apart from projects providing pre-built packages, the following projects are also used in the ecosystem: 63 | 64 | - [![](https://img.shields.io/badge/hdl-awesome-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/awesome) [![](https://img.shields.io/website.svg?label=hdl.github.io%2Fawesome&longCache=true&style=flat-square&url=http%3A%2F%2Fhdl.github.io%2Fawesome%2Findex.html)](https://hdl.github.io/awesome): index of tools/projects; there is a markdown file for each tool/project, with a frontmatter including metadata (repos, site, useful references, etc.). Those are used in the documentation of packaging projects. 65 | - [![](https://img.shields.io/badge/hdl-smoke--tests-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/smoke-tests): fine grained tests that cover the most important functionalities of the tools. Those are used in packaging projects, along with more specific tests. 66 | - [![](https://img.shields.io/badge/hdl-constraints-f2f1ef.svg?longCache=true&style=flat-square&logo=GitHub&logoColor=f2f1ef)](https://github.com/hdl/constraints) [![](https://img.shields.io/website.svg?label=hdl.github.io%2Fconstraints&longCache=true&style=flat-square&url=http%3A%2F%2Fhdl.github.io%2Fconstraints%2Findex.html)](https://hdl.github.io/constraints): constraints and useful metadata about development boards, devices, and external memories. Some of the test examples in packaging projects use it. 67 | --------------------------------------------------------------------------------