forked from QuickLogic-Corp/quicklogic-fpga-toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
119 lines (89 loc) · 3.38 KB
/
Dockerfile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
ARG IMAGE="python:3-slim-buster"
#---
# Place anything that is common to both the build and execution environment in base
#
FROM $IMAGE AS base
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
ca-certificates \
clang \
cmake \
curl \
git \
libffi-dev \
libreadline-dev \
libtbb-dev \
tcl-dev \
graphviz \
wget \
xdot \
&& apt-get autoclean && apt-get clean && apt-get -y autoremove \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists
ENV INSTALL_DIR="/opt/symbiflow/eos-s3"
ENV PATH="$INSTALL_DIR/install/bin:$INSTALL_DIR/install/bin/python:$PATH"
ENV YOSYS=${INSTALL_DIR}/install/bin/yosys
#---
FROM base AS build
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
bison \
build-essential \
flex \
gawk \
git \
iverilog \
pkg-config
#Checkout *yosys* repository (https://github.com/QuickLogic-Corp/yosys.git), branch: **quicklogic-rebased**.
RUN git clone https://github.com/QuickLogic-Corp/yosys.git -b quicklogic-rebased quicklogic-yosys
WORKDIR /quicklogic-yosys
RUN make config-gcc
RUN make install PREFIX=${INSTALL_DIR}/install
RUN cd -
#Checkout *yosys-symbiflow-plugins* (https://github.com/QuickLogic-Corp/yosys-symbiflow-plugins), branch: **ql-ios**.
WORKDIR /
RUN git clone https://github.com/QuickLogic-Corp/yosys-symbiflow-plugins -b ql-ios
WORKDIR /yosys-symbiflow-plugins
# export PATH='specify Yosys installation path as specified in PREFIX in previous step':$PATH
RUN make
RUN make install
RUN cd -
#Checkout *vpr* repository (https://github.com/SymbiFlow/vtr-verilog-to-routing.git), branch: **master**.
WORKDIR /
RUN git clone https://github.com/SymbiFlow/vtr-verilog-to-routing -b master
RUN cd vtr-verilog-to-routing
WORKDIR /vtr-verilog-to-routing
RUN make
#Checkout *symbiflow-arch-defs* repository (https://github.com/QuickLogic-Corp/symbiflow-arch-defs.git), branch: **quicklogic-upstream-rebase**.
WORKDIR /
RUN git clone https://github.com/QuickLogic-Corp/symbiflow-arch-defs.git -b quicklogic-upstream-rebase
WORKDIR /symbiflow-arch-defs
RUN make env
RUN cd build
RUN make all_conda
RUN cd -
RUN make
#---
FROM base AS release-candidate
COPY --from=build /opt/symbiflow/eos-s3 /opt/symbiflow/eos-s3/
COPY --from=build /symbiflow-arch-defs /symbiflow-arch-defs/
COPY --from=build /yosys-symbiflow-plugins /yosys-symbiflow-plugins/
COPY --from=build /vtr-verilog-to-routing /vtr-verilog-to-routing/
# Probably should add these to the release candidate:
# ENV YOSYS='path to Yosys binary, installed in first step'
# ENV VPR='path to vpr binary built'
# ENV GENFASM='path to genfasm binary built'
FROM release-candidate AS all_quick_tests
WORKDIR /symbiflow-arch-defs/build/quicklogic/pp3/tests
RUN make all_quick_tests
FROM release-candidate AS all_ql_tests
WORKDIR /symbiflow-arch-defs/build/quicklogic/pp3/tests
RUN make all_ql_tests
FROM release-candidate AS release
# Build the container with something like:
# docker build . -t symbiflow-ql-slim-buster
# Run bash in the container interactively with something like:
# docker run -it symbiflow-ql-slim-buster bash
# Run any test case in the container running bash interactively. For example, follow these steps to run a test case:
# cd /symbiflow-arch-defs/build/quicklogic/pp3/tests/quicklogic_testsuite/bin2seven
# make bin2seven-ql-chandalar_fasm