From fe38f90815cf1cfe6810c4a485280a362de7f941 Mon Sep 17 00:00:00 2001 From: Vipin Thomas <vipin.thomas@stud.th-deg.de> Date: Fri, 25 Jun 2021 15:36:10 +0000 Subject: [PATCH] Update main.cpp --- main.cpp | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/main.cpp b/main.cpp index adadeaf..1809bdb 100644 --- a/main.cpp +++ b/main.cpp @@ -1,46 +1,39 @@ -#include <pixel.hpp> - +#include "pixel.hpp" +#include <iostream> int main() { stream streamIn; stream streamOut; + pkt_t tmp; + ap_int<32> a; + ap_int<32> selector,position1,position2,stream_count; + selector=0; + position1=1; + position2=3; + stream_count=27; + a=50; + + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 3; x++) { + for (int z = 0;z < 3; z++){ - for (int y = 0; y < 2; y++) { - for (int x = 0; x < 2; x++) { - for (int z = 0;z < 2; z++){ - pkt_t tmp; tmp.data = 255; tmp.user = (x == 0) && (y == 0)&&(z==0); - tmp.last = (x == 26); + tmp.last = (y == 2); streamIn.write(tmp); + std::cout << "input: " << tmp.data << std::endl; + + pixel(selector,position1,position2,stream_count,a,streamIn,streamOut); + + tmp = streamOut.read(); + std::cout << "Output: " << tmp.data << std::endl; } } } - ap_int<32> a; - ap_int<32> selector,position1,position2,stream_count; - selector=0; - position1=1; - position2=1; - stream_count=1; - a=50; - pixel(selector,position1,position2,stream_count,a,streamIn,streamOut); - - for (int y = 0; y < 2; y++) { - for (int x = 0; x < 2; x++) { - for (int z = 0;z < 2; z++){ - pkt_t tmp = streamOut.read(); - - } - } - } return 0; } - - - - -- GitLab