Newer
Older
#include <iostream>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
using namespace std;
static int count = 0;
static int count_streams = 0;
static bool flag = false;
static int p_count = 3;
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=position
#pragma HLS INTERFACE s_axilite port=stream_count
#pragma HLS INTERFACE axis port=din
#pragma HLS INTERFACE axis port=dout
if(count == position || count == position+1 || count == position+2){
pkt.data -= 1;
p_count--;
if (count_streams == stream_count){
count_streams = 0;
flag = false;
}
// pending: have to make count=0 when TLAST signal is active - for w not in the range of 0 to n(size of the array)