Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
655 Discussions

Issues HPS OpenCL Enviroment writeup.

TLeng2
Beginner
1,016 Views

Issue writeup regarding HPS OpenCL.

 

1: Linux issue.

As mentioned in Ticket:

https://forums.intel.com/s/question/0D50P00004PK4DESA1/opencl-bsp-hps-are-updated-opencl-drivers-libs-for-newer-linux-kernels-available-

The FPGA Bridge handling for the AXI Bridges is changed in Kernel versions 4 upward and no Update is planned....!!

 

The Issue is known since 2016. ( see link of the Rocketboards Forum: https://forum.rocketboards.org/t/missing-dev-fpga0-device-on-de0-nano-soc/526)

The info «You can use Kernel 3.10 LTS» does not help due multiple reasons.

1.     3.10 is outdated and has security flaws.

2.     Intel itself removed all SOCFPGA sources regarding 3.X Kernels, see attached screenshot.

3.     Our Host Software does not run on Kernel lower than 4.

The issue hereby ist hat the Partial Reconfiguration can not be used. So every time i want to run the System it tries to AOCL Program the device and it fails due the fact that the AXI Bridges are not existing in expected pre 4 kernel behaviour.

This renderst he HPS OpenCL at the moment Unusable besides the AOCL Diagnose.

 

Issue 2

 

AOC / MMD Driver Issue.

We use a design without shared memory. See attached screenshot.

The HPS uses its own 2 / 4 GB Memory for the Linux System. The FPGA has ist own 4GB attached through a second Memory controller. Connection is only via the lw AXI and the HPS to FPGA AXI Bridge.

The Driver has an option for non DMA access as i read through the Sourcecodes but couldnt enable it. The following happened. :

AOCL Diagnose shows the FPGA perfectly fine with ID and everything.

AOCL Diagnose acl0 which starts the memory test starts fine till a specific memory border which indicates that the driver still runs in shared memory mode.

We need the Driver in non shared memory mode.

 

Compiled Experimenrts, sources, card images and logs are available on PM

 

0 Kudos
4 Replies
EBERLAZARE_I_Intel
737 Views

Hi,

 

We are moving to newer kernels and old kernels are removed. Please use the latest kernels version.

 

"We need the Driver in non shared memory mode." let me check into this.

 

Regards

0 Kudos
TLeng2
Beginner
737 Views

We are using latest Kernel version.

 

the command "AOCL Program acl0 kernel.aocx" does not work with latest kernel version due the fact that the FPGA Bridges are controlled different in newer Kernels ....

 

See Source of Intels own Source located at \intelFPGA_pro\19.3\hld\board\a10soc\source\host\mmd\acl_mmd_config.cpp

 

// Disable communication bridges between ARM and FPGA

void ACL_MMD_CONFIG::disable_bridges()

{

  int system_res = system ("echo 0 > /sys/class/fpga-bridge/fpga2hps/enable");

  ACL_MMD_ASSERT(system_res != -1, "echo failed \n");

  system_res = system ("echo 0 > /sys/class/fpga-bridge/hps2fpga/enable");

  ACL_MMD_ASSERT(system_res != -1, "echo failed \n");

  system_res = system ("echo 0 > /sys/class/fpga-bridge/lwhps2fpga/enable");

  ACL_MMD_ASSERT(system_res != -1, "echo failed \n");

}

 

// Enable communication bridges between ARM and FPGA

void ACL_MMD_CONFIG::enable_bridges()

{

  int system_res = system ("echo 1 > /sys/class/fpga-bridge/fpga2hps/enable");

  ACL_MMD_ASSERT(system_res != -1, "echo failed \n");

  system_res = system ("echo 1 > /sys/class/fpga-bridge/hps2fpga/enable");

  ACL_MMD_ASSERT(system_res != -1, "echo failed \n");

  system_res = system ("echo 1 > /sys/class/fpga-bridge/lwhps2fpga/enable");

  ACL_MMD_ASSERT(system_res != -1, "echo failed \n");

}

 

 

This does not work with newer Kernels. !

 

there is NO /sys/class/fpga-bridges/* in Kernels after 3.X

 

That is the main issue why AOCL program doesnt work at all.

 

 

 

 

0 Kudos
EBERLAZARE_I_Intel
736 Views

Hi,

 

Understood the complications of the kernel version, I will need to check with our internal team regarding this.

 

Regards.

0 Kudos
EBERLAZARE_I_Intel
736 Views

Hi,

 

For issue 2:

It is recommended to use shared memory, I could not find any information regarding on the kernel usage of nonshared memory.

https://www.intel.com/content/www/us/en/programmable/documentation/mwh1391807965224.html#ewa1412885766352

0 Kudos
Reply