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: 
Highlighted
3,022 Views
Registered: ‎03-19-2017

Vivado HLS: How to add like VHDL generic block in HLS c code?

Dear,

How do I write HLS C code like below VHDL code? Thank you.

generic (
     MODE : integer range 0 to 1 := 1 
);

0 Kudos
7 Replies
Scholar u4223374
Scholar
3,020 Views
Registered: ‎04-26-2015

Re: Vivado HLS: How to add like VHDL generic block in HLS c code?

#include <ap_cint.h>

uint1 MODE = 1;

That's as close as I can get without knowing more about the application.

0 Kudos
Xilinx Employee
Xilinx Employee
3,005 Views
Registered: ‎08-01-2008

Re: Vivado HLS: How to add like VHDL generic block in HLS c code?

you can refer listed documentation here for C HLS

https://www.xilinx.com/support/documentation-navigation/design-hubs/dh0012-vivado-high-level-synthesis-hub.html
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
2,920 Views
Registered: ‎03-19-2017

Re: Vivado HLS: How to add like VHDL generic block in HLS c code?

Dear Scholar,

Thanks for your reply, but it is not what I mean. The generic block of VHDL will generate GUI property for user set value of this variable "MODE" (attached file). That is what I want to do the same job by HLS c/c++ code. How can I do that? Anyone could help me!

 

 

mode.jpg
0 Kudos
Scholar u4223374
Scholar
2,917 Views
Registered: ‎04-26-2015

Re: Vivado HLS: How to add like VHDL generic block in HLS c code?

You can't, at least not without a lot of messing about in TCL.

0 Kudos
2,869 Views
Registered: ‎03-19-2017

Re: Vivado HLS: How to add like VHDL generic block in HLS c code?

Dear Scholar,

Why? Any document or example for me to study how to design a IP by HLS with customer property setting? Just like Xilinx's TPG IP (v6.0). 

Any one could help? Thank you.

0 Kudos
Scholar u4223374
Scholar
2,821 Views
Registered: ‎04-26-2015

Re: Vivado HLS: How to add like VHDL generic block in HLS c code?

p.ching.kuang@gmail.com

 

The reason you can't is precisely because there isn't a document that shows how to do it. It's possible to do (as shown by the TPG block) but Xilinx has not released information on how to achieve that.

 

If you reverse-engineer the TPG block it's possible to see how they've done it - but that's the only option at this stage.

0 Kudos
85 Views
Registered: ‎06-27-2018

Re: Vivado HLS: How to add like VHDL generic block in HLS c code?

A customer of us and thus Xilinx needs that feature too.

Otherwise for each configuration the C/C++ code needs to be touched...

Can someone from Xilinx please give an update on this?

 

0 Kudos