cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
#include "../include/common.hpp"
Go to the source code of this file.
Functions | |
bool | setInputDataStream (stream< UdpWord > &sDataStream, const string dataStreamName, const string inpFileName, int simCnt) |
Initialize an input data stream from a file. 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... | |
void | unpack_ap_uint_64_ (ap_uint< 64 > value, ap_uint< 8 > *buffer) |
Unpack an ap_uint<64> word to an array of 8 x ap_uint<8>. More... | |
bool | dumpDataToFile (UdpWord *udpWord, ofstream &outFileStream) |
Dump a data word to a file. More... | |
bool | getOutputDataStream (stream< UdpWord > &sDataStream, const string dataStreamName, const string outFileName, int simCnt) |
Fill an output file with data from an output stream. More... | |
bool | dumpStringToFile (const string s, const string outFileName, int simCnt) |
Fill an output file with data from an image. More... | |
bool | dumpStringToFileOnlyRawData (const string s, const string outFileName, int simCnt, size_t out_size) |
Fill an output file with data from an image. More... | |
bool | dumpStringToFileWithLastSetEveryGnoPackets (string s, const string outFileName, int simCnt, int gno) |
Fill an output file with data from a string and set the tlast every gno packets. More... | |
bool | dumpFileToString (const string inpFileName, char *charOutput, int simCnt) |
Initialize an input data stream from a file. More... | |
template<unsigned int bytes_per_line = 8> | |
string | dumpFileToStringRawDataString (const string inpFileName, int *rawdatalines, size_t outputSize) |
Initialize an input data stream from a file with only data. More... | |
unsigned char | hexval (unsigned char c) |
convert a char to its hexadecimal representation. More... | |
void | hex2ascii (const string &in, string &out) |
Convert a hexadecimal string to a ascii string FIXME: More... | |
void | ascii2hex (const string &in, string &out) |
Convert a ascii string to a hexadecimal string FIXME: More... | |
void | ascii2hexWithSize (const string &in, string &out, size_t bytesize) |
Convert a ascii string to a hexadecimal string FIXME: More... | |
bool | isCornerPresent (string str, string corner) |
Check the presence of a given corner value at the begin and the end of a string. More... | |
template<typename T > | |
void | string2hexnumerics (const string &in, char *out, size_t byteSize) |
Convert a hex string to a integer into a char buffer with the SAME dimensions FIXME: More... | |
void | stringHex2Unsigned (const string &in, unsigned int *out, size_t byteSize) |
void | string2hexnumericsString (const string &in, string &out, size_t byteSize) |
Convert a hex string to a integer into a char buffer with the SAME dimensions FIXME: More... | |
template<unsigned int bytes_per_line = 8> | |
string | createMemTestCommands (unsigned long long int mem_address, unsigned int testingNumber, unsigned int burst_size) |
Create the commands for a memory test with start/max address to test-nop to execute-stop. More... | |
template<unsigned int bytes_per_line = 8> | |
string | createMemTestGoldenOutput (unsigned long long int mem_address, unsigned int testingNumber, bool with_bw_analysis) |
Create the expected output results for the memory test (with FAULT INJECTION) More... | |
std::string | createUppercaseGoldenOutput (std::string input_string) |
Create the expected output results for the uppercase. More... | |
void | reverseStr (string &str) |
reverse a given string More... | |
template<unsigned int bytes_per_line = 8> | |
std::vector< MemoryTestResult > | parseMemoryTestOutput (const string longbuf, size_t charOutputSize, int rawdatalines) |
Parse the memory test output contained in astring with a given size. More... | |
void | printStringHex (const string inStr, size_t strSize) |
print byte-per-byte a given string in hexadecimal format More... | |
void | printCharBuffHex (const char *inStr, size_t strSize) |
print byte-per-byte a given char buff in hexadecimal format More... | |
void | printBits (size_t const size, void const *const ptr) |
print the binary representation of a target pointer buffer of a given size. Assumes little endian. More... | |