cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shjang
Observer
Observer
338 Views
Registered: ‎07-30-2019

What's difference between hls::vector and array?

Jump to solution

 

Hi.

 

I'm trying to develop my own accelerated kernel on Vitis tool.

And I found that user can use hls::vector and array variable both.

But I cannot understand which is the difference there in both type.

 

What's difference between hls::vector and array?

Is there any difference in implemented hardware?

 

Thanks.

0 Kudos
1 Solution

Accepted Solutions
xilinxacct
Professor
Professor
167 Views
Registered: ‎10-23-2018

@shjang 

An array is a base pointer to some memory... A vector (from STL) can dynamically grow, and has knowledge of its size. In HLS, there cannot be dynamic growth, as there is no dynamic memory. In synthesizable code, STL vectors cannot be used... See this for more info on hls::vector 

https://www.xilinx.com/html_docs/xilinx2020_2/vitis_doc/vitis_hls_coding_styles.html

Hope that Helps
If so, Please mark as solution accepted. Kudos also welcomed.

View solution in original post

1 Reply
xilinxacct
Professor
Professor
168 Views
Registered: ‎10-23-2018

@shjang 

An array is a base pointer to some memory... A vector (from STL) can dynamically grow, and has knowledge of its size. In HLS, there cannot be dynamic growth, as there is no dynamic memory. In synthesizable code, STL vectors cannot be used... See this for more info on hls::vector 

https://www.xilinx.com/html_docs/xilinx2020_2/vitis_doc/vitis_hls_coding_styles.html

Hope that Helps
If so, Please mark as solution accepted. Kudos also welcomed.

View solution in original post