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: 
Explorer
Explorer
4,615 Views
Registered: ‎11-01-2015

An issue about "system("diff -w out.dat out.gold.dat")"

Hi,

 

I find this function

system("diff -w out.dat out.gold.dat")

can only be supported in Vivado HLS. How can I make it used in Microsoft Visual Studio?

 

Where can I find the detailed descriptions about this function?

 

Thanks,

Regards

 

 

0 Kudos
3 Replies
Teacher muzaffer
Teacher
4,611 Views
Registered: ‎03-31-2012

Re: An issue about "system("diff -w out.dat out.gold.dat")"

windows also supports system function. Are you sure you have "diff" on the path?

Basically system allows you to execute a binary and return the result to the c program. In this case the program is "diff".
- 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
Explorer
Explorer
4,610 Views
Registered: ‎11-01-2015

Re: An issue about "system("diff -w out.dat out.gold.dat")"

Hi @muzaffer,

 

Thank you. Does this function return the number of different data between two given files?

 

Thanks,

Regards

0 Kudos
Teacher muzaffer
Teacher
4,605 Views
Registered: ‎03-31-2012

Re: An issue about "system("diff -w out.dat out.gold.dat")"

if you call it through system, you only get an indication whether they're different. If you want the number of differences, you can pipe the result "wc". Just do "man diff" to see the options of diff program.
- 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