Forum Discussion
Val
New Contributor
6 years agoEncapsulating HLS streams
Hi all, As I am working with multiple input streams, I'd like to encapsulate them within a class/function, etc The HLS Reference doc clearly specify not to inherit Stream or wrap them into structur...
Val
New Contributor
6 years agoNote:
You cannot derive new classes from the stream classes or encapsulate them in other
formats such as structs or arrays. However, you may use references to instances of
these classes as references inside other classes, meaning that you can create a class
that has a reference to a stream object as a data member.I first missed this sentence in the HLS Reference doc and tried encapsulating `stream` and stream_in` in a struct.
In some cases, I get a silent failure at `_fpga` time, where compile is successful, and test also runs successfully but nothing seems to be read from the stream (successful blocking `read` but no data, or unexpected)
Best,
Val