ocpidev-platform — manage an OpenCPI HDL platform.
The hdl platform noun represents an OpenCPI HDL platform, which is
either a specific FPGA part on a circuit board with optionally attached
devices or an FPGA simulator that has the infrastructure to serve
as an OpenCPI container (runtime environment) for
HDL assemblies (FPGA-based subsets of OpenCPI applications).
An HDL platform is described by an OpenCPI HDL Platform Description (OHPD), which is an XML file that specifies:
In a project, an HDL platform resides in its own directory <name> (which is
usually the lowercase version of the name used by the platform’s vendor)
under a platforms/ subdirectory in the project’s hdl/ directory.
An HDL platform directory contains the platform’s OHPD (named <name>.xml)
and the VHDL source code skeleton file
<name>.vhd for the HDL platform worker.
The ocpidev create operation for an HDL platform produces
initial versions of these files that can then be edited as necessary.
An HDL platform directory can also optionally contain:
devices/ library
The ocpidev build operation generates exported files that enable HDL
assemblies to be built for the platform and a lib/ subdirectory
that contains links to the files that are necessary for other OpenCPI
assets to use the platform. Note that building a OpenCPI platform (whether
HDL or RCC) is usually done at installation time because a platform
cannot be used by other OpenCPI assets until it has been built.
See the OpenCPI Installation Guide for a description of how OpenCPI
platforms are built.
For information on the HDL build flow as it relates to HDL platforms and other HDL assets, see the chapter "Building HDL Assets" in the OpenCPI HDL Development Guide.
For information on developing an HDL platform, including structure and syntax descriptions of HDL platform/platform worker and HDL platform configuration XML files and how to develop an HDL device worker, see the section "Enabling Execution for FPGA Platforms" in the OpenCPI Platform Development Guide.
Verbs that can operate on an HDL platform are:
build
clean
create
delete
utilization
Note that an asset’s name is implied by the directory you’re in when
you issue the ocpidev command. For HDL platforms, this
means that you can perform operations (verbs) on the HDL platform
without having to specify its name when you issue the
ocpidev command from inside the HDL platform’s directory.
The ocpidev tool can also operate on a plural hdl platforms noun.
The syntax is:
ocpidev [<options>] [build|clean|show|utilization] hdl platforms
The verbs that can be performed on the hdl platforms noun are:
build
hdl/
subdirectory of the project, creating directories and files as required.
clean
hdl/ subdirectory of the project.
show
show formatting options
can be specified.
utilization
utilization
options can be specified.
In the descriptions below, a plus sign (+) after the option indicates that it can be specified more than once on the command line.
Keywords for platforms supported by OpenCPI that can be specified in the <platform> argument to an option can be found in the tables of supported platforms in the OpenCPI User Guide.
Keywords for architectures supported by OpenCPI that can be specified
in the <target> argument to an option include isim, modelsim,
xsim, stratix4, stratix5, virtex5, virtex6, zynq,
zynq_is, spartan3adsp.
-d <directory>
-v, --verbose
-A <directory>+
-C <core>+
-I <directory>+
-T <target>+
-Y <primitive-library>+
-Z <target>+
-k
-y <component-library>+
-f
--hdl-target=<target>+
--hdl-platform=<hdl-platform>+
--global-scope
--local-scope is not used.
--json
--local-scope
--simple
--table
--format={table|latex}
table sends the information to stdout in tabular format.
Specifying latex bypasses stdout and writes all output to
utilization.inc files in the directories for the assets on
which it operates.
--hdl-platform=<platform>+
--hdl-library=<library>
--library=<library>, -l <library>
-P <hdl-platform>
Inside the project (at the top level), create the
HDL platform myplatform. The directory myplatform
is created in the hdl/platforms directory
(which is also created if it doesn’t exist):
ocpidev create hdl platform myplatform
Inside the project (at the top level), create the
HDL platform myplatform, specifying that it can
only be built for the zed HDL platform:
ocpidev create hdl platform myplatform --only-platform=zed
Inside the project (at the top level), create the
HDL platform myplatform, specifying that it can
only be built for the zynq HDL target:
ocpidev create hdl platform myplatform -T zynq
Inside the project (from the top level or the
hdl/platforms/ directory), delete
the HDL platform myplatform:
ocpidev delete hdl platform myplatform
Inside the myplatform HDL platform’s directory, build
the myplatform platform for the xsim HDL platform:
ocpidev build --hdl-platform=xsim
Inside the project (from the top level or the
hdl/platforms/ directory), build all existing
HDL platforms:
ocpidev build hdl platforms
Inside the myplatform HDL platform’s directory,
build the myplatform platform for the zynq HDL target:
ocpidev build --hdl-target=zynq
List all HDL platforms in all registered projects and the current project on which assets can be built:
ocpidev show hdl platforms
Inside the project (from the top level of the
hdl/platforms/ directory), display information
about FPGA resource use by the myplatform HDL platform:
ocpidev utilization hdl platform myplatform
Inside the project (from the top level of the
hdl/platforms/ directory), display information
about FPGA resource use by the HDL platforms in the project:
ocpidev utilization hdl platforms