UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer czeck
Observer
1,521 Views
Registered: ‎08-28-2017

Error in clCreateProgramWithBinary

I'm porting a design from 2017.1 to 2017.4 using the SDx flow.  When I run the application on I get the following error during the call to clCreateProgramWithBinary()


ERROR: internal error: kernel instance 'output_1' in kernel 'kernel_output' doesn't match control port 's_axi_control' != ''

 

The code where this happens:

cl::Context context(device);
cl::CommandQueue q(context, device,
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_PROFILING_ENABLE);
std::string device_name = device.getInfo<CL_DEVICE_NAME>();

std::string binaryFile = xcl::find_binary_file(device_name,"kernel7");
cl::Program::Binaries bins = xcl::import_binary_file(binaryFile);
devicesX.resize(1);
cl::Program program(context, devicesX, bins);
cl::Kernel krnl_output(program,"input0func"); // Second argument does not change error

 

Runtime output:

 

---
XILINX_OPENCL="/home/wxyz/vega-3601_5.1/xbinst"
LD_LIBRARY_PATH="/home/wxyz/vega-3601_5.1/xbinst/runtime/lib/x86_64:/home/wxyz/vega-3601_5.1/xbinst/runtime/lib/x86_64:/opt/Xilinx.sdx/SDx/2017.4.op/lib/lnx64.o/Ubuntu:/opt/Xilinx.sdx/SDx/2017.4.op/lib/lnx64.o:/opt/Xilinx.sdx/SDx/2017.4.op/runtime/lib/x86_64"
---
platform Name: Xilinx
Vendor Name : Xilinx
Found Platform
XCLBIN File Name: kernel7
INFO: Importing xclbin/kernel7.hw.advantech_vega-3601_dynamic_5_1.xclbin
Loading: 'xclbin/kernel7.hw.advantech_vega-3601_dynamic_5_1.xclbin'
ERROR: internal error: kernel instance 'output_1' in kernel 'kernel_output' doesn't match control port 's_axi_control' != ''

 

I have built and run other toy examples using the same flow and machines.  Its only my full design that gives me this error.

 

Thanks,

 

Tags (2)
0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
1,495 Views
Registered: ‎09-08-2011

Re: Error in clCreateProgramWithBinary

Hi czeck,

 

   Is this with an updated DSA (5.0) and is this the second binary you are trying to call? If you have a xclbin before this, you need to clRealseMemObject() first in 2017.4.

 

If that's not the issue, can you cover the top level interface definitions you have for your kernel?

 

It might be helpful to see if there is something that stands out there.

 

Regards

 

Evan

 

 

 

If at first you don't succeed, try redefining success?
0 Kudos
Observer czeck
Observer
1,477 Views
Registered: ‎08-28-2017

Re: Error in clCreateProgramWithBinary

Hi Evan,

I've tried running this after a cold boot, so there is no issue about previous runs.   I have even reduced the software image to only initialize the HW, and taken this from know working code.

 

The interface on the kernels, 7 in this design all follow the same pattern:  Some extracts are below.  We cannot share code in this forum.

Thanks
Ed.

 

From the component.xml:

 <ports>
<port name="S_AXI_CONTROL" mode="slave" range="0x1000" dataWidth="32" portType="addressable" base="0x0"/>
<port name="control_to_kernel_output" mode="write_only" dataWidth="32" portType="stream"/>
<port name="kernel_output_to_control" mode="read_only" dataWidth="32" portType="stream"/>
</ports>

 

From the packaged kernel:

(* CORE_GENERATION_INFO = "kernel_output,IP_Integrator,{x_ipVendor=xilinx.com,x_ipLibrary=BlockDiagram,x_ipName=kernel_output,x_ipVersion=1.00.a,x_ipLanguage=VERILOG,numBlks=1,numReposBlks=1,numNonXl
nxBlks=1,numHierBlks=0,maxHierDepth=0,numSysgenBlks=0,numHlsBlks=0,numHdlrefBlks=0,numPkgbdBlks=0,bdsource=USER,synth_mode=OOC_per_IP}" *) (* HW_HANDOFF = "kernel_output.hwdef" *)
module kernel_output
(S_AXI_CONTROL_araddr,
S_AXI_CONTROL_arready,
S_AXI_CONTROL_arvalid,
S_AXI_CONTROL_awaddr,
S_AXI_CONTROL_awready,
S_AXI_CONTROL_awvalid,
S_AXI_CONTROL_bready,
S_AXI_CONTROL_bresp,
S_AXI_CONTROL_bvalid,
S_AXI_CONTROL_rdata,
S_AXI_CONTROL_rready,
S_AXI_CONTROL_rresp,
S_AXI_CONTROL_rvalid,
S_AXI_CONTROL_wdata,
S_AXI_CONTROL_wready,
S_AXI_CONTROL_wstrb,
S_AXI_CONTROL_wvalid,
ap_clk,
ap_rstn,
control_to_kernel_output_tdata,
control_to_kernel_output_tready,
control_to_kernel_output_tvalid,
kernel_output_to_control_tdata,
kernel_output_to_control_tready,
kernel_output_to_control_tvalid);
input [15:0]S_AXI_CONTROL_araddr;
output S_AXI_CONTROL_arready;
input S_AXI_CONTROL_arvalid;
input [15:0]S_AXI_CONTROL_awaddr;
output S_AXI_CONTROL_awready;
input S_AXI_CONTROL_awvalid;
input S_AXI_CONTROL_bready;
output [1:0]S_AXI_CONTROL_bresp;
output S_AXI_CONTROL_bvalid;
output [31:0]S_AXI_CONTROL_rdata;
input S_AXI_CONTROL_rready;
output [1:0]S_AXI_CONTROL_rresp;
output S_AXI_CONTROL_rvalid;
input [31:0]S_AXI_CONTROL_wdata;
output S_AXI_CONTROL_wready;
input [3:0]S_AXI_CONTROL_wstrb;
input S_AXI_CONTROL_wvalid;
input ap_clk;
input ap_rstn;
input [31:0]control_to_kernel_output_tdata;
output control_to_kernel_output_tready;
input control_to_kernel_output_tvalid;
output [31:0]kernel_output_to_control_tdata;
input kernel_output_to_control_tready;
output kernel_output_to_control_tvalid;

0 Kudos
Moderator
Moderator
1,410 Views
Registered: ‎03-27-2012

Re: Error in clCreateProgramWithBinary

Hi @czeck

 

Can you send me your code privately?

My email address is seanz(at)xilinx.com

 

Regards,

Sean

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer czeck
Observer
1,399 Views
Registered: ‎08-28-2017

Re: Error in clCreateProgramWithBinary

It looks there is a problem with the xml generated by SDx flow.  Specifically, the following field is empty.

 

grep -a addrRemap kernel7.hw.advantech_vega-3601_dynamic_5_1.xclbin 
<addrRemap base="" port=""/>

 

Editing with xclbinsplit  and sclbincat, I was able to get past this error, but other behaviors appear incorrect.  

0 Kudos
Xilinx Employee
Xilinx Employee
537 Views
Registered: ‎06-04-2018

Re: Error in clCreateProgramWithBinary

Hi @czeck,

Is the above mentioned issue resolved?

I am facing similar issue for one of the example when I am trying locally targeting xilinx_vcu1525_dynamic_6_0 DSA.

0 Kudos
Observer czeck
Observer
522 Views
Registered: ‎08-28-2017

Re: Error in clCreateProgramWithBinary

Looking back at a private email thread,  it apprears that the follow change was needed to address this issues:

 

Please try changing this line in ‘scripts/gen_from_ipi_xo.tcl’ : 

 

package_xo -xo_path ${xoname} \
    -kernel_name $krnl_name \
    -ip_directory ./packaged_kernel/kernel_${krnl_name} \
    -kernel_xml ./src/${krnl_name}.xml

 

 

To this: 

package_xo -xo_path ${xoname} \
    -kernel_name kernel_$krnl_name \
    -ip_directory ./packaged_kernel/kernel_${krnl_name} \
    -kernel_xml ./src/${krnl_name}.xml