ocpidev-create — create OpenCPI assets
The create verb creates, in a project, the OpenCPI asset
specified by the <noun> and <name> arguments that follow the verb.
Asset types to be specified in the <noun> argument are:
application
component
hdl
A prefix to indicate an HDL asset in the hdl/ subdirectory of a project.
Possible HDL assets are:
assembly
card
device
platform
primitive
Create an HDL primitive. Possible primitive types are:
core
library
slot
library
project
protocol
registry
test
worker
All HDL assets should avoid having names that are Verilog or VHDL- reserved identifiers, such as reg, etc.
Note that the create verb creates skeleton OpenCPI asset document files
for most of the buildable OpenCPI assets when it creates the asset.
See the ocpidev-build(1) man page and the
"noun" man pages for individual assets for details.
In addition to the general-purpose options common
to all OpenCPI tools (see opencpi(1)),
the options described below can be specified for the create verb.
These options are usually specific to the asset type
that is being created. If creation fails, all partially-created
directories and/or files are removed unless the -k (--keep)
option is specified.
Many options to the create verb set initial values in the asset’s
XML description file that can subsequently be edited for any required
changes or additions.
In the following descriptions, the plus sign (+) after the option indicates that it can be specified more than once on the command line.
-k, --keep
-D <package-ID>, --depend <package-ID>+
--register
-F <package-prefix>, --package-prefix=<package-ID>
-K <package-ID>, --package-id=<package-ID>
-N <package-name>, --package-name=<package-name>
-A <directory>, --xml-include=<directory>+
-I <directory>, --include-dir=<directory>+
-Y <primitive-library>, --primitive-library=<primitive-library>+
-y <component-library>, --component-library=<component-library>+
-n, --no-control
-t, --create-test
-p, --project
specs/
directory of the project. No asset directories or document files are created.
-h <hdl-library>, --hdl-library=<hdl-library>
hdl/ directory of the project. Valid values are only
one of devices, cards or adapters.
-l <library>, --library=<library>
-S <spec>, --component
ocpidev create operation
searches for a component spec whose name matches
the name of the worker/test being created. Use the -S
option to specify a different component spec name to search for.
The operation searches for a component spec in the component
directory in the same library as the worker/test, in the specs/ directory
in the same library as the worker/test (for backward compatibility with
earlier OpenCPI releases), in the top-level specs/ directory in the
project, and in other projects, if the --depend (-D) option
was specified when the project containing the worker/test was created
or dependencies are specified in the Project.xml file.
-L <language>, --language=<language>
O <file>, --other=<file>+
P <platform>, --platform=<platform>
-R <prereq-library>, --static-prereq=<prereq-library>+
-V <slave-worker>, --slave-worker=<slave-worker>+
-W <worker>, --worker=<worker>+
-r <prereq-library>, --rcc-dynamic=<prereq-library>+
-C <core>, --core=<core>+
-E <hdl-device>, --emulates=<hdl-device>+
-U <hdl-device>, --supports=<hdl-device>+
-g <part>, --part=<part>
-q <frequency>, --time-freq=<frequency>
-Q <platform>, --exclude-platform=<platform>+
-G <platform>, --only-platform=<platform>+
-T <target>, --only-target=<target>+
-Z <target>, --exclude-target=<target>+
-H, --no-depend
$OCPI_ROOT_DIR/projects/core/hdl/primitives
(currently, bsv, cdc, fixed_float, and ocpi).
-J, --no-elaborate
-B <file>, --prebuilt=<file>
.edf file from Xilinx Vivado,
an .ngc file from Coregen or a .qxp file from Quartus).
-M <module>, --module=<module>
create.
-X, --xml-app
applications/ directory
of the project.
-x, --xml-dir-app
-X option.
Create in the current working directory a project with the name my-project. This project’s
package-ID will be local.my-project:
ocpidev create project my-project
Create in the current working directory a project with
the package-prefix org.my_organization and
name my_project. This project’s package-ID will be
org.my_organization.my_project.
ocpidev create project my-project -F org.my_organization
Create a project registry /home/workspace/my-registry. Note that a
new registry will not have a core project registered, so the next
thing to do is locate and register a core project. Finally, use
ocpidev set registry /home/workspace/my-registry from within a project
to tell that project to use the new registry. None of this is
necessary if you are using the default project registry in the
OpenCPI installation.
ocpidev -d /home/workspace create registry my-registry
Create the default components library for a project. If you
provide a name other than components, ocpidev creates it
underneath the components directory.
ocpidev create library components
Create a skeleton component specification and component
asset document for a component named mycomp. The files
are created in the mycomp.comp/ directory in
the components library.
Use the -l <library-name> (--library=<library-name>)
option if there are sublibraries underneath components.
ocpidev create component mycomp
Create the skeleton files and worker asset document
for an HDL worker named fft_fast that implements the
fft component spec located in the component directory
fft.comp/fft-comp.xml in the same library as the worker.
ocpidev create worker fft_fast.hdl -S fft
Create the skeleton files and asset document
for an HDL assembly named MyPlutoAsm to be
used only on the plutosdr HDL platform.
ocpidev create hdl assembly MyPlutoAsm -G plutosdr
Component specifications created in earlier OpenCPI releases
reside in a specs/ directory located either in a component library
or at the top level of a project and are named
<name>-spec.xml or <name>_spec.xml.
The following option to the ocpidev create operation for a component is
provided for backward compatibility with the component spec structure used
in earlier OpenCPI releases:
ocpidev create component <name> --file-only
The --file-only option directs ocpidev to create a component spec named
<name>-spec.xml in a specs/ directory in a component library.
No component asset document is created.
See the main web site: https://www.opencpi.org
See the OpenCPI Application Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Application_Development_Guide.pdf
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 Platform Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Platform_Development_Guide.pdf
See the OpenCPI RCC Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_RCC_Development_Guide.pdf
See the OpenCPI Documentation Writer Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Documentation_Writer_Guide.pdf