From 6523d7909f97759ef84a29240cea6d0d0d6c9d33 Mon Sep 17 00:00:00 2001
From: Majd Hafiri <majd.hafiri@stud.th-deg.de>
Date: Fri, 4 Jun 2021 13:30:44 +0000
Subject: [PATCH] Update pixel.cpp

---
 pixel.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/pixel.cpp b/pixel.cpp
index 064cb7a..5f5849a 100644
--- a/pixel.cpp
+++ b/pixel.cpp
@@ -5,7 +5,7 @@
 using namespace std;
 
 typedef ap_axis<32,0,0,0> pkt_t;
-
+static int counter=0;
 
 
 void pixel(
@@ -19,9 +19,7 @@ void pixel(
 	#pragma HLS INTERFACE axis port=dout
 
 	pkt_t pkt=din.read();
-	static int count=0;
 
-	
 
 	if(counter==w){
 		pkt.data*=2;
@@ -29,7 +27,7 @@ void pixel(
 
 	}
 	else{
-	count++;
+	counter++;
 	}
 	// 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) 
 
-- 
GitLab