Skip to content

Commit dc1c611

Browse files
authored
Merge pull request #5 from PyFPGA/langutils
Langutils
2 parents 6823b9b + eaf9c6f commit dc1c611

File tree

6 files changed

+169
-11
lines changed

6 files changed

+169
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ name: Deploy Docker Images
33
on: [push]
44

55
jobs:
6-
synthesis:
6+
deploy:
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
name:
11+
- synthesis
12+
- langutils
813
steps:
914
- uses: actions/checkout@v2
1015
- name: Login to GitHub Container Registry
@@ -13,7 +18,7 @@ jobs:
1318
registry: ghcr.io
1419
username: ${{ github.actor }}
1520
password: ${{ secrets.GITHUB_TOKEN }}
16-
- name: Build Docker image
17-
run: docker build -f recipes/synthesis -t ghcr.io/pyfpga/synthesis .
18-
- name: Push Docker image
19-
run: docker push ghcr.io/pyfpga/synthesis
21+
- name: Build Docker image for ${{ matrix.name }}
22+
run: docker build -f recipes/${{ matrix.name }} -t ghcr.io/pyfpga/${{ matrix.name }} .
23+
- name: Push Docker image for ${{ matrix.name }}
24+
run: docker push ghcr.io/pyfpga/${{ matrix.name }}

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# PyFPGA containers
22

3-
* `synthesis`:
3+
* `langutils`: utilities for processing and analyzing HDL languages
4+
* [vhd2vl](https://github.com/ldoolitt/vhd2vl)
5+
* [Slang](https://github.com/MikePopoloski/slang)
6+
* [sv2v](https://github.com/zachjs/sv2v)
7+
* [Verible](https://github.com/chipsalliance/verible)
8+
* [Surelog](https://github.com/chipsalliance/Surelog)
9+
* [sv-parser](https://github.com/dalance/sv-parser)
10+
* `synthesis`: tools for logic synthesis
411
* [GHDL](https://github.com/ghdl/ghdl)
512
* [Yosys](https://github.com/YosysHQ/yosys)
613
* [ghdl-yosys-plugin](https://github.com/ghdl/ghdl-yosys-plugin)

recipes/langutils

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
FROM ubuntu:latest AS build
2+
3+
WORKDIR /root
4+
5+
#
6+
# Dependencies
7+
#
8+
9+
RUN apt update -qq \
10+
&& DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
11+
# Common
12+
build-essential \
13+
ca-certificates \
14+
curl \
15+
git \
16+
gnupg \
17+
python3 \
18+
wget \
19+
zlib1g-dev \
20+
# vhd2vl
21+
flex \
22+
bison \
23+
iverilog \
24+
# Surelog
25+
cmake \
26+
default-jre \
27+
python3-orderedmultidict \
28+
&& curl -sSL https://get.haskellstack.org/ | sh \
29+
&& curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor -o /usr/share/keyrings/bazel-archive-keyring.gpg \
30+
&& echo "deb [signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] \
31+
https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
32+
&& apt update -qq \
33+
&& DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
34+
bazel \
35+
&& apt autoclean && apt clean && apt -y autoremove \
36+
&& rm -rf /var/lib/apt/lists/*
37+
38+
#
39+
# vhd2vl
40+
#
41+
42+
RUN git clone --depth 1 https://github.com/ldoolitt/vhd2vl \
43+
&& cd vhd2vl && make -j$(nproc) \
44+
&& cp src/vhd2vl /usr/local/bin
45+
46+
#
47+
# Slang
48+
#
49+
50+
RUN git clone --depth 1 https://github.com/MikePopoloski/slang.git \
51+
&& cd slang && cmake -B build && cmake --build build -j8 \
52+
&& cmake --install build --strip
53+
54+
#
55+
# Surelog
56+
#
57+
58+
RUN git clone --depth 1 https://github.com/alainmarcel/Surelog.git \
59+
&& cd Surelog && git submodule update --init --recursive \
60+
&& make -j$(nproc) && make install
61+
62+
#
63+
# sv2v
64+
#
65+
66+
RUN git clone --depth 1 https://github.com/zachjs/sv2v.git \
67+
&& cd sv2v && make -j$(nproc) && cp bin/sv2v /usr/local/bin
68+
69+
#
70+
# Verible
71+
#
72+
73+
RUN git clone --depth 1 https://github.com/chipsalliance/verible.git \
74+
&& cd verible && bazel build -c opt //... \
75+
&& bazel run -c opt :install -- /usr/local/bin
76+
77+
###############################################################################
78+
79+
## slang
80+
#/usr/local/lib/libfmt.a
81+
#/usr/local/include/fmt
82+
#/usr/local/lib/cmake/fmt
83+
#/usr/local/include/ieee1800
84+
#/usr/local/lib/libfmt.a
85+
#/usr/local/lib/libmimalloc.a
86+
#/usr/local/include/mimalloc-2.1
87+
#/usr/local/include/slang
88+
#/usr/local/include/slang
89+
#/usr/local/bin/slang
90+
#/usr/local/bin/slang-netlist
91+
#/usr/local/bin/slang-tidy
92+
#/usr/local/bin/slang-reflect
93+
#/usr/local/bin/slang-hier
94+
#/usr/local/lib/libsvlang.a
95+
#/usr/local/bin/slang
96+
#/usr/local/lib/cmake/slang
97+
#/usr/local/share/pkgconfig/sv-lang.pc
98+
99+
## Surelog
100+
#/usr/local/lib/libcapnp.a
101+
#/usr/local/lib/libkj.a
102+
#/usr/local/lib/libuhdm.a
103+
#/usr/local/bin/uhdm-cmp
104+
#/usr/local/bin/uhdm-dump
105+
#/usr/local/bin/uhdm-hier
106+
#/usr/local/bin/uhdm-lint
107+
#/usr/local/include/uhdm
108+
#/usr/local/share/uhdm/UHDM.capnp
109+
#/usr/local/lib/cmake/UHDM
110+
#/usr/local/lib/pkgconfig/UHDM.pc
111+
#/usr/local/bin/surelog
112+
#/usr/local/bin/roundtrip
113+
#/usr/local/lib/libsurelog.a
114+
#/usr/local/lib/libantlr4-runtime.a
115+
#/usr/local/lib/libcapnp.a
116+
#/usr/local/lib/libkj.a
117+
#/usr/local/lib/libuhdm.a
118+
#/usr/local/share/surelog
119+
#/usr/local/include/Surelog
120+
#/usr/local/lib/cmake/Surelog
121+
#/usr/local/lib/pkgconfig/Surelog.pc
122+
123+
## Verible
124+
#/usr/local/bin/git-verible-verilog-format.sh
125+
#/usr/local/bin/verible-patch-tool
126+
#/usr/local/bin/verible-transform-interactive.sh
127+
#/usr/local/bin/verible-verilog-diff
128+
#/usr/local/bin/verible-verilog-format
129+
#/usr/local/bin/verible-verilog-format-changed-lines-interactive.sh
130+
#/usr/local/bin/verible-verilog-kythe-extractor
131+
#/usr/local/bin/verible-verilog-kythe-kzip-writer
132+
#/usr/local/bin/verible-verilog-lint
133+
#/usr/local/bin/verible-verilog-ls
134+
#/usr/local/bin/verible-verilog-obfuscate
135+
#/usr/local/bin/verible-verilog-preprocessor
136+
#/usr/local/bin/verible-verilog-project
137+
#/usr/local/bin/verible-verilog-syntax

test.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/langutils.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
bash ../run.sh langutils 'vhd2vl --version'
5+
bash ../run.sh langutils 'slang --version'
6+
bash ../run.sh langutils 'surelog --version'
7+
bash ../run.sh langutils 'sv2v --version'
8+
bash ../run.sh langutils 'verible-verilog-syntax --version'

tests/synthesis.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -e
3+
4+
bash ../run.sh synthesis 'ghdl --version'
5+
bash ../run.sh synthesis 'yosys -m ghdl -V'
6+
bash ../run.sh synthesis 'synlig -V'

0 commit comments

Comments
 (0)