#!/bin/bash # Ubuntu 22 SCRIPT_PATH="${BASH_SOURCE[0]}"; pushd `dirname ${SCRIPT_PATH}` > /dev/null SCRIPT_PATH=`pwd -P`; popd > /dev/null mkdir $SCRIPT_PATH/toolsrc mkdir $SCRIPT_PATH/cad # Xyce and Trilinos takes the longest to execute, in the interest of caching, this should go first. # install Trilinos apt-get update --fix-missing; DEBIAN_FRONTEND=noninteractive apt-get install -y \ sudo wget gcc g++ gfortran make bison flex libfl-dev libfftw3-dev libsuitesparse-dev libblas-dev liblapack-dev libtool \ autoconf automake git \ libhwloc15 libopenmpi-dev openmpi-bin openmpi-common \ python3 python3-pip libpython3-all-dev wget https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-x86_64.sh bash cmake-3.29.6-linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license cd $SCRIPT_PATH/toolsrc git clone --depth=1 https://github.com/trilinos/Trilinos.git --branch trilinos-release-15-1-1 git clone --depth=1 https://github.com/Xyce/Xyce.git --branch Release-7.8.0 cd Trilinos mkdir $SCRIPT_PATH/trilinos mkdir build cd build cmake \ -D PYTHON_EXECUTABLE=/usr/bin/python3 \ -D CMAKE_C_COMPILER=mpicc \ -D CMAKE_CXX_COMPILER=mpic++ \ -D CMAKE_Fortran_COMPILER=mpif77 \ -D CMAKE_INSTALL_PREFIX="$SCRIPT_PATH/trilinos" \ -D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \ -D AMD_LIBRARY_DIRS="/usr/lib" \ -D MPI_BASE_DIR="/usr" \ -C $SCRIPT_PATH/toolsrc/Xyce/cmake/trilinos/trilinos-MPI-base.cmake \ $SCRIPT_PATH/toolsrc/Trilinos cmake --build . -j 40 -t install # install Xyce cd $SCRIPT_PATH/toolsrc cd Xyce mkdir build cd build cmake \ -D CMAKE_INSTALL_PREFIX=$SCRIPT_PATH/cad \ -D Trilinos_ROOT=$SCRIPT_PATH/trilinos \ $SCRIPT_PATH/toolsrc/Xyce cmake --build . -j 16 -t install make xycecinterface make install # install OpenRoad cd $SCRIPT_PATH/toolsrc git clone --recursive https://www.github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git cd OpenROAD-flow-scripts SUDO_USER="root" ./setup.sh ./build_openroad.sh --local --install-path $SCRIPT_PATH/openroad --nice mv dependencies $SCRIPT_PATH/or-tools # install ACT cd $SCRIPT_PATH/toolsrc apt-get install -y libedit-dev zlib1g-dev m4 git gcc g++ make libboost-all-dev git clone --recursive https://www.github.com/asyncvlsi/actflow.git cd actflow export ACT_HOME=$SCRIPT_PATH/cad export VLSI_TOOLS_SRC=$SCRIPT_PATH/toolsrc/actflow cd actsim ./grab_xyce.sh $SCRIPT_PATH/toolsrc/Xyce/build sed -i 's/make/make CXX=mpic++ CC=mpicc CC_COMPILER=mpicc CXX_COMPILER=mpic++ C_COMPILER_NAME=mpicc CXX_COMPILER_NAME=mpic++/g' build.sh cd $SCRIPT_PATH/toolsrc/actflow echo "g++" > CXX_COMPILER CXX="g++" CC="gcc" CXX_COMPILER="g++" CC_COMPILER="gcc" ./build # install ACT-06 apt-get install -y libedit-dev zlib1g-dev m4 git gcc g++ make cd $SCRIPT_PATH/toolsrc --mount=type=secret,id=user --mount=type=secret,id=token git clone https://$(cat /run/secrets/user):$(cat /run/secrets/token)@git.broccolimicro.io/Broccoli/act-06.git --branch v1.0.1 cd act-06/prsim ./grab_xyce.sh $SCRIPT_PATH/toolsrc/Xyce/build cd .. XYCE_INSTALL="$SCRIPT_PATH/cad" ENABLE_MPI=1 make cp prsim/prsim chan.py measure.py sim2vcd.py tlint/tlint spi2act/spi2act.py v2act/v2act $SCRIPT_PATH/cad/bin # install graphviz DOT apt-get install -y graphviz # install Haystack cd $SCRIPT_PATH/toolsrc git clone --recursive https://github.com/nbingham1/haystack.git --branch v0.2.2 cd haystack cd lib make cd ../bin make cp hsesim/hsesim $SCRIPT_PATH/cad/bin cp hseenc/hseenc $SCRIPT_PATH/cad/bin cp hseplot/plot $SCRIPT_PATH/cad/bin cp bubble/bubble $SCRIPT_PATH/cad/bin cp prsim/prsim $SCRIPT_PATH/cad/bin/prsimh # don't overwrite act's prsim cp gated/gated $SCRIPT_PATH/cad/bin cp prsize/size $SCRIPT_PATH/cad/bin # install go cd $SCRIPT_PATH/toolsrc apt-get -y install wget /usr/bin/wget https://go.dev/dl/go1.19.1.linux-amd64.tar.gz tar -C $SCRIPT_PATH -xzf go1.19.1.linux-amd64.tar.gz GOPATH=$SCRIPT_PATH/go $SCRIPT_PATH/go/bin/go install golang.org/x/tools/gopls@latest GOPATH=$SCRIPT_PATH/go $SCRIPT_PATH/go/bin/go install golang.org/x/lint/golint@latest # install gaw apt-get update --fix-missing; DEBIAN_FRONTEND=noninteractive apt-get install -y libgtk-3-dev libcanberra-gtk3-module cd $SCRIPT_PATH/toolsrc git clone https://github.com/broccolimicro/waveview.git cd waveview ./configure --prefix=$SCRIPT_PATH/cad make make install # install gtkwave apt-get update --fix-missing; DEBIAN_FRONTEND=noninteractive apt-get install -y gtkwave # install prspice cd $SCRIPT_PATH/toolsrc git clone https://github.com/nbingham1/prspice.git --branch v0.0.2 cd prspice make cp prdbase prspice $SCRIPT_PATH/cad/bin # install pr cd $SCRIPT_PATH/toolsrc git clone https://github.com/broccolimicro/pr.git --branch v0.0.6 cp pr/pr pr/scripts/* $SCRIPT_PATH/cad/bin # install magic layout tool cd $SCRIPT_PATH/toolsrc DEBIAN_FRONTEND=noninteractive apt-get install -y tcsh m4 csh libx11-dev tcl-dev tk-dev libcairo2-dev mesa-common-dev libglu1-mesa-dev libncurses-dev git clone https://www.github.com/RTimothyEdwards/magic.git cd magic ./configure --prefix=$SCRIPT_PATH/magic make make install ADD ../share/* $SCRIPT_PATH/cad/share # install floret DEBIAN_FRONTEND=noninteractive apt-get install -y libqhull-dev zlib1g-dev tup cd $SCRIPT_PATH/toolsrc git clone --recursive https://github.com/broccolimicro/floret.git --branch v1.1.2 cd floret make cp floret-linux $SCRIPT_PATH/cad/bin/floret