- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have code in DPC++ that is using an FPGA as the device and CPU host. I am trying to print to the console in tis code for debugging/state analysis, but I am failing.
I looked at the code in the tutorials and those print statements work beautifully. But when I try to add print statements of own, they fail (nothing printed to the screen). Specifically, any print statements earlier in the code (before the print "Platform Name") print sometimes and don't print the other times.
I use the following two ways of printing:
1) printf("About to Read Stuff\n");
2) std::cout << "About to Read Stuff" << std::endl;
Could I please get some help with this? I have attached my source code
Thank you!
- Tags:
- General Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We tried the code sample given by you and tested on devcloud using FPGA Emulation Device but we didn't get any such issue which you are mentioning. We also tried printing before the print "Platform Name" and run multiple executions (15 times ) but didn't observe the problem mentioned by you.
For more information, I have attached my screenshot of execution and let me know where I have to make changes to reproduce the problem you are getting. As you have not provided the aes.hpp file I have to change the image height, width, and key_length accordingly. I have attached the modified code below.
Warm Regards,
Abhishek
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We tried the code sample given by you and tested on devcloud using FPGA Emulation Device but we didn't get any such issue which you are mentioning. We also tried printing before the print "Platform Name" and run multiple executions (15 times ) but didn't observe the problem mentioned by you.
For more information, I have attached my screenshot of execution and let me know where I have to make changes to reproduce the problem you are getting. As you have not provided the aes.hpp file I have to change the image height, width, and key_length accordingly. I have attached the modified code below.
Warm Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the reply!
How are you running on the FPGA? I am using this command: dpcpp -fintelfpga src/run_me.cpp -DFPGA_EMULATOR -o bin/run_me.emu
Could you try running it with that command and see what happens? Could you also tell me the command you are using? I tried running it with dpcpp printerror.cpp -o printerror (what i see in the screenshot) but it says I cannot specify a device that way.
I have also attached all header and source files
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I figured out the error :)
Thank you so much! Your file helped a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for confirming that your issue got resolved.
Please let us know if we can close this thread. You can always post a new thread if you face any other issue.
Warm Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As your issue got resolved we are closing this thread. Please feel free to post a new thread if you have any issues.
Warm Regards,
Abhishek

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page