void pool(hls::stream &in,hls::stream &out, int ch_div_K,int height_in,int width_in, int height_out,int width_out,int Kx,int Ky) { #pragma HLS INTERFACE s_axilite port=return #pragma HLS INTERFACE s_axilite port=Ky #pragma HLS INTERFACE s_axilite port=width_in #pragma HLS INTERFACE s_axilite port=Kx #pragma HLS INTERFACE s_axilite port=height_in #pragma HLS INTERFACE s_axilite port=height_out #pragma HLS INTERFACE s_axilite port=width_out #pragma HLS INTERFACE s_axilite port=ch_div_K #pragma HLS DATAFLOW #pragma HLS INTERFACE axis register both port=out #pragma HLS INTERFACE axis register both port=in hls::stream stream_tp; #pragma HLS STREAM variable=stream_tp depth=8 dim=1 hls::stream stream_tp2; pool_1D(in,stream_tp,ch_div_K,height_in,width_in,Kx); pool_2D(stream_tp,stream_tp2,ch_div_K,height_in,width_out,Ky); hs2axis(stream_tp2,out,ch_div_K,height_out,width_out); }