// stream_test.h
// 2018/02/11 by marsee
//
#ifndef __STREAM_TEST_H__
#define __STREAM_TEST_H__
#include <ap_fixed.h>
template<int W, int I, int N, int U, int TI, int TD>
struct ap_fixed_axis{
ap_fixed<W, I, AP_TRN, AP_WRAP> data[N];
ap_uint<(W+7)/8> keep;
ap_uint<(W+7)/8> strb;
ap_uint<U> user;
ap_uint<1> last;
ap_uint<TI> id;
ap_uint<TD> dest;
};
template<int W, int I, int N, int U, int TI, int TD>
struct ap_ufixed_axis{
ap_ufixed<W, I, AP_TRN, AP_WRAP> data[N];
ap_uint<(W+7)/8> keep;
ap_uint<(W+7)/8> strb;
ap_uint<U> user;
ap_uint<1> last;
ap_uint<TI> id;
ap_uint<TD> dest;
};
#endif
// stream_test.cpp
// 2018/02/11 by marsee
//
#include <ap_int.h>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include <hls_video.h>
#include "stream_test.h"
int stream_test(hls::stream<ap_fixed_axis<16,6,2,1,1,1> >& ins,
hls::stream<ap_fixed_axis<16,6,2,1,1,1> >& outs){
#pragma HLS INTERFACE axis register both port=outs
#pragma HLS INTERFACE axis register both port=ins
#pragma HLS INTERFACE s_axilite port=return
ap_fixed_axis<16,6,2,1,1,1> ins_t;
ap_fixed_axis<16,6,2,1,1,1> outs_t;
for(int y=0; y<10; y++){
for(int x=0; x<56; x++){
ins >> ins_t;
outs_t.data[0] = ins_t.data[0] * (ap_fixed<16, 6, AP_TRN, AP_WRAP>)2.0;
outs_t.data[1] = ins_t.data[1] * (ap_fixed<16, 6, AP_TRN, AP_WRAP>)3.0;
outs_t.user = 1;
outs_t.last = 0;
outs << outs_t;
}
}
return(0);
}
ERROR: [XFORM 203-103] Cannot partition array 'ins.V.data.V' (stream_test/stream_test.cpp:12): different array partition directive on the same group of AXI-Stream ports.
ERROR: [HLS 200-70] Pre-synthesis failed.
command 'ap_source' returned error code
while executing
"source C:/Users/Masaaki/Documents/VIvado_HLS/ZYBO_Z7-20/test/stream_test/solution1/csynth.tcl"
invoked from within
"hls::main C:/Users/Masaaki/Documents/VIvado_HLS/ZYBO_Z7-20/test/stream_test/solution1/csynth.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"
Finished C synthesis.
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | - | - | - | - | - | - |