Skip to content
Snippets Groups Projects
Commit 2d8d9adb authored by Vipin Thomas's avatar Vipin Thomas
Browse files

Update pixel.cpp

parent ca6d8b03
No related branches found
No related tags found
No related merge requests found
......@@ -4,33 +4,37 @@
using namespace std;
typedef ap_axis<32,0,0,0> pkt_t;
typedef ap_axis<32,0,0,0> pkt_t;
void pixel(
ap_int<32> &w,
ap_int<32> &len,
ap_int<32> w,
hls::stream< pkt_t > &din,
hls::stream< pkt_t > &dout
) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=w
#pragma HLS INTERFACE s_axilite port=len
#pragma HLS INTERFACE axis port=din
#pragma HLS INTERFACE axis port=dout
pkt_t pkt;
din.read(pkt);
pkt_t pkt=din.read();
static int count=0;
// if(pkt.data){
len++;
// }
if(len==w){
if(counter==w){
pkt.data*=2;
}
else if(counter< w){
count++;
}
else{
counter=0;
}
dout.write(pkt);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment