40 #include "../src/fmc.hpp"
41 #include "../../../../../hls/cfdk.hpp"
42 #include "../../../../../hls/network.hpp"
43 #include "../../../../../hls/axi_utils.hpp"
44 #include "../../NAL/src/nal.hpp"
48 #include <hls_stream.h>
54 #define HWICAP_SEQ_SIZE ((16*IN_BUFFER_SIZE + 512)/4)
56 #define HWICAP_SEQ_SIZE ((4*IN_BUFFER_SIZE + 512)/4)
58 #define HWICAP_SEQ_START_ADDRESS 1024
106 output |= (ap_uint<32>) ((
input << 24) & 0xFF000000);
116 ap_uint<32> *used_hwicap_buffer =
HWICAP;
132 #ifdef INCLUDE_PYROLINK
138 printf(
"[%4.4d] STEP DUT \n",
simCnt);
146 if (
MMIO == expected)
148 printf(
"expected result: %#010x\n", (
int)
MMIO);
152 printf(
"[%4.4d] ERROR: Got %#010x instead of %#010x\n",
simCnt, (
int)
MMIO, (
int) expected);
159 printf(
"%s: \n",
msg);
162 uint8_t cur_elem = (ap_uint<8>) buffer_int[i];
163 printf(
"%02x ", cur_elem);
175 printf(
"%s: \n",
msg);
178 int cur_elem = (
int) buffer_int[i];
179 printf(
"%08x ", cur_elem);
189 bool checkSeqHwicap(uint32_t *true_buffer, ap_uint<32> *out_buffer, uint32_t start_address, uint32_t end_address,
bool not_to_swap)
191 uint32_t max_address = end_address;
195 printf(
"set max verify address to %d.\n",max_address);
197 for(
int i = start_address; i<max_address; i++)
199 ap_uint<32> true_buffer_BE = 0x0;
202 true_buffer_BE = true_buffer[i];
204 true_buffer_BE = (ap_uint<32>) ((true_buffer[i] >> 24) & 0xFF);
205 true_buffer_BE |= (ap_uint<32>) ((true_buffer[i] >> 8) & 0xFF00);
206 true_buffer_BE |= (ap_uint<32>) ((true_buffer[i] << 8) & 0xFF0000);
207 true_buffer_BE |= (ap_uint<32>) ((true_buffer[i] << 24) & 0xFF000000);
209 if(true_buffer_BE != out_buffer[i])
211 printf(
"HWICAP OUT is different at position %d: should be %#010x, but is %#010x\n", i, (
int) true_buffer_BE, (
int) out_buffer[i]);
212 printf(
"relative position: %d; end address: %d\n",(
int) (i - start_address), max_address);
213 printf(
"Context:\n\tShould:\n");
214 for(
int j = i-3; j<i+3; j++)
216 ap_uint<32> true_buffer_BE_2 = 0x0;
219 true_buffer_BE_2 = true_buffer[j];
221 true_buffer_BE_2 = (ap_uint<32>) ((true_buffer[j] >> 24) & 0xFF);
222 true_buffer_BE_2 |= (ap_uint<32>) ((true_buffer[j] >> 8) & 0xFF00);
223 true_buffer_BE_2 |= (ap_uint<32>) ((true_buffer[j] << 8) & 0xFF0000);
224 true_buffer_BE_2 |= (ap_uint<32>) ((true_buffer[j] << 24) & 0xFF000000);
226 printf(
"\t%4.4d: %#010x\n",j,(
int) true_buffer_BE_2);
229 for(
int j = i-3; j<i+3; j++)
231 printf(
"\t%4.4d: %#010x\n",j,(
int) out_buffer[j]);
237 printf(
"[HWICAP OUT is valid from address %d to %d]\n",start_address, max_address);
243 ap_uint<32> ctrlWord = 0;
244 for(
int i = 0; i<8; i++)
246 ctrlWord |= ((ap_uint<32>) cnt) << (i*4);
257 xmem[i] = (((ap_uint<32>) cnt) << 24) | 0x0A0B00 | ((ap_uint<32>) i);
263 ap_uint<8> header = (ap_uint<8>) cnt;
269 ap_uint<32> headerLine = header | (
xmem[0] & 0xFFFFFF00);
271 ap_uint<32> footerLine = (((ap_uint<32>) header) << 24) | (
xmem[
LINES_PER_PAGE-1] & 0x00FFFFFF);
272 xmem[0] = headerLine;
277 ap_uint<64>
initStream(ap_uint<4> cnt, stream<NetworkWord> &tcp_data,
int nr_words,
bool with_pattern,
bool inverse_upper,
bool insert_tlast)
279 ap_uint<32> ctrlWord = 0;
280 for(
int i = 0; i<8; i++)
284 ctrlWord |= ((ap_uint<32>) ++cnt) << (i*4);
286 ctrlWord |= ((ap_uint<32>) cnt) << (i*4);
290 ap_uint<64> data_word = 0;
293 data_word = (((ap_uint<64>) ~ctrlWord) << 32) | ctrlWord;
295 data_word = ((ap_uint<64>) ctrlWord << 32) | ctrlWord;
298 printf(
"Writing to Stream: 0x%llx\n",(
unsigned long long) data_word);
300 for(
int i = 0; i<nr_words; i++)
303 tmp.tdata = data_word;
305 if(i == nr_words -1 && insert_tlast)
322 tmp = ((ap_uint<32>) (uint8_t) buffer_int[i*4 + 0]);
323 tmp |= ((ap_uint<32>)(uint8_t) buffer_int[i*4 + 1]) << 8;
324 tmp |= ((ap_uint<32>)(uint8_t) buffer_int[i*4 + 2]) << 16;
325 tmp |= ((ap_uint<32>)(uint8_t) buffer_int[i*4 + 3]) << 24;
332 printf(
"Writing %d bytes to Stream: (in hex)\n", content_len);
333 for(
int i = 0; i<content_len; i+=8)
335 ap_uint<64> new_word = 0;
336 ap_uint<8> tkeep = 0;
337 for(
int j = 0; j<8; j++)
339 if(i+j < content_len)
341 new_word |= ((ap_uint<64>) ((uint8_t) buffer_int[i+j])) << (j*8);
342 tkeep |= ((ap_uint<8>) 1) << j;
344 new_word |= ((ap_uint<64>) ((uint8_t) 0 ))<< (j*8);
345 tkeep |= ((ap_uint<8>) 0) << j;
352 tmp.tdata = new_word;
354 if(i >= (content_len - 8))
361 printf(
"%016llx | %02x | %d \n",(
unsigned long long) new_word, (
int) tkeep, (
int)
tmp.tlast);
370 printf(
"Draining NetworkStream: (in hex)\n");
372 while(!tcp_data.empty())
375 printf(
"%016llx\n",(
unsigned long long)
tmp.tdata);
397 bool succeded =
true;
401 printf(
"%#010x\n", (
int)
MMIO);
402 succeded = (
MMIO == 0xBEBAFECA) && succeded;
409 printf(
"%#010x\n", (
int)
MMIO);
414 printf(
"%#010x\n", (
int)
MMIO);
420 printf(
"%#010x\n", (
int)
MMIO);
425 printf(
"%#010x\n", (
int)
MMIO);
430 printf(
"%#010x\n", (
int)
MMIO);
433 printf(
"== Display and Decoup Test passed == \n");
437 printf(
"===== XMEM =====\n");
514 for(
int i = 0; i<0xf; i++)
539 printf(
"WF_should: %#010x\n", WF_should);
591 xmem[0] = 0xAABBCC00;
592 xmem[4] = 0x12121212;
593 xmem[127] = 0xAABBCCFF;
598 for(
int i = 0; i<0xf; i++)
606 printf(
"MMIO out: %#010x\n", (
int)
MMIO);
620 printf(
"== XMEM Test passed == \n");
624 printf(
"===== HTTP =====\n");
631 char *httpBuffer =
new char[1024];
632 char* getStatus =
"GET /status HTTP/1.1\r\nHost: localhost:8080\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\n\r\n";
633 httpBuffer[0] = 0xF0;
634 strcpy(&httpBuffer[1],getStatus);
635 httpBuffer[strlen(getStatus)+1] = 0x0;
636 httpBuffer[127] = 0xF0;
640 int lastPageBytes = strlen(getStatus) % 126;
663 getStatus =
"GET /theWorldAndEveryghing HTTP/1.1\r\nHost: localhost:8080\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\n\r\n";
664 httpBuffer[0] = 0xF0;
665 strcpy(&httpBuffer[1],getStatus);
666 httpBuffer[strlen(getStatus)+1] = 0x0;
667 httpBuffer[127] = 0xF0;
671 lastPageBytes = strlen(getStatus) % 126;
697 getStatus =
"GET /theWorldAndEveryghing HTTP/1.1\r\nHost: localhost:8080\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\n";
698 httpBuffer[0] = 0xF0;
699 strcpy(&httpBuffer[1],getStatus);
700 httpBuffer[strlen(getStatus)+1] = 0x0;
701 httpBuffer[127] = 0xF0;
705 lastPageBytes = strlen(getStatus) % 126;
731 getStatus =
"POST /configure HTTP/1.1\r\nHost: localhost:8080\r\nUser-Agent: curl/7.47.0\r\nContent-Length: 1607\r\n \
732 Content-Type: application/x-www-form-urlencodedAB\r\n\r\nffffffffffbb11220044ffffffffffffffffaa99556620000000200000002000";
733 printf(
"%s\n",getStatus);
734 httpBuffer[0] = 0x00;
735 strcpy(&httpBuffer[1],getStatus);
736 httpBuffer[strlen(getStatus)+1] = 0x0;
737 httpBuffer[127] = 0x00;
738 httpBuffer[128] = 0xF1;
739 httpBuffer[255] = 0XF1;
746 lastPageBytes = strlen(getStatus) % 126;
774 getStatus =
"POST /configure HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nffff000000bb11220044ffffffffffffffffaa995566200000002000000020000000200000002000000020000000200000002000000020000000200000002000000020000000200000002000000000200000002000000020000000200000002000";
776 printf(
"%s\n",getStatus);
778 httpBuffer[0] = 0x00;
779 strcpy(&httpBuffer[1],getStatus);
780 httpBuffer[strlen(getStatus)+1] = 0x0;
781 httpBuffer[127] = 0x00;
782 httpBuffer[128] = 0x01;
783 httpBuffer[255] = 0X01;
784 httpBuffer[256] = 0xF2;
785 httpBuffer[383] = 0xF2;
791 lastPageBytes = strlen(getStatus) % 126;
805 for(
int i = 2; i<0x1f; i++)
813 for(
int j = 0; j< 4; j++)
867 getStatus =
"PUT /rank/42 HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\n\r\n";
868 httpBuffer[0] = 0xF0;
869 strcpy(&httpBuffer[1],getStatus);
870 httpBuffer[strlen(getStatus)+1] = 0x0;
871 httpBuffer[127] = 0xF0;
875 lastPageBytes = strlen(getStatus) % 126;
899 getStatus =
"PUT /rank/abc HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\n\r\n";
900 httpBuffer[0] = 0xF0;
901 strcpy(&httpBuffer[1],getStatus);
902 httpBuffer[strlen(getStatus)+1] = 0x0;
903 httpBuffer[127] = 0xF0;
907 lastPageBytes = strlen(getStatus) % 126;
931 getStatus =
"PUT /size/5 HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\n\r\n";
932 httpBuffer[0] = 0xF0;
933 strcpy(&httpBuffer[1],getStatus);
934 httpBuffer[strlen(getStatus)+1] = 0x0;
935 httpBuffer[127] = 0xF0;
939 lastPageBytes = strlen(getStatus) % 126;
955 printf(
"== HTTP Test passed == \n");
959 #ifdef INCLUDE_PYROLINK
962 printf(
"===== PYROLINK TEST =====\n");
971 for(
int i = 0; i<0xf; i++)
977 ap_uint<8> ctrlByte = ((cnt & 0xf) << 4) | (cnt & 0xf);
978 for(
int j = 0; j <126; j++)
982 assert(
tmp.tdata == ctrlByte);
994 ap_uint<8> ctrlByte = ((cnt & 0xf) << 4) | (cnt & 0xf);
995 for(
int j = 0; j <10; j++)
1001 assert(
tmp.tdata == ctrlByte);
1004 assert(
tmp.tlast == 1);
1015 for(
int j = 0; j<(3*128 + 14); j++)
1027 tmp.tdata = 3*128 + 15;
1040 assert(
bufferOut[3*128+15 - 1] == (3*128 + 15) % 256);
1042 printf(
"== PYROLINK Test passed == \n");
1044 printf(
"-- Skipping PYROLINK Test (+20 stepDut) -- \n");
1051 printf(
"===== NAL =====\n");
1058 succeded &=
checkResult(
MMIO & 0xf0f0f000, (0x3049444C | 0x30424f52) & 0xf0f0f000);
1062 getStatus =
"POST /routing HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n";
1064 printf(
"%s\n",getStatus);
1066 httpBuffer[0] = 0x00;
1067 strcpy(&httpBuffer[1],getStatus);
1068 int startTable = strlen(getStatus);
1069 int routingTable[25] = {0x30,0x20, 0x0a, 0x0b, 0x0c, 0x01, 0x0a, 0x31,0x20, 0x0a, 0x0b, 0x0c, 0x02, 0x0a, 0x32,0x20, 0x0a, 0x0b, 0x0c, 0x05, 0x0a, 0x0d, 0x0a, 0x0d, 0x0a};
1071 int j = startTable + 1;
1077 httpBuffer[j] = 0x00;
1078 httpBuffer[j + 1] = 0xF1;
1083 httpBuffer[j] = routingTable[i];
1089 httpBuffer[127] = 0x00;
1090 httpBuffer[128] = 0xF1;
1091 httpBuffer[255] = 0xF1;
1093 printBuffer((uint8_t*) httpBuffer,
"POST ROUTING httpBuffer", 3);
1096 lastPageBytes = (strlen(getStatus) + 25) % 126;
1124 printf(
"== NAL Test passed == \n");
1128 printf(
"===== TCP =====\n");
1137 ap_uint<32> WF_ctrl = 0;
1139 getStatus =
"GET /status HTTP/1.1\r\nHost: localhost:8080\r\nUser-Agent: curl/7.47.0\r\nAccept: */*\r\n\r\n";
1140 strcpy(&httpBuffer[0],getStatus);
1169 getStatus =
"POST /configure HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nffff000000bb11220044ffffffffffffffffaa9955662000000021000000220000002300000024000000250000002600000027000000280abcd";
1171 printf(
"%s\n",getStatus);
1173 strcpy(&httpBuffer[0],getStatus);
1191 getStatus =
"e290000002000000021000000220000002300000000240000002500000026000002700123456789AB\r\n\r\n";
1194 printf(
"%s\n",getStatus);
1196 strcpy(&httpBuffer[0],getStatus);
1206 for(
int j = 0; j< 3; j++)
1217 WF_should = 0x38394142;
1218 printf(
"WF_should: %#010x\n", WF_should);
1239 getStatus =
"POST /routing HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n";
1241 printf(
"%s\n",getStatus);
1243 strcpy(&httpBuffer[0],getStatus);
1244 startTable = strlen(getStatus);
1252 httpBuffer[j] = routingTable[i];
1282 for(
int j = 0; j< 2; j++)
1296 getStatus =
"POST /routing HTTP/1.1\r\nUser-Agent: curl/7.47.0\r\nContent-Type: application/x-www-form-urlencoded\r\nbla\r\n\r\n";
1298 printf(
"%s\n",getStatus);
1300 strcpy(&httpBuffer[0],getStatus);
1301 startTable = strlen(getStatus);
1305 int j = startTable + 3;
1309 httpBuffer[j] = routingTable[i];
1334 printf(
"Check stream:\n0x312e312f50545448\n0x706e552032323420\n0x6261737365636f72\n0x7469746e4520656c\n0x65686361430a0d79\n");
1361 getStatus =
"POST /configure HTTP/1.1\r\nUser-Agent: curl/7.47.01\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nffff000000bb11220044ffffffffffffffffaa9955662000000021000000220000002300000024000000250000002600000027000000280abcd";
1363 strcpy((
char*) &
HWICAP_seq_IN[hwicap_in_address],
"ffff000000bb11220044ffffffffffffffffaa9955662000000021000000220000002300000024000000250000002600000027000000280abcd");
1364 hwicap_in_address += strlen(
"ffff000000bb11220044ffffffffffffffffaa9955662000000021000000220000002300000024000000250000002600000027000000280abcd");
1366 printf(
"%s\n",getStatus);
1367 printf(
"\t....with large payload\n\n");
1369 strcpy(&httpBuffer[0],getStatus);
1371 int message_size = strlen(getStatus);
1389 getStatus =
"e2900000020000000210000002200000023000000002400000025000000260002700123456789AB";
1394 strcpy(&httpBuffer[0],getStatus);
1395 strcpy((
char*) &
HWICAP_seq_IN[hwicap_in_address],getStatus);
1396 hwicap_in_address += strlen(getStatus);
1398 message_size += strlen(getStatus);
1403 for(
int j = 0; j< 3; j++)
1412 WF_should = 0x36373839;
1413 printf(
"WF_should: %#010x\n", WF_should);
1420 bool overflow_happened =
false;
1426 getStatus =
"abcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789AB";
1429 strcpy((
char*) &
HWICAP_seq_IN[hwicap_in_address],getStatus);
1430 hwicap_in_address += strlen(getStatus);
1432 strcpy(&httpBuffer[0],getStatus);
1434 message_size += strlen(getStatus);
1441 WF_should = 0x36373839;
1447 overflow_happened =
true;
1459 getStatus =
"abcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789AB";
1462 strcpy((
char*) &
HWICAP_seq_IN[hwicap_in_address],getStatus);
1463 hwicap_in_address += strlen(getStatus);
1465 strcpy(&httpBuffer[0],getStatus);
1467 message_size += strlen(getStatus);
1472 WF_should = 0x67683230;
1473 printf(
"WF_should: %#010x\n", WF_should);
1479 overflow_happened =
false;
1487 getStatus =
"abcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789AB";
1490 strcpy((
char*) &
HWICAP_seq_IN[hwicap_in_address],getStatus);
1491 hwicap_in_address += strlen(getStatus);
1493 strcpy(&httpBuffer[0],getStatus);
1495 message_size += strlen(getStatus);
1502 WF_should = 0x67683230;
1503 printf(
"WF_should: %#010x\n", WF_should);
1511 WF_should = 0x30303030;
1516 WF_should = 0x30303231;
1523 WF_should = 0x30303030;
1529 WF_should = 0x30303232;
1540 WF_should = 0x36373839;
1549 printf(
"----------- Random Test -----------\n");
1552 char stringBuffer[512];
1554 bool correction_done =
false;
1556 gettimeofday(&now, NULL);
1557 uint32_t random_seed = now.tv_sec + now.tv_usec;
1558 printf(
"\tSeed %d\n", random_seed);
1560 while(message_size < max_message_size)
1566 getStatus =
"abcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789ABabcdefgh20000000210000002200000023000000002400000025abcdef26ghijk2700123456789AB";
1569 strcpy(stringBuffer,getStatus);
1572 if(message_size > 1024 && message_size < (max_message_size - 1024) )
1574 uint16_t stop_byte = rand() % (strlen(getStatus) - 1);
1583 printf(
"cutting payload at %d\n", stop_byte);
1584 stringBuffer[stop_byte] =
'\0';
1585 }
else if( (message_size > (max_message_size - 1024)) && !correction_done)
1587 correction_done =
true;
1588 uint16_t stop_byte = 32 + ( 4 - (message_size % 4));
1589 printf(
"correcting payload with length %d\n", stop_byte);
1590 stringBuffer[stop_byte] =
'\0';
1593 strcpy((
char*) &
HWICAP_seq_IN[hwicap_in_address],stringBuffer);
1594 hwicap_in_address += strlen(stringBuffer);
1596 strcpy(&httpBuffer[0],stringBuffer);
1598 message_size += strlen(stringBuffer);
1603 uint8_t multiple_iterations = rand() % 8;
1604 for(
int k = 0; k < multiple_iterations; k++)
1606 printf(
"multiple FMC calls with no input %d.\n",multiple_iterations);
1622 getStatus =
"0012345678abcdefgh\r\n\r\n";
1625 strcpy((
char*) &
HWICAP_seq_IN[hwicap_in_address],
"0012345678abcdefgh");
1626 hwicap_in_address += strlen(getStatus);
1628 strcpy(&httpBuffer[0],getStatus);
1636 WF_should = 0x65666768;
1637 printf(
"WF_should: %#010x\n", WF_should);
1653 printf(
"Check stream:\n0x312e312f50545448\n0x0d4b4f2030303220\n");
1663 printf(
"== TCP Test passed == \n");
1667 return succeded? 0 : -1;
ap_uint< 64 > initStream(ap_uint< 4 > cnt, stream< NetworkWord > &tcp_data, int nr_words, bool with_pattern, bool inverse_upper, bool insert_tlast)
ap_uint< 1 > decoupActive
ap_uint< 32 > sim_fpga_time_seconds
#define LAST_PAGE_CNT_SHIFT
ap_uint< 1 > layer_7_enabled
ap_uint< 1 > disable_pyro_link
void copyBufferToXmem(char *buffer_int, ap_uint< 32 > xmem[(32 *16)])
ap_uint< 32 > sim_fpga_time_minutes
ap_uint< 32 > HWICAP_seq_OUT[((16 *4096+512)/4)]
#define ENABLE_TCP_MODE_SHIFT
ap_uint< 1 > disable_ctrl_link
#define XMEM_ANSWER_START
ap_uint< 8 > toe_sess_drop_cnt
bool checkSeqHwicap(uint32_t *true_buffer, ap_uint< 32 > *out_buffer, uint32_t start_address, uint32_t end_address, bool not_to_swap)
#define PYRO_READ_REQUEST_SHIFT
stream< Axis< 8 > > FMC_Debug_Pyrolink("FMC_Debug_Pyrolink")
stream< TcpWord > sFMC_NAL_Tcp_data("sFMC_Nal_Tcp_data")
uint8_t HWICAP_seq_IN[((16 *4096+512)/4) *4]
void drainStream(stream< NetworkWord > &tcp_data)
ap_uint< 32 > MMIO_out_BE
void initBuffer(ap_uint< 4 > cnt, ap_uint< 32 > xmem[(32 *16)], bool lastPage, bool withPattern)
ap_uint< 8 > toe_meta_drop_cnt
#define CHECK_PATTERN_SHIFT
ap_uint< 8 > toe_notif_drop_cnt
ap_uint< 32 > xmem[(32 *16)]
ap_uint< 16 > uoe_drop_cnt
ap_uint< 1 > layer_4_enabled
void fmc(ap_uint< 32 > *MMIO_in, ap_uint< 32 > *MMIO_out, ap_uint< 1 > *layer_4_enabled, ap_uint< 1 > *layer_6_enabled, ap_uint< 1 > *layer_7_enabled, ap_uint< 1 > *nts_ready, ap_uint< 32 > *in_time_seconds, ap_uint< 32 > *in_time_minutes, ap_uint< 32 > *in_time_hours, ap_uint< 16 > *role_mmio_in, ap_uint< 16 > *uoe_drop_cnt_in, ap_uint< 8 > *toe_notif_drop_cnt_in, ap_uint< 8 > *toe_meta_drop_cnt_in, ap_uint< 8 > *toe_data_drop_cnt_in, ap_uint< 8 > *toe_crc_drop_cnt_in, ap_uint< 8 > *toe_sess_drop_cnt_in, ap_uint< 8 > *toe_ooo_drop_cnt_in, ap_uint< 32 > *HWICAP, ap_uint< 1 > decoupStatus, ap_uint< 1 > *setDecoup, ap_uint< 1 > *setSoftReset, ap_uint< 32 > xmem[(32 *16)], ap_uint< 32 > nalCtrl[(0x3ff/4)], ap_uint< 1 > *disable_ctrl_link, stream< TcpWord > &siNAL_Tcp_data, stream< AppMeta > &siNAL_Tcp_SessId, stream< TcpWord > &soNAL_Tcp_data, stream< AppMeta > &soNAL_Tcp_SessId, ap_uint< 32 > *role_rank, ap_uint< 32 > *cluster_size)
ap_uint< 8 > toe_data_drop_cnt
uint32_t sequential_hwicap_address
ap_uint< 1 > layer_6_enabled
ap_uint< 8 > toe_ooo_drop_cnt
stream< AppMeta > sNAL_FMC_Tcp_sessId("sNAL_FMC_Tcp_sessId")
ap_uint< 32 > clusterSize_out
stream< TcpWord > sNAL_FMC_Tcp_data("sNAL_FMC_Tcp_data")
bool checkResult(ap_uint< 32 > MMIO, ap_uint< 32 > expected)
stream< AppMeta > sFMC_NAL_Tcp_sessId("sFMC_Nal_Tcp_sessId")
ap_uint< 1 > decoupStatus
void printBuffer32(ap_uint< 32 > buffer_int[(32 *16)], char *msg, int max_pages)
ap_uint< 8 > toe_crc_drop_cnt
stream< Axis< 8 > > Debug_FMC_Pyrolink("Debug_FMC_Pyrolink")
void stepDut()
Run a single iteration of the DUT model.
uint32_t bufferInPtrNextRead
ap_uint< 32 > HWICAP[512]
void printBuffer(volatile uint8_t *buffer_int, char *msg, int max_pages)
ap_uint< 32 > reverse_byte_order(ap_uint< 32 > input)
#define HWICAP_SEQ_START_ADDRESS
void copyBufferToStream(char *buffer_int, stream< NetworkWord > &tcp_data, int content_len)
ap_uint< 32 > sim_fpga_time_hours
ap_uint< 32 > nodeRank_out
ap_uint< 32 > nalCtrl[(0x3ff/4)]
bool use_sequential_hwicap
#define NAL_CTRL_LINK_SIZE
#define NAL_CTRL_LINK_MRT_START_ADDR
void setTLast(ap_uint< 1 > new_last)