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
1,072 Views
Registered: ‎03-22-2017

Define macros for different solutions

I have an HLS project that contains 3 solutions, i.e., BASIC, FAST, FASTER, (micro-architectural choices of my design).

 

I would like to define a different macro, i.e., BASIC, FAST, FASTERfor each solution of the above solutions such that it activates the corresponding branch of the following pre-processor conditional directive:

 

 

#ifdef BASIC
/* do something for solution BASIC */

#elif defined(FAST)
/* do something for solution FAST */

#elif defined(FASTER)
/* do something for solution FASTER */

#else
#error "You did not define any macro..."

#endif

 

Thank you 

 

0 Kudos
1 Reply
Mentor xilinxacct
Mentor
146 Views
Registered: ‎10-23-2018

Re: Define macros for different solutions

@gdg

The preprocessor should be fully functional, so you should be able to do that idea.

Hope that helps

Please mark as 'solution accepted' to close the issue... Kudos also welcomed. :-)