36 #include <hls_stream.h>
38 #include "../../../../cFDK/SRA/LIB/SHELL/LIB/hls/NTS/SimNtsUtils.hpp"
39 #include "../../../../cFDK/SRA/LIB/SHELL/LIB/hls/NTS/SimAppData.hpp"
44 #define MAX_SIM_CYCLES 500
45 #define TB_GRACE_TIME 1000
46 #define STARTUP_DELAY 25
50 #define NOT_YET_DONE false
52 #define ENABLED (ap_uint<1>)1
53 #define DISABLED (ap_uint<1>)0
55 #define DEFAULT_SESS_ID 42
56 #define DEFAULT_DATAGRAM_LEN 32
64 #define DEFAULT_FPGA_IP4_ADDR 0x0A0CC801
65 #define DEFAULT_FPGA_LSN_PORT 0x2263
66 #define DEFAULT_FPGA_SND_PORT 0xA263
67 #define DEFAULT_HOST_IP4_ADDR 0x0A0CC832
68 #define DEFAULT_HOST_LSN_PORT 0x80
69 #define DEFAULT_HOST_SND_PORT 0x8080
83 stream<TcpAppData> &siTAF_Data,
84 stream<TcpSessId> &siTAF_SessId,
85 stream<TcpDatLen> &siTAF_DatLen,
86 ofstream &rawFileStream,
87 ofstream &tcpFileStream,
92 stream<TcpAppData> &soTAF_Data,
93 stream<TcpSessId> &soTAF_SessId,
94 stream<TcpDatLen> &soTAF_DatLen,
95 ifstream &inpFileStream,
96 ofstream &outGoldStream,
102 #
if defined TAF_USE_NON_FIFO_IO
103 ap_uint<2> poTAF_EchoCtrl,
106 stream<TcpAppData> &soTAF_Data,
107 stream<TcpSessId> &soTAF_SessId,
108 stream<TcpDatLen> &soTAF_DatLen,
110 stream<TcpAppData> &siTAF_Data,
111 stream<TcpSessId> &siTAF_SessId,
112 stream<TcpDatLen> &siTAF_DatLen);
void stepSim()
Increment the simulation counter.
void increaseSimTime(unsigned int cycles)
Increase the simulation time of the testbench.
bool pTSIF_Send(int &nrError, stream< TcpAppData > &soTAF_Data, stream< TcpSessId > &soTAF_SessId, stream< TcpDatLen > &soTAF_DatLen, ifstream &inpFileStream, ofstream &outGoldStream, int &nrSegments)
Emulate the sending part of the TSIF process.
bool pTSIF_Recv(int &nrErr, stream< TcpAppData > &siTAF_Data, stream< TcpSessId > &siTAF_SessId, stream< TcpDatLen > &siTAF_DatLen, ofstream &rawFileStream, ofstream &tcpFileStream, int &nrSegments)
Emulate the receiving part of the TSIF process.
void pTSIF(int &nrErr, stream< TcpAppData > &soTAF_Data, stream< TcpSessId > &soTAF_SessId, stream< TcpDatLen > &soTAF_DatLen, stream< TcpAppData > &siTAF_Data, stream< TcpSessId > &siTAF_SessId, stream< TcpDatLen > &siTAF_DatLen)
Emulate the behavior of TSIF.