Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
14943 Discussions

FPGA (opencl) code works in emulation (with strict channel depths) but does not work on FPGA (wrong results)

NSriv2
Novice
1,094 Views

Here is the code (https://drive.google.com/file/d/1QcMYwOPU9onk4CiZx6YFD1pEYjXOSsbY/view?usp=sharing). I am using aoc 17.1 on VLAB

 

Here are the commands that you can run. (You might need to modify the Makefile according to your aoc setup):

 

% make compile-emulation

% make compile-host

% make run-emulation

 

This will pass and give correct results.

 

FPGA flow:

 

% make compile-device

% make compile-host

% make run

 

runs it on FPGA but the results are all 0s

 

Thanks,

Nitish

 

 

 

0 Kudos
3 Replies
MuhammadAr_U_Intel
198 Views

Hi Nitish,

 

What BSP are you targeting ?

Have you tried using the latest version of OpenCL compiler 18.1 ?

 

Thanks,

Arslan

HRZ
Valued Contributor II
198 Views

Your code does not compile on my environment due to missing channel connections for “A_feeder_channel”. I am using aoc directly on your kernel. Furthermore, you have two writes to the “B_loader_channel” channel. Multiple call sites were not allowed until v17.0 and I would definitely avoid it even now that it is allowed. You are using very complex channeling operations, seemingly with multiple call sites in some places, and you are not enforcing channel ordering as far as I can see. This could very well be the reason for the incorrect output. The emulator fails at emulating concurrency properly; hence, you should not expect it to show concurrency issues that might exists in your kernel correctly.

NSriv2
Novice
198 Views

Thanks for your replies HRZ and MUsman. The problem was multiple read/write channel calls for the same channel. Once I removed that, design started working.

Reply