cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
memtest_library.hpp
Go to the documentation of this file.
1 
43 #ifndef _ROLE_MEMTEST_LIBRARY_HPP_
44 #define _ROLE_MEMTEST_LIBRARY_HPP_
45 
46 #include <stdio.h>
47 #include <iostream>
48 #include <hls_stream.h>
49 #include "ap_int.h"
50 #include <stdint.h>
51 #include "../../../../../HOST/custom/memtest/languages/cplusplus/include/config.h"//debug level define
52 
53 #include "network.hpp"
54 
55 using namespace hls;
56 
60 
61 
72  ap_uint<32> *pi_rank,
73  ap_uint<32> *pi_size,
74  stream<NodeId> &sDstNode_sig,
75  ap_uint<32> *po_rx_ports
76  )
77 {
78  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
79 #pragma HLS INLINE off
80  //-- STATIC VARIABLES (with RESET) ------------------------------------------
81  static PortFsmType port_fsm = FSM_WRITE_NEW_DATA;
82 #pragma HLS reset variable=port_fsm
83 
84  switch(port_fsm)
85  {
86  default:
87  case FSM_WRITE_NEW_DATA:
88  //Triangle app needs to be reset to process new rank
89  if(!sDstNode_sig.full())
90  {
91  NodeId dst_rank = (*pi_rank + 1) % *pi_size;
92  #if DEBUG_LEVEL == TRACE_ALL
93  printf("rank: %d; size: %d; \n", (int) *pi_rank, (int) *pi_size);
94  #endif
95  sDstNode_sig.write(dst_rank);
96  *po_rx_ports = 0x0; //init the value
97  port_fsm = FSM_DONE;
98  }
99  break;
100  case FSM_DONE:
101  *po_rx_ports = 0x1; //currently work only with default ports...
102  break;
103  }
104 
105 }
106 
107 
108 
121 void pRXPath(
122  stream<NetworkWord> &siSHL_This_Data,
123  stream<NetworkMetaStream> &siNrc_meta,
124  stream<NetworkMetaStream> &sRxtoProc_Meta,
125  stream<NetworkWord> &sRxpToProcp_Data,
126  NetworkMetaStream meta_tmp,
127  bool * start_stop,
128  unsigned int *processed_word_rx,
129  unsigned int *processed_bytes_rx
130  )
131 {
132  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
133  #pragma HLS INLINE off
134  //-- LOCAL VARIABLES ------------------------------------------------------
135 
136 
138 #pragma HLS reset variable=enqueueFSM
139 
140 
141  NetworkWord netWord;
142  ap_uint<16> max_iterations;
143  static bool start_stop_local = false;
144  static bool prev_was_start = false;
145 #pragma HLS reset variable=start_stop_local
146 
147  *start_stop = start_stop_local;
148  switch(enqueueFSM)
149  {
150  case WAIT_FOR_META:
151  #if DEBUG_LEVEL == TRACE_ALL
152  printf("DEBUG in pRXPath: enqueueFSM - WAIT_FOR_META, *processed_word_rx=%u, *processed_bytes_rx=%u\n",
153  *processed_word_rx, *processed_bytes_rx);
154  #endif
155  if ( !siNrc_meta.empty() && !sRxtoProc_Meta.full() )
156  {
157  meta_tmp = siNrc_meta.read();//not sure if I have to continue to test or not, hence sending the meta or not is different
158  meta_tmp.tlast = 1; //just to be sure...
159  sRxtoProc_Meta.write(meta_tmp); //valid destination
161  }
162  break;
163 
164  case PROCESSING_PACKET:
165  #if DEBUG_LEVEL == TRACE_ALL
166  printf("DEBUG in pRXPath: enqueueFSM - PROCESSING_PACKET, *processed_word_rx=%u, *processed_bytes_rx=%u\n",
167  *processed_word_rx, *processed_bytes_rx);
168  #endif
169 
170  if ( !siSHL_This_Data.empty() && !sRxpToProcp_Data.full() )
171  {
172  //-- Read incoming data chunk
173  netWord = siSHL_This_Data.read();
174 
175  switch(netWord.tdata.range(MEMTEST_COMMANDS_HIGH_BIT,MEMTEST_COMMANDS_LOW_BIT))//the command is in the first two bits
176  {
177  case(TEST_START_CMD):
178  start_stop_local=true;
179  *start_stop=true;
180  sRxpToProcp_Data.write(netWord);
181  prev_was_start=true;
182  #if DEBUG_LEVEL == TRACE_ALL
183  printf("Hallo, I received a start command :D\n");
184  #endif
185  break;
186  case(TEST_STOP_CMD):
187  start_stop_local=false;
188  *start_stop=false;
189  netWord.tdata=TEST_STOP_CMD;
190  netWord.tlast = 1;
191  sRxpToProcp_Data.write(netWord);
192  prev_was_start=false;
193  #if DEBUG_LEVEL == TRACE_ALL
194  printf("Hallo, I received a stop command D:\n");
195  #endif
196  break;
197 
198  case(TEST_BURSTSIZE_CMD):
199  #if DEBUG_LEVEL == TRACE_ALL
200  printf("Hallo, I received a burst size command :), and prev_was_start=%u\n",prev_was_start);
201  #endif
202  if (prev_was_start)
203  {
204  sRxpToProcp_Data.write(netWord);
205 
206  }else{
207  netWord.tdata=TEST_INVLD_CMD;
208  sRxpToProcp_Data.write(netWord);
209  }
210  prev_was_start=false;
211  break;
212  default:
213  if (start_stop_local)
214  {
215  //some data manipulation here
216  // everything is running and should no sending anything back
217  } else {
218  netWord.tdata=TEST_INVLD_CMD;
219  prev_was_start=false;
220  sRxpToProcp_Data.write(netWord);
221  }
222  break;
223 
224  }
225  //no need to forwarding every packet to the processing, hence commenting out
226  //sRxpToProcp_Data.write(netWord);
227  if(netWord.tlast == 1)
228  {
230  }
231  }
232  break;
233  }
234 
235 
236 }
237 
238 
239 
251 void pTXPath(
252  stream<NetworkWord> &soTHIS_Shl_Data,
253  stream<NetworkMetaStream> &soNrc_meta,
254  stream<NetworkWord> &sProcpToTxp_Data,
255  stream<NetworkMetaStream> &sRxtoTx_Meta,
256  stream<NodeId> &sDstNode_sig,
257  unsigned int *processed_word_tx,
258  ap_uint<32> *pi_rank
259 )
260 {
261  //-- DIRECTIVES FOR THIS PROCESS ------------------------------------------
262  //#pragma HLS DATAFLOW interval=1
263  #pragma HLS INLINE off
264  //-- LOCAL VARIABLES ------------------------------------------------------
265  NetworkWord netWordTx;
266  NetworkMeta meta_in = NetworkMeta();
267  static NodeId dst_rank;
269  #pragma HLS reset variable=dequeueFSM
270 
271  switch(dequeueFSM)
272  {
273  case WAIT_FOR_META:
274  if(!sDstNode_sig.empty())
275  {
276  dst_rank = sDstNode_sig.read();
278  //Triangle app needs to be reset to process new rank
279  }
280  break;
282  #if DEBUG_LEVEL == TRACE_ALL
283  printf("DEBUG in pTXPath: dequeueFSM=%d - WAIT_FOR_STREAM_PAIR, *processed_word_tx=%u\n",
284  dequeueFSM, *processed_word_tx);
285  #endif
286  //-- Forward incoming chunk to SHELL
287  *processed_word_tx = 0;
288 
289  if (( !sProcpToTxp_Data.empty() && !sRxtoTx_Meta.empty()
290  && !soTHIS_Shl_Data.full() && !soNrc_meta.full() ))
291  {
292  netWordTx = sProcpToTxp_Data.read();
293 
294  // in case MTU=8 ensure tlast is set in WAIT_FOR_STREAM_PAIR and don't visit PROCESSING_PACKET
295  if (PACK_SIZE == 8)
296  {
297  netWordTx.tlast = 1;
298  }
299  soTHIS_Shl_Data.write(netWordTx);
300 
301  meta_in = sRxtoTx_Meta.read().tdata;
302  NetworkMetaStream meta_out_stream = NetworkMetaStream();
303  meta_out_stream.tlast = 1;
304  meta_out_stream.tkeep = 0xFF; //just to be sure
305 
306  meta_out_stream.tdata.dst_rank = dst_rank;
307  meta_out_stream.tdata.src_rank = (NodeId) *pi_rank;
308  meta_out_stream.tdata.dst_port = meta_in.src_port;
309  meta_out_stream.tdata.src_port = meta_in.dst_port;
310 
311  soNrc_meta.write(meta_out_stream);
312 
313  (*processed_word_tx)++;
314 
315  if(netWordTx.tlast != 1)
316  {
318  }
319  }
320  break;
321 
322  case PROCESSING_PACKET:
323  #if DEBUG_LEVEL == TRACE_ALL
324  printf("DEBUG in pTXPath: dequeueFSM=%d - PROCESSING_PACKET, *processed_word_tx=%u\n",
325  dequeueFSM, *processed_word_tx);
326  #endif
327  if( !sProcpToTxp_Data.empty() && !soTHIS_Shl_Data.full())
328  {
329  netWordTx = sProcpToTxp_Data.read();
330 
331  // This is a normal termination of the axi stream from vitis functions
332  if(netWordTx.tlast == 1)
333  {
335  }
336 
337  // This is our own termination based on the custom MTU we have set in PACK_SIZE.
338  // TODO: We can map PACK_SIZE to a dynamically assigned value either through MMIO or header
339  // in order to have a functional bitstream for any MTU size
340  (*processed_word_tx)++;
341  if (((*processed_word_tx)*8) % PACK_SIZE == 0)
342  {
343  netWordTx.tlast = 1;
345  }
346 
347  soTHIS_Shl_Data.write(netWordTx);
348  }
349  break;
350  }
351 }
352 
356 
360 
361 
372 template<typename Tin, typename Tout, unsigned int arraysize>
373 void pMyMemtestMemCpy(Tin* in, Tout* out){
374 #pragma HLS INLINE
375  for (unsigned int i = 0; i < arraysize; i++)
376  {
377 #pragma HLS PIPELINE II=1
378  *out = *in;
379  }
380 
381 }
382 
383 
397 template<typename Tin, typename Tout, const unsigned int arraysize>
398 void pMemCpyCircularBuff(Tin* buff, Tout* out_mem, unsigned int elems,unsigned int offset_buff){
399 #pragma HLS INLINE
400  unsigned int j = 0;
401  circ_buff_loop: for (unsigned int i = 0; i < elems; i++)
402  {
403 #pragma HLS PIPELINE II=1
404 #pragma HLS LOOP_TRIPCOUNT min = 1 max = arraysize
405  if(offset_buff+j==arraysize)//
406  {
407  offset_buff=0;
408  j=1;
409  out_mem[i] = buff[0];
410  }else{
411  out_mem[i] = buff[offset_buff+j];
412  j++;
413  }
414  }
415 
416 }
417 
418 
419 
431 template<typename Tin, typename Tout, const unsigned int burstsize>
432 void pReadAxiMemMapped2HlsStream(Tin* main_mem, hls::stream<Tout> &sOut, unsigned int elems){
433 #pragma HLS INLINE
434  mmloop: for (unsigned int i = 0; i < elems; i++)
435  {
436 #pragma HLS PIPELINE II=1
437 #pragma HLS LOOP_TRIPCOUNT min = 1 max = burstsize
438  Tout tmp = main_mem[i];
439  sOut.write(tmp);
440  }
441 
442 }
443 
444 
460 template<typename Tin, typename Tout, const unsigned int burstsize, typename Tcntr>
461 void pReadAxiMemMapped2HlsStreamCountFirst(Tin* main_mem, hls::stream<Tout> &sOut, unsigned int elems, hls::stream<Tcntr>& cmd){
462 #pragma HLS INLINE
463 cmd.write(0);
464  mmloop: for (unsigned int i = 0; i < elems; i++)
465  {
466 #pragma HLS PIPELINE II=1
467 #pragma HLS LOOP_TRIPCOUNT min = 1 max = burstsize
468  Tout tmp = main_mem[i];
469  sOut.write(tmp);
470  }
471  cmd.write(1);
472 
473 }
474 
475 
490 template<typename Tin, typename Tout, const unsigned int burstsize, typename Tcntr>
491 void pReadAxiMemMapped2HlsStreamCountActivated(Tin* main_mem, hls::stream<Tout> &sOut, unsigned int elems, hls::stream<Tcntr>& cmd){
492 #pragma HLS INLINE
493  cmd.write(1);
494  mmloop: for (unsigned int i = 0; i < elems; i++)
495  {
496 #pragma HLS PIPELINE II=1
497 #pragma HLS LOOP_TRIPCOUNT min = 1 max = burstsize
498  Tout tmp = main_mem[i];
499  sOut.write(tmp);
500  }
501  cmd.write(1);
502 }
503 
504 
519 template<typename Tin, typename Tout, const unsigned int burstsize, typename Tcntr>
520 void pReadAxiMemMapped2HlsStreamCountExtern(Tin* main_mem, hls::stream<Tout> &sOut, unsigned int elems, hls::stream<Tcntr>& cmd, bool activated){
521 #pragma HLS INLINE
522  cmd.write(activated);
523  mmloop: for (unsigned int i = 0; i < elems; i++)
524  {
525 #pragma HLS PIPELINE II=1
526 #pragma HLS LOOP_TRIPCOUNT min = 1 max = burstsize
527  Tout tmp = main_mem[i];
528  sOut.write(tmp);
529  }
530  cmd.write(1);
531 }
535 
539 
540 const unsigned long int max_counter_cc = 4000000;
541 
542 //Original function from Xilinx Vitis Accel examples, template from DCO
543 // @DEPRECATED
544 //https://github.com/Xilinx/Vitis_Accel_Examples/blob/master/cpp_kernels/axi_burst_performance/src/test_kernel_common.hpp
545 template<typename Tin, typename Tout, unsigned int counter_precision=64>
546 void perfCounterProc(hls::stream<Tin>& cmd, hls::stream<Tout>& out, int direction, int burst_length, int nmbr_outstanding)
547 {
548 #pragma HLS INLINE off
549 
550  Tin input_cmd;
551  // wait to receive a value to start counting
552  ap_uint<counter_precision> cnt = cmd.read();
553 // keep counting until a value is available
554 count:
555  while (cmd.read_nb(input_cmd) == false) {
556  cnt++;
557  #if DEBUG_LEVEL == TRACE_ALL
558 #ifndef __SYNTHESIS__
559  printf("DEBUG perfCounterProc counter value = %s\n", cnt.to_string().c_str());
560 #endif //__SYNTHESIS__
561 #endif
562  }
563 
564  // // write out kernel statistics to global memory
565  Tout tmp[1];//was 4
566  tmp[0] = cnt;
567  // tmp[1] = input_cmd;
568  //tmp[1] = burst_length;
569  // tmp[3] = nmbr_outstanding;
570  //memcpy(out, tmp, 4 * sizeof(Tout));
571  out.write(tmp[0]);
572  //out.write(tmp[1]);
573  //out.write(nmbr_outstanding); this
574  //out.write(input_cmd); Xilinx use this to count the errors but we are already counting so...
575 }
576 
577 //Original function from Xilinx Vitis Accel examples, template from DCO
578 // @DEPRECATED
579 //https://github.com/Xilinx/Vitis_Accel_Examples/blob/master/cpp_kernels/axi_burst_performance/src/test_kernel_common.hpp
580 template<typename Tin, typename Tout, unsigned int counter_precision=64>
581 void perfCounterProc2Mem(hls::stream<Tin>& cmd, Tout * out, int direction, int burst_length, int nmbr_outstanding) {
582 
583  Tin input_cmd;
584  // wait to receive a value to start counting
585  ap_uint<counter_precision> cnt = cmd.read();
586 // keep counting until a value is available
587 count:
588  while (cmd.read_nb(input_cmd) == false) {
589 #pragma HLS LOOP_TRIPCOUNT min = 1 max = max_counter_cc
590  cnt++;
591 
592 #if DEBUG_LEVEL == TRACE_ALL
593 #ifndef __SYNTHESIS__
594  printf("DEBUG perfCounterProc counter value = %s\n", cnt.to_string().c_str());
595 #endif //__SYNTHESIS__
596 #endif
597  }
598  *out =cnt;
599 }
600 
601 
602 
614 template<typename Tin, typename Tout, unsigned int counter_precision=64>
615 void perfCounterProc2MemCountOnly(hls::stream<Tin>& cmd, Tout * out) {
616 
617  Tin input_cmd;
618  // wait to receive a value to start counting
619  ap_uint<counter_precision> cnt = cmd.read();
620 // keep counting until a value is available
621 count:
622  while (cmd.read_nb(input_cmd) == false) {
623 #pragma HLS LOOP_TRIPCOUNT min = 1 max = max_counter_cc
624  cnt++;
625 
626 #if DEBUG_LEVEL == TRACE_ALL
627 #ifndef __SYNTHESIS__
628  printf("DEBUG perfCounterProc counter value = %s\n", cnt.to_string().c_str());
629 #endif //__SYNTHESIS__
630 #endif
631  }
632  *out =cnt;
633 }
634 
635 
636 
650 template<typename Tin, typename Tout, unsigned int counter_precision=64>
651 void perfCounterProc2MemCountIncremental(hls::stream<Tin>& cmd, Tout * out) {
652 
653  Tin input_cmd;
654  // wait to receive a value to start counting
655  ap_uint<counter_precision> cnt = cmd.read();
656 // keep counting until a value is available
657 count:
658  while (cmd.read_nb(input_cmd) == false) {
659 #pragma HLS LOOP_TRIPCOUNT min = 1 max = max_counter_cc
660  cnt++;
661 #if DEBUG_LEVEL == TRACE_ALL
662 #ifndef __SYNTHESIS__
663  printf("DEBUG perfCounterProc counter value = %s\n", cnt.to_string().c_str());
664 #endif //__SYNTHESIS__
665 #endif
666  }
667  *out +=cnt;
668 }
669 
670 
682 template<typename Tin, typename Tout, unsigned int counter_precision=64>
683 void perfCounterMultipleCounts(hls::stream<Tin>& cmd, Tout * out) {
684  #pragma HLS interface ap_ctrl_none port=return
685  Tin input_cmd=1;
686 
687  // wait to receive a value to start counting
688  ap_uint<counter_precision> cnt = cmd.read();
689  reset:
690  while (input_cmd != 0)//a zero will stop the counter
691  {
692 #pragma HLS LOOP_TRIPCOUNT min = 1 max = max_counter_cc
693 #if DEBUG_LEVEL == TRACE_ALL
694  #ifndef __SYNTHESIS__
695  //printf("DEBUG begin to count :D input_cmd value = %s\n", input_cmd.to_string().c_str());
696 #endif //__SYNTHESIS__
697 #endif
698 // keep counting until a value is available
699 count:
700  while (cmd.read_nb(input_cmd) == false) {
701 #pragma HLS LOOP_TRIPCOUNT min = 1 max = max_counter_cc
702 #pragma HLS PIPELINE II=1
703  cnt++;
704 #if DEBUG_LEVEL == TRACE_ALL
705  #ifndef __SYNTHESIS__
706  // printf("DEBUG perfCounterProc counter value = %s\n", cnt.to_string().c_str());
707 #endif //__SYNTHESIS__
708 #endif
709  }
710  input_cmd=cmd.read();
711  }
712  *out +=cnt;
713 }
714 
715 
729 template<typename Tevent=bool, const unsigned int counter_width=32, const unsigned int maximum_counter_value_before_reset=4000000>
731 hls::stream<Tevent> &sOfEnableCCIncrement,
732 hls::stream<Tevent> &sOfResetCounter,
733 hls::stream<Tevent> &sOfGetTheCounter,
734 hls::stream<ap_uint<counter_width> > &oSClockCounter)
735 {
736 
737  static ap_uint<counter_width> internal_counter = 0;
738  static bool pop_the_counter = false;
739 #pragma HLS reset variable=internal_counter
740 #pragma HLS reset variable=pop_the_counter
741 //giving priority to the pop
742  if(!sOfGetTheCounter.empty()){
743  pop_the_counter = sOfGetTheCounter.read();
744  }
745  if (pop_the_counter && !oSClockCounter.full())
746  {
747  oSClockCounter.write(internal_counter);
748  pop_the_counter=false;
749  }
750  if(!sOfResetCounter.empty()){
751  bool reset_or_not = sOfResetCounter.read();
752  if (reset_or_not)
753  {
754  internal_counter = 0;
755  }
756  }
757  if(!sOfEnableCCIncrement.empty()){
758  bool increment = sOfEnableCCIncrement.read();
759  if (increment)
760  {
761  if(internal_counter==maximum_counter_value_before_reset){
762  internal_counter=1;
763  }else{
764  internal_counter++;
765  }
766 #if DEBUG_LEVEL == TRACE_ALL
767 #ifndef __SYNTHESIS__
768  printf("DEBUG pCountClockCycles counter value = %s\n", internal_counter.to_string().c_str());
769 #endif //__SYNTHESIS__
770 #endif
771  }
772  }
773 }
777 
778 #endif //_ROLE_MEMTEST_LIBRARY_HPP_
void pPortAndDestionation(ap_uint< 32 > *pi_rank, ap_uint< 32 > *pi_size, stream< NodeId > &sDstNode_sig, ap_uint< 32 > *po_rx_ports)
pPortAndDestionation - Setup the port and the destination rank.
const unsigned long int max_counter_cc
#define FSM_WRITE_NEW_DATA
Definition: memtest.hpp:78
void pCountClockCycles(hls::stream< Tevent > &sOfEnableCCIncrement, hls::stream< Tevent > &sOfResetCounter, hls::stream< Tevent > &sOfGetTheCounter, hls::stream< ap_uint< counter_width > > &oSClockCounter)
Count Clock Cycles between two events first sketch TODO: make it working without counting with the st...
void pRXPath(stream< NetworkWord > &siSHL_This_Data, stream< NetworkMetaStream > &siNrc_meta, stream< NetworkMetaStream > &sRxtoProc_Meta, stream< NetworkWord > &sRxpToProcp_Data, NetworkMetaStream meta_tmp, bool *start_stop, unsigned int *processed_word_rx, unsigned int *processed_bytes_rx)
Receive Path - From SHELL to THIS.
#define MEMTEST_COMMANDS_HIGH_BIT
Definition: memtest.hpp:67
#define FSM_DONE
Definition: memtest.hpp:79
#define PacketFsmType
Definition: memtest.hpp:76
#define PortFsmType
Definition: memtest.hpp:80
void perfCounterProc2MemCountIncremental(hls::stream< Tin > &cmd, Tout *out)
Count Clock Cycles between two events, the first event init the counter the second stop the count and...
void perfCounterMultipleCounts(hls::stream< Tin > &cmd, Tout *out)
Count Clock Cycles between two events, the first event init the counter the second stop the count,...
void pTXPath(stream< NetworkWord > &soTHIS_Shl_Data, stream< NetworkMetaStream > &soNrc_meta, stream< NetworkWord > &sProcpToTxp_Data, stream< NetworkMetaStream > &sRxtoTx_Meta, stream< NodeId > &sDstNode_sig, unsigned int *processed_word_tx, ap_uint< 32 > *pi_rank)
Transmit Path - From THIS to SHELL.
#define PROCESSING_PACKET
Definition: memtest.hpp:73
void perfCounterProc2Mem(hls::stream< Tin > &cmd, Tout *out, int direction, int burst_length, int nmbr_outstanding)
#define WAIT_FOR_STREAM_PAIR
Definition: memtest.hpp:72
void pReadAxiMemMapped2HlsStreamCountFirst(Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems, hls::stream< Tcntr > &cmd)
Copy a run-time variable amount of data to an hls stream with a given max it assumes also the initial...
void perfCounterProc2MemCountOnly(hls::stream< Tin > &cmd, Tout *out)
Count Clock Cycles between two events, the first event init the counter the second stop the count.
void pReadAxiMemMapped2HlsStream(Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems)
Copy a run-time variable amount of data to an hls stream with a given max.
void perfCounterProc(hls::stream< Tin > &cmd, hls::stream< Tout > &out, int direction, int burst_length, int nmbr_outstanding)
#define WAIT_FOR_META
Definition: memtest.hpp:71
void pMyMemtestMemCpy(Tin *in, Tout *out)
Copy a fixed compile time amount of data to another array.
void pReadAxiMemMapped2HlsStreamCountActivated(Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems, hls::stream< Tcntr > &cmd)
Copy a run-time variable amount of data to an hls stream with a given max it assumes "perfCounterMult...
void pMemCpyCircularBuff(Tin *buff, Tout *out_mem, unsigned int elems, unsigned int offset_buff)
Copy a run-time variable amount of data to another array employing the src as circular buffer i....
void pReadAxiMemMapped2HlsStreamCountExtern(Tin *main_mem, hls::stream< Tout > &sOut, unsigned int elems, hls::stream< Tcntr > &cmd, bool activated)
Copy a run-time variable amount of data to an hls stream with a given max it assumes "perfCounterMult...
#define MEMTEST_COMMANDS_LOW_BIT
Definition: memtest.hpp:68
#define PACK_SIZE
Definition: config.h:51
uint8_t enqueueFSM
Definition: uppercase.cpp:54
uint8_t dequeueFSM
Definition: uppercase.cpp:55
@ TEST_START_CMD
Definition: memtest.hpp:62
@ TEST_STOP_CMD
Definition: memtest.hpp:61
@ TEST_BURSTSIZE_CMD
Definition: memtest.hpp:59
@ TEST_INVLD_CMD
Definition: memtest.hpp:63
out
Definition: test.py:12
ap_uint< 8 > NodeId
Definition: network.hpp:82
ap_uint< 1 > tlast
Definition: network.hpp:111
ap_uint< 8 > tkeep
Definition: network.hpp:110
NetworkMeta tdata
Definition: network.hpp:109
NodeId dst_rank
Definition: network.hpp:95
NodeId src_rank
Definition: network.hpp:97
NrcPort src_port
Definition: network.hpp:98
NrcPort dst_port
Definition: network.hpp:96
ap_uint< 64 > tdata
Definition: network.hpp:49
ap_uint< 1 > tlast
Definition: network.hpp:51