cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
11,854 Views
Registered: ‎07-27-2010

C/C++ code synthesis on Vivado HLS

Jump to solution

hi,

 

   I wish to synthesis sample native a C/C++ design on Vivado HLS to get HDL files for FPGA implenebtation.

   I tried an examle code of calculator but found some errors....

Can you help me to get simple code of C/C++ ,which I can synthesis on HLS to clear my concept...

 

Looking for kind help..

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
19,931 Views
Registered: ‎02-06-2013

Re: C/C++ code synthesis on Vivado HLS

Jump to solution

Hi

 

Check the labs in the below doc and the example in the HLS video

 

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_3/ug871-vivado-high-level-synthesis-tutorial.pdf

 

http://www.xilinx.com/training/vivado/getting-started-with-vivado-high-level-synthesis.htm

Regards,

Satish

--------------------------------------------------​--------------------------------------------
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.
--------------------------------------------------​-------------------------------------------

View solution in original post

0 Kudos
4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
19,932 Views
Registered: ‎02-06-2013

Re: C/C++ code synthesis on Vivado HLS

Jump to solution

Hi

 

Check the labs in the below doc and the example in the HLS video

 

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_3/ug871-vivado-high-level-synthesis-tutorial.pdf

 

http://www.xilinx.com/training/vivado/getting-started-with-vivado-high-level-synthesis.htm

Regards,

Satish

--------------------------------------------------​--------------------------------------------
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.
--------------------------------------------------​-------------------------------------------

View solution in original post

0 Kudos
Highlighted
Explorer
Explorer
11,839 Views
Registered: ‎07-27-2010

Re: C/C++ code synthesis on Vivado HLS

Jump to solution

Thanks for ur prompt reply

I gone through the tutorial.

Plz. tell me :If I dont have test bench file how can I synthesis.(I have native C code)

For E.G.

#include<stdio.h>
#include<conio.h>
void main()

{
float a,b,c;
//clrscr();
a=10.2;
b=5.3;
c=a+b;
//printf("Sum of two Numbers=%f" ,c);
//getch();
}

 

CAN we synthesis this...

0 Kudos
Highlighted
Explorer
Explorer
11,828 Views
Registered: ‎07-27-2010

Re: C/C++ code synthesis on Vivado HLS

Jump to solution

plz, comment regarding test bench file,Is it required.

As Normally in C we have source and header files only.

 

Thanks...

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
11,762 Views
Registered: ‎03-22-2011

Re: C/C++ code synthesis on Vivado HLS

Jump to solution

Open the Vivado HLS GUi and select Open Example Projects to get started.

Since you are trying to use floats, open the Coding Example and select type_float_double.

 

Then, start to change the code in the design. You'll then have to adjust the test bench file and since the design will start to fail C-sim, so you'll need to create new golden data. After C sim, copy proj_types_float_double/solution1/csim/build/results.dat to results.golden.dat in the main directory: basically use the output from C sim to create a new set of golden results.

 

The test bench is everything below main() which is not below the function to be synthesized: the code which helps confirm the function to be synthesized works correctly.

 

And, read the User Guide: even if you look over the first 50 pages of UG902 you would not be asking such questions.

 

 

 

0 Kudos