kernelinfo Utility

The kernelinfo utility extracts and displays information from Xilinx object (XO) files which can be used during host code development. This information includes hardware function names, arguments, offsets, and port data.

The following command options are available:

Table 1. kernelinfo Commands
Option Description
-h [ --help ] Print help message.
-x [ --xo_path ] <arg> Absolute path to file including file name and .xo extension.
-l [ --log ] <arg> By default, information is displayed on the screen. Otherwise, you can use the --log option to output the information as a file.
-j [ --json ] Output the file in JSON format.
[input_file] XO file. Specify the XO file positionally or use the --xo_path option.
[output_file] Output from Xilinx OpenCL Compiler. Specify the output file positionally, or use the --log option.

To run the kernelinfo utility, enter the following in a Linux terminal:

kernelinfo <filename.o>

The output is divided into three sections:

  • Kernel Definitions
  • Arguments
  • Ports

The report generated by the following command is reviewed to help better understand the report content. Note that the report is broken down into specific sections for better understandability.

kernelinfo krnl_vadd.xo

Where krnl_vadd.xo is a compiled kernel.

Kernel Definition

Reports high-level kernel definition information. Importantly, for the host code development, the kernel name is given in the name field. In this example, the kernel name is krnl_vadd.

=== Kernel Definition ===
name: krnl_vadd
language: c
vlnv: xilinx.com:hls:krnl_vadd:1.0
preferredWorkGroupSizeMultiple: 1
workGroupSize: 1
debug: true
containsDebugDir: 1
sourceFile: krnl_vadd/cpu_sources/krnl_vadd.cpp

Arguments

Reports kernel function arguments.

In the following example, there are four arguments: a, b, c, and n_elements.

=== Arg ===
name: a
addressQualifier: 1
id: 0
port: M_AXI_GMEM
size: 0x8
offset: 0x10
hostOffset: 0x0
hostSize: 0x8
type: int*

=== Arg ===
name: b
addressQualifier: 1
id: 1
port: M_AXI_GMEM
size: 0x8
offset: 0x1C
hostOffset: 0x0
hostSize: 0x8
type: int*

=== Arg ===
name: c
addressQualifier: 1
id: 2
port: M_AXI_GMEM1
size: 0x8
offset: 0x28
hostOffset: 0x0
hostSize: 0x8
type: int*

=== Arg ===
name: n_elements
addressQualifier: 0
id: 3
port: S_AXI_CONTROL
size: 0x4
offset: 0x34
hostOffset: 0x0
hostSize: 0x4
type: int const 

Ports

Reports the memory and control ports used by the kernel.

=== Port ===
name: M_AXI_GMEM
mode: master
range: 0xFFFFFFFF
dataWidth: 32
portType: addressable
base: 0x0

=== Port ===
name: M_AXI_GMEM1
mode: master
range: 0xFFFFFFFF
dataWidth: 32
portType: addressable
base: 0x0

=== Port ===
name: S_AXI_CONTROL
mode: slave
range: 0x1000
dataWidth: 32
portType: addressable
base: 0x0