1 # Installation instructions for Symbiflow with Xilinx Artix7 100T Board
3 * <https://symbiflow.github.io/>
4 * <https://github.com/SymbiFlow>
10 * <https://bugs.libre-soc.org/show_bug.cgi?id=654>
14 * Installation with newest git commit of symbiflow-arch-defs
16 ## Setting up new debootstrap and chroot into it
18 Run the following if you wish to isolate the symbiflow build
19 from other software (reproducible builds) or use the schroot
20 auto-preparation script here:
21 <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=mk-deb-chroot;hb=HEAD>
23 export MY_CHROOT=/stable-chroot
25 debootstrap buster $MY_CHROOT http://deb.debian.org/debian/
26 mount -t proc proc $MY_CHROOT/proc
27 mount -t sysfs sysfs $MY_CHROOT/sys
28 mount -t devpts devpts $MY_CHROOT/dev/pts/
29 chroot $MY_CHROOT /bin/bash
31 ## Download neccessary softwares
33 apt-get install git wget
35 git clone https://github.com/steveicarus/iverilog.git
36 git clone https://github.com/YosysHQ/yosys.git
37 git clone https://github.com/YosysHQ/abc.git
38 git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing.git
39 git clone https://github.com/cliffordwolf/icestorm.git
40 git clone https://github.com/SymbiFlow/prjxray.git
41 git clone https://github.com/SymbiFlow/yosys-symbiflow-plugins.git
42 git clone https://github.com/SymbiFlow/symbiflow-examples.git
43 git clone https://github.com/SymbiFlow/symbiflow-arch-defs.git
44 git clone https://github.com/QuickLogic-Corp/quicklogic-fasm.git
45 git clone https://github.com/QuickLogic-Corp/quicklogic-fasm-utils
46 #git clone https://github.com/SymbiFlow/symbiflow-rr-graph.git
48 wget http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz
49 wget https://anaconda.org/LiteX-Hub/prjxray-db/0.0_248_g2e51ad3/download/linux-64/prjxray-db-0.0_248_g2e51ad3-20210317_102909.tar.bz2
51 # get yosys-proc.patch from Bug attachment file.
53 ## Steps to compile Icarus Verilog
55 ### Necessary software to install
57 apt-get install build-essential autoconf make g++ bison flex gperf libreadline6-dev
59 ### Build Icarus Verilog
64 ./configure --prefix=/usr/local/iverilog
69 Please adjust the install paths for iverilog.
71 ## Steps to compile Yosys
73 ### Necessary software to install
75 apt-get install -t buster_backports cmake
76 apt-get install python3 clang libreadline-dev gawk tcl-dev \
77 libffi-dev pkg-config libboost-system-dev libboost-python-dev \
78 libboost-filesystem-dev zlib1g-dev
84 make -j $(nproc) PREFIX=/usr/local/symbiflow
85 make PREFIX=/usr/local/symbiflow install
87 ""Please adjust the install paths for Yosys.""
89 ## Steps to compile vtr-verilog-to-routing
91 ### Necessary software to install
93 # Only if want GUI place and route
94 #apt-get install libcairo2-dev libfontconfig1-dev libx11-dev libxft-dev \
97 ### Build vtr-verilog-to-routing
99 cd vtr-verilog-to-routing
100 mkdir build; cd build
101 cmake -DBUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow ..
105 ""Please adjust the install paths for vtr-verilog-to-routing.""
107 ## Steps to compile libxml2
109 * Newer version is needed which fixes a integer overflow error and is not
112 ### Necessary software to install
114 apt-get install python3-dev
118 tar -xf libxml2-2.9.12.tar.gz
120 ./configure --prefix=/usr/local/symbiflow --with-history --with-python=/usr/bin/python3
124 ""Please adjust the install paths for vtr-verilog-to-routing.""
126 ## Steps to compile prjxray
128 ### Necessary software to install
133 git submodule update --init --recursive
134 mkdir build; cd build
135 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow ..
139 ## Steps to compile yosys-symbiflow-plugins
141 ### Necessary software to install
143 ### Build yosys-symbiflow-plugins
145 cd yosys-symbiflow-plugins/
146 sed -i -e 's@include third_party/make-env/conda.mk@#include third_party/make-env/conda.mk@' Makefile
150 ## Steps to compile Icestorm
152 ### Necessary software to install
154 apt-get install libftdi-dev
159 make -j $(nproc) PREFIX=/usr/local/symbiflow
162 ## Steps to compile prjxray-db
164 ### Install prjxray-db
166 tar --strip-components=2 -xf prjxray-db-0.0_248_g2e51ad3-20210312_125539.tar.bz2 share/symbiflow/prjxray-db
170 cat > /usr/local/symbiflow/bin/prjxray-config <<EOF
172 echo /path/to/prjxray-db
175 chmod +x /usr/local/symbiflow/bin/prjxray-config
177 ## Steps to compile symbiflow-arch-defs
179 ## Necessary software to install
181 apt-get install nodejs npm python3-pytest openocd flake8 python3-pip \
182 default-jre-headless libantlr4-runtime-dev cython3 python3-numpy \
183 python3-intervaltree python3-simplejson python3-intelhex \
184 python3-importlib-metadata python3-jsonschema python3-packaging \
185 python3-pyparsing python3-pyrsistent python3-tqdm python3-zipp \
186 python3-typing-extensions python3-ply
188 pip3 install textx fasm pyjson5 pyyaml tinyfpgab tinyprog pyjson lxml \
189 progressbar2 hilbertcurve==1.0.5 pycapnp==1.0.0b1 python-constraint \
190 parameterized yapf==0.26.0
192 cd symbiflow-arch-defs
194 git submodule update --init --recursive
195 pip3 install -e third_party/prjxray
196 pip3 install -e third_party/xc-fasm
197 pip3 install ../quicklogic-fasm-utils
198 pip3 install ../quicklogic-fasm
199 cd third_party/qlf-fasm; git checkout master; cd ../..;
200 pip3 install -e third_party/qlf-fasm
201 cd quicklogic/common/utils/quicklogic-timings-importer;
202 git checkout master; cd ../../../../;
203 pip3 install -e quicklogic/common/utils/quicklogic-timings-importer
204 pip3 install -e third_party/vtr-xml-utils
205 pip3 install -e third_party/python-symbiflow-v2x
206 pip3 install -e third_party/python-sdf-timing
207 #pip3 install ../symbiflow-rr-graph
208 pip3 install -e third_party/symbiflow-xc-fasm2bels
210 export PATH=/usr/local/iverilog/bin:/usr/local/symbiflow/bin:$PATH
212 mkdir -p env/conda/envs
213 ln -s /usr/local/symbiflow env/conda/envs/symbiflow_arch_def_base
215 git checkout d5d69edeadcf28b36d75c1cb515b145fc6775c3c
217 sed -i -e 's@add_subdirectory(litex)@#add_subdirectory(litex)@g' -e 's@add_subdirectory(ibex)@#add_subdirectory(ibex)@g' xc/xc7/tests/soc/CMakeLists.txt
219 patch -p1 -i yosys-proc.patch
221 ### Build symbiflow-arch-defs-xc7-artix7_100t
223 mkdir build; cd build
224 #!!ATTENTION change path to prjxray-db
225 cmake -DUSE_CONDA=FALSE -DPRJXRAY_DB_DIR=/path/to/prjxray-db -DINSTALL_FAMILIES=xc7 -DINSTALL_ARCHS=artix7_100t -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow ..
226 cd xc/xc7/archs/artix7_100t
228 make file_xc_xc7_archs_artix7_100t_channels_xc7a100tcsg324-1_channels.db
230 make PINMAP_INSTALL_arty100t-full_xc7a100t_test_arty100t-full_pinmap.csv
231 mkdir -p /usr/local/symbiflow/share/symbiflow/arch/xc7a100t_test/xc7a100tcsg324-1
232 cp arty100t-full_pinmap.csv /usr/local/symbiflow/share/symbiflow/arch/xc7a100t_test/xc7a100tcsg324-1
234 # Now you can skip to symbiflow-examples.git for external test
236 # To do builtin counter test; it should build top.bit as final bitstream
238 make counter_arty100t_bit
240 ### Build symbiflow-arch-defs-xc7-artix7
242 mkdir build_artix7; cd build_artix7
243 #!!ATTENTION change path to prjxray-db
244 cmake -DUSE_CONDA=FALSE -DPRJXRAY_DB_DIR=/path/to/prjxray-db -DINSTALL_FAMILIES=xc7 -DINSTALL_ARCHS=artix7_100t -DINSTALL_DEVICES=artix7 -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow ..
245 cd xc/xc7/archs/artix7
247 mkdir -p /usr/local/symbiflow/share/symbiflow/arch/xc7a50t_test/xc7a50tfgg484-1
250 python3 ../../../common/utils/prjxray_create_pinmap_csv.py --output /usr/local/symbiflow/share/symbiflow/arch/xc7a50t_test/xc7a50tfgg484-1/pinmap.csv --connection_database channels/xc7a50tfgg484-1/channels.db --package_pins /path/to/prjxray-db/artix7/xc7a50tfgg484-1/package_pins.csv
252 # Now you can skip to symbiflow-examples.git for external test
253 # Currently I have to modify it to artix7_x50t
255 # To do builtin counter test; it should build top.bit as final bitstream
256 # If the make target has not been built by cmake then you have to run
257 # cmake without -DINSTALL_DEVICES=artix7
260 make counter_arty_bit
262 ## Steps to compile symbiflow-examples
264 ### Build symbiflow-arch-defs-xc7-artix7_100t
266 cd symbiflow-examples
268 TARGET="arty_100" make -C counter_test
270 # Should produce top.bit bitstream