VLSI Chip Design Setup: Analog and Digital Workflows with Open Source Tools: By Sahil Maurya

System Requirements

Start with a Linux system with version: “Ubuntu 22.04.4 LTS” fresh.

(Kindly note: Open your Linux Terminal, then copy and paste each of these commands step by step.)

STEP 1: System Updation

It is necessary to update the system, for this, open a terminal in the desktop/home and give command:

sudo apt-get update

STEP 2: Specific Folder Creation

Now, we will be installing all the required tools in a new folder. To create that folder type:

mkdir -p <Installation_directory_name>

Now, change the directory from desktop to the newly created folder by running the command:

cd <Installation_directory_name>

Example: mkdir -p chip_design
cd chip_design

STEP 3: Pre-Requisites

Next step is to install all the necessary supporting libraries for the installation of open-source tools for Ubuntu LTS version.

sudo apt install git
sudo apt-get install build-essential clang bison flex
sudo apt-get install libreadline-dev gawk tcl-dev libffi-dev
sudo apt-get install git graphviz xdot pkg-config python3
sudo apt-get install libboost-system-dev libboost-python-dev
sudo apt-get install libboost-filesystem-dev zlib1g-dev make m4
sudo apt-get install tcsh csh libx11-dev gperf tcl8.6-dev tk8.6
sudo apt-get install tk8.6-dev libxmp4 libxpm-dev libxcb1
sudo apt-get install libcairo2 libxrender-dev libx11-xcb-dev
sudo apt-get install libxaw7-dev freeglut3-dev automake yosys
sudo apt-get update
sudo apt-get -y install libtool

Check whether .local/bin is included in $PATH:

echo $PATH | grep '\.local'

If it’s not there, then add it to your path before starting the install by adding this to your ~/.bashrc file:

export PATH="$HOME/.local/bin:$PATH"

For Analog Chip Design: Magic, Xschem, Open PDKs (Skywater130), Xterm Ngspice

STEP 4: Installing Xschem Tool

Once the installation of all the prerequisites is done, we can proceed with the installation of individual tools one by one. First, we are going to install Xschem. For that, open a terminal and run the following commands:

cd ~/<Installation_directory_name>/
git clone https://github.com/StefanSchippers/xschem.git xschem
cd xschem
./configure
make
sudo make install

To run Xschem:

xschem

STEP 5: Installing Magic Tool

Next, we will be installing Magic. For that, open a terminal in our installation folder and run the following commands:

cd ~/<Installation_directory_name>/
git clone git://opencircuitdesign.com/magic
cd magic
./configure
make
sudo make install

STEP 6: Installing Ngspice Tool

Next is the installation of Ngspice. Before installing Ngspice, just update the system by:

sudo apt-get update

Then run the following commands:

wget https://sourceforge.net/projects/ngspice/files/ng-spice-rework/43/ngspice-43.tar.gz/download

(Once the zip file is downloaded, extract the ngspice-43 folder and then run the following commands)

cd ngspice-43
./configure
make
sudo make install

When successful, check the version using:

ngspice –version

STEP 7: Installing Open_PDKs

Next comes the most time-consuming part of the installation process, i.e., the installation of Open_PDKs. Once again start by updating the system:

sudo apt-get update

Thereafter run the following commands:

git clone git://opencircuitdesign.com/open_pdks
cd open_pdks
./configure --enable-sky130-pdk
sudo make
sudo make install

Copy the .magicrc file and paste it in the magic directory:

cd ~
cd ~/.xschem
cp ~/<Installation_directory_name>/open_pdks/sky130/sky130A/libs.tech/xs/xschemrc
cd ~
cp ~/<Installation_directory_name>/open_pdks/sky130/sky130A/libs.tech/ma/sky130A.magicrc ~/.magicrc
sudo apt -y install vim-gtk3 xterm
or
sudo apt-get -y install xterm
sudo apt-get -y install vim-gtk

STEP 8: Installing LVS

Next, install LVS tool to perform Layout versus Schematic check using the command:

sudo apt-get install netgen-lvs

STEP 8: Installing KLayout

Next, install the tool KLayout to have a look at the GDS file using command:

sudo apt-get install klayout

For Digital Chip Design: OpenLane, Iverilog, GTKWave, KLayout

STEP 1: Installing OpenLane

In order to generate the GDS file for our digital design, we need to have OpenLane installed. For the same, Docker needs to be installed. Use the following commands to install and run Docker tests:

sudo apt install docker.io
docker run hello-world

Note: After installing Docker, run "docker run hello-world" to test if Docker runs without root/sudo permissions. If it requires root permissions, you will get an error regarding docker.sock in /var/run. You need to change this file permission by running the following:

cd /var/run
sudo su
chmod 666 docker.sock
exit

Inside the working directory (chip_design here), clone the following and install OpenLane:

git clone https://github.com/The-OpenROAD-Project/OpenLane
cd OpenLane
make
make test

STEP 2: Installing Icarus, GTKWave, KLayout

In order to run different digital designs, Icarus Verilog serves as a means. Further, in order to cross-verify the output GTKWave needs to be installed so as to verify the simulation results.

1) Installation of Iverilog:

sudo apt install iverilog

2) Installation of GTKWave:

To install GTKWave, first update the system using:

sudo apt-get update

Then, run the following command:

sudo apt-get -y install gtkwave

We can see the GTKWave window by calling it on the respective terminal.

3) Installation of KLayout:

sudo apt-get install klayout

Now, KLayout can be opened by calling “klayout”. Sometimes, Wayland errors may occur. At such instances, run the command:

XDG_SESSION_TYPE=x11 klayout

Now, try running KLayout and see if the window appears.