analogue_design_examples
require it. For this reason, we need a github account.
ls ~/.ssh/id_rsa.pub
If No such file or directory
is returned, then the key must be generated. If no such message is returned, skip the key generation step and proceed to upload it to GitHub **INSERT REF TO STEP**
ssh-keygen
~/.ssh/id_rsa.pub
. View the key using:
cat ~/.ssh/id_rsa.pub
~/.ssh/id_rsa.pub
into the Key box. This allows GitHub to recognise your machine when you try to connect via SSHsudo apt update
sudo apt install git
Enter the password for your linux account (with root access) if prompted
apt
will ask to confirm the install, press the Y
keygit help
should return:usage: git [--version] [--help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>] These are common Git commands used in various situiations: etc etc.
cd ~
git clone git@github.com:yrrapt/analogue_design_example.git
analogue_design_example
directory is present in your home directory
cd ~/analogue_design_example
analogue_design_example/env/Makefile
./tools
directory to ensure they are all located in a consistent location agnositc of system setup./tools
directory:
sudo mkdir /tools
rwx
access to /tools
:
sudo chmod 777 /tools
This can be changed as desired after install
/pdk
directory to store installed PDKs in a separate location to the tools. We also modify its permissions in a similar way:
sudo mkdir /pdk
sudo chmod 777 /pdk
cd /tools
git clone git@github.com:StefanSchippers/xschem.git
sudo apt install csh libx11-dev libxrender1 libxrender-dev libxcb1 libxaw7-dev \
libx11-xcb-dev libcairo2 libcairo2-dev tcl8.6 tcl8.6-dev \
tk8.6 tk8.6-dev flex bison libxpm4 libxpm-dev gawk adms \
libreadline6-dev
cd /tools/xschem
install
for the installed binaries:
mkdir ./install
install
directory:
./configure --prefix=/tools/xschem/install
make
/tools/xschem/install
in our case):
make install
/tools/xschem/install/bin/xschem
sudo apt install xterm
cd /tools
mkdir ./xschem_library
cd xschem_library
git clone git@github.com:StefanSchippers/xschem_sky130.git
/tools/xschem_library/xschem_sky130
/tools
:
cd /tools
git clone git://opencircuitdesign.com/magic
cd /tools/magic
install
for the installed binaries:
mkdir ./install
install
directory:
./configure --prefix=/tools/magic/install
make
/tools/magic/install
in our case):
make install
/tools/magic/install/bin/magic
/tools
directory:
cd /tools
git clone git://opencircuitdesign.com/netgen
cd /tools/netgen
install
for the installed binaries:
mkdir ./install
install
directory:
./configure --prefix=/tools/netgen/install
make
/tools/netgen/install
in our case):
make install
/pdk
directory:
cd /pdk
git clone git://opencircuitdesign.com/open_pdks
cd /pdk/open_pdks
install
for the installed binaries:
mkdir ./install
$PATH
for the build process to find them. We will add them in a more permanent manner later. Run:
PATH=/tools/magic/install/bin:/tools/netgen/install/bin:/tools/xschem/install/bin:$PATH
./configure --enable-sky130-pdk --prefix=/pdk/open_pdks/install
./configure --enable-sky130-pdk --prefix=/pdk/open_pdks/install CFLAGS="" LDFLAGS=""
make
/pdk/open_pdks/install
in our case):
make install
.magicrc
to the home directory so it's sourced on startup:
cp -f /pdk/open_pdks/install/share/pdk/sky130A/libs.tech/magic/sky130A.magicrc ~/.magicrc
echo "export SKY130A=/pdk/open_pdks/install/share/pdk/sky130A" >> ~/.bashrc
/tools
directory:
cd /tools
git clone git://git.code.sf.net/p/ngspice/ngspice
cd /tools/ngspice
install
for the installed binaries:
mkdir ./install
sudo apt install autoconf libtool automake
make
and make install
) is handled by a compile script, but it must be passed the prefix and compiler flags depending on architecture:compile_linux.sh
file in your favourite text editor#./autogen.sh
#if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi
./autogen.sh --adms
if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi
--enable-adms
as an option and change the prefix on line 55:
../configure --enable-adms --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp CFLAGS="-g -m64 -O0 -Wall -Wno-unused-but-set-variable" LDFLAGS="-m64 -g" --prefix=/tools/ngspice/install
--enable-adms
as an option and change the prefix on line 62:
../configure --enable-adms --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp --disable-debug CFLAGS="-m64 -O2" LDFLAGS="-m64 -s" --prefix=/tools/ngspice/install
compile_linux.sh
file in your favourite text editor#./autogen.sh
#if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi
./autogen.sh --adms
if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi
--enable-adms
as an option, change the prefix and blank the flags on line 55:
../configure --enable-adms --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp CFLAGS="" LDFLAGS="" --prefix=/tools/ngspice/install
--enable-adms
as an option, change the prefix and blank the flagd on line 62:
../configure --enable-adms --with-x --enable-xspice --enable-cider --with-readline=yes --enable-openmp --disable-debug CFLAGS="" LDFLAGS="" --prefix=/tools/ngspice/install
chmod u+rwx ./compile_linux.sh
./compile_linux.sh
/tools/ngspice/install/bin/ngspice
sudo apt install ruby-dev qt5-default python3-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 libqt5xmlpatterns5-dev python3-pyqt5 qtcreator pyqt5-dev-tools qttools5-* libqt5svg5-dev
/tools
directory:
cd /tools
git clone git@github.com:KLayout/klayout.git
cd /tools/klayout
git fetch --tags
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $latestTag
install
directory for klayout to be installed into:
mkdir ./install
build.sh
script. Remember to install it to the correct directory using the -prefix
option:
./build.sh -qt5 -prefix /tools/klayout/install
sudo apt install -y python3-pip python3-venv python3-virtualenv python3-numpy rustc libprotobuf-dev protobuf-compiler libopenmpi-dev
mkdir -p ~/.venvs
cd ~/.venvs
python3 -m venv analogue_design_example
Note that the venv name will change in the future, depending on the project you intend to work on.
source ~/.venvs/analogue_design_example/bin/activate
~/analogue_design_example/env/requirements.txt file:
python -m pip install pip --upgrade
python -m pip install wheel
python -m pip install -r ~/analogue_design_example/env/requirements.txt
cd ~/analogue_design_example
git submodule init
git submodule update
cd ./env
python -m pip install -e yaaade
sudo apt install -y gcc g++ gfortran make cmake bison flex libfl-dev libfftw3-dev libsuitesparse-dev libblas-dev liblapack-dev libtool autoconf automake libopenmpi-dev openmpi-bin
/tools/xyce
directory and clone the xyce git repo:
cd /tools
mkdir -p xyce; cd xyce
git clone https://github.com/Xyce/Xyce.git xyce_source
cd xyce_source
./bootstrap
/tools/xyce/trilinos
directory and clone the repo:
cd /tools/xyce
mkdir -p trilinos; cd trilinos
wget https://github.com/trilinos/Trilinos/archive/refs/tags/trilinos-release-12-12-1.tar.gz
tar -xvf trilinos-release-12-12-1.tar.gz
mv Trilinos-trilinos-release-12-12-1 trilinos_source
rm trilinos-release-12-12-1.tar.gz
cd /tools/xyce/trilinos
mkdir -p install; cd install
echo '#!/bin/sh' > reconfigure
echo 'SRCDIR=/tools/xyce/trilinos/trilinos_source' >> reconfigure
echo 'ARCHDIR=/tools/xyce/xyce_libs/serial' >> reconfigure
echo 'FLAGS="-O3 -fPIC"' >> reconfigure
echo 'cmake \' >> reconfigure
echo '-G "Unix Makefiles" \' >> reconfigure
echo '-DCMAKE_C_COMPILER=gcc \' >> reconfigure
echo '-DCMAKE_CXX_COMPILER=g++ \' >> reconfigure
echo '-DCMAKE_Fortran_COMPILER=gfortran \' >> reconfigure
echo '-DCMAKE_CXX_FLAGS="$FLAGS" \' >> reconfigure
echo '-DCMAKE_C_FLAGS="$FLAGS" \' >> reconfigure
echo '-DCMAKE_Fortran_FLAGS="$FLAGS" \' >> reconfigure
echo '-DCMAKE_INSTALL_PREFIX=$ARCHDIR \' >> reconfigure
echo '-DCMAKE_MAKE_PROGRAM="make" \' >> reconfigure
echo '-DTrilinos_ENABLE_NOX=ON \' >> reconfigure
echo '-DNOX_ENABLE_LOCA=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_EpetraExt=ON \' >> reconfigure
echo '-DEpetraExt_BUILD_BTF=ON \' >> reconfigure
echo '-DEpetraExt_BUILD_EXPERIMENTAL=ON \' >> reconfigure
echo '-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_TrilinosCouplings=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_Ifpack=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_Isorropia=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_AztecOO=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_Belos=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_Teuchos=ON \' >> reconfigure
echo '-DTeuchos_ENABLE_COMPLEX=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_Amesos=ON \' >> reconfigure
echo '-DAmesos_ENABLE_KLU=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_Sacado=ON \' >> reconfigure
echo '-DTrilinos_ENABLE_Kokkos=OFF \' >> reconfigure
echo '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF \' >> reconfigure
echo '-DTrilinos_ENABLE_CXX11=ON \' >> reconfigure
echo '-DTPL_ENABLE_AMD=ON \' >> reconfigure
echo '-DAMD_LIBRARY_DIRS="/usr/lib" \' >> reconfigure
echo '-DTPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \' >> reconfigure
echo '-DTPL_ENABLE_BLAS=ON \' >> reconfigure
echo '-DTPL_ENABLE_LAPACK=ON \' >> reconfigure
echo '$SRCDIR' >> reconfigure
chmod u+x reconfigure
./reconfigure
make
make install
cd /tools/xyce
mkdir -p install; cd install
echo '../xyce_source/configure \' > reconfigure
echo 'CXXFLAGS="-O3 -std=c++11" \' >> reconfigure
echo 'ARCHDIR="/tools/xyce/xyce_libs/serial" \' >> reconfigure
echo '--enable-shared \' >> reconfigure
echo '--enable-xyce-shareable \' >> reconfigure
echo 'CPPFLAGS="-I/usr/include/suitesparse" \' >> reconfigure
echo '--prefix=/tools/xyce/install/serial' >> reconfigure
chmod u+x reconfigure
./reconfigure
make
make install
GAW
waveform viewer
sudo apt install build-essential libgtk-3-dev gettext
cd /tools
git clone git@github.com:StefanSchippers/xschem-gaw.git
/tools/xschem-gaw/po/Makefile.in.in
GETTEXT_MACRO_VERSION
to the version of gettext you're using
cd /tools/xschem-gaw
mkdir install
aclocal && automake --add-missing && autoconf
./configure --prefix=/tools/xschem-gaw/install
make
make install
sudo apt install bison automake autopoint
python3 -m pip install kivy
python3 -m pip install pyinstaller
cd /tools
git clone git@github.com:d-m-bailey/cvc.git
cd cvc
mkdir install
autoreconf -vif
./configure --disable-nls --prefix=/tools/cvc/install
make
make install
sudo apt install ninja-build
git clone git@github.com:donn/padring.git
cd /tools/padring
Open the file bootstrap.sh
, and replace the word build
with install
./bootstrap.sh
cd install && ninja
sudo apt install build-essential clang bison flex \
libreadline-dev gawk tcl-dev libffi-dev git \
graphviz xdot pkg-config python3 libboost-system-dev \
libboost-python-dev libboost-filesystem-dev zlib1g-dev
git clone git@github.com:/YosysHQ/yosys
cd /tools/yosys
mkdir install
/tools/yosys/Makefile
file:#CONFIG := clang
CONFIG := gcc
PREFIX ?= /tools/yosys/install
make
make install
sudo apt install libgsl-dev
cd /tools
git clone git@github.com:rubund/graywolf.git
cd /tools/graywolf
mkdir install
cmake -DCMAKE_INSTALL_PREFIX=/tools/graywolf/install
make
make install
cd /tools
git clone git@github.com:RTimothyEdwards/qrouter.git
cd /tools/qrouter
mkdir install
./configure
./configure --prefix=/tools/qrouter/install
make
make install
sudo apt install tcsh python3-tk
cd /tools
git clone git@github.com:RTimothyEdwards/qflow.git
cd /tools/qflow
mkdir build
./configure
./configure --prefix=/tools/qflow/build
make
make install
cd /tools/
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD
sudo apt install libffi-dev tcl-dev time swig libboost-all-dev libspdlog-dev libeigen3-dev liblemon-dev
python3 -m pip install pandas
sudo /tools/OpenROAD/etc/DependencyInstaller.sh -dev
cd /tools/OpenROAD
mkdir install
./etc/Build.sh -cmake="-DCMAKE_INSTALL_PREFIX=/tools/OpenROAD/install"
cd build
make install
cd /tools
git clone git@github.com:The-OpenROAD-Project/OpenLane.git
sudo apt install build-essential python3 python3-venv python3-pip git
python3 -m pip install pyyaml
cd /tools/OpenLane
python3 ./env.py tool-list
python3 ./env.py local-install
PATH
echo "PATH=/tools/klayout/install:/tools/magic/install/bin:/tools/netgen/install/bin:/tools/ngspice/install/bin:/tools/xschem/install/bin:/tools/xyce/install/serial/bin:/tools/xschem-gaw/install/bin:/tools/cvc/install/bin:/tools/padring/install:/tools/yosys/install/bin:/tools/graywolf/install/bin:/tools/qrouter/install/bin:/tools/qflow/install:$PATH" >> ~/.bashrc
klayout
magic
netgen
ngspice
xschem
gaw
Xyce
$XSCHEM_SHAREDIR
points to the correct installation directory. We modified the default location, so we muct adjust the line in the xschemrc file (within the git repo):
set XSCHEM_SHAREDIR /tools/xschem/install/share/xschem
$SKYWATER_MODELS
and the $SKYWATER_STDCELLS
declared in the xschemrc
are correct:
.magicrc
is placed in each tool user's home directory~/.bashrc