Skip to content

Commit

Permalink
Merge pull request #11 from NikLeberg/ghdl-yosys-plugin
Browse files Browse the repository at this point in the history
Add GHDL as plugin to Yosys
  • Loading branch information
Readon authored Jun 15, 2024
2 parents e854a3b + 631c9bc commit 9e4dff1
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Author(s): Pavel Benacek <pavel.benacek@gmail.com>
# Leuenberger Niklaus <https://github.com/NikLeberg>

ARG UBUNTU_VERSION=22.04
FROM ubuntu:$UBUNTU_VERSION AS base
Expand All @@ -13,14 +14,14 @@ ARG SBT_OPTS_DEFAULT="-Dsbt.override.build.repos=true -Dsbt.boot.directory=/sbt/
ENV COURSIER_CACHE=$COURSIER_CACHE_DEFAULT
ENV SBT_OPTS=$SBT_OPTS_DEFAULT

ARG DEPS_RUNTIME="ca-certificates gnupg2 openjdk-17-jdk-headless ccache curl g++ gcc git libtcl8.6 python3 python3-pip python3-pip-whl libpython3-dev ssh locales make ghdl iverilog libboost1.74-dev"
ARG DEPS_RUNTIME="ca-certificates gnupg2 openjdk-17-jdk-headless ccache curl g++ gcc git libtcl8.6 python3 python3-pip python3-pip-whl libpython3-dev ssh locales make libgnat-13 iverilog libboost1.74-dev"
RUN apt-get update && \
apt-get install -y --no-install-recommends $DEPS_RUNTIME

FROM base AS build-symbiyosys

ENV PREFIX=/opt
ARG DEPS_YOSYS="autoconf build-essential clang cmake libffi-dev libreadline-dev pkg-config tcl-dev unzip flex bison"
ARG DEPS_YOSYS="autoconf build-essential clang cmake libffi-dev libreadline-dev pkg-config tcl-dev unzip flex bison gnat libz-dev"
RUN apt-get install -y --no-install-recommends $DEPS_YOSYS

ARG YOSYS_VERSION="yosys-0.28"
Expand Down Expand Up @@ -65,6 +66,26 @@ RUN git clone https://github.com/YosysHQ/sby.git SymbiYosys && \
cd .. && \
rm -Rf SymbiYosys

ARG GHDL_VERSION="v4.1.0"
RUN git clone https://github.com/ghdl/ghdl ghdl && \
cd ghdl && \
git checkout $GHDL_VERSION && \
mkdir build && \
cd build && \
../configure --prefix=$PREFIX && \
make && \
make install && \
cd ../.. && \
rm -Rf ghdl

ARG GHDL_PLUGIN_VERSION="0c4740a"
RUN git clone https://github.com/ghdl/ghdl-yosys-plugin.git ghdl-yosys-plugin && \
cd ghdl-yosys-plugin && \
git reset $GHDL_PLUGIN_VERSION --hard && \
make YOSYS_PREFIX=$PREFIX install && \
cd .. && \
rm -Rf ghdl-yosys-plugin

FROM base AS build-verilator

ENV PREFIX=/opt
Expand Down

0 comments on commit 9e4dff1

Please sign in to comment.