ocpidev-library — manage an OpenCPI component library.
The library noun represents an OpenCPI component library, which is a
single directory in a project that holds a collection of specifications,
workers and tests that can be built, exported and installed to support
applications.
A component library is described by its directory structure,
a <name>.xml file, and an OpenCPI library asset document
(named <name>.rst) that serves as a description
of the library and as a directory to the assets documented within it.
In a project, a component library resides in its
own directory along with its library asset document.
The default configuration is a single component library named
components (with an asset document named components.rst)
that exists at the top level of a project.
Multiple-library configurations are also possible; in this configuration,
the libraries reside in their own directories underneath a
directory named components/ that exists at the top level of the project.
Note that none of the sublibraries underneath this directory
can be named components.
A component library has the following directory structure:
.comp/ directories.
specs/ directory.
.<authoring-model-suffix>; for example, MyWorker.rcc or MyWorker.hdl.
.test/; for example,
MyComp.test.
lib/ directory.
For more information on component library directory structure and its XML file, see the chapter "Component Libraries" in the OpenCPI Component Development Guide. For more information on component library asset documents and on OpenCPI asset documentation in general, see the chapter "Documenting OpenCPI Assets" in the OpenCPI Documentation Writer Guide.
Verbs that can operate on a component library 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
run
utilization
Note that an asset’s name is implied by the directory you’re in when
you issue the ocpidev command. For component libraries, this
means that you can perform operations (verbs) on the library
without having to specify its name when you issue the
ocpidev command from inside the library.
The ocpidev tool can also operate on a plural libraries noun.
The syntax is:
ocpidev --local-scope [<options>] show libraries
where show is the only valid verb and the options
that can be specified are -d <directory> and
the show verb options. Note that the default global scope
is not valid for the libraries noun and generates an error.
When you use the libraries noun, you must specify
the --local-scope option (or just --local) to override the default.
In addition to the options common to all OpenCPI tools (see opencpi(1)), the options described below can be specified for operations on libraries. 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 HDL architectures supported by OpenCPI that can be specified
in the <target> argument to an option include isim, modelsim,
xsim, zynq, zynq_ultra, spartan3adsp.
-A <directory>, --xml-include=<directory>+
-G <platform>, --only-platform=<platform>+
-F <package-prefix>, --package-prefix=<package-ID>
-I <directory>, --include-dir=<directory>+
-K <package-ID>, --package-id=<package-ID>
-N <package-name>, --package-name=<package-name>
create verb.
-Q <platform>, --exclude-platform=<platform>+
-T <target>, --only-target=<target>+
-Y <primitive-library>, --prim-lib=<primitive-library>+
-Z <target>, --exclude-target=<target>+
-k, --keep
-y <component-library>, --comp-lib=<component-library>+
-f
--doc-only
--no-doc
--hdl
--hdl-platform=<hdl-platform>+
--hdl-rcc-platform=<platform>+
--rcc-platform
<platform> is also not used), the current development software
platform is used as the single RCC platform used for building.
--hdl-target=<target>+
--optimize
--rcc
--rcc-platform=<platform>+
--hdl-rcc-platform <platform>
is also not used), the current development software platform
is used as the single RCC platform used for building.
The options described here, when used in an "ocpidev run library" command, are applied as appropriate to all of the unit tests that reside in the library.
-G <platform>, --only-platform=<platform>+
-Q <platform>, --exclude-platform=<platform>
-l <library>, --library=<library>
--accumulate-errors
--hdl-platform=<platform>+
--keep-simulations
--phase=<phase>+
prepare, execute, verify, and view.
The view phase is used to run only the view scripts for the unit test,
without other phases. The --view option can be used to add viewing along with other phases.
--rcc-platform=<platform>+
--remotes=<system>
OCPI_REMOTE_TEST_SYS variable. See the section
"Defining Remote Systems for Executing Tests"
in the OpenCPI Component Development Guide for more information.
--view
view.sh) for the test at the conclusion of the
test suite’s execution.
--json
--local-scope
--simple
--table
--simple or --json are not used.
-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=<library>
--hdl-platform=<platform>+
Create the default components library for a project:
ocpidev create library components
Inside the assets project, build the util_comps library
for the zed HDL platform and xilinx21_2_aarch32 RCC platform.
ocpidev build library util_comps --hdl-platform zed
--rcc-platform xilinx21_2_aarch32
Inside the assets project, clean the util_comps library
for asset documents, but not for the assets themselves:
ocpidev clean library util_comps --doc-only
Run all the component unit test suites in the default components library
inside the current project:
ocpidev run library components
Display information about the libraries in the current project:
ocpidev show libraries --local-scope
Display FPGA resource usage information for all built workers in the
components library in the current project:
ocpidev utilization library components
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 Documentation Writer Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Documentation_Writer_Guide.pdf