Skip to content

Commit 1add89d

Browse files
authored
impl: restructure, add different images with prj tools (#15)
Architecture dependent: * impl:ecp5: GHDL + Yosys + nextpnr-ecp5 * impl:ice40: GHDL + Yosys + nextpnr-ice40 * impl:generic: GHDL + Yosys + nextpnr-generic * impl:pnr: GHDL + Yosys + nextpnr-ecp5 + nextpnr-ice40 + nextpnr-generic * impl:icestorm: impl:ice40 + icestorm * impl:prjtrellis: impl:ecp5 + prjtrellis * impl:latest: impl:pnr + icestorm + prjtrellis
1 parent 0354360 commit 1add89d

File tree

11 files changed

+271
-15
lines changed

11 files changed

+271
-15
lines changed

.github/workflows/impl.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Authors:
22
# Unai Martinez-Corral
3+
# Sebastian Birke <[email protected]>
34
#
45
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
56
#
@@ -43,9 +44,21 @@ jobs:
4344

4445
- run: echo "$(pwd)/.github/bin" >> $GITHUB_PATH
4546

46-
- run: dockerBuild impl impl
47+
- run: dockerBuild impl:ecp5 impl ecp5
48+
- run: dockerBuild impl:ice40 impl ice40
49+
- run: dockerBuild impl:generic impl generic
50+
- run: dockerBuild impl:icestorm impl icestorm
51+
- run: dockerBuild impl:prjtrellis impl prjtrellis
52+
- run: dockerBuild impl:pnr impl pnr
53+
- run: dockerBuild impl impl
4754

48-
- run: dockerTest impl
55+
- run: dockerTest impl:ecp5 impl--ecp5
56+
- run: dockerTest impl:ice40 impl--ice40
57+
- run: dockerTest impl:generic impl--generic
58+
- run: dockerTest impl:icestorm impl--icestorm
59+
- run: dockerTest impl:prjtrellis impl--prjtrellis
60+
- run: dockerTest impl:pnr impl--pnr
61+
- run: dockerTest impl impl
4962

5063
- name: Login to DockerHub
5164
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
@@ -57,4 +70,10 @@ jobs:
5770
- if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
5871
run: >-
5972
dockerPush
73+
impl:ecp5
74+
impl:ice40
75+
impl:generic
76+
impl:icestorm
77+
impl:prjtrellis
78+
impl:pnr
6079
impl

doc/index.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ include::tools.adoc[]
2424

2525
Images including multiple tools:
2626

27-
* **I**mplementation: https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl?longCache=true&style=flat-square&label=hdlc%2Fimpl&logo=Docker&logoColor=fff[title='hdlc/impl:latest Docker image size']]
27+
* **I**mplementation:
28+
** https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl/ecp5?longCache=true&style=flat-square&label=hdlc%2Fimpl:ecp5&logo=Docker&logoColor=fff[title='hdlc/impl:ecp5 Docker image size']] GHDL + Yosys + nextpnr-ecp5
29+
** https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl/ice40?longCache=true&style=flat-square&label=hdlc%2Fimpl:ice40&logo=Docker&logoColor=fff[title='hdlc/impl:ice40 Docker image size']] GHDL + Yosys + nextpnr-ice40
30+
** https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl/generic?longCache=true&style=flat-square&label=hdlc%2Fimpl:generic&logo=Docker&logoColor=fff[title='hdlc/impl:generic Docker image size']] GHDL + Yosys + nextpnr-generic
31+
** https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl/icestorm?longCache=true&style=flat-square&label=hdlc%2Fimpl:icestorm&logo=Docker&logoColor=fff[title='hdlc/impl:icestorm Docker image size']] impl:ice40 + icestorm
32+
** https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl/prjtrellis?longCache=true&style=flat-square&label=hdlc%2Fimpl:prjtrellis&logo=Docker&logoColor=fff[title='hdlc/impl:prjtrellis Docker image size']] impl:ecp5 + prjtrellis
33+
** https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl/pnr?longCache=true&style=flat-square&label=hdlc%2Fimpl:pnr&logo=Docker&logoColor=fff[title='hdlc/impl:pnr Docker image size']] GHDL + Yosys + nextpnr-ecp5 + nextpnr-ice40 + nextpnr-generic
34+
** https://hub.docker.com/r/hdlc/impl/tags[image:https://img.shields.io/docker/image-size/hdlc/impl/latest?longCache=true&style=flat-square&label=hdlc%2Fimpl&logo=Docker&logoColor=fff[title='hdlc/impl:latest Docker image size']] impl:pnr + icestorm + prjtrellis
2835
* **F**ormal:
2936
** https://hub.docker.com/r/hdlc/formal/tags[image:https://img.shields.io/docker/image-size/hdlc/formal/latest?longCache=true&style=flat-square&label=hdlc%2Fformal&logo=Docker&logoColor=fff[title='hdlc/formal:latest Docker image size']] all solvers depending on Python 3.
3037
** https://hub.docker.com/r/hdlc/formal/tags[image:https://img.shields.io/docker/image-size/hdlc/formal/min?longCache=true&style=flat-square&label=hdlc%2Fformal:min&logo=Docker&logoColor=fff[title='hdlc/formal:min Docker image size']] Z3 only.

doc/tools.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ icestorm:
9393
use:
9494
- 'icestorm'
9595
in:
96+
- 'impl:icestorm'
9697
- 'impl'
9798
- 'prog'
9899
otherin:
@@ -132,6 +133,7 @@ prjtrellis:
132133
use:
133134
- 'prjtrellis'
134135
in:
136+
- 'impl:prjtrellis'
135137
- 'impl'
136138
otherin:
137139
- 'nextpnr:prjtrellis'

impl.dockerfile

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Authors:
22
# Unai Martinez-Corral
3+
# Sebastian Birke <[email protected]>
34
#
45
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
56
#
@@ -17,20 +18,60 @@
1718
#
1819
# SPDX-License-Identifier: Apache-2.0
1920

20-
FROM hdlc/nextpnr
21+
FROM hdlc/ghdl:yosys AS base
2122

2223
COPY --from=hdlc/pkg:ghdl-yosys-plugin /ghdl /
2324
COPY --from=hdlc/pkg:yosys /yosys /
2425

2526
RUN apt-get update -qq \
2627
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
27-
libffi-dev \
28-
libgnat-8 \
29-
libreadline-dev \
30-
tcl-dev \
31-
graphviz \
32-
xdot \
28+
libboost-all-dev \
29+
libomp5-7 \
30+
make \
3331
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
34-
&& rm -rf /var/lib/apt/lists \
35-
&& yosys-config --exec mkdir -p --datdir/plugins \
36-
&& yosys-config --exec ln -s /usr/local/lib/ghdl_yosys.so --datdir/plugins/ghdl.so
32+
&& rm -rf /var/lib/apt/lists
33+
34+
#---
35+
36+
FROM base AS ecp5
37+
38+
COPY --from=hdlc/pkg:nextpnr-ecp5 /nextpnr-ecp5 /
39+
40+
#---
41+
42+
FROM base AS ice40
43+
44+
COPY --from=hdlc/pkg:nextpnr-ice40 /nextpnr-ice40 /
45+
46+
#---
47+
48+
FROM base AS generic
49+
50+
COPY --from=hdlc/pkg:nextpnr-generic /nextpnr-generic /
51+
52+
#---
53+
54+
FROM ice40 AS icestorm
55+
56+
COPY --from=hdlc/pkg:icestorm /icestorm /
57+
58+
#---
59+
60+
FROM ecp5 AS prjtrellis
61+
62+
COPY --from=hdlc/pkg:prjtrellis /prjtrellis /
63+
64+
#---
65+
66+
FROM base AS pnr
67+
68+
COPY --from=hdlc/pkg:nextpnr-ecp5 /nextpnr-ecp5 /
69+
COPY --from=hdlc/pkg:nextpnr-ice40 /nextpnr-ice40 /
70+
COPY --from=hdlc/pkg:nextpnr-generic /nextpnr-generic /
71+
72+
#---
73+
74+
FROM pnr AS latest
75+
76+
COPY --from=hdlc/pkg:icestorm /icestorm /
77+
COPY --from=hdlc/pkg:prjtrellis /prjtrellis /

test/impl--ecp5.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Sebastian Birke <[email protected]>
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
./ghdl.sh
28+
./yosys.sh
29+
./nextpnr--ecp5.sh

test/impl--generic.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Sebastian Birke <[email protected]>
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
./ghdl.sh
28+
./yosys.sh
29+
./nextpnr--generic.sh

test/impl--ice40.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Sebastian Birke <[email protected]>
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
./ghdl.sh
28+
./yosys.sh
29+
./nextpnr--ice40.sh

test/impl--icestorm.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Sebastian Birke <[email protected]>
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
./ghdl.sh
28+
./yosys.sh
29+
30+
./nextpnr--ice40.sh
31+
./icestorm.sh

test/impl--pnr.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Sebastian Birke <[email protected]>
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
./ghdl.sh
28+
./yosys.sh
29+
30+
./nextpnr--ecp5.sh
31+
./nextpnr--ice40.sh
32+
./nextpnr--generic.sh

test/impl--prjtrellis.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env sh
2+
3+
# Authors:
4+
# Unai Martinez-Corral
5+
# Sebastian Birke <[email protected]>
6+
#
7+
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
#
9+
# Licensed under the Apache License, Version 2.0 (the "License");
10+
# you may not use this file except in compliance with the License.
11+
# You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS,
17+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
# See the License for the specific language governing permissions and
19+
# limitations under the License.
20+
#
21+
# SPDX-License-Identifier: Apache-2.0
22+
23+
set -e
24+
25+
cd $(dirname "$0")
26+
27+
./ghdl.sh
28+
./yosys.sh
29+
30+
./nextpnr--ecp5.sh
31+
./prjtrellis.sh

0 commit comments

Comments
 (0)