30 #ifndef _TEST_COMMON_H_
31 #define _TEST_COMMON_H_
36 #include <hls_stream.h>
38 #include "../../../../../HOST/quantitative_finance/mceuropeanengine/languages/cplusplus/include/config.h"
39 #include "../../mceuropeanengine/include/mceuropeanengine.hpp"
46 #define THIS_NAME "TB"
48 #define TRACE_OFF 0x0000
49 #define TRACE_URIF 1 << 1
50 #define TRACE_UAF 1 << 2
51 #define TRACE_MMIO 1 << 3
52 #define TRACE_ALL 0xFFFF
54 #define DEBUG_LEVEL (TRACE_ALL)
64 #define DEBUG_TRACE true
66 #define ENABLED (ap_uint<1>)1
67 #define DISABLED (ap_uint<1>)0
81 const std::string inpFileName,
int simCnt);
134 const std::string dataStreamName,
const std::string outFileName,
int simCnt);
145 static inline unsigned int
146 readFileConfigToStruct(
const char *fname,
varin *instruct);
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.
bool dumpFileToString(const std::string inpFileName, std::string strOutput, int simCnt)
Initialize an input data stream from a file.
bool setInputDataStream(stream< UdpWord > &sDataStream, const std::string dataStreamName, const std::string inpFileName, int simCnt)
Initialize an input data stream from a file.
bool readDataStream(stream< UdpWord > &sDataStream, UdpWord *udpWord)
Read data from a stream.
bool dumpDataToFile(UdpWord *udpWord, std::ofstream &outFileStream)
Dump a data word to a file.
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.
bool dumpStructToFile(varin *s, const std::string outFileName, int simCnt)
Fill an output file with data from an output stream.