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: 
Observer zxttao
Observer
2,091 Views
Registered: ‎06-12-2008

The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Hi,

We are trying the reference design of on-chip global memory in sdaccel (tool version: 2017.4), Emulation_SW mode can pass ,but failed in Emulation_HW mode building.  We found the following error information in the log files: 

 

"adder_stage" accesses non-pipe global variable "xcl_mem_g_var1", which is not support in HLS" 

"fatal error: error in backend: Top function not found: there is no function named 'adder_stage'"

 

Attached the reference design from "UG1207 - SDAccel Environment Optimization Guide " . 

// Global memory buffers used to transfer data between kernels
// Contents of the memory do not need to be accessed by host processor
global int g_var0[1024];   
global int g_var1[1024];   
// Kernel reads data from global memory buffer written by the host processor
// Kernel writes data into global buffer consumed by another kernel
kernel __attribute__ ((reqd_work_group_size(256,1,1)))
void input_stage (global int *input)
{
__attribute__((xcl_pipeline_workitems)) {
g_var0[get_local_id(0)] = input[get_local_id(0)];
}
}
// Kernel computes a result based on data from the input_stage kernel
kernel __attribute__ ((reqd_work_group_size(256,1,1)))
void adder_stage(int inc)
{
__attribute__ ((xcl_pipeline_workitems)) {
int input_data, output_data;
input_data = g_var0[get_local_id(0)];
output_data = input_data + inc;
g_var1[get_local_id(0)] = output_data;
}
}
// Kernel writes the results computed by the adder_stage to
// a global memory buffer that is read by the host processor
kernel __attribute__ ((reqd_work_group_size(256,1,1)))
void output_state(global int *output)
{
__attribute__ ((xcl_pipeline_workitems)) {
output[get_local_id(0)] = g_var1[get_local_id(0)];
}
}

 

We also tried to use the "global int16 g_var0[1024]" ,instead of "int", but got the same failure. Questions:  Is there any wrong in the attached kernel code ? How to build the on-chip global memory in Emulation-hw mode? 

 

Thanks in advance.

 

0 Kudos
12 Replies
Observer zxttao
Observer
2,017 Views
Registered: ‎06-12-2008

回复: The on-chip global memory failed in Emulation_HW mode

We also tried the same code in the sdaccel2017.2 version.  The on chip global memory can work in 2017.2.  It looks like the issue only happens in 2017.4 version. 

0 Kudos
Moderator
Moderator
2,001 Views
Registered: ‎03-27-2012

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Hello @zxttao

 

Have you tried the solution in this topic?

https://forums.xilinx.com/t5/SDAccel/ERROR-KernelCheck-83-114-in-sdx-2017-4/m-p/818135#M1615

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Observer zxttao
Observer
1,974 Views
Registered: ‎06-12-2008

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Hi Moderator,

Thanks for your response.  We tried the solution that you mentioned , but the issue is still there .   Could you please check if there is any other way to workaround the on-chip global memory issue in 2017.4 ? 

 

BTW, if we use the 2017.2 to generate the fpga binary file and use the 2017.4 to generate the host exe , does it work?

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

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Hi @zxttao

 

This code work for me on 2017.4. No error was reported.

Here is the command line I used:

xocc -c --xp param:compiler.preserveHlsOutput=1 --xp param:compiler.generateExtraRunData=true -s -I./ -o xclbin/vadd.hw_emu.xilinx_kcu1500_dynamic_5_0.xo -t hw_emu --platform xilinx_kcu1500_dynamic_5_0 ./vadd.cl 
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer zxttao
Observer
1,894 Views
Registered: ‎06-12-2008

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

HI Moderator,

Thanks for your command line.  It works for xocc compile , but we still failed during the xocc link.  The detail information is as the following :

 

The link command that i used :

xocc -l --xp param:compiler.preserveHlsOutput=1 --xp param:compiler.generateExtraRunData=true -s xclbin/vadd.hw_emu.xilinx_kcu1500_dynamic_5_0.xo -t hw_emu --platform xilinx_kcu1500_dynamic_5_0 ./adder_global_mem.cl 

 

The failed information :

ERROR: [KernelCheck 83-113] Kernel 'output_state' accesses non-pipe global variable 'xcl_mem_g_var1', which is not supported.

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

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Thanks. I can see the error now.
I will try and see what is happening.
You can workaround this error by switching to xilinx_kcu1500_4ddr-xpr_4_0 DSA (--platform xilinx_kcu1500_4ddr-xpr_4_0), if OK for you.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer zxttao
Observer
1,870 Views
Registered: ‎06-12-2008

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

By my understanding , sdaccel2017.4 doen't support "xilinx_kcu1500_4ddr-xpr_4_0 ". Do you mean switch back to sdaccel 2017.2 with xilinx_kcu1500_4ddr-xpr_4_0   ?  Just want to double confirm it . 

 

Thanks,

Allan

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

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Hi Allan,

 

Yes. Please use 2017.2 to workaround this problem.

 

Regards,

Sean

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Explorer
Explorer
1,203 Views
Registered: ‎05-23-2017

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

@zxttao@seanz

 

I met the same error when using the on-chip memory as global memory.

Did you have any solution to workaround this issue with the 2017.4?

 

Thanks

0 Kudos
Observer zxttao
Observer
882 Views
Registered: ‎06-12-2008

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

At that time, i used the 2017.2 to WAR it .  Not sure if xilinx already fixed the issue in the latest release 2018.2 .  I didn't get chance to test it with 2018.2 . 

0 Kudos
Explorer
Explorer
872 Views
Registered: ‎05-23-2017

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Thanks.

I will have a try and let you know.

 

0 Kudos
Visitor motebphd2018
Visitor
288 Views
Registered: ‎05-31-2018

Re: The on-chip global memory(Emulation_HW mode) failed in sdaccel2017.4

Dear mathmaxsean

Have you tried the on-chip global memory example on the SDx 2018.2? 

I have tride that on SDx 2018.1 and I got the same error which is

ERROR: [KernelCheck 83-113] Kernel 'vadd' accesses non-pipe global variable 'xcl_mem_g_var1', which is not supported.

Error: unable to create function map for HLS kernel vadd

 

So does anyone has an idea how to get this works?

 

Thank you all

 

0 Kudos