From 2d8b8c8db9a77be9e32f241bece1fb239e8a0a19 Mon Sep 17 00:00:00 2001
From: Vipin Thomas <vipin.thomas@stud.th-deg.de>
Date: Thu, 24 Jun 2021 23:31:49 +0000
Subject: [PATCH] Update pixel.cpp

---
 pixel.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/pixel.cpp b/pixel.cpp
index 1dc982e..c4b4d7c 100644
--- a/pixel.cpp
+++ b/pixel.cpp
@@ -18,12 +18,13 @@ void decrypt(int data);
 // void toAscii(char *c);
 
 
-void pixel(char key[3],
+void pixel(char key[1],
         ap_int<32> selector,
 		ap_int<32> position1,
 		ap_int<32> position2,
 		ap_int<32> stream_count,
 		ap_int<32> &ascii,
+        ap_int<32> &keyout,
 		hls::stream< pkt_t > &din,
 		hls::stream< pkt_t > &dout
 ) {
@@ -34,14 +35,14 @@ void pixel(char key[3],
 	#pragma HLS INTERFACE s_axilite port=position2
 	#pragma HLS INTERFACE s_axilite port=stream_count
 	#pragma HLS INTERFACE s_axilite port=ascii 
+    #pragma HLS INTERFACE s_axilite port=keyout 
 	#pragma HLS INTERFACE axis port=din
 	#pragma HLS INTERFACE axis port=dout
 
     pkt_t pkt=din.read();
-    for(int i=0;i<3;i++)
-	{
-            key[i]=(int)key[i]+1;
-    }
+
+    keyout=(int)key[0];
+ 
     switch(selector)
     {
         case 0:
-- 
GitLab