cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
: Utilities for the simulation of the Network-Transport-Stack (NTS) components. More...
#include <stdlib.h>
#include <unistd.h>
#include <iostream>
#include <fstream>
#include "../MEM/mem.hpp"
#include "../NTS/nts.hpp"
#include "../NTS/nts_utils.hpp"
#include "../NTS/SimNtsUtils.hpp"
Go to the source code of this file.
Functions | |
bool | isDatFile (string fileName) |
Checks if a file has a ".dat" extension. More... | |
bool | isDottedDecimal (string ipStr) |
Checks if a string contains an IP address represented in dot-decimal notation. More... | |
bool | isHexString (string str) |
Checks if a string contains a hexadecimal number. More... | |
ap_uint< 32 > | myDottedDecimalIpToUint32 (string ipStr) |
Converts an IPv4 address represented with a dotted-decimal string into an UINT32. More... | |
vector< string > | myTokenizer (string strBuff, char delimiter) |
Brakes a string into tokens by using the 'delimiter' character. More... | |
string | myUint64ToStrHex (ap_uint< 64 > inputNumber) |
Converts an UINT64 into a string of 16 HEX characters. More... | |
string | myUint8ToStrHex (ap_uint< 8 > inputNumber) |
Converts an UINT8 into a string of 2 HEX characters. More... | |
ap_uint< 64 > | myStrHexToUint64 (string dataString) |
Converts a string of 16 HEX characters into an UINT64. More... | |
ap_uint< 8 > | myStrHexToUint8 (string keepString) |
Converts a string of 2 HEX characters into an UINT8. More... | |
int | myDiffTwoFiles (string dataFileName, string goldFileName) |
Compares 2 files line-by-line, up to length of the 2nd file. More... | |
bool | readAxisRawFromLine (AxisRaw &axisRaw, string stringBuffer) |
Retrieve an AxisRaw chunk from a string. More... | |
bool | readFpgaSocketFromLine (SockAddr &fpgaSock, string stringBuffer) |
Retrieve an Fpga socket from a string. More... | |
bool | readFpgaSndPortFromLine (Ly4Port &port, string stringBuffer) |
Retrieve an FPGA send port from a string. More... | |
bool | readHostSocketFromLine (SockAddr &hostSock, string stringBuffer) |
Retrieve a Host socket from a string. More... | |
bool | readAxisRawFromFile (AxisRaw &axisRaw, ifstream &inpFileStream) |
Retrieve an Axis raw data chunk from a file. More... | |
bool | readTbParamFromFile (const string paramName, const string datFile, unsigned int ¶mVal) |
Retrieve a testbench parameter from a DAT file. More... | |
int | writeAxisAppToFile (AxisApp &axisApp, ofstream &outFile) |
Dump a TCP or UDP application data chunk into a file. The data are stored as a stream of bytes which is terminated by a newline when the 'TLAST' bit of the data chunk is set. More... | |
int | writeAxisAppToFile (AxisApp &axisApp, ofstream &outFile, int &wrCount) |
Dump a TCP or UDP application data chunk into a file. Data are stored as a stream of bytes with a newline being appended every time the write-counter reaches the Maximum Segment Size (.i.e, MY_MSS) or the TLAST' bit of the data chunk is set. More... | |
bool | writeAxisRawToFile (AxisRaw &axisRaw, ofstream &outFileStream) |
Dump an Axis raw data chunk to a file. More... | |
bool | writeSocketPairToFile (SocketPair &socketPair, ofstream &outFileStream) |
Dump a SocketPair to a file. More... | |
template<int D> | |
bool | writeApUintToFile (ap_uint< D > &data, ofstream &outFileStream) |
Dump an AP_UINT to a file. More... | |
bool | feedAxisRawStreamFromFile (stream< AxisRaw > &ss, const string ssName, string datFile, int &nrChunks, int &nrFrames, int &nrBytes) |
bool | drainAxisRawStreamToFile (stream< AxisRaw > &ss, const string ssName, string datFile, int &nrChunks, int &nrFrames, int &nrBytes) |
template<class AXIS_T > | |
bool | feedAxisFromFile (stream< AXIS_T > &ss, const string ssName, string datFile, int &nrChunks, int &nrFrames, int &nrBytes) |
Initialize an Axi4-Stream (Axis) from a DAT file. More... | |
template<class AXIS_T > | |
bool | drainAxisToFile (stream< AXIS_T > &ss, const string ssName, string datFile, int &nrChunks, int &nrFrames, int &nrBytes) |
Empty an Axi4-Stream (Axis) to a DAT file. More... | |
: Utilities for the simulation of the Network-Transport-Stack (NTS) components.
System: : cloudFPGA Component : Shell, Network Transport Stack (NTS) Language : Vivado HLS
Definition in file SimNtsUtils.hpp.