From 6b94f0cf4d249a1aa4b682278b1d6c9c78c9e458 Mon Sep 17 00:00:00 2001 From: Vipin Thomas <vipin.thomas@stud.th-deg.de> Date: Thu, 24 Jun 2021 22:33:54 +0000 Subject: [PATCH] Update pixel.cpp --- pixel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pixel.cpp b/pixel.cpp index 0a22494..3dc95b3 100644 --- a/pixel.cpp +++ b/pixel.cpp @@ -18,7 +18,7 @@ void decrypt(int data); // void toAscii(char *c); -void pixel(char key[16], +void pixel(char key[3], ap_int<32> selector, ap_int<32> position1, ap_int<32> position2, @@ -38,8 +38,10 @@ void pixel(char key[16], #pragma HLS INTERFACE axis port=dout pkt_t pkt=din.read(); - int n=(int)*key; - *key=(char)n; + for(i = 0;i<3;i++) + { + key[i]=(int)c+1; + } switch(selector) { case 0: -- GitLab