Deploying Applications in a Runtime Environment
OpenCPI applications require a small set of required dependencies during execution, which is considerably smaller than the requirements for OpenCPI development, which requires the installation of the OpenCPI Component Development Kit (CDK). While the installation requirements and procedures are described in full in the OpenCPI Installation Guide, the essential requirements required to support application execution are described here.
The basic requirements are to have the executable
(ocpirun or a custom ACI C++ program), as well as the artifacts for the workers used during
execution. The executable can use whatever artifacts are available, as built for the available
processing resources on the system. By limiting the artifacts available (accessed via the
OCPI_LIBRARY_PATH environment variable setting), the system requirements are reduced to
the minimum.
Beyond these two important elements (executables and artifacts), there are several dynamically
loaded and used plug-ins and drivers, depending on which hardware resources are enabled for OpenCPI
to use during execution. There is an OpenCPI Linux kernel device driver module that is loaded using
the ocpidriver command line tool. There are user-mode plug-ins that are loaded according to a
system configuration file, at $OCPI_ROOT_DIR/system.xml, or a location indicated by the
OCPI_SYSTEM_CONFIG environment variable.
All of these drivers and plug-ins are optional, and used based on the hardware needed by OpenCPI application execution. The following table lists them and their use cases:
Driver |
Required for: |
Kernel Module |
Access to DMA devices on the system bus. E.g. FPGA PCIe cards in slots on the system’s motherboard, or Zynq/SoC systems using the FPGA subsystem. Loading this driver requires root/sudo privileges. It is loaded using the ocpidriver command. See the OpenCPI User Guide for details on this module. |
RCC Container Plug-in |
Execution of RCC/Software workers. Indicated in |
HDL Container Plug-in |
Execution of HDL/FPGA workers (in hardware or in simulators).
Indicated in |
DMA Transport Plug-in |
Data plane transport between software containers and DMA devices, e.g. FPGA
containers. Requires the kernel module to be loaded prior to execution. Indicated in
|
PIO Transport Plug-in |
Data plane transport for software containers using shared memory. Indicated in
|
Socket Transport Plug-in |
Data plane transport for containers using network sockets. Indicated in
|
In addition to the executables, artifacts, and optionally loaded drivers and plug-ins, there are a
small number of utility scripts (such as ocpidriver), support files (such as system.xml),
and utility commands (which includes ocpirun) that are typically included in a
runtime-installation. Installation packages are prepared for a particular runtime environment.
If not using remote containers, the ocpiadmin command can be used to create the contents of
an SD card for the embedded system.
For some hardware and software configurations, third-party software is required for execution. One example is that for execution on FPGA boards that require dynamic JTAG loading of FPGA configuration files (a.k.a. bitstreams), there are drivers and utilities required from the FPGA vendors (Xilinx or Intel/Altera) that must be installed.