cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mohamed34
Visitor
Visitor
1,153 Views
Registered: ‎05-12-2018

HLS sobel with VDMA

Hi there,

 

I want to use the sobel filter from XAPP1167 in microzed 7020 platform.

In a first time i designed with a posterize hls block and it was working fine, but with the sobel filter, I have a signal, but a black screen. 

 

I configured the HLS sobel block in SDK like this:

 

XImage_filter hsobel;
XImage_filter_Config *hsobel_config;

hsobel_config = XImage_filter_LookupConfig(XPAR_IMAGE_FILTER_0_DEVICE_ID);
XImage_filter_Initialize(&hsobel,XPAR_IMAGE_FILTER_0_DEVICE_ID);

XImage_filter_Set_rows(&hsobel,(u32)1080);
XImage_filter_Set_cols(&hsobel,(u32)1920);

XImage_filter_Set_C_XR0C0(&hsobel,(u32)1);
XImage_filter_Set_C_XR0C1(&hsobel,(u32)0);
XImage_filter_Set_C_XR0C2(&hsobel,(u32)-1);
XImage_filter_Set_C_XR1C0(&hsobel,(u32)2);
XImage_filter_Set_C_XR1C1(&hsobel,(u32)0);
XImage_filter_Set_C_XR1C2(&hsobel,(u32)-2);
XImage_filter_Set_C_XR2C0(&hsobel,(u32)1);
XImage_filter_Set_C_XR2C1(&hsobel,(u32)0);
XImage_filter_Set_C_XR2C2(&hsobel,(u32)-1);
XImage_filter_Set_C_YR0C0(&hsobel,(u32)1);
XImage_filter_Set_C_YR0C1(&hsobel,(u32)2);
XImage_filter_Set_C_YR0C2(&hsobel,(u32)1);
XImage_filter_Set_C_YR1C0(&hsobel,(u32)0);
XImage_filter_Set_C_YR1C1(&hsobel,(u32)0);
XImage_filter_Set_C_YR1C2(&hsobel,(u32)0);
XImage_filter_Set_C_YR2C0(&hsobel,(u32)-1);
XImage_filter_Set_C_YR2C1(&hsobel,(u32)-2);
XImage_filter_Set_C_YR2C2(&hsobel,(u32)-1);

XImage_filter_Set_c_high_thresh(&hsobel,(u32)200);
XImage_filter_Set_c_low_thresh(&hsobel,(u32)100);
XImage_filter_Set_c_invert(&hsobel,(u32)0);

XImage_filter_Start(&hsobel);
XImage_filter_EnableAutoRestart(&hsobel);

 

 I've attached the design file, provided by vivado.

I tried with a VDMA before and after the sobel filter,

and one just after the sobel filter

 

Thanks for any help.

 

 

 

 

 

0 Kudos
2 Replies
tedbooth
Scholar
Scholar
1,135 Views
Registered: ‎03-28-2016

At a quick look, the system design looks ok.  I would suggest using a "System ILA" to capture the input video and output video streams of the sobel filter so that you can verify if the data looks correct.

 

Also double check your VDMA frame buffers and verify that they are being properly initialized.  It's easy to be reading from the wrong location and getting bad results.

 

Ted Booth | Tech. Lead FPGA Design Engineer | DesignLinx Solutions
https://www.designlinxhs.com
0 Kudos
mohamed34
Visitor
Visitor
1,126 Views
Registered: ‎05-12-2018

Tedbooth, thanks for your reply,

 

I will add ILA block to my design, to check.

Concerning the VDMA:

for the first one I write and read in this space:

unsigned int srcBuffer0= (XPAR_PS7_DDR_0_S_AXI_BASEADDR + 0x100000);

 

and for the second one:
unsigned int srcBuffer1 = (XPAR_PS7_DDR_0_S_AXI_BASEADDR + 0x100000 +0xf00000);

 

and it was working for the posterize algorithme.

0 Kudos