Skip to content

Commit 80464ec

Browse files
committed
impl: Restructure, add different combination of tools:
Architecture dependent: - impl:ice40: GHDL + Yosys + nextpnr-ice40 - impl:ecp5: GHDL + Yosys + nextpnr-ecp5 - impl:pnr: GHDL + Yosys + nextpnr-ice40 + nextpnr-ecp5 - impl:icestorm: impl:ice40 + icestorm - impl:prjtrellis: impl:ecp5 + prjtrellis - impl:latest: impl:pnr + icestorm + prjtrellis
1 parent 4b898e6 commit 80464ec

File tree

8 files changed

+238
-16
lines changed

8 files changed

+238
-16
lines changed

.github/workflows/impl.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Unai Martinez-Corral
33
#
44
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
5+
# Copyright 2021 Sebastian Birke <[email protected]>
56
#
67
# Licensed under the Apache License, Version 2.0 (the "License");
78
# you may not use this file except in compliance with the License.
@@ -43,9 +44,19 @@ jobs:
4344

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

46-
- run: dockerBuild impl impl
47+
- run: dockerBuild impl:ice40 impl ice40
48+
- run: dockerBuild impl:icestorm impl icestorm
49+
- run: dockerBuild impl:ecp5 impl ecp5
50+
- run: dockerBuild impl:prjtrellis impl prjtrellis
51+
- run: dockerBuild impl:pnr impl pnr
52+
- run: dockerBuild impl:latest impl latest
4753

48-
- run: dockerTest impl
54+
- run: dockerTest impl:ice40 impl--ice40
55+
- run: dockerTest impl:icestorm impl--icestorm
56+
- run: dockerTest impl:ecp5 impl--ecp5
57+
- run: dockerTest impl:prjtrellis impl--prjtrellis
58+
- run: dockerTest impl:pnr impl--pnr
59+
- run: dockerTest impl:latest impl
4960

5061
- name: Login to DockerHub
5162
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
@@ -54,5 +65,20 @@ jobs:
5465
username: ${{ secrets.DOCKER_USER }}
5566
password: ${{ secrets.DOCKER_PASS }}
5667

57-
- run: dockerPush impl
68+
- run: dockerPush impl:ice40
69+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
70+
71+
- run: dockerPush impl:icestorm
72+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
73+
74+
- run: dockerPush impl:ecp5
75+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
76+
77+
- run: dockerPush impl:prjtrellis
78+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
79+
80+
- run: dockerPush impl:pnr
81+
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
82+
83+
- run: dockerPush impl:latest
5884
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'

impl.dockerfile

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Authors:
22
# Unai Martinez-Corral
3+
# Sebastian Birke
34
#
45
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
6+
# Copyright 2021 Sebastian Birke <[email protected]>
57
#
68
# Licensed under the Apache License, Version 2.0 (the "License");
79
# you may not use this file except in compliance with the License.
@@ -17,20 +19,52 @@
1719
#
1820
# SPDX-License-Identifier: Apache-2.0
1921

20-
FROM hdlc/nextpnr
22+
FROM hdlc/ghdl:yosys AS base
2123

2224
COPY --from=hdlc/pkg:ghdl-yosys-plugin /ghdl /
2325
COPY --from=hdlc/pkg:yosys /yosys /
2426

2527
RUN apt-get update -qq \
2628
&& 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 \
29+
libboost-all-dev \
30+
libomp5-7 \
31+
make \
3332
&& 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
33+
&& rm -rf /var/lib/apt/lists
34+
35+
#---
36+
37+
FROM base AS ice40
38+
39+
COPY --from=hdlc/pkg:nextpnr-ice40 /nextpnr /
40+
41+
#---
42+
43+
FROM ice40 AS icestorm
44+
45+
COPY --from=hdlc/pkg:icestorm /icestorm /
46+
47+
#---
48+
49+
FROM base AS ecp5
50+
51+
COPY --from=hdlc/pkg:nextpnr-ecp5 /nextpnr /
52+
53+
#---
54+
55+
FROM ecp5 AS prjtrellis
56+
57+
COPY --from=hdlc/pkg:prjtrellis /prjtrellis /
58+
59+
#---
60+
61+
FROM base AS pnr
62+
63+
COPY --from=hdlc/pkg:nextpnr-all /nextpnr /
64+
65+
#---
66+
67+
FROM pnr AS latest
68+
69+
COPY --from=hdlc/pkg:icestorm /icestorm /
70+
COPY --from=hdlc/pkg:prjtrellis /prjtrellis /

test/impl--ecp5.sh

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

test/impl--ice40.sh

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

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

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

test/impl.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
# Authors:
44
# Unai Martinez-Corral
5+
# Sebastian Birke
56
#
67
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
8+
# Copyright 2021 Sebastian Birke <[email protected]>
79
#
810
# Licensed under the Apache License, Version 2.0 (the "License");
911
# you may not use this file except in compliance with the License.
@@ -29,7 +31,11 @@ cd $(dirname "$0")
2931
./smoke-tests/nextpnr.sh
3032
./smoke-tests/yosys.sh
3133

32-
ghdl --version
33-
yosys --version
34+
./ghdl.sh
35+
./yosys.sh
3436

35-
./_todo.sh
37+
./nextpnr--ice40.sh
38+
./icestorm.sh
39+
40+
./nextpnr--ecp5.sh
41+
./prjtrellis.sh

0 commit comments

Comments
 (0)