UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer dat63
Observer
784 Views
Registered: ‎08-28-2018

DMASIMPLE could not find physical address for buffer

Jump to solution

Hi,

I am using the xfOpenCV functions with success by following the steps indicated in UG1223:

1. Read the image using cv::imread().
2. Copy the data to xf::Mat.
3. Call the processing function(s) in xfOpenCV.
4. Copy the data from xf::Mat to cv::Mat.
5. Write the output to image using cv::imwrite().

 

I tried to modify step 3 by calling a custom function that takes as arguments a _src and a _dst xf::Mat image container. The function works when compiled as software function. When it is selected to be HW accelerated the entire projects is successfully terminated but during the execution i get the error :

"DMASIMPLE could not find physical address for buffer, ensure the buffer is allocated with sds_alloc"

I guess the error refers to the _src.data or _dst.data buffers, but how can I allocate them with sds_alloc? I thought that instantiating the _src and _dst structures with the new operator would internally allocate the buffers by means of sds_alloc but maybe this is not the case. What am I doing wrong?

 

Thanks for the support

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer dat63
Observer
742 Views
Registered: ‎08-28-2018

Re: DMASIMPLE could not find physical address for buffer

Jump to solution

Hi,

I eventually solved the problem. I was passing the wrong argument to the function, cv::Mat instead of xf:Mat. Now the accelerated function works flawlessy. This also means that the xf:Mat constructor uses sds_alloc to allocate the buffer for the image data as expected

View solution in original post

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
778 Views
Registered: ‎07-12-2017

Re: DMASIMPLE could not find physical address for buffer

Jump to solution

Hi @dat63,

 

Could you please check if the following design is helpful ?

 

https://github.com/Xilinx/SDSoC_Examples/tree/master/cpp/getting_started/dma_simple

 

Please see how a and b are allocated usin sds_alloc() in main.cpp and corresponding header file for SDS data_mover pragma.

0 Kudos
Observer dat63
Observer
759 Views
Registered: ‎08-28-2018

Re: DMASIMPLE could not find physical address for buffer

Jump to solution

Hi @hatchuta,

thanks for the suggestion, but I do not know how the example you provided can help me. I need to work with xf::Mat image containers while the example uses simple arrays. The point is: how can I allocate the data buffers inside xf:.Mat with sds_alloc? I thought it would be automatically done when you use the xf::Mat constructor but probably it is not otherwise I wouldn't get the error at runtime

0 Kudos
Highlighted
Observer dat63
Observer
743 Views
Registered: ‎08-28-2018

Re: DMASIMPLE could not find physical address for buffer

Jump to solution

Hi,

I eventually solved the problem. I was passing the wrong argument to the function, cv::Mat instead of xf:Mat. Now the accelerated function works flawlessy. This also means that the xf:Mat constructor uses sds_alloc to allocate the buffer for the image data as expected

View solution in original post

0 Kudos