0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【VitisHLS】hls::streamを用いた関数のis private within this context

Posted at
#include "sample.hpp"

void add_st (
    hls::stream<my_axis> in_a,
    hls::stream<my_axis> in_b,
    hls::stream<my_axis> out_res
){

    my_axis a, b, res;

    in_a.read(a);
    in_b.read(b);
    res.data = a.data + b.data;
    res.user = a.user;
    res.last = a.last;
    out_res.write( res );

}

void top_func(
    hls::stream<my_axis>& in_a, 
    hls::stream<my_axis>& in_b, 
    hls::stream<my_axis>& out_res
){

    #pragma HLS INTERFACE axis port=in_a
    #pragma HLS INTERFACE axis port=in_b
    #pragma HLS INTERFACE axis port=out_res
    #pragma HLS DATAFLOW

    add_st( in_a , in_b , out_res );
}
error: ‘hls::stream<__STREAM_T__, 0>::stream(const hls::stream<__STREAM_T__, 0>&) [with __STREAM_T__ = hls::axis<unsigned int, 32ul, 0ul, 0ul>]’ is private within this context

原因:&の付け忘れ

void add_st (
    hls::stream<my_axis>& in_a,
    hls::stream<my_axis>& in_b,
    hls::stream<my_axis>& out_res
){
...

エラー文が微妙に分かり辛い。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?