Installation#

Installing Python#

Before installing the SiliconCompiler package you will need to set up a Python environment. Currently Python 3 is supported. The following sections will walk you through how to install the appropriate python dependencies and start a Python virtual environment. Note that at any time, if you need to exit the Python virtual environment, type ‘deactivate’ and hit enter.

Ubuntu (>=18.04)#

Open up a terminal and enter the following command sequence.

python3 --version                                      # check for Python 3
sudo apt update                                        # update package information
sudo apt install python3-dev python3-pip python3-venv  # install dependencies
python3 -m venv  ./venv                                # create a virtual env
source ./venv/bin/activate                             # active virtual env (bash/zsh)

Note

If you plan to generate any docs or create any flowgraphs, you’ll also need to install Graphviz. You can make sure you have this dependency by running sudo apt install graphviz xdot

Skip ahead to SC Install.

RHEL (>=RHEL 7)#

Open up a terminal and enter the following command sequence.

sudo subscription-manager repos --enable rhel-server-rhscl-7-rpms  # enable Red Hat Software Collections repository
sudo yum -y install rh-python38                                    # install Python 3.8
scl enable rh-python38 bash                                        # enable Python in current environment
python3 --version                                                  # check for Python 3
python3 -m venv ./venv                                             # create a virtual env
source ./venv/bin/activate                                         # active virtual env (bash/zsh)
pip install --upgrade pip                                          # upgrade Pip

Note

If you plan to generate any docs or create any flowgraphs, you’ll also need to install Graphviz. You can make sure you have this dependency by running sudo yum -y install graphviz xdot

Skip ahead to SC Install.

macOS (>=10.15)#

Open up a terminal and enter the following command sequence.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
brew update
brew install python
python3 --version                                      # check for Python 3
python3 -m venv  ./venv                                # create a virtual env
source ./venv/bin/activate                             # active virtual env

Note

If you plan to generate any docs or create any flowgraphs, you’ll also need to install Graphviz. You can make sure you have this dependency by running brew install graphviz xdot

Skip ahead to SC Install.

Windows (>= Windows 10)#

Install the latest Python package from Python.org using the Windows installer. Open up a Windows shell by:

  1. Pressing the ‘Windows’ key

  2. Typing ‘cmd’, and pressing enter.

From the command shell, enter the following sequence to create and activate a virtual environment.

python -m venv  .\venv
.\venv\Scripts\activate

Note

If you plan to generate any docs or create any flowgraphs, you’ll also need to install Graphviz.

Installing SiliconCompiler#

After you’ve got the python dependencies installed, you will need to install SiliconCompiler. There are a few different ways to do this:

  1. The recommended method is to install the last stable version published to pypi.org, or

  2. You can do an offline install with a tarball (for Linux only), or

  3. You can install directly from the git repository (best for developers).

Install from pypi.org#

SiliconCompiler can be installed directly from pypi.org using pip. Activate your Python Virtual Environment and follow the instructions below.

(venv) pip install --upgrade pip                # upgrade pip in virtual env
(venv) pip list                                 # show installed packages in venv
(venv) pip install --upgrade siliconcompiler    # install SiliconCompiler in venv
(venv) python -m pip show siliconcompiler       # will display SiliconCompiler package information

To confirm your installation:

(venv) python -c "import siliconcompiler;print(siliconcompiler.__version__)"

The expected version should be printed to the display:

0.20.2

Skip to asic demo.

Offline Install (Linux only)#

We also provide packages that bundle SC with all of its Python dependencies to enable installation on machines without an external internet connection.

To access them:

  1. Go our builds page.

  2. Click on the most recent, passing Wheels package. This should be the first green-colored build in the list.

  3. On the bottom of that page, you will see an “Artifacts” section. Click on the “sc_plus_dependencies” to download it.

  4. The packages are named scdeps-<pyversion>.tar.gz, depending on which Python version they are associated with.

Then untar the package and install SiliconCompiler:

(venv) tar -xzvf scdeps-<pyversion>.tar.gz
(venv) pip install --upgrade pip --no-index --find-links scdeps
(venv) pip install siliconcompiler --no-index --find-links scdeps

To confirm your installation:

(venv) python -c "import siliconcompiler;print(siliconcompiler.__version__)"

The expected version should be printed to the display:

0.20.2

Skip to asic demo.

Install from GitHub Repo (Linux/MacOS)#

You can also install SiliconCompiler from the latest SiliconCompiler GitHub Repository.

Install Dependencies, Bison and Flex

For Linux, you can use:

sudo apt-get install flex bison

On MacOS, note that you must first install Bison and Flex from Homebrew.

brew install bison
brew install flex

Ensure that the path to the Homebrew packages takes priority over system packages in your $PATH. Run brew --prefix to determine where Homebrew installs packages on your machine.

Install SiliconCompiler

Finally, to clone and install SiliconCompiler, run the following:

(venv) git clone -b v0.20.2 siliconcompiler/siliconcompiler
(venv) cd siliconcompiler
(venv) python -m pip install -e .

To confirm your installation:

(venv) python -c "import siliconcompiler;print(siliconcompiler.__version__)"

The expected version should be printed to the display:

0.20.2

ASIC Demo#

Now that you have installed SiliconCompiler, you can test your installation by running a quick demo through the ASIC design flow in the cloud.:

sc -target asic_demo -remote

Your remote job should only take a few minutes to run if the servers aren’t too busy. It should end with a results directory where you can find png file which displays your results. It should look something like this:

../_images/selftest_screenshot.png

See Quickstart guide next to go through the design and run details of the quick demo above.

External Tools#

If you wish to run on your machine instead of remotely in the cloud as in the quick asic demo target above, there will be some tools you need to install first.

Note

The minimum set of tools required for an ASIC flow are: Surelog, Yosys, OpenROAD, and KLayout. Links to individual tool installation instructions and platform limitations can be found in the pre-defined tool drivers.

We have provided the following helper install scripts for this minimum toolset for the ASIC flow as well as other external tools, but keep in mind that they are for reference only. If you should run into issues, please consult the official download instructions for the tool itself. All official tool documentation links can be found in the pre-defined tool drivers section.

Unless otherwise specified in the script name, these scripts target Ubuntu 20.04.

See Quickstart guide next to see how to run locally on your machine with these tools.