forked from Mluckydwyer/hw-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-Full
63 lines (51 loc) · 2.76 KB
/
Dockerfile-Full
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# mluckydwyer/hw-ci Docker Container
FROM mluckydwyer/hw-ci:slim as slim
LABEL \
org.opencontainers.image.title="Hardware Verification CI Docker container" \
org.opencontainers.image.description="Questa Sim, Verilator, GHDL, VUnit, CocoTB, and Pytest for HW Development (+VNC)." \
org.opencontainers.image.authors="Matthew Dwyer <[email protected]>" \
org.opencontainers.image.source="https://github.com/Mluckydwyer/hw-ci"
ENV container docker
# Patch CocoTB-test simulation.py with custom implementation for Modelsim complilation
# RUN rm /opt/Python-3.6.14/lib/python3.6/site-packages/cocotb_test/simulator.py
# COPY resources/simulator.py /opt/Python-3.6.14/lib/python3.6/site-packages/cocotb_test/simulator.py
# EXPOSE 5678
# Install VUnit
FROM slim as vunit
RUN pip3 install vunit_hdl
# Install Questasim (aka Modelsim)
FROM vunit as questasim
RUN yum install -y libiodbc unixODBC ncurses ncurses-libs \
zeromq-devel libXext alsa-lib libXtst libXft libxml2 libedit libX11 libXi \
glibc glibc.i686 glibc-devel.i386 libgcc.i686 libstdc++-devel.i686 libstdc++ \
libstdc++.i686 libXext libXext.i686 libXft libXft.i686 libXrender libXtst
WORKDIR /tmp
ENV QUESTA_VERSION=22.2
ENV QUESTA_VERSION_FULL=22.2.0.94
RUN curl -sS -O https://downloads.intel.com/akdlm/software/acdsinst/22.2/94/ib_installers/QuestaSetup-22.2.0.94-linux.run \
&& curl -sS -O https://downloads.intel.com/akdlm/software/acdsinst/22.2/94/ib_installers/questa_part2-22.2.0.94-linux.qdz \
&& chmod +x QuestaSetup-${QUESTA_VERSION_FULL}-linux.run \
&& ./QuestaSetup-${QUESTA_VERSION_FULL}-linux.run --mode unattended --installdir /opt/intelFPGA/${QUESTA_VERSION} --accept_eula 1 --questa_edition questa_fse \
&& rm QuestaSetup-${QUESTA_VERSION_FULL}-linux.run
ENV PATH="/opt/intelFPGA/${QUESTA_VERSION}/questa_fse/bin:${PATH}"
# Install Symbiflow toolchain
FROM questasim as symbiflow
ENV SYMBIFLOW_INSTALL_DIR=/opt/symbiflow
ENV PATH=$SYMBIFLOW_INSTALL_DIR/xc7/:$PATH
WORKDIR /workspaces/
RUN mkdir -p $SYMBIFLOW_INSTALL_DIR/{xc7,eos-s3}/install \
&& yum -y install git which xz \
&& curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/Miniconda3-latest-Linux-x86_64.sh \
&& sh /tmp/Miniconda3-latest-Linux-x86_64.sh -u -b -p ${SYMBIFLOW_INSTALL_DIR}/conda \
&& git clone https://github.com/SymbiFlow/symbiflow-examples \
&& cd symbiflow-examples \
&& source "${SYMBIFLOW_INSTALL_DIR}/conda/etc/profile.d/conda.sh" \
&& conda env create -f xc7/environment.yml \
&& conda env create -f eos-s3/environment.yml \
&& rm /tmp/Miniconda3-latest-Linux-x86_64.sh
FROM symbiflow as final
RUN mkdir /workspaces/tools
COPY ./resources/*.sh /workspaces/tools/
RUN chmod +x /workspaces/tools/*.sh \
&& chmod +rw /root/ -R
WORKDIR /workspaces/