cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
youad
Visitor
Visitor
1,165 Views
Registered: ‎10-30-2017

printf not working with with SDAccel 2018.2?

Jump to solution

Hi all,

I just switched to SDAccel 2018.2 from 2017.2. I found that the printf in OpenCL seems no longer working. It just prints 0 for all variables. For example:

printf("this number is %d.\n",100);

 in a .cl file will produce "this number is 0" in the terminal.

When I compile the same code using 2017.2, the printf works normally. Anyone knows why is this? Is this some sort of bug of 2018.2?

0 Kudos
1 Solution

Accepted Solutions
hongh
Moderator
Moderator
1,078 Views
Registered: ‎11-04-2010

Hi, @youad ,

The printf issue in SW-Emulation has been reproduced in SDx 2018.2, and it is planned to be fixed in SDx 2018.3.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
youad
Visitor
Visitor
1,119 Views
Registered: ‎10-30-2017

Anyone using the latest version of SDAccel?

0 Kudos
graces
Moderator
Moderator
1,105 Views
Registered: ‎07-16-2008

In which run did you observe this result? SW emulation, HW emulation or system?

This shouldn't be a common issue. Can you share the test case?

-----------------------------------------------------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs.
-----------------------------------------------------------------------------------------------------------------------
0 Kudos
hongh
Moderator
Moderator
1,098 Views
Registered: ‎11-04-2010

Hi, @youad ,

The issue can be seen in SDx 2018.2 SW-Emu stage and has been reflected to the developer. 

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
youad
Visitor
Visitor
1,084 Views
Registered: ‎10-30-2017

I encounter this issue when running SW emulation. I tried several previous projects of mine (work well in 2017) and none can printf correctly. The projects are compiled from command line.

If it is not a issue in SDAccel 2018, then probably it is some compiler flags issue? I can share with you the terminal output if you want to look at it. Could you also run some code in 2018 and see if it is a common issue?

0 Kudos
hongh
Moderator
Moderator
1,079 Views
Registered: ‎11-04-2010

Hi, @youad ,

The printf issue in SW-Emulation has been reproduced in SDx 2018.2, and it is planned to be fixed in SDx 2018.3.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

0 Kudos