diff --git a/Testbench/pixel.hpp b/Testbench/pixel.hpp index 97ba4a67871b7d20810d4904d49d0b09a094f50f..c46dfd1bc01d75f256d47659bf551643e0a7e35e 100644 --- a/Testbench/pixel.hpp +++ b/Testbench/pixel.hpp @@ -1,24 +1,31 @@ #include <stdio.h> #include <stdlib.h> -#include<math.h> -#include <string.h> +#include <math.h> #include <hls_stream.h> #include <ap_axi_sdata.h> +//#include <string.h> +//#include <array> + +//const auto N = 1<<2; // array size +//using vec_t = std::array<char, N>; + using namespace std; -typedef ap_axis<32,0,0,0> pkt_t; +typedef ap_axis<32,1,1,1> pkt_t; + typedef hls::stream< pkt_t > stream; -void pixel(ap_int<32> selector, - ap_int<32> position1, - ap_int<32> position2, - ap_int<32> stream_count, - ap_int<32> ascii, - stream &din, - stream &dout -); +void pixel(ap_int<32> &in_decimal, + ap_int<32> selector, + ap_int<32> position1, + ap_int<32> position2, + hls::stream< pkt_t > &din, + hls::stream< pkt_t > &dout + + ); long long convert(int n); int convertBinInt(long long n); void decrypt(int data); +int getDecimal(int n);