From 7ccd5da1202a173bcd81aca3a690deac4e6dd60e Mon Sep 17 00:00:00 2001
From: Vipin Thomas <vipin.thomas@stud.th-deg.de>
Date: Wed, 30 Jun 2021 10:09:53 +0000
Subject: [PATCH] Update main.cpp

---
 Testbench/main.cpp | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/Testbench/main.cpp b/Testbench/main.cpp
index 1809bdb..d31d3ae 100644
--- a/Testbench/main.cpp
+++ b/Testbench/main.cpp
@@ -3,37 +3,39 @@
 
 int main() {
 
+//	vec_t key,keyout;
 	stream streamIn;
 	stream streamOut;
-
 	pkt_t tmp;
+	ap_int<32> indecimal;
 	ap_int<32> a;
 	ap_int<32> selector,position1,position2,stream_count;
 		selector=0;
 	    position1=1;
-	    position2=3;
-	    stream_count=27;
-	    a=50;
+	    position2=8;
+	    indecimal=72;
+//	for (auto& x: key) {
+//		x = 'a';
+//		std::cout << "Key: " << x << std::endl;
+//	}
 
-	for (int y = 0; y < 3; y++) {
-	    for (int x = 0; x < 3; x++) {
-	    	for (int z = 0;z < 3; z++){
+	for (int y = position1-1; y < position2; y++) {
 
 	        tmp.data = 255;
-	        tmp.user = (x == 0) && (y == 0)&&(z==0);
-	        tmp.last = (y == 2);
+	        tmp.user = (y == 0);
+//	        tmp.last = (y == position2);
 	        streamIn.write(tmp);
 	        std::cout << "input: " << tmp.data << std::endl;
 
-	        pixel(selector,position1,position2,stream_count,a,streamIn,streamOut);
+	        pixel(indecimal,selector,position1,position2,streamIn,streamOut);
 
 	        tmp = streamOut.read();
 	        std::cout << "Output: " << tmp.data << std::endl;
 	    	}
-	    }
-	}
-
+	std::cout << "Value decoded: " << indecimal << std::endl;
 
     return 0;
 
 }
+
+
-- 
GitLab