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: 
Newbie sdenel
Newbie
5,063 Views
Registered: ‎09-18-2013

ZC702 Targeted Reference Design: Cosimulation error

Hello everybody,

 

As I try to understand the TRD for my Evaluation Kit, I tried to run the Cosimulation in Vivado HLS for the sobel function. The Test Bench is provided with the project, so I tried to simply "Run C/HDL Cosimulation".

 

At first, I got an error because the sobel_filter function in sobel.c does not have the same prototype than in sobel.h. I assume you did changes without running the cosimultion again. Thus I edited sobel.h, and changed the sobel_filter function header to put default values for XR0C0, ...YR2C2, c_high_thesh, c_low_thresh, c_invert. I took these parameters in xsobel.c.

So my new function header is:

void sobel_filter(
    AXI_PIXEL inter_pix[MAX_HEIGHT][MAX_WIDTH],
    AXI_PIXEL out_pix[MAX_HEIGHT][MAX_WIDTH],
    int rows,
    int cols,
    int C_XR0C0 = 0x1       ,
    int C_XR0C1 = 0x0       ,
    int C_XR0C2 = 0xFFFFFFFF,
    int C_XR1C0 = 0x2       ,
    int C_XR1C1 = 0x0       ,
    int C_XR1C2 = 0xFFFFFFFE,
    int C_XR2C0 = 0x1       ,
    int C_XR2C1 = 0x0       ,
    int C_XR2C2 = 0xFFFFFFFF,
    int C_YR0C0 = 0x1       ,
    int C_YR0C1 = 0x2       ,
    int C_YR0C2 = 0x1       ,
    int C_YR1C0 = 0x0       ,
    int C_YR1C1 = 0x0       ,
    int C_YR1C2 = 0x0       ,
    int C_YR2C0 = 0xFFFFFFFF,
    int C_YR2C1 = 0xFFFFFFFE,
    int C_YR2C2 = 0xFFFFFFFF,
    int c_high_thesh = 200,
    int c_low_thresh = 100,
    int c_invert = 0
);

 

Now, it runs! But the cosimulation finally failed, because the output result_1080p.bmp is not the same as result_1080p_golden.bmp. As you can see with attached file, it is true :-)
I have the feeling - but I may be wrong - that result_1080p_golden.bmp is outdated, and was not outputted by the current sobel_filter function with the default parameters from xsobel.c

 

Could you confirm me that the reference picture is outdated? If so, could you provide an up-to-date picture to have a correct cosimulation?

 

Thank you very much,

 

Simon D.

result_1080p_golden.jpg
result_1080p.jpg
0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
5,010 Views
Registered: ‎03-24-2010

Re: ZC702 Targeted Reference Design: Cosimulation error

The sobel_filter funtion in head file and testbench is inconsistent with the function body in sobel.cpp. Before it's been modified, the example from XAPP890 can be used instead.

Regards,
brucey
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos