Skip to content

impl: restructure, add different images with prj tools #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/impl.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
#
Expand Down Expand Up @@ -43,9 +44,21 @@ jobs:

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

- run: dockerBuild impl impl
- run: dockerBuild impl:ecp5 impl ecp5
- run: dockerBuild impl:ice40 impl ice40
- run: dockerBuild impl:generic impl generic
- run: dockerBuild impl:icestorm impl icestorm
- run: dockerBuild impl:prjtrellis impl prjtrellis
- run: dockerBuild impl:pnr impl pnr
- run: dockerBuild impl impl

- run: dockerTest impl
- run: dockerTest impl:ecp5 impl--ecp5
- run: dockerTest impl:ice40 impl--ice40
- run: dockerTest impl:generic impl--generic
- run: dockerTest impl:icestorm impl--icestorm
- run: dockerTest impl:prjtrellis impl--prjtrellis
- run: dockerTest impl:pnr impl--pnr
- run: dockerTest impl impl

- name: Login to DockerHub
if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
Expand All @@ -57,4 +70,10 @@ jobs:
- if: github.event_name != 'pull_request' && github.repository == 'hdl/containers'
run: >-
dockerPush
impl:ecp5
impl:ice40
impl:generic
impl:icestorm
impl:prjtrellis
impl:pnr
impl
9 changes: 8 additions & 1 deletion doc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ include::tools.adoc[]

Images including multiple tools:

* **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']]
* **I**mplementation:
** 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
** 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
** 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
** 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
** 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
** 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
** 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
* **F**ormal:
** 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.
** 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.
Expand Down
2 changes: 2 additions & 0 deletions doc/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ icestorm:
use:
- 'icestorm'
in:
- 'impl:icestorm'
- 'impl'
- 'prog'
otherin:
Expand Down Expand Up @@ -132,6 +133,7 @@ prjtrellis:
use:
- 'prjtrellis'
in:
- 'impl:prjtrellis'
- 'impl'
otherin:
- 'nextpnr:prjtrellis'
Expand Down
61 changes: 51 additions & 10 deletions impl.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2019-2021 Unai Martinez-Corral <[email protected]>
#
Expand All @@ -17,20 +18,60 @@
#
# SPDX-License-Identifier: Apache-2.0

FROM hdlc/nextpnr
FROM hdlc/ghdl:yosys AS base

COPY --from=hdlc/pkg:ghdl-yosys-plugin /ghdl /
COPY --from=hdlc/pkg:yosys /yosys /

RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
libffi-dev \
libgnat-8 \
libreadline-dev \
tcl-dev \
graphviz \
xdot \
libboost-all-dev \
libomp5-7 \
make \
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists \
&& yosys-config --exec mkdir -p --datdir/plugins \
&& yosys-config --exec ln -s /usr/local/lib/ghdl_yosys.so --datdir/plugins/ghdl.so
&& rm -rf /var/lib/apt/lists

#---

FROM base AS ecp5

COPY --from=hdlc/pkg:nextpnr-ecp5 /nextpnr-ecp5 /

#---

FROM base AS ice40

COPY --from=hdlc/pkg:nextpnr-ice40 /nextpnr-ice40 /

#---

FROM base AS generic

COPY --from=hdlc/pkg:nextpnr-generic /nextpnr-generic /

#---

FROM ice40 AS icestorm

COPY --from=hdlc/pkg:icestorm /icestorm /

#---

FROM ecp5 AS prjtrellis

COPY --from=hdlc/pkg:prjtrellis /prjtrellis /

#---

FROM base AS pnr

COPY --from=hdlc/pkg:nextpnr-ecp5 /nextpnr-ecp5 /
COPY --from=hdlc/pkg:nextpnr-ice40 /nextpnr-ice40 /
COPY --from=hdlc/pkg:nextpnr-generic /nextpnr-generic /

#---

FROM pnr AS latest

COPY --from=hdlc/pkg:icestorm /icestorm /
COPY --from=hdlc/pkg:prjtrellis /prjtrellis /
29 changes: 29 additions & 0 deletions test/impl--ecp5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env sh

# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./ghdl.sh
./yosys.sh
./nextpnr--ecp5.sh
29 changes: 29 additions & 0 deletions test/impl--generic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env sh

# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./ghdl.sh
./yosys.sh
./nextpnr--generic.sh
29 changes: 29 additions & 0 deletions test/impl--ice40.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env sh

# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./ghdl.sh
./yosys.sh
./nextpnr--ice40.sh
31 changes: 31 additions & 0 deletions test/impl--icestorm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env sh

# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./ghdl.sh
./yosys.sh

./nextpnr--ice40.sh
./icestorm.sh
32 changes: 32 additions & 0 deletions test/impl--pnr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env sh

# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./ghdl.sh
./yosys.sh

./nextpnr--ecp5.sh
./nextpnr--ice40.sh
./nextpnr--generic.sh
31 changes: 31 additions & 0 deletions test/impl--prjtrellis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env sh

# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

set -e

cd $(dirname "$0")

./ghdl.sh
./yosys.sh

./nextpnr--ecp5.sh
./prjtrellis.sh
10 changes: 8 additions & 2 deletions test/impl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Authors:
# Unai Martinez-Corral
# Sebastian Birke <[email protected]>
#
# Copyright 2020-2021 Unai Martinez-Corral <[email protected]>
#
Expand All @@ -26,7 +27,12 @@ cd $(dirname "$0")
./_env.sh

./ghdl.sh
./nextpnr.sh
./yosys.sh

./_todo.sh
./nextpnr--ecp5.sh
./prjtrellis.sh

./nextpnr--ice40.sh
./icestorm.sh

./nextpnr--generic.sh