package_xo
command will create a kernel.xml
file from the component.xml of a packaged IP, so you do
not need to manually provide one, or generate one using the RTL Kernel wizard.An XML kernel description file, called kernel.xml, must be created for each RTL kernel, so that it can be used in the Vitis application acceleration development flow. The kernel.xml file specifies kernel attributes like the register map and ports needed by the runtime and Vitis tool flows. The following code shows is an example of a kernel.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<root versionMajor="1" versionMinor="6">
<kernel name="vitis_kernel_wizard_0" language="ip_c"
vlnv="mycompany.com:kernel:vitis_kernel_wizard_0:1.0"
attributes="" preferredWorkGroupSizeMultiple="0" workGroupSize="1" interrupt="true">
<ports>
<port name="s_axi_control" mode="slave" range="0x1000" dataWidth="32" portType="addressable" base="0x0"/>
<port name="m00_axi" mode="master" range="0xFFFFFFFFFFFFFFFF" dataWidth="512" portType="addressable"
base="0x0"/>
</ports>
<args>
<arg name="axi00_ptr0" addressQualifier="1" id="0" port="m00_axi" size="0x8" offset="0x010" type="int*"
hostOffset="0x0" hostSize="0x8"/>
</args>
</kernel>
</root>
The following table describes the format of the kernel.xml in detail:
Tag | Attribute | Description |
---|---|---|
<root>
|
versionMajor
|
For the current release of Vitis software platform, set to 1. |
versionMinor
|
For the current release of Vitis software platform, set to 6. | |
<kernel> |
name
|
Kernel name |
language
|
Always set to ip_c for RTL
kernels. |
|
vlnv
|
Must match the vendor, library, name, and version attributes in
the component.xml of an IP. For example, if
component.xml has the following tags:
The
vlnv attribute in kernel XML must be set to: |
|
attributes
|
Reserved. Set it to empty string: "" | |
preferredWorkGroupSizeMultiple
|
Reserved. Set it to 0. | |
workGroupSize
|
Reserved. Set it to 1. | |
interrupt
|
Set to "true" (interrupt="true") if the RTL kernel has an interrupt, otherwise omit. | |
hwControlProtocol
|
Specifies the control protocol for the RTL kernel.
|
|
<port>
|
name
|
Specifies the port name. Important: The AXI4-Lite interface must be
named
S_AXI_CONTROL . |
mode
|
At least one AXI4 master
port and one AXI4-Lite slave control port are
required. AXI4-Stream ports can be specified to stream data between kernels.
|
|
range
|
The range of the address space for the port. | |
dataWidth
|
The width of the data that goes through the port, default is 32-bits. | |
portType
|
Indicate whether or not the port is addressable or streaming.
|
|
base
|
For AXI4 master and slave
ports, set to 0x0 . This tag is not applicable to
AXI4-Stream ports. |
|
<arg>
|
name
|
Specifies the kernel software argument name. |
addressQualifier
|
Valid values:
|
|
id
|
Only applicable for AXI4
master and slave ports. The ID needs to be sequential. It is used to determine the
order of kernel arguments. Not applicable for AXI4-Stream ports. |
|
port
|
Specifies the <port> name to which the arg is connected. |
|
size
|
Size of the argument in bytes. The default is 4 bytes. | |
offset
|
Indicates the register memory address. | |
type
|
The C data type of the argument. For example, uint* , int* , or float* . |
|
hostOffset
|
Reserved. Set to 0x0 . |
|
hostSize
|
Size of the argument. The default is 4 bytes. | |
memSize
|
For AXI4-Stream ports,
memSize sets the depth of the created FIFO.Tip: Not applicable to AXI4
ports.
|
|
The following tags specify additional tags for AXI4-Stream ports. They do not apply to AXI4 ports. | ||
<connection>
|
The connection tag describes the actual connection in hardware, either from the kernel to the FIFO inserted for the PIPE, or from the FIFO to the kernel. | |
srcInst
|
Specifies the source instance of the connection. | |
srcPort
|
Specifies the port on the source instance for the connection. | |
dstInst
|
Specifies the destination instance of the connection. | |
dstPort
|
Specifies the port on the destination instance of the connection. |