From 90e28ba8cc3e1a4bf0dc9d412345ca030031e380 Mon Sep 17 00:00:00 2001
From: Majd Hafiri <majd.hafiri@stud.th-deg.de>
Date: Fri, 28 May 2021 22:20:45 +0000
Subject: [PATCH] Add simple pixel manipulation

---
 pixel_manipulation.cpp | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 pixel_manipulation.cpp

diff --git a/pixel_manipulation.cpp b/pixel_manipulation.cpp
new file mode 100644
index 0000000..9a443aa
--- /dev/null
+++ b/pixel_manipulation.cpp
@@ -0,0 +1,32 @@
+#include <iostream>
+#include <hls_stream.h>
+#include <ap_axi_sdata.h>
+
+using namespace std;
+
+typedef ap_axis<24,0,0,0> pkt_t; 
+
+
+
+void pixel(
+
+		hls::stream< pkt_t > &din,
+		hls::stream< pkt_t > &dout,
+
+) {
+	#pragma HLS INTERFACE ap_ctrl_none port=return
+	#pragma HLS INTERFACE axis port=din
+	#pragma HLS INTERFACE axis port=dout
+
+	pkt_t pkt;
+	din.read(pkt);
+
+	    for(int i=0; i<=2; i++){
+            
+	        pkt.data[i] = 255; 
+            
+	    }
+
+	dout.write(pkt);
+}
+
-- 
GitLab