cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
771 Views
Registered: ‎06-10-2018

SDSoC OpenCL emulation failing with HEXAll.

Jump to solution

Hi,

 

I am trying to perform emulation of builtin OpenCL Vector Addition example on software emulation target for ZC706 board.

 

My emulation is terminating with following error message, please see bottom of SDx log: -

-----------------

22:01:30 INFO    : Launching XSCT server: xsct -n -sdx -interactive /home/my_username/xilinx/workspace1/temp_xsdb_launch_script.tcl
22:01:30 INFO    : XSCT server has started successfully.
22:01:30 INFO    : Successfully done setting XSCT server connection channel  
22:01:30 INFO    : plnx-install-location is set to ''
22:01:30 INFO    : Successfully done setting SDK workspace  
22:01:30 INFO    : Registering command handlers for SDx TCF services
22:01:30 INFO    : Registering command handlers for SDK TCF services
22:01:30 INFO    : Validating SDSoC License...
22:01:30 INFO    : License available for SDSoC
22:01:30 INFO    : Validating SDAccel License...
22:01:30 INFO    : License available for SDAccel
22:04:55 INFO    : Launching the emulator on project 'EmuOCL980' for configuration 'Debug'
22:04:55 INFO    : Launching QEMU with command 'sdsoc_emulator -pid-file emulation.pid -no-reboot -forward-port 1440 1534 -runtime ocl'
22:04:56 ERROR    : [QEMU Process]: qemu-system-aarch64: -redir tcp:1440::1534: The -redir option is deprecated. Please use '-netdev user,hostfwd=...' instead.

22:04:56 ERROR    : [QEMU Process]: qemu-system-aarch64
22:04:56 ERROR    : [QEMU Process]: : info: QEMU waiting for connection on: disconnected:tcp:127.0.0.1:9458,server

22:04:58 ERROR    : [QEMU Process]: rom: requested regions overlap (rom bootloader. free=0x000000000000b1a2, addr=0x0000000000000000)

22:06:18 INFO    : Emulator has started.
22:06:22 ERROR    : [QEMU Process]: terminate called after throwing an instance of '
22:06:22 ERROR    : [QEMU Process]: HEXAll'
  what():  ERROR: [Common 17-331] Failed to open zip archive /home/my_username/xilinx/workspace1/EmuOCL980/Debug/_sds/rundir/binary_0/hw_em/ziptmp. This may indicate that the file is corrupt, that there is insufficient free disk space available to uncompress it, or that you do not have permission to create files in the directory /home/my_username/xilinx/workspace1/EmuOCL980/Debug/_sds/rundir/binary_0/hw_em


22:06:22 ERROR    : [QEMU Process]: qemu-system-aarch64
22:06:22 ERROR    : [QEMU Process]: : /cosim@0: Disconnected clk=83911014228 ns

-----------------

 

Partial results printed in console are following, which indicate that emulation did start but got terminated because of above error: -

---------------

platform Name: Xilinx
Vendor Name : Xilinx
Found Platform
XCLBIN File Name: vadd
INFO: Importing ./binary_container_1.xclbin
Loading: './binary_container_1.xclbin'

----------------

 

Development environment details: -

-----------------

OS: CentOS Linux release 7.5.1804 (Core)

SDx version: Xilinx SDx v2018.2 (64-bit), SW Build 2258646 on Thu Jun 14 20:03:40 MDT 2018

------------------

 

I did check permission of mentioned file and also tried running as root. Also, around 145GB is free on my hard disk and I do not see any user specific quotas with quota command. There is no limit on filesize either as ulimit returns "unlimited".

 

Any help will be much appreciated!

 

-Sumit

 

Update: Made machine username information private.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
645 Views
Registered: ‎06-10-2018

Re: SDSoC OpenCL emulation failing with HEXAll.

Jump to solution

The problem is present in SW emulation of ZC706. Things are fine when every step in SDx (including source code) remains same but platform is changed to ZCU102.

 

Another data point is. same source code works fine on real ZC706 hardware platform.

 

So, SW emulation is not correctly emulating behavior of ZC706 real HW. Same problem occurs in both SDx GUI mode and command-line emulation..

 

Best regards,

Sumit

View solution in original post

0 Kudos
3 Replies
Highlighted
Visitor
Visitor
742 Views
Registered: ‎06-10-2018

Re: SDSoC OpenCL emulation failing with HEXAll.

Jump to solution

Here are few updates: -

 

1) I tried by reducing DATA_SIZE to 16. Problem repeats.

 

2) Problem seems to be with following command: -

    cl::Program program(context, devices, bins);

Reason:  As evident from various debug prints from the code as pasted below.

Modified code snippet: -

------------------

    //Create Program and Kernel
    std::cout << "IA3 " << std::endl;
    std::string binaryFile = xcl::find_binary_file(device_name,"vadd");
    std::cout << "IA4" << std::endl;
    cl::Program::Binaries bins = xcl::import_binary_file(binaryFile);
    std::cout << "IA5" << std::endl;
    devices.resize(1);
    std::cout << "IA6" << std::endl;
    cl::Program program(context, devices, bins);
    std::cout << "IA7: Before Kernel Extrac" << std::endl;

    cl::Kernel krnl_vector_add(program,"vadd");

    std::cout << "IA8" << std::endl;

-----------------

 

New console output: -

----------------

IA1: Before data init
IA2: After data init
platform Name: Xilinx
Vendor Name : Xilinx
Found Platform
IA3
XCLBIN File Name: vadd
IA4
INFO: Importing ./binary_container_1.xclbin
Loading: './binary_container_1.xclbin'
IA5
IA6

 

----------------

 

 

3) I manually created around 19GB file in the directory mentioned in error. No permission or size issue(s) occured.

 

Does it look like a bug in SDx or am I missing something?

 

 

0 Kudos
Highlighted
Visitor
Visitor
696 Views
Registered: ‎06-10-2018

Re: SDSoC OpenCL emulation failing with HEXAll.

Jump to solution

Does anybody have any clue about this problem?

Or, is there any crisp and "latest" (for v 2018.2) documentation for performing SW emulation from command line for SDSoC OpenCL application development?

Xilinx team, probably you can shed some light?

Thanks!

0 Kudos
Highlighted
Visitor
Visitor
646 Views
Registered: ‎06-10-2018

Re: SDSoC OpenCL emulation failing with HEXAll.

Jump to solution

The problem is present in SW emulation of ZC706. Things are fine when every step in SDx (including source code) remains same but platform is changed to ZCU102.

 

Another data point is. same source code works fine on real ZC706 hardware platform.

 

So, SW emulation is not correctly emulating behavior of ZC706 real HW. Same problem occurs in both SDx GUI mode and command-line emulation..

 

Best regards,

Sumit

View solution in original post

0 Kudos