cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
common.hpp File Reference
#include <stdio.h>
#include <string>
#include <hls_stream.h>
#include "common/xf_headers.hpp"
Include dependency graph for common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define THIS_NAME   "TB"
 
#define TRACE_OFF   0x0000
 
#define TRACE_URIF   1 << 1
 
#define TRACE_UAF   1 << 2
 
#define TRACE_MMIO   1 << 3
 
#define TRACE_ALL   0xFFFF
 
#define DEBUG_LEVEL   (TRACE_ALL)
 
#define OK   true
 
#define KO   false
 
#define VALID   true
 
#define UNVALID   false
 
#define DEBUG_TRACE   true
 
#define ENABLED   (ap_uint<1>)1
 
#define DISABLED   (ap_uint<1>)0
 

Functions

bool setInputDataStream (stream< UdpWord > &sDataStream, const std::string dataStreamName, const std::string inpFileName, int simCnt)
 Initialize an input data stream from a file. More...
 
bool setInputFileToArray (const std::string inpFileName, ap_uint< OUTPUT_PTR_WIDTH > *imgArray, int simCnt)
 Initialize an input array from a file with format "tdata tkeep tlast". More...
 
bool readDataStream (stream< UdpWord > &sDataStream, UdpWord *udpWord)
 Read data from a stream. More...
 
ap_uint< 64 > pack_ap_uint_64_ (ap_uint< 8 > *buffer)
 Pack an array of 8 x ap_uint<8> into a ap_uint<64> word. More...
 
bool dumpDataToFile (UdpWord *udpWord, std::ofstream &outFileStream)
 Dump a data word to a file. More...
 
bool getOutputDataStream (stream< UdpWord > &sDataStream, const std::string dataStreamName, const std::string outFileName, int simCnt)
 Fill an output file with data from an output stream. More...
 
bool dumpImgToFile (xf::cv::Mat< OUT_TYPE, HEIGHT, WIDTH, NPIX > &_img, const std::string outFileName, int simCnt)
 Fill an output file with data from an image. More...
 
unsigned int writeCornersIntoFile (cv::Mat &in_img, cv::Mat &ocv_out_img, cv::Mat &out_img, std::vector< cv::Point > &hls_points, std::vector< cv::Point > &ocv_points, std::vector< cv::Point > &common_pts)
 Write the corners found by Harris into a file. More...
 
void markPointsOnImage (xf::cv::Mat< OUT_TYPE, HEIGHT, WIDTH, NPIX > &imgOutput, cv::Mat &in_img, cv::Mat &out_img, std::vector< cv::Point > &hls_points)
 Mark the points found by Harris into the image. More...