Skip to content

mikekuk/opencpi

 
 

Repository files navigation

Open Component Portability Infrastructure (OpenCPI) is an open source software (OSS) framework for developing and executing component-based applications on heterogeneous embedded systems.

This is the source distribution of OpenCPI, which is hosted on github.com, and is located here.

As a framework for both development and execution, OpenCPI supports defining, implementing, building and testing components, as well as executing applications based on those components in the targeted embedded systems. By targeting heterogeneous systems, the framework supports development and execution across diverse processing technologies including GPPs (general purpose processors), FPGA (field programmable gate arrays), GPUs (graphics processing units) assembled into mixed systems. Component implementations (a.k.a. workers) are written in the language commonly used to target the type of processor being used. Thus workers for GPPs are written in C or C++, workers for FPGAs are written in VHDL or Verlog, and workers for GPUs are written in the OpenCL dialect of C.

A common use of OpenCPI is for software-defined radio applications on platforms that contain both CPU and FPGA computing resources.

An overview of OpenCPI based on the latest release is available on the website here.

The discussion and announcement email list for OpenCPI is discuss at lists.opencpi.org. Subscribe at lists.opencpi.org.

Documentation

The available documentation is here with a recommended reading order here. Much of it is oriented toward those using the CentOS6/7 YUM/RPM installation, although all the development guides cover both types of installation, described next.

Installation

There are two ways to install and use OpenCPI. The first is recommended for typical users that are using CentOS6 or CentOS7 Linux and not developing/modifying/patching OpenCPI itself. Both installation methods require that the user have sudo privileges, which may be a sys admin task in some environments

1. YUM/RPM Installation:

For CentOS6 or CentOS7 Linux, there is a binary/pre-built RPM installation available using the yum command. To install OpenCPI this way, use the following commands:

  • sudo yum install yum-utils epel-release
  • sudo yum-config-manager --add-repo=http://opencpi.github.io/repo/opencpi.repo
  • sudo yum install 'opencpi*'

This installs the latest release. This will install OpenCPI globally on your system, in standard locations (e.g. /usr/share/doc, /usr/lib/debug, etc.). For additional information to complete the installation consult the YUM/RPM Installation Guide.

2. Source-based Installation:

For any supported development OS, you can download, build, install, and use OpenCPI starting from source. To obtain and use OpenCPI this way, you must select a tagged release. Releases and tags are listed at the OpenCPI github repository here. The default git branch (called master, accessed without tags) is not necessarily usable or stable and should not be used except in rare circumstances. (This will probably change soon). This source installation method downloads, builds and uses the software in a directory of the user's choosing (e.g. ~/opencpi). Thus multiple versions can be downloaded and coexist, but not execute simultaneously.

Source installations make no global changes to the user's system other than:

  • Installing or updating some required standard packages using the yum install or equivalent command.
  • Dynamically/temporarily loading and using the OpenCPI kernel driver in order to test it.

Both these steps require sudo privileges. The installation process is described in detail in the install-from-source installation guide, but the steps described here are sufficient if you understand them. You can either download a tar file for the release, which results in a ~300MB directory before building, or you can download (clone) the git repository with the complete source history, which results in a ~2GB directory before building.

Downloading sources

Obtaining sources via downloading a tar file.

To download the tar file associated with a release, select the release on the OpenCPI repository releases page here and select the tar file to download. When the tar file is extracted it will create a directory called opencpi-<release-tag>, which you should change into. Some browsers will automatically extract the file, but the first command assumes it does not.

  • tar xzf opencpi-<release-tag>.gz
  • cd opencpi-<release-tag>

Obtaining sources via cloning the OpenCPI git repository.

To download via cloning the entire OpenCPI, first ensure that you have git installed on your system. If git is not present, on CentOS systems this is accomplished (installing or updating git) by using the command:

  • sudo yum install git

After git is installed, you issue these commands to download the repository and enter the directory.

  • git clone https://github.com/opencpi/opencpi.git
  • cd opencpi
  • git checkout<release-tag>

Build and test OpenCPI for use on the system have downloaded to, by running:

  • ./scripts/install-opencpi.sh

This command may take a while, and will require you to provide the sudo password twice during that process, for the two global actions described earlier. If you are not present to provide the password it may fail, but can be rerun. It will require internet access to download and build software it needs. There are ways around this requirement that are described in the install-from-source installation guide. The testing done by this script only executes software-based components and applications.

Set up your environment as a user of OpenCPI

This is done using the opencpi-setup.sh script in the cdk subdirectory. OpenCPI currently only supports the bash shell. There are two ways to perform this step:

  • If you want to manually set up your environment in each shell window as you need it, you simply source the script where it lives, under the cdk subdirectory. E.g. if OpenCPI was downloaded into the ~/opencpi directory, you would issue the command:

    source ~/opencpi/cdk/opencpi-setup.sh -s

  • If you want to set up the environment once on each login, you would add this same line to your ~/.profile file (or ~/.bash_login or ~/.bash_profile). Note that this will only take effect when you login, or when you start a new login shell using the -l option to bash, e.g.:

    bash -l

Building the OpenCPI documentation locally

Although the current documentation is accessible here, all the OpenCPI documentation can be rebuilt (creating PDF files) from the source tree. This requires the installation of a number of additional standard packages for compiling and converting LaTeX and OpenOffice documents. This process is only supported on a CentOS7 development host. The following script installs the require packages (using sudo yum install), builds all the document PDF files, and creates an index.html file, all in the ./doc/pdfs directory.

./scripts/install-opencpi-docs.sh

When this script completes successfully, you can view the documents by opening the doc/pdfs/index.html file in your browser.

License

OpenCPI is Open Source Software, licensed with the LGPL3. See the license file.

About

Open Component Portability Infrastructure

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Verilog 33.1%
  • C++ 31.5%
  • VHDL 7.5%
  • C 6.0%
  • Coq 5.0%
  • TeX 4.8%
  • Other 12.1%