ocpidev-assembly — manage an OpenCPI HDL assembly.
The hdl assembly noun represents an OpenCPI HDL assembly, which is a
group of pre-connected HDL workers built as an artifact - a binary
executable compiled from the workers - intended
for use as an FPGA-based subset of an OpenCPI application.
An HDL assembly is described by an OpenCPI HDL Assembly Description (OHAD), which is an XML file that specifies the HDL workers that make up the HDL assembly and the connections between them. The OHAD defines the worker instances, any properties and parameter settings, connections between workers and external ports for any data flowing into or out of the assembly. For information about the OHAD’s XML structure, see the section "The HDL Assembly XML File" in the OpenCPI HDL Development Guide.
In a project, an HDL assembly resides in its own directory <name>
under an assemblies/ subdirectory in the project’s hdl/ directory.
An HDL assembly directory contains the assembly’s OHAD XML file
(named <name>.xml).
The ocpidev create operation produces initial versions of these
files that can then be edited as necessary.
When an HDL assembly is built, the result - the executable artifact
file (with the suffix .bitz or .gz) - is placed in
an artifacts directory at the top level of the project.
The ocpidev build operation also creates additional directories
and files in the HDL assembly’s directory, including a container
artifact built for the target platform in a directory
container-<platform>.
The ocpidev clean operation removes the files created by
the ocpidev build operation.
For information on how to develop an HDL assembly, see the chapter "HDL Assemblies for Creating Bitstreams/Executables" in the OpenCPI HDL Development Guide.
An OpenCPI HDL assembly asset document can also be created for
an HDL assembly to facilitate documenting the HDL assembly during
the overall assembly development process.
In a project, an HDL assembly asset document resides in
the same directory and has the same name as the HDL assembly’s OHAD
but with the suffix .rst instead of .xml. Unless suppressed
by options, building the HDL assembly or the asset that
contains it (e.g., project, library) builds viewable HTML output of
the asset document and cleaning the HDL assembly removes the generated
HTML. The section "Documenting OpenCPI Assets" in the
OpenCPI Documentation Writer Guide provides more information about
this feature and describes how to create an OpenCPI HDL assembly asset document.
Verbs that can operate on an HDL assembly are:
build
--doc-only and --no-doc options to control
the asset document building function.
clean
--doc-only and --no-doc options to control
the asset document cleaning function.
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 assemblies, this
means that you can perform operations (verbs) on the HDL assembly
without having to specify its name when you issue the
ocpidev command from inside the HDL assembly’s directory.
The ocpidev tool can also operate on a plural hdl assemblies noun.
The syntax is:
ocpidev [<options>] [build|clean|utilization] hdl assemblies
The verbs that can be performed on the hdl assemblies noun are:
build
hdl/ subdirectory of the project, creating directories
and files as required. Use the --doc-only and --no-doc options
to control the asset document building function.
clean
hdl/ subdirectory of the project.
Use the --doc-only and --no-doc options to control
the asset document cleaning function.
utilization
utilization
options can be specified.
In addition to the options common to all OpenCPI tools (see opencpi(1)), the options described below can be specified for operations on HDL assemblies. In the following descriptions, 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, zynq, zynq_ultra, zynq_ise, spartan3adsp.
-G <platform>, --only-platform=<platform>+
-Q <platform>, --exclude-platform=<platform>+
-T <target>, --only-target=<target>+
-Z <target>, --exclude-target=<target>+
-k, --keep
--doc-only
--no-doc
--hdl-target=<target>+
--hdl-platform=<hdl-platform>+
-P <hdl-platform>, --platform=<hdl-platform>
-l <library>, --library=<library>
--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>
Inside the project (at the top level), create the
HDL assembly myassy. The directory myassy
is created in the hdl/assemblies/ directory
(which is also created if it doesn’t exist):
ocpidev create hdl assembly myassy
Inside the project (at the top level), create the
HDL assembly myassy, specifying that it can
only be built for the zed HDL platform:
ocpidev create hdl assembly myassy -G=zed
Inside the project (at the top level), create the
HDL assembly myassy, specifying that it can
only be built for the zynq HDL chip architecture:
ocpidev create hdl assembly myassy -T zynq
Inside the project (from the top level or the
hdl/assemblies directory), delete
the HDL assembly myassy:
ocpidev delete hdl assembly myassy
Inside the myassy HDL assembly’s directory, build
the myassy assembly and asset document for the xsim HDL platform:
ocpidev build --hdl-platform=xsim
Inside the myassy HDL assembly’s directory, build
only the asset document for the myassy assembly :
ocpidev build --doc-only
Inside the project (from the top level or the
hdl/assemblies directory), build all existing
HDL assemblies but not their asset documents:
ocpidev build hdl assemblies --no-doc
Inside the myassy HDL assembly’s directory,
built the myassy assembly for the zynq_ultra HDL chip architecture
and build the asset document:
ocpidev build --hdl-target=zynq_ultra
Inside the project (from the top level of the
hdl/assemblies directory) display information
about FPGA resource use by the myassy assembly:
ocpidev utilization hdl assembly myassy
Inside the project (from the top level of the
hdl/assemblies directory) display information
about FPGA resource use by the assemblies in the project:
ocpidev utilization hdl assemblies
See the main web site: https://www.opencpi.org
See the OpenCPI Component Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Component_Development_Guide.pdf
See the OpenCPI HDL Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_HDL_Development_Guide.pdf
See the OpenCPI Documentation Writer Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Documentation_Writer_Guide.pdf