Appendix 3: Quick Default Installation (Mac OS)

This is a summary of the installation of the set of tools outlined above. This procedure will put all of the tool repository sources into a directory under the user's home directory called gits. Everything in the instructions is executed by commands on the Mac OS command line in a terminal. Comment lines start with echo so that they can be cut and pasted into the terminal without causing errors. These instructions have been vetted on Mac OS Big Sur.
cd ~
echo Create common directory for tool sources
mkdir -p gits
cd gits

echo
echo Install homebrew
echo
echo Note: The command below takes a few minutes to install stuff
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

echo
echo Compile and install X11-based Tcl/Tk for magic and xschem
echo
brew install wget coreutils
wget https://prdownloads.sourceforge.net/tcl/tcl8.6.13-src.tar.gz
tar xfz tcl8.6.13-src.tar.gz
rm tcl8.6.13-src.tar.gz
cd tcl8.6.13/unix
echo Using opt2 in case homebrew tcl/tk was installed
./configure --prefix=/usr/local/opt2/tcl-tk
make -j$(nproc)
sudo make install
make clean
cd ~/gits
brew install libx11
wget https://prdownloads.sourceforge.net/tcl/tk8.6.13-src.tar.gz
tar xfz tk8.6.13-src.tar.gz
rm tk8.6.13-src.tar.gz
cd tk8.6.13/unix
./configure --prefix=/usr/local/opt2/tcl-tk --with-tcl=/usr/local/opt2/tcl-tk/lib --with-x --x-includes=/usr/local/include/X11 --x-libraries=/usr/local/lib
sed -i.bak 's/(libdir):.*$/(libdir)/g' Makefile
make -j$(nproc)
sudo make install
make clean
cd ~/gits

echo
echo Install prerequisite packages for Mac OS using homebrew
echo
brew install cairo
brew install libglu freeglut
brew install --cask xquartz
echo Run the X11 server
open -a XQuartz
echo Allow X11 permission (may or may not be necessary)
xhost + localhost
echo Set the DISPLAY environment variable
export DISPLAY=:0

echo
echo Get the Magic VLSI layout editor
echo
git clone https://github.com/RTimothyEdwards/magic
cd magic
./configure --with-tcl=/usr/local/opt2/tcl-tk/lib --with-tk=/usr/local/opt2/tcl-tk/lib --with-cairo=$(brew --prefix cairo)/include --x-includes=/usr/local/include/X11 --x-libraries=/usr/local/lib --enable-cairo-offscreen
make -j$(nproc)
sudo make install
make clean
cd ~/gits

echo
echo Get the open_pdks installer and build Sky130 and GF180MCU
echo
git clone https://github.com/RTimothyEdwards/open_pdks
cd open_pdks
./configure --enable-sky130-pdk --enable-sram-sky130
make
sudo make install
make veryclean
./configure --enable-gf180mcu-pdk --enable-osu-sc-gf180mcu
make
sudo make install
make veryclean
make distclean
cd ~/gits

echo
echo Get the netgen LVS tool
echo
git clone https://github.com/RTimothyEdwards/netgen
cd netgen
./configure --with-tcl=/usr/local/opt2/tcl-tk/lib --with-tk=/usr/local/opt2/tcl-tk/lib
make
sudo make install
make clean
cd ~/gits

echo
echo Get prerequisites needed for compiling xschem
echo
brew install libxaw libxpm jpeg libxcb
echo
echo Get the xschem schematic editor
echo
git clone https://github.com/stefanschippers/xschem.git
cd xschem
./configure
echo Modify Makefile.conf for the X11-based Tcl/Tk
sed -i.bak1 "/CFLAGS/s#-O2#-O2 -I/usr/local/opt2/tcl-tk/include#" Makefile.conf
sed -i.bak2 "/LDFLAGS/s#-lm#-lm -L/usr/local/opt2/tcl-tk/lib#" Makefile.conf
sed -i.bak3 "/LDFLAGS/s#8.5#8.6#g" Makefile.conf
make
sudo make install
make clean
cd ~/gits

echo
echo Get ngspice from Homebrew
echo
echo brew install ngspice
echo
echo Compile the ngspice circuit simulator from source
echo
brew install automake autoconf libtool
brew install bison
git clone git://git.code.sf.net/p/ngspice/ngspice
cd ngspice
./autogen.sh
mkdir release
cd release
../configure --with-x --enable-xspice --disable-debug --enable-cider --enable-pss --enable-klu --enable-osdi BISON=/usr/local/opt/bison/bin/bison YACC=/usr/local/opt/bison/bin/yacc
make -j$(nproc)
sudo make install
make clean
cd ~/gits

email:

Last updated: March 17, 2024 at 1:40pm