This is a subgroup of MCEuropeanEngine accelerated function with only testbench-related functions/classes/.
More...
This is a subgroup of MCEuropeanEngine accelerated function with only testbench-related functions/classes/.
This is a subgroup of MCEuropeanEngine accelerated function with only testbench-related functions/classes.
◆ DEBUG_LEVEL
◆ DEBUG_TRACE
◆ DISABLED
#define DISABLED (ap_uint<1>)0 |
◆ ENABLED
#define ENABLED (ap_uint<1>)1 |
◆ KO
◆ OK
◆ THIS_NAME
◆ TRACE_ALL
◆ TRACE_MMIO
#define TRACE_MMIO 1 << 3 |
◆ TRACE_OFF
◆ TRACE_UAF
◆ TRACE_URIF
#define TRACE_URIF 1 << 1 |
◆ UNVALID
◆ VALID
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Main testbench of MCEuropeanEngine.
- Returns
- 0 upon success, nrErr else.
Definition at line 110 of file test_mceuropeanengine.cpp.
117 printf(
"#####################################################\n");
118 printf(
"## TESTBENCH STARTS HERE ##\n");
119 printf(
"#####################################################\n");
125 printf(
"Usage : %s <configuration file>. Provided %d\n", argv[0], argc);
136 const char *fname = argv[1];
137 if (readFileConfigToStruct(fname, &instruct) !=
INSIZE) {
138 printf(
"WARNING: Invalid read size of configration file %s. Will use default...\n", fname);
140 instruct.
seed = 4332 ;
155 printf(
"WARNING tb Invalid instruct->loop_nm = %u. Will assign %u\n", (
unsigned int)instruct.
loop_nm,
OUTDEP);
171 printf(
"ERROR: Cannot allocate memory for output array. Aborting...\n");
183 for (
unsigned int tb_loop = 0; tb_loop < 1; tb_loop++) {
189 printf(
"### ERROR : Failed to set input data stream \"sSHL_Uaf_Data\". \n");
195 for (
unsigned int i = 0; i < tot_trasnfers_in; i++) {
234 printf(
"## End of simulation at cycle=%3d. \n",
simCnt);
256 printf(
"NRC received NRCmeta stream from rank %d to rank %d.\n", (
int) tmp_meta.
tdata.
src_rank, (
int) tmp_meta.
tdata.
dst_rank);
262 assert(i == tot_trasnfers_out);
265 printf(
"Error No metadata received...\n");
274 printf(
"### ERROR : Failed to set array from file \"ofsUAF_Shl_Data.dat\". \n");
277 writeArrayToFile(
"./hls_out.txt",
out);
278 for (
unsigned int i = 0; i < instruct.
loop_nm; i++) {
279 printf(
"Option price %u: %f\n", i,
out[i]);
284 int rc1 = system(
"diff --brief -w -i -y ../../../../test/ofsUAF_Shl_Data.dat \
285 ../../../../test/verify_UAF_Shl_Data.dat");
288 printf(
"## Error : File \'ofsUAF_Shl_Data.dat\' does not match \'verify_UAF_Shl_Data.dat\'.\n");
290 printf(
"Output data in file \'ofsUAF_Shl_Data.dat\' verified.\n");
297 printf(
"#####################################################\n");
300 printf(
"## ERROR - TESTBENCH FAILED (RC=%d) !!! ##\n", nrErr);
302 printf(
"## SUCCESSFULL END OF TESTBENCH (RC=0) ##\n");
304 printf(
"#####################################################\n");
stream< NetworkMetaStream > siUdp_meta("siUdp_meta")
stream< NetworkMetaStream > soUdp_meta("soUdp_meta")
stream< UdpWord > sUAF_Shl_Data("sUAF_Shl_Data")
void stepDut()
Run a single iteration of the DUT model.
stream< UdpWord > sSHL_Uaf_Data("sSHL_Uaf_Data")
ap_uint< 32 > cluster_size
ap_uint< 32 > s_udp_rx_ports
bool setInputDataStream(stream< UdpAppData > &sDataStream, const string dataStreamName, const string inpFileName)
Initialize an input data stream from a file.
bool getOutputDataStream(stream< UdpAppData > &sDataStream, const string dataStreamName, const string outFileName)
Fill an output file with data from an output stream.
bool dumpFileToArray(const string inpFileName, double *out, int simCnt)
Initialize an input data stream from a file.
bool dumpStructToFile(varin *s, const std::string outFileName, int simCnt)
Fill an output file with data from an output stream.
DtUsedInt requiredSamples
◆ siUdp_meta()
◆ soUdp_meta()
◆ sSHL_Uaf_Data()
stream<UdpWord> sSHL_Uaf_Data |
( |
"sSHL_Uaf_Data" |
| ) |
|
◆ stepDut()
Run a single iteration of the DUT model.
- Returns
- Nothing.
Definition at line 93 of file test_mceuropeanengine.cpp.
100 printf(
"[%4.4d] STEP DUT \n",
simCnt);
void mceuropeanengine(ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NetworkWord > &siSHL_This_Data, stream< NetworkWord > &soTHIS_Shl_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &soNrc_meta, ap_uint< 32 > *po_rx_ports)
Main process of the MCEuropeanEngine Application directives.
◆ sUAF_Shl_Data()
stream<UdpWord> sUAF_Shl_Data |
( |
"sUAF_Shl_Data" |
| ) |
|
◆ cluster_size
◆ node_rank
◆ piSHL_This_MmioCaptPktEn
ap_uint<1> piSHL_This_MmioCaptPktEn |
◆ piSHL_This_MmioPostPktEn
ap_uint<1> piSHL_This_MmioPostPktEn |
◆ s_udp_rx_ports
ap_uint<32> s_udp_rx_ports = 0x0 |
◆ simCnt