cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
definelicht
Adventurer
Adventurer
527 Views
Registered: ‎02-16-2017

Missing constructor for streams with non-zero depth

Jump to solution

In version 2020.1 of vitis_hls and vivado_hls, the constructor for passing a name to the stream is missing when the depth parameter is specified. If the depth parameter is not specified, the constructor works as expected.

The code below reproduces the error. If the depth parameter is removed (hls::stream<int, 128> changed to hls::stream<int>), the code synthesizes.

This seems like an oversight?

#include <hls_stream.h>

void Read(int const *memory, hls::stream<int, 128> &stream, int N) {
  for (int i = 0; i < N; ++i) {
    #pragma HLS PIPELINE II=1
    stream.write(memory[i]);
  }
}

void Write(hls::stream<int, 128> &stream, int *memory, int N) {
  for (int i = 0; i < N; ++i) {
    #pragma HLS PIPELINE II=1
    memory[i] = stream.read();
  }
}

void MyKernel(int const *source_memory, int *destination_memory, int N) {
  #pragma HLS INTERFACE m_axi port=source_memory bundle=gmem0
  #pragma HLS INTERFACE m_axi port=destination_memory bundle=gmem1
  #pragma HLS INTERFACE s_axilite port=source_memory bundle=control
  #pragma HLS INTERFACE s_axilite port=destination_memory bundle=control
  #pragma HLS INTERFACE s_axilite port=N bundle=control
  #pragma HLS DATAFLOW
  hls::stream<int, 128> stream("hi");
  Read(source_memory, stream, N);
  Write(stream, destination_memory, N);
}
0 Kudos
1 Solution

Accepted Solutions
ramananr
Xilinx Employee
Xilinx Employee
459 Views
Registered: ‎08-22-2019

Yes, the issue with naming the stream is a bug that has been fixed in the upcoming 2020.2 release. 

View solution in original post

2 Replies
aoifem
Moderator
Moderator
470 Views
Registered: ‎11-21-2018

Hi @definelicht 

Thanks for flagging this as a potential issue. There is some information about this at the following link, under the title Using HLS Streams for Streaming Data

https://www.xilinx.com/html_docs/xilinx2020_1/vitis_doc/programmingvitishls.html

 

 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA


**~ Got a minute? Answer our Vitis HLS survey here! ~**

**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
ramananr
Xilinx Employee
Xilinx Employee
460 Views
Registered: ‎08-22-2019

Yes, the issue with naming the stream is a bug that has been fixed in the upcoming 2020.2 release. 

View solution in original post