I have two variables:
void func1(hls::stream<ap_axiu<8,1,1,1>> &a);
void func2(hls::stream<ap_uint<8>> &b);
Where ap_axiu
is defined as:
template<int D,int U,int TI,int TD>
struct ap_axiu{
ap_uint<D> data;
ap_uint<(D+7)/8> keep;
ap_uint<(D+7)/8> strb;
ap_uint<U> user;
ap_uint<1> last;
ap_uint<TI> id;
ap_uint<TD> dest;
};
I would like to call func2
inside func1
, using the data of parameter a of func1
(see defenition of ap_axiu
). So func
would look something like this:
void func1(hls::stream<ap_axiu<8,1,1,1>> &a) {
func2(???);
}
where ???
should be the ap_uint<D> data
part of variable hls::stream<ap_axiu<8,1,1,1>> a
, surrounded by hls::stream< >
.
How can I do this in C++? I don't have much experience with templates and I also cannot find it on Google.