-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 190a21e
Showing
19 changed files
with
250 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Context | ||
|
||
There are a handful of approaches for providing *great prepackaged/prebuilt and easy-to-set-up EDA tooling environments*: | ||
|
||
## Default package managers | ||
|
||
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 default 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. For example: [SymbiFlow/symbiflow-arch-pkgs](https://github.com/SymbiFlow/symbiflow-arch-pkgs). Fortunately, on Windows it is easier to upstream recipes because `pacman` is the only supported Unix alike package manager (see [hdl/MINGW-packages](https://github.com/hdl/MINGW-packages)). | ||
|
||
Moreover, 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. | ||
|
||
## Statically pre-built packages | ||
|
||
[open-tool-forge](https://github.com/open-tool-forge) provides statically pre-built packages for GNU/Linux, Windows and macOS through [fpga-toolchain](https://github.com/open-tool-forge/fpga-toolchain). | ||
|
||
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 [open-tool-forge/fpga-toolchain: DEVELOPMENT.md > General guidelines](https://github.com/open-tool-forge/fpga-toolchain/blob/main/DEVELOPMENT.md#general-guidelines). | ||
|
||
## OCI container images | ||
|
||
[ghdl/docker](https://github.com/ghdl/docker), [hdl/containers](https://github.com/hdl/containers), [dbhi/docker](https://github.com/dbhi/docker) (uses [dbhi/qus](https://github.com/dbhi/qus)), [alpin3/ulx3s](https://github.com/alpin3/ulx3s)... provide Linux container images, which can be used on any platform with Docker or Podman support. | ||
|
||
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). | ||
|
||
## WebAssembly packages | ||
|
||
[YoWASP](http://yowasp.org/) aims to distribute tools form [YosysHQ](https://github.com/YosysHQ/) compiled to [WebAssembly](https://webassembly.org/) via language package managers like Python’s [PyPI](https://pypi.org/). | ||
|
||
## Conda packages | ||
|
||
[SymbiFlow/conda-packages](https://github.com/SymbiFlow/conda-packages), [SymbiFlow/fpga-tool-perf](https://github.com/SymbiFlow/fpga-tool-perf), [litex-hub/litex-conda-eda](https://github.com/litex-hub/litex-conda-eda), [litex-hub/litex-conda-packages](https://github.com/litex-hub/litex-conda-packages), [antmicro/conda-build-prepare-actions](https://github.com/antmicro/conda-build-prepare-actions)... provide and use non-static packages through [Conda](https://conda.io). | ||
|
||
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 any of the previous solutions. | ||
|
||
--- | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Smoke tests | ||
|
||
As discussed in [CONTEXT](CONTEXT.md), there is a thriving activity for providing ready-to-use packages of open source EDA tooling: static build, dynamic builds, containers, Conda... Regardless of the packaging approach, most integration and distribution projects need to build each tool using some custom options, and then ensure that the produced artifacts are valid. Running full test suites included in project codebases is sometimes not possible, because CI services timeout. Nevertheless, EDA tools are expected to be thoroughly tested upstream; so, integrators need a set of quick sanity tests. | ||
|
||
Existing third-party testsuites and examples typically require additional dependencies for testing multiple tools at the same time. However, integration/distribution strategies do not always build all the tools in the same environment. Therefore, a fine grained approach to test definition is required. In analogy to electrical smoke testing, [smoke testing (software)](https://en.wikipedia.org/wiki/Smoke_testing_%28software%29) is a subset of test cases that cover the most important functionality of a software tool. This repository contains smoke tests for the following tools: | ||
|
||
- [x] [bootlector](http://fmv.jku.at/boolector/) | ||
- [ ] [cocotb](https://github.com/cocotb/cocotb) | ||
- [x] [ghdl](https://github.com/ghdl/ghdl) | ||
- [ ] [ghdl-yosys-plugin](https://github.com/ghdl/ghdl-yosys-plugin) | ||
- [ ] [gtkwave](https://github.com/gtkwave/gtkwave) | ||
- [x] [icestorm](https://github.com/cliffordwolf/icestorm) | ||
- [ ] [iverilog](https://github.com/steveicarus/iverilog) | ||
- [ ] [netlistsvg](https://github.com/nturley/netlistsvg) | ||
- [x] [nextpnr](https://github.com/YosysHQ/nextpnr) | ||
- [x] [prjtrellis](https://github.com/SymbiFlow/prjtrellis) | ||
- [ ] [sigrok-cli](https://sigrok.org/wiki/Sigrok-cli) | ||
- [ ] [surelog](https://github.com/alainmarcel/Surelog) | ||
- [x] [symbiyosys](https://github.com/YosysHQ/SymbiYosys) | ||
- [ ] [verible](https://github.com/google/verible) | ||
- [ ] [verilator](https://github.com/verilator/verilator) | ||
- [ ] [vpr/vtr](https://github.com/verilog-to-routing/vtr-verilog-to-routing) | ||
- [ ] [vunit](https://github.com/VUnit/vunit) | ||
- [x] [yices 2](https://github.com/SRI-CSL/yices2) | ||
- [x] [yosys](https://github.com/YosysHQ/yosys) | ||
- [x] [z3](https://github.com/Z3Prover/z3) | ||
|
||
Board programming: | ||
|
||
- [x] [dfu-util](http://dfu-util.sourceforge.net/) | ||
- [ ] [ecpprog](https://github.com/gregdavill/ecpprog) | ||
- [ ] [fujprog](https://github.com/kost/fujprog) | ||
- [ ] [icesprog](https://github.com/wuxx/icesugar/tree/master/tools) | ||
- [x] [openFPGALoader](https://github.com/trabucayre/openFPGALoader) | ||
- [ ] [openocd](http://openocd.org/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env sh | ||
|
||
stdir="$(dirname "$0")" | ||
|
||
"$stdir"/bootlector.sh | ||
"$stdir"/dfu-util.sh | ||
"$stdir"/ghdl.sh | ||
"$stdir"/icestorm.sh | ||
"$stdir"/nextpnr.sh | ||
"$stdir"/openFPGALoader.sh | ||
"$stdir"/prjtrellis.sh | ||
"$stdir"/symbiyosys.sh | ||
"$stdir"/yices.sh | ||
"$stdir"/yosys.sh | ||
"$stdir"/z3.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./bootlector.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help boolector btorsim btoruntrace btormc btorimc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env sh | ||
|
||
enable_color() { | ||
ANSI_RED="\033[31m" | ||
ANSI_GREEN="\033[32m" | ||
ANSI_YELLOW="\033[33m" | ||
ANSI_BLUE="\033[34m" | ||
ANSI_MAGENTA="\033[35m" | ||
ANSI_GRAY="\033[90m" | ||
ANSI_CYAN="\033[36;1m" | ||
ANSI_DARKCYAN="\033[36m" | ||
ANSI_NOCOLOR="\033[0m" | ||
} | ||
|
||
disable_color() { unset ANSI_RED ANSI_GREEN ANSI_YELLOW ANSI_BLUE ANSI_MAGENTA ANSI_CYAN ANSI_DARKCYAN ANSI_NOCOLOR; } | ||
|
||
enable_color | ||
|
||
#- | ||
|
||
test_help() { | ||
for tool; do | ||
echo "· $tool help >> $ST_LOGFILE" | ||
$tool --help >> "$ST_LOGFILE" 2>&1 | ||
exit_code=$? | ||
printf "· $tool help: exit code $exit_code | " | ||
if [ "$exit_code" = "0" ] || [ "$exit_code" = "64" ]; then | ||
printf "${ANSI_GREEN}OK${ANSI_NOCOLOR}\n" | ||
else | ||
printf "${ANSI_RED}FAIL${ANSI_NOCOLOR}\n" | ||
exit $exit_code | ||
fi | ||
done | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./dfu-util.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help dfu-prefix dfu-suffix dfu-util |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./ghdl.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help ghdl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./icestorm.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help icebram icemulti icepack icepll iceprog icetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./nextpnr-ecp5.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help nextpnr-ecp5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./nextpnr-generic.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help nextpnr-generic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./nextpnr-ice40.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help nextpnr-ice40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env sh | ||
|
||
stdir="$(dirname "$0")" | ||
|
||
"$stdir"/nextpnr-ice40.sh | ||
"$stdir"/nextpnr-ecp5.sh | ||
"$stdir"/nextpnr-generic.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./openFPGALoader.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help openFPGALoader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./prjtrellis.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help ecpbram ecpmulti ecppack ecppll ecpprog ecpunpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./symbiyosys.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help sby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./yices.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help yices yices-sat yices-smt yices-smt2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./symbiyosys.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help yosys yosys-abc yosys-config yosys-filterlib yosys-smtbmc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
. $(dirname "$0")/common.sh | ||
|
||
ST_LOGFILE=./z3.log | ||
|
||
[ -f "$ST_LOGFILE" ] && rm -rf "$ST_LOGFILE" || true | ||
|
||
test_help z3 |