User Guide


Chapter 2 Installation & Configuration

Before you get started with OpTiMSoC you should notice that external tools and libraries might be required that are in some cases proprietary and cost some money. Although OpTiMSoC is developed at an university with access to many EDA tools, we aim to always provide tool flows and support for open and free tools, but especially when it comes to synthesis such alternatives are even not available.

2.1 Prerequisites

Throughout this document some packages are required in your Linux distribution. OpTiMSoC should principally work on all common Linux distributions. In case you encounter problems in your system we highly encourage you to contact the OpTiMSoC maintainers to fix these problems. Nevertheless, we recommend Ubuntu 12.04 or 14.04 LTS as development system and can ensure OpTiMSoC will work on it as we also work on it. In the following we will refer to Ubuntu/Debian commands to install packages, that will run under Ubuntu 12.04 and 14.04 LTS.

Independent of the OpTiMSoC components you plan to use, you will need some packages to be installed:

sudo apt-get -y install git python build-essential automake autoconf

2.2 Get OpTiMSoC – Quick Start

The most simple way to get started is with the release packages. You can find the OpTiMSoC releases here: https://github.com/optimsoc/sources/releases. With the release you can find the distribution packets that need to be extracted to /opt/optimsoc. There are two packages: the base package contains the programs, libraries and tools to get started. The examples package contains prebuilt verilator simulations for the real quick start.

For example take the 2015.1 release and download both base and examples. Then create the base folder and extract the package:

sudo mkdir /opt/optimsoc
sudo chown $USER /opt/optimsoc
tar -xzf optimsoc-2015.1-base.tgz -C /opt/optimsoc
tar -xzf optimsoc-2015.1-examples.tgz -C /opt/optimsoc

You can now use the installation after setting the environment with the pre-installed environment source script:

source /opt/optimsoc/2015.1/setup.sh

We encourage you to put this line into your ~/.bashrc.

Now you are near to get started, but you need some programs to build software to run in OpTiMSoC and execute the verilator-based simulations. Those are: the or1k-elf-multicore toolchain, SystemC and Verilator. All those tools are free, but are (except for an outdated Verilator version) not part of the Linux package systems. Hence you need to built those tools as described in the Reference Manual, or you can simply download some prebuilt-versions.

To do so simply run a script for your version:

wget https://raw.githubusercontent.com/optimsoc/prebuilts/master/optimsoc-prebuilt-deploy.py
chmod a+x optimsoc-prebuilt-deploy.py
./optimsoc-prebuilt-deploy -d /opt/optimsoc systemc verilator or1kelf

You may of course leave out any of the tools if you already have it installed. Finally, you will get another source script to set up the environment for the prebuilt tools:

source /opt/optimsoc/setup_prebuilt.sh

You are now ready to go to the tutorials.

2.3 Get OpTiMSoC – Build yourself

You can also build OpTiMSoC from the sources. This options usually becomes standard if you start developing for or around OpTiMSoC. The build is done from one git repository: https://github.com/optimsoc/sources.

It is generally a good idea to understand git, especially when you plan to contribute to OpTiMSoC. Nevertheless, we will give a more detailed explanation of how to get your personal copies of OpTiMSoC and (potentially) update them.

The start of a successful built is to install the tools Verilator, SystemC, and the or1k-elf-multicore toolchain. The most simple way is to start with the prebuilt tools as described above, then set the environment for the tools.

Note

During the installation, you’ll frequently encounter three types of directories.

  • The source directory. This is the place where the uncompiled source code files are stored. Usually, that is the folder that you cloned from the git repository.

    The $OPTIMSOC_SOURCE environment variable should point to the root of the source directories.

  • The build or object directory. For different components such a directory is used to build the component. The installer performs the build process in these directories and you perform individual builds there if you develop for OpTiMSoC (for example: if you develop the libraries).

    Sometimes, this directory is equal to the source directory, but most of the time, we create a new directory called build inside the source directory. Doing so has a great benefit: if something in the build process went wrong, you can simply delete the build directory and start all over again.

  • The installation directory. This is the target directory where results of the build process are stored for further use. It is used by the installer or you when running make install to store the files generated by the build process. The environment variable $OPTIMSOC points to the root of the installation directory.

2.3.1 Pre-requisites

You will need some programs to build OpTiMSoC, e.g., on Ubuntu 14.04:

sudo apt-get install autoconf automake libtool tcl texlivetexlive-latex-extra texlive-fonts-extra

2.3.2 Get the sources

Start with checking out the repository:

git clone https://github.com/optimsoc/sources.git optimsoc-sources
cd optimsoc-sources

2.3.3 Run installer

Now simply run the installer to install:

./tools/install.py -d /opt/optimsoc/2015.1