X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=HDL_workflow%2Fsymbiflow.mdwn;h=43819efc7b36b6a05fce65f0e8333799dc03a86d;hb=ed5501078efc5c1975dcf0785d29db1959b6b166;hp=96a912971bc0deedd6a914c28a7eef0183dbe68c;hpb=736591d048396596a9a08f1060da300589e312c9;p=libreriscv.git diff --git a/HDL_workflow/symbiflow.mdwn b/HDL_workflow/symbiflow.mdwn index 96a912971..43819efc7 100644 --- a/HDL_workflow/symbiflow.mdwn +++ b/HDL_workflow/symbiflow.mdwn @@ -2,16 +2,21 @@ * * +* -WORK IN PROGRESS +This is now possible with the automated devscript + -## Bugzilla page +It is, as always, your responsibility to check the contents of any +script before running it. -* +------- -## TODO +# Manual instructions -* Installation with newest git commit of symbiflow-arch-defs +These are notes taken during the process of developing the above +script. you **do not** need to go through this manual process unless +you are very paranoid. warning: it took several days to get right. ## Setting up new debootstrap and chroot into it @@ -28,81 +33,159 @@ auto-preparation script here: mount -t devpts devpts $MY_CHROOT/dev/pts/ chroot $MY_CHROOT /bin/bash -## Download neccessary softwares +## Add Buster Backports Repo and Update - apt-get install git wget +""buster backports is needed for cmake"" + + cat << EOF > /etc/apt/sources.list.d/buster_backports.list + deb http://deb.debian.org/debian buster-backports main + EOF + +""oooo annoying, pin preferences for buster-backports"" + + cat << EOF > /etc/apt/preferences.d/99buster-backports + Package: * + Pin: release a=buster-backports + Pin-Priority: 900 + EOF + +""upgrade to buster-backports"" + + apt-get update -y + apt-get upgrade -y + + +## Download necessary softwares + + apt-get install -y libcurl3-gnutls/buster git/buster wget git clone https://github.com/steveicarus/iverilog.git git clone https://github.com/YosysHQ/yosys.git git clone https://github.com/YosysHQ/abc.git + git clone https://github.com/oneapi-src/oneTBB.git git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing.git - git clone https://github.com/cliffordwolf/icestorm.git + git clone https://github.com/yosyshq/icestorm.git git clone https://github.com/SymbiFlow/prjxray.git + git clone https://github.com/SymbiFlow/prjxray-db.git git clone https://github.com/SymbiFlow/yosys-symbiflow-plugins.git git clone https://github.com/SymbiFlow/symbiflow-examples.git git clone https://github.com/SymbiFlow/symbiflow-arch-defs.git git clone https://github.com/QuickLogic-Corp/quicklogic-fasm.git - git clone https://github.com/QuickLogic-Corp/quicklogic-fasm-utils - #git clone https://github.com/SymbiFlow/symbiflow-rr-graph.git + git clone https://github.com/QuickLogic-Corp/quicklogic-fasm-utils.git + git clone https://github.com/SymbiFlow/python-fpga-interchange.git + git clone https://github.com/capnproto/capnproto.git + git clone https://github.com/capnproto/pycapnp.git wget http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz - 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 - - # get yosys-proc.patch from Bug attachment file. + wget http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz ## Steps to compile Icarus Verilog ### Necessary software to install - apt-get install build-essential autoconf make g++ bison flex gperf libreadline6-dev + apt-get install -y build-essential autoconf make g++ bison flex gperf \ + libreadline6-dev ### Build Icarus Verilog cd iverilog git checkout v11_0 sh autoconf.sh - ./configure --prefix=/usr/local/iverilog + ./configure --prefix=/usr/local/symbiflow/iverilog make -j$(nproc) make check make install - -Please adjust the install paths for iverilog. + export PATH=/usr/local/symbiflow/iverilog/bin:$PATH + cd .. ## Steps to compile Yosys ### Necessary software to install - apt-get install -t buster_backports cmake - apt-get install python3 clang libreadline-dev gawk tcl-dev \ + apt-get install -y cmake + apt-get install -y python3 clang libreadline-dev gawk tcl-dev \ libffi-dev pkg-config libboost-system-dev libboost-python-dev \ libboost-filesystem-dev zlib1g-dev ### Build Yosys - cd yosys + cd abc + git checkout 4f5f73d18b137930fb3048c0b385c82fa078db38 + cd ../yosys + git checkout f44110c62561b21fa673f44d8e115c3ee70d2900 ln -s ../abc . - make -j $(nproc) PREFIX=/usr/local/symbiflow - make PREFIX=/usr/local/symbiflow install + make -j $(nproc) PREFIX=/usr/local/symbiflow/yosys + make PREFIX=/usr/local/symbiflow/yosys install + install -d -m 0755 /usr/local/symbiflow/share + ln -s ../yosys/share/yosys /usr/local/symbiflow/share + export PATH=/usr/local/symbiflow/yosys/bin:$PATH + cd .. + +## Steps to compile oneTBB + +* Note: TBB is needed for multi-threading VTR-Verilog-to-routing +* If not need multi-threading do not build TBB and VTR with TBB + +### Necessary software to install + + apt-get install -y libhwloc-dev -""Please adjust the install paths for Yosys."" +### Build TBB + + cd oneTBB + git checkout v2020.3 + make -j$(nproc) tbb tbbmalloc tbbproxy tbbbind + install -d -m 0755 /usr/local/symbiflow/oneTBB/lib + cp -dpr include /usr/local/symbiflow/oneTBB + install -Dm755 build/linux_*/*.so* -t /usr/local/symbiflow/oneTBB/lib + cmake -DINSTALL_DIR=/usr/local/symbiflow/oneTBB/lib/cmake/TBB \ + -DTBB_VERSION_FILE=/usr/local/symbiflow/oneTBB/include/tbb/tbb_stddef.h \ + -DSYSTEM_NAME=Linux -P cmake/tbb_config_installer.cmake + echo "/usr/local/symbiflow/oneTBB/lib" > /etc/ld.so.conf.d/symbiflow.conf + ldconfig + cd .. ## Steps to compile vtr-verilog-to-routing ### Necessary software to install + apt-get install -y libeigen3-dev + # Only if want GUI place and route #apt-get install libcairo2-dev libfontconfig1-dev libx11-dev libxft-dev \ #libgtk-3-dev -### Build vtr-verilog-to-routing +### Build vtr cd vtr-verilog-to-routing + git checkout 77a3df829fdf509a76b9d7b941376f3835c2576a mkdir build; cd build - cmake -DBUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow .. + cmake -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow/vtr .. make -j $(nproc) make install + install -d -m 0755 /usr/local/symbiflow/share/vtr + install -m 0644 ../libs/libvtrcapnproto/gen/rr_graph_uxsdcxx.capnp \ + /usr/local/symbiflow/share/vtr + export PATH=/usr/local/symbiflow/vtr/bin:$PATH + cd ../.. -""Please adjust the install paths for vtr-verilog-to-routing."" +### Build vtr-tbb + + cd vtr-verilog-to-routing + git checkout 77a3df829fdf509a76b9d7b941376f3835c2576a + mkdir build-tbb; cd build-tbb + cmake -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow/vtr-tbb \ + -DTBB_INCLUDE_DIR=/usr/local/symbiflow/oneTBB/include \ + -DTBB_LIBRARY=/usr/local/symbiflow/oneTBB/lib -DBUILD_TYPE=Release .. + LIBRARY_PATH=/usr/local/symbiflow/oneTBB/lib make -j $(nproc) + LIBRARY_PATH=/usr/local/symbiflow/oneTBB/lib make install + install -d -m 0755 /usr/local/symbiflow/share/vtr + install -m 0644 ../libs/libvtrcapnproto/gen/rr_graph_uxsdcxx.capnp \ + /usr/local/symbiflow/share/vtr + # Choose either one of path for vtr-binaries + # This one or above one + #export PATH=/usr/local/symbiflow/vtr-tbb/bin:$PATH + cd ../.. ## Steps to compile libxml2 @@ -111,17 +194,40 @@ Please adjust the install paths for iverilog. ### Necessary software to install - apt-get install python3-dev + apt-get install -y python3-dev ### Build libxml2 tar -xf libxml2-2.9.12.tar.gz - libxml2-2.9.12 - ./configure --prefix=/usr/local/symbiflow --with-history --with-python=/usr/bin/python3 + cd libxml2-2.9.12 + ./configure --prefix=/usr/local/symbiflow/libxml2 --with-history \ + --with-python=/usr/bin/python3 make -j $(nproc) make install + echo "/usr/local/symbiflow/libxml2/lib" >> /etc/ld.so.conf.d/symbiflow.conf + ldconfig + export PATH=/usr/local/symbiflow/libxml2/bin:$PATH + cd .. -""Please adjust the install paths for vtr-verilog-to-routing."" +## Steps to compile libxslt + +* Needed by python3 lxml + +### Build libxslt + + tar -xf libxslt-1.1.34.tar.gz + cd libxslt-1.1.34 + sed -i s/3000/5000/ libxslt/transform.c doc/xsltproc.{1,xml} + sed -i -r '/max(Parser)?Depth/d' ./tests/fuzz/fuzz.c + ./configure --prefix=/usr/local/symbiflow/libxslt --disable-static \ + --without-python \ + PKG_CONFIG_PATH=/usr/local/symbiflow/libxml2/lib/pkgconfig + make -j $(nproc) + make install + echo "/usr/local/symbiflow/libxslt/lib" >> /etc/ld.so.conf.d/symbiflow.conf + ldconfig + export PATH=/usr/local/symbiflow/libxslt/bin:$PATH + cd .. ## Steps to compile prjxray @@ -130,11 +236,14 @@ Please adjust the install paths for iverilog. ### Build prjxray cd prjxray + git checkout f7f06896ad26bb7c94680dc323d4b871eded1f4e git submodule update --init --recursive mkdir build; cd build cmake -DCMAKE_INSTALL_PREFIX=/usr/local/symbiflow .. - make + make -j$(nproc) make install + export PATH=/usr/local/symbiflow/bin:$PATH + cd ../.. ## Steps to compile yosys-symbiflow-plugins @@ -142,94 +251,149 @@ Please adjust the install paths for iverilog. ### Build yosys-symbiflow-plugins - cd yosys-symbiflow-plugins/ - sed -i -e 's@include third_party/make-env/conda.mk@#include third_party/make-env/conda.mk@' Makefile - make + cd yosys-symbiflow-plugins + git checkout b170f1d3575568d87901422f846b700169e299be + sed -i -e 's@-include third_party/make-env/conda.mk@#-include third_party/make-env/conda.mk@' Makefile + make -j$(nproc) make install + cd .. + +## Steps to compile prjxray-db + +### Install prjxray-db + + cd prjxray-db + git archive --format=tar --prefix=prjxray-db/ \ + cd41f08a8a4d2a60053750a0fe10623b1e2e35da | \ + tar -C /usr/local/symbiflow -xf - + + cat > /usr/local/symbiflow/bin/prjxray-config << EOF + #!/bin/bash + echo /usr/local/symbiflow/prjxray-db + EOF + + chmod +x /usr/local/symbiflow/bin/prjxray-config + cd .. ## Steps to compile Icestorm ### Necessary software to install - apt-get install libftdi-dev + apt-get install -y libftdi-dev ### Build Icestorm cd icestorm - make -j $(nproc) PREFIX=/usr/local/symbiflow + git checkout 83b8ef947f77723f602b706eac16281e37de278c + make -j $(nproc) PREFIX=/usr/local/symbiflow/icestorm + make PREFIX=/usr/local/symbiflow/icestorm install + export PATH=/usr/local/symbiflow/icestorm/bin:$PATH + cd .. + +## Steps to compile capnproto + +### Necessary software to install + + apt-get install -y automake autoconf libtool + +### Build capnproto + + cd capnproto + git checkout v0.8.0 + cd c++ + autoreconf -i + ./configure --prefix=/usr/local/symbiflow/capnproto + make -j $(nproc) make install + echo "/usr/local/symbiflow/capnproto/lib" >> /etc/ld.so.conf.d/symbiflow.conf + ldconfig + export PATH=/usr/local/symbiflow/capnproto/bin:$PATH + cd ../.. -## Steps to compile prjxray-db +## Steps to compile pycapnp -### Install prjxray-db +### Necessary software to install - tar --strip-components=2 -xf prjxray-db-0.0_248_g2e51ad3-20210312_125539.tar.bz2 share/symbiflow/prjxray-db + apt-get install -y python3-pip cython3 - #!!ATTENTION!! +### Build pycapnp - cat > /usr/local/symbiflow/bin/prjxray-config <