cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
common.hpp
Go to the documentation of this file.
1 
17 
33 #include <stdio.h>
34 #include <iostream> // For cout and cerr
35 #include <cstdlib> // For atoi()
36 #include <assert.h> // For assert()
37 #include <string> // For to_string
38 #include <string.h>
39 #include <sstream>
40 #include <cstdio>
41 #include <memory>
42 #include <stdexcept>
43 #include <array>
44 #include <sys/stat.h>
45 #include <stdlib.h>
46 //#include "../include/config.h"
47 #include "config.h"
48 #include<algorithm>
49 #include <fstream>
50 #include <bitset>
51 #include <vector>
52 #include <cmath>
53 #include <chrono>
54 #include <ctime>
55 
56 using namespace std;
57 #define MAX_TESTABLE_ADDRESS 8000000000//((int)(512/8 * 125000000)) //byte addressable!!!
58 #define MAX_TEST_REPETITION_BITWIDTH 16
59 #define MAX_BURST_SIZE 4096
60 
61 
62 //------------------------------------------------------
63 //-- TESTBENCH DEFINES
64 //------------------------------------------------------
65 #define OK true
66 #define KO false
67 
68 
69 void print_cFpMemtest(void)
70 {
71  // http://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=cFp_Memtest
72  cout << " " << endl;
73  cout << "...build with: " << endl;
74  cout << " ██████╗███████╗██████╗ ███╗ ███╗███████╗███╗ ███╗████████╗███████╗███████╗████████╗" << endl;
75  cout << "██╔════╝██╔════╝██╔══██╗ ████╗ ████║██╔════╝████╗ ████║╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝" << endl;
76  cout << "██║ █████╗ ██████╔╝ ██╔████╔██║█████╗ ██╔████╔██║ ██║ █████╗ ███████╗ ██║ " << endl;
77  cout << "██║ ██╔══╝ ██╔═══╝ ██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║ ██║ ██╔══╝ ╚════██║ ██║ " << endl;
78  cout << "╚██████╗██║ ██║███████╗██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║ ██║ ███████╗███████║ ██║ " << endl;
79  cout << " ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝ " << endl;
80  cout << "A cloudFPGA project from IBM ZRL v0.1 --dco " << endl;
81  cout << " " << endl;
82 }
83 
84 
85 void delay(unsigned int mseconds)
86 {
87  clock_t goal = mseconds + clock();
88  while (goal > clock());
89 }
90 
91 
98 void printBits(size_t const size, void const * const ptr)
99 {
100  unsigned char *b = (unsigned char*) ptr;
101  unsigned char byte;
102  int i, j;
103 
104  for (i = size-1; i >= 0; i--) {
105  for (j = 7; j >= 0; j--) {
106  byte = (b[i] >> j) & 1;
107  printf("%u", byte);
108  }
109  }
110  puts("");
111 }
112 
113 
119 void ascii2hex(const string& in, string& out)
120 {
121  std::stringstream sstream;
122  for ( string::const_iterator item = in.begin(); item != in.end(); item++){
123  sstream << std::hex << int(*item);
124  }
125  out=sstream.str();
126 }
127 
128 
136 template<unsigned int bytes_per_line = 8>
137 string createMemTestCommands(unsigned long long int mem_address, unsigned int testingNumber, unsigned int burst_size)
138 {
139  string out;
140  char start_cmd [bytes_per_line];
141  char stop_cmd [bytes_per_line];
142  char value_cmd[bytes_per_line];
143  char burst_cmd[bytes_per_line];
144  //WARNING: currently hardcoded way of start and stop commands with a 1 and 2 for start and stop respectively
145  for (unsigned int k = 0; k < bytes_per_line; k++) {
146  value_cmd[k] = (char)0;
147  if (k != 0) {
148  stop_cmd[k] = (char)0;
149  start_cmd[k] = (char)0;
150  burst_cmd[k] = (char)0;
151  }
152  else {
153  start_cmd[k] = (char)1;
154  stop_cmd[k] = (char)2;
155  burst_cmd[k] = (char)4;
156  }
157  }
158  memcpy(start_cmd+1, (char*)&testingNumber, 2);
159  out = out.append(start_cmd,3);
160  memcpy(value_cmd, (char*)&mem_address, 5);
161  out = out.append(value_cmd,5);
162  memcpy(burst_cmd+1,(char*)&burst_size,2);
163  out = out.append(burst_cmd,8);
164  return string(out);
165  }
166 
167 template<unsigned int bytes_per_line = 8>
169 {
170  string out;
171  char stop_cmd [bytes_per_line];
172  for (unsigned int k = 0; k < bytes_per_line; k++) {
173  if (k != 0) {
174  stop_cmd[k] = (char)0;
175  }
176  else {
177  stop_cmd[k] = (char)2;
178  }
179  }
180  out.append(stop_cmd,bytes_per_line);
181  return out;
182 }
183 static inline ssize_t
184 __file_size(const char *fname)
185 {
186  int rc;
187  struct stat s;
188 
189  rc = lstat(fname, &s);
190  if (rc != 0) {
191  fprintf(stderr, "err: Cannot find %s!\n", fname);
192  return rc;
193  }
194  return s.st_size;
195 }
196 
197 static inline ssize_t
198 __file_read(const char *fname, char *buff, size_t len)
199 {
200  int rc;
201  FILE *fp;
202 
203  if ((fname == NULL) || (buff == NULL) || (len == 0))
204  return -EINVAL;
205 
206  fp = fopen(fname, "r");
207  if (!fp) {
208  fprintf(stderr, "err: Cannot open file %s: %s\n",
209  fname, strerror(errno));
210  return -ENODEV;
211  }
212  rc = fread(buff, len, 1, fp);
213  if (rc == -1) {
214  fprintf(stderr, "err: Cannot read from %s: %s\n",
215  fname, strerror(errno));
216  fclose(fp);
217  return -EIO;
218  }
219  fclose(fp);
220  return rc;
221 }
222 
223 
229 // C++98 guarantees that '0', '1', ... '9' are consecutive.
230 // It only guarantees that 'a' ... 'f' and 'A' ... 'F' are
231 // in increasing order, but the only two alternative encodings
232 // of the basic source character set that are still used by
233 // anyone today (ASCII and EBCDIC) make them consecutive.
234 unsigned char hexval(unsigned char c)
235 {
236  if ('0' <= c && c <= '9')
237  return c - '0';
238  else if ('a' <= c && c <= 'f')
239  return c - 'a' + 10;
240  else if ('A' <= c && c <= 'F')
241  return c - 'A' + 10;
242  else abort();
243 }
244 
245 
251 void hex2ascii(const string& in, string& out)
252 {
253  out.clear();
254  out.reserve(in.length() / 2);
255  for (string::const_iterator p = in.begin(); p != in.end(); p++)
256  {
257  unsigned char c = hexval(*p);
258  p++;
259  if (p == in.end()) break; // incomplete last digit - should report error
260  c = (c << 4) + hexval(*p); // + takes precedence over <<
261  out.push_back(c);
262  }
263 }
264 
265 template<typename T>
266 void number2hexString(const T in, char * out, size_t byteSize)
267 {
268  std::sprintf(out,byteSize, "%x", (char*)&in);
269 }
270 
271 
278 template<unsigned int bytes_per_line = 8>
279 string dumpFileToStringRawDataString(const string inpFileName, int * rawdatalines, size_t outputSize) {
280  string strLine;
281  string tmp_Out;
282  ifstream inpFileStream;
283  string datFile = inpFileName;
284  string charOutput;
285  //charOutput.reserve(outputSize);
286  //strLine.reserve(outputSize);
287  //tmp_Out.reserve(bytes_per_line);
288  unsigned long long int mylongunsigned;
289  unsigned long long int zero_byte=0;
290  unsigned int i = 0;
291  char my_tmp_buf [bytes_per_line];
292  //-- STEP-1 : OPEN FILE
293  inpFileStream.open(datFile.c_str());
294 
295  if ( !inpFileStream ) {
296  cout << "### ERROR : Could not open the input data file " << datFile << endl;
297  return "";
298  }
299 
300  //-- STEP-2 : SET DATA STREAM
301  while (inpFileStream) {
302 
303  if (!inpFileStream.eof()) {
304 
305  getline(inpFileStream, strLine);
306  memcpy(my_tmp_buf,&zero_byte, bytes_per_line);
307  if (strLine.empty()) continue;
308  *rawdatalines+=1;
309  mylongunsigned=stoul(strLine,nullptr,16);
310  hex2ascii(strLine, tmp_Out);
311  // Write to strOutput
312  memcpy(my_tmp_buf,(char *)&mylongunsigned, sizeof(unsigned long long int));
313  charOutput.append(my_tmp_buf, bytes_per_line);
314  i++;
315  }
316  }
317  //-- STEP-3: CLOSE FILE
318  inpFileStream.close();
319  //tmp_Out.clear();
320 
321  return string(charOutput);
322 }
323 
324 
331 void ascii2hexWithSize(const string& in, string& out, size_t bytesize)
332 {
333  std::stringstream sstream;
334  for ( int i=0; i<bytesize; i++){
335  sstream << std::hex << int(in[i]);
336  }
337  out=sstream.str();
338 }
339 
340 bool findCharNullPos (char * str) {
341  unsigned int len = strlen(str);
342  bool f = false;
343  for(unsigned int i=0; i<=len; i++) {
344  if(str[i]=='\0') {
345  printf("DEBUG: null character position: %d\n",i+1);
346  f = true;
347  }
348  }
349  if(f == false) {
350  printf("DEBUG: null character not found\n");
351  }
352  return f;
353 }
354 
355 
356 
363 void printStringHex(const string inStr, size_t strSize){
364  #if DEBUG_LEVEL == TRACE_ALL
365  printf("Going to print a hex string :D\n");
366  #endif
367  for (size_t i = 0; i < strSize; i++)
368  {
369  printf("%x",inStr[i]);
370  }
371  printf("\n");
372 
373 }
374 
375 
382 void printCharBuffHex(const char * inStr, size_t strSize){
383  #if DEBUG_LEVEL == TRACE_ALL
384  printf("Going to prit a hex char buff :D\n");
385  #endif
386  for (size_t i = 0; i < strSize; i++)
387  {
388  printf("%x",inStr[i]);
389  }
390  printf("\n");
391 
392 }
393 
394 void printCharBuffHexSafe(const char * inStr, size_t strSize){
395  printf("Going to prit a hex char buff :D\n");
396  for (size_t i = 0; i < strSize; i++)
397  {
398  char tmp = inStr[i];
399  printf("%x",tmp);
400  }
401  printf("\n");
402 
403 }
404 
405 void string2hexnumerics(const string& in, char * out, size_t byteSize)
406 {
407  for (int i = 0; i < byteSize; i++)
408  {
409  std::sprintf(out+i, "%d", (int)in[i]);
410  }
411 }
412 
413 //Data structure of a memory test Result
415  unsigned long long int target_address;
416  unsigned int fault_cntr;
417  unsigned int first_fault_address;
418  unsigned long long int clock_cycles_read;
419  unsigned long long int clock_cycles_write;
420 
423  unsigned long long int target_address,
424  unsigned int fault_cntr,
425  unsigned int first_fault_address,
426  unsigned long long int clock_cycles_write,
427  unsigned long long int clock_cycles_read) :
428  target_address(target_address),
429  fault_cntr(fault_cntr),
430  first_fault_address(first_fault_address),
431  clock_cycles_write(clock_cycles_write),
432  clock_cycles_read(clock_cycles_read) {}
433 };
434 
435 
443 template<unsigned int bytes_per_line=8>
444 std::vector<MemoryTestResult> parseMemoryTestOutput(const string longbuf, size_t charOutputSize, int rawdatalines)
445 {
446  std::vector<MemoryTestResult> testResults_vector;
447 
448  int rawiterations = charOutputSize / 8; //should be equivalent to rawdatalines
449  unsigned int mem_word_size = 512;
450  unsigned int mem_word_byte_size = mem_word_size/8;
451  bool is_stop_present = rawdatalines % (3+1+1) == 0; //guard to check if multiple data of 3 64bytes or with
452 
453  int k = 1;
454  char myTmpOutBuff [bytes_per_line];
455  for (int i = 0; i < bytes_per_line; ++i)
456  {
457  myTmpOutBuff[i]=(char)0;
458  }
459  unsigned int testingNumber_out=0, fault_cntr_out=0, fault_addr_out=0;
460  unsigned long long int max_memory_addr_out=0, clock_cycles_read=0, clock_cycles_write=0;
461  for (int i = 1; i < rawdatalines+1; i++)
462  {
463  string tmp_outbuff;
464  tmp_outbuff= longbuf.substr((i-1)*bytes_per_line,bytes_per_line);
465  if(is_stop_present && k==7){
466  cout << "DEBUG the stop is present and is here" << endl;
467  } else if( ( (i == rawdatalines-1) || (i == rawdatalines) ) && k==6){ //check it is either the last or one before the last
468  //substr extraction and parsing
469  //strncpy(myTmpOutBuff,tmp_outbuff.c_str()+1,bytes_per_line-1);
470  //testingNumber_out = *reinterpret_cast<unsigned long long*>(myTmpOutBuff);
471  memcpy(&testingNumber_out,tmp_outbuff.c_str()+1,bytes_per_line/2);
472 
473  #if DEBUG_LEVEL == TRACE_ALL
474  cout << "DEBUG last command with the iterations " << testingNumber_out << endl;
475  #endif
476  }else if(k==5){
477  //strncpy(myTmpOutBuff,tmp_outbuff.c_str(),bytes_per_line);
478  //clock_cycles_read = *reinterpret_cast<unsigned long long int*>(myTmpOutBuff);
479  memcpy(&clock_cycles_read,tmp_outbuff.c_str(),bytes_per_line);
480 
481  #if DEBUG_LEVEL == TRACE_ALL
482  cout << "DEBUG clock_cycles_read (or the fourth half data pckt) " << clock_cycles_read << endl;
483  cout << "DEBUG clock_cycles_write (or the fourth half data pckt) " << clock_cycles_write << endl;
484  #endif
485  MemoryTestResult tmpResult(max_memory_addr_out,fault_cntr_out,fault_addr_out,clock_cycles_write,clock_cycles_read);
486  testResults_vector.push_back(tmpResult);
487  if(!( (i+1 == rawdatalines-1) || (i+1 == rawdatalines) )){
488  k=0;
489  #if DEBUG_LEVEL == TRACE_ALL
490  cout << "DEBUG reinit the counter" << endl;
491  #endif
492  }
493  unsigned int written_words = max_memory_addr_out%mem_word_byte_size == 0 ? max_memory_addr_out/mem_word_byte_size : max_memory_addr_out/mem_word_byte_size + 1;
494  double rd_bndwdth = ( (double)written_words*(double)mem_word_size / ( (double)tmpResult.clock_cycles_read * ( 6.4 ) ) ); // Gbit/T
495  double wr_bndwdth = ( (double)written_words*(double)mem_word_size / ( (double)tmpResult.clock_cycles_write * ( 6.4 ) ) );
496  #if DEBUG_LEVEL == TRACE_ALL
497  cout << "Written " << written_words << " words" << endl;
498  cout << "DEBUG overall test results: target address " << tmpResult.target_address << " ";
499  cout << "Fault counter: " << tmpResult.fault_cntr << " ";
500  cout << "First fault at address: " << tmpResult.first_fault_address << " " << endl;
501  cout << " RD BW " << rd_bndwdth << "[GBit/s] with cc equal to " << tmpResult.clock_cycles_read << " " << endl;
502  cout << " WR BW " << wr_bndwdth << "[GBit/s] with cc equal to " << tmpResult.clock_cycles_write << " " << endl;
503  #endif
504  } else if(k==4){ //clock cycless
505  //char mySecondTmpOutBuff[bytes_per_line/2];
506  //string additional_string;
507  //init the buffer
508  //for(int i=0;i<bytes_per_line;i++){myTmpOutBuff[i]=(char)0;mySecondTmpOutBuff[i%(bytes_per_line/2)]=(char)0;}
509  // additional_string=tmp_outbuff.substr(bytes_per_line/2,bytes_per_line/2);
510  //
511  // tmp_outbuff = tmp_outbuff.erase(bytes_per_line/2,bytes_per_line/2);
512  // strncpy(myTmpOutBuff,tmp_outbuff.c_str(),bytes_per_line/2);
513  // clock_cycles_read = *reinterpret_cast<unsigned int*>(myTmpOutBuff);
514  //
515  // strncpy(mySecondTmpOutBuff,additional_string.c_str(),bytes_per_line/2);
516  // clock_cycles_write = *reinterpret_cast<unsigned int*>(mySecondTmpOutBuff);
517  //strncpy(myTmpOutBuff,tmp_outbuff.c_str(),bytes_per_line);
518  //clock_cycles_write = *reinterpret_cast<unsigned long long int*>(myTmpOutBuff);
519  memcpy(&clock_cycles_write,tmp_outbuff.c_str(),bytes_per_line);
520 
521  }else if(k==3){ // first fault address
522  //substr extraction and parsing
523  //strncpy(myTmpOutBuff,tmp_outbuff.c_str(),bytes_per_line);
524  //fault_addr_out = *reinterpret_cast<unsigned long long int *>(myTmpOutBuff);
525  memcpy(&fault_addr_out,tmp_outbuff.c_str(),bytes_per_line/2);
526 
527  #if DEBUG_LEVEL == TRACE_ALL
528  cout << "DEBUG first fault address (or the third data pckt) " << fault_addr_out << endl;
529  #endif
530  }else if(k==2){ // fault cntr
531  //strncpy(myTmpOutBuff,tmp_outbuff.c_str(),bytes_per_line);
532  //fault_cntr_out = *reinterpret_cast<unsigned long long int *>(myTmpOutBuff);
533  memcpy(&fault_cntr_out,tmp_outbuff.c_str(),bytes_per_line/2);
534 
535  #if DEBUG_LEVEL == TRACE_ALL
536  cout << "DEBUG the fault counters (or the second data pack) " << fault_cntr_out << endl;
537  #endif
538  }else { //max addrss
539  //substr extraction and parsing
540  // strncpy(myTmpOutBuff,tmp_outbuff.c_str(),bytes_per_line);
541  // max_memory_addr_out = *reinterpret_cast<unsigned long long *>(myTmpOutBuff);
542  memcpy(&max_memory_addr_out,tmp_outbuff.c_str(),bytes_per_line);
543  #if DEBUG_LEVEL == TRACE_ALL
544  cout << "DEBUG max address (or the first data pack) " << max_memory_addr_out << endl;
545  #endif
546  }
547  k++;
548  tmp_outbuff.clear();
549  }
550  return testResults_vector;
551 }
552 
553 
554 std::ofstream loggingAVGFile;
555 const std::string loggingAVGFileName="cfp_vitis_memtest_avg.csv";
556 
558  if (FILE *file = fopen(loggingAVGFileName.c_str(), "r")){
559  fclose(file);
560  }else{
561  loggingAVGFile.open(loggingAVGFileName, std::ios_base::app);
562  loggingAVGFile << "TimeStamp,Iterations[#],Trgt_Address[Byte],Brst_size[#beats],WrittenWords[512b],AVG_RD_BW[Gbit/s],AVG_WR_BW[Gbit/s],AVG_faults[#],PowOfTwoBytes\n";
563  loggingAVGFile.close();
564  }
565 }
566 
568  unsigned int iters, unsigned long long int trgt_address,
569  unsigned int brst_size, unsigned int wr_words,
570  double rd_bw, double wr_bw, unsigned int faults )
571  {
572  loggingAVGFile.open(loggingAVGFileName, std::ios_base::app);
573  std::time_t instant_time = std::time(0); // get time now
574  std::tm* now = std::localtime(&instant_time);
575  loggingAVGFile << (now->tm_year + 1900)<< '-' << (now->tm_mon + 1) << '-' << now->tm_mday << "," << iters<< ",";
576  loggingAVGFile<<trgt_address<< ","<<brst_size<< ","<<wr_words<< ",";
577  loggingAVGFile<<rd_bw<< ","<<wr_bw<< ","<< faults <<",";
578  loggingAVGFile << (int) log2(trgt_address)<<"\n";
579  loggingAVGFile.close();
580 }
581 
582 std::ofstream loggingMultiItFile;
583 const std::string loggingMultiItFileName="cfp_vitis_memtest_multi.csv";
584 
585 
587  if (FILE *file = fopen(loggingMultiItFileName.c_str(), "r")){
588  fclose(file);
589  }else{
590  loggingMultiItFile.open(loggingMultiItFileName, std::ios_base::app);
591  loggingMultiItFile << "TimeStamp,Iteration[#],Trgt_Address[Byte],";
592  loggingMultiItFile << "Brst_size[#beats],WrittenWords[512b],RD_BW[Gbit/s],WR_BW[Gbit/s],";
593  loggingMultiItFile << "faults[#],first_faulty_address[byte],PowOfTwoBytes\n";
594  loggingMultiItFile.close();
595  }
596 }
597 
599  unsigned int iters, unsigned long long int trgt_address,
600  unsigned int brst_size, unsigned int wr_words,
601  double rd_bw, double wr_bw, unsigned int faults,
602  unsigned long long int first_faulty_address )
603  {
604  loggingMultiItFile.open(loggingMultiItFileName, std::ios_base::app);
605  std::time_t instant_time = std::time(0); // get time now
606  std::tm* now = std::localtime(&instant_time);
607  loggingMultiItFile << (now->tm_year + 1900)<< '-' << (now->tm_mon + 1) << '-' << now->tm_mday << "," << iters<< ",";
608  loggingMultiItFile<<trgt_address<< ","<<brst_size<< ","<<wr_words<< ",";
609  loggingMultiItFile<<rd_bw<< ","<<wr_bw<< ","<< faults;
610  loggingMultiItFile<<","<<first_faulty_address<<"," << (int) log2(trgt_address)<<"\n";
611  loggingMultiItFile.close();
612 }
void ascii2hex(const string &in, string &out)
Convert a ascii string to a hexadecimal string.
Definition: common.hpp:119
unsigned char hexval(unsigned char c)
convert a char to its hexadecimal representation.
Definition: common.hpp:234
unsigned long long int clock_cycles_read
Definition: common.hpp:418
const std::string loggingAVGFileName
Definition: common.hpp:555
std::vector< MemoryTestResult > parseMemoryTestOutput(const string longbuf, size_t charOutputSize, int rawdatalines)
Parse the memory test output contained in astring with a given size.
Definition: common.hpp:444
void createAVGLogFile()
Definition: common.hpp:557
void number2hexString(const T in, char *out, size_t byteSize)
Definition: common.hpp:266
string dumpFileToStringRawDataString(const string inpFileName, int *rawdatalines, size_t outputSize)
Initialize an input data stream from a file with only data.
Definition: common.hpp:279
void printBits(size_t const size, void const *const ptr)
print the binary representation of a target pointer buffer of a given size. Assumes little endian.
Definition: common.hpp:98
unsigned int first_fault_address
Definition: common.hpp:417
void printCharBuffHex(const char *inStr, size_t strSize)
print byte-per-byte a given char buff in hexadecimal format
Definition: common.hpp:382
std::ofstream loggingMultiItFile
Definition: common.hpp:582
MemoryTestResult(unsigned long long int target_address, unsigned int fault_cntr, unsigned int first_fault_address, unsigned long long int clock_cycles_write, unsigned long long int clock_cycles_read)
Definition: common.hpp:422
void ascii2hexWithSize(const string &in, string &out, size_t bytesize)
Convert a ascii string to a hexadecimal string.
Definition: common.hpp:331
string createMemTestCommands(unsigned long long int mem_address, unsigned int testingNumber, unsigned int burst_size)
Create the commands for a memory test with start/max address to test-nop to execute-stop.
Definition: common.hpp:137
void createItLogFile()
Definition: common.hpp:586
void string2hexnumerics(const string &in, char *out, size_t byteSize)
Definition: common.hpp:405
string createMemTestStopCommand()
Definition: common.hpp:168
void logTheAvgResult(unsigned int iters, unsigned long long int trgt_address, unsigned int brst_size, unsigned int wr_words, double rd_bw, double wr_bw, unsigned int faults)
Definition: common.hpp:567
void delay(unsigned int mseconds)
Definition: common.hpp:85
void logTheSingleResult(unsigned int iters, unsigned long long int trgt_address, unsigned int brst_size, unsigned int wr_words, double rd_bw, double wr_bw, unsigned int faults, unsigned long long int first_faulty_address)
Definition: common.hpp:598
unsigned long long int clock_cycles_write
Definition: common.hpp:419
unsigned int fault_cntr
Definition: common.hpp:416
void print_cFpMemtest(void)
Definition: common.hpp:69
void printCharBuffHexSafe(const char *inStr, size_t strSize)
Definition: common.hpp:394
bool findCharNullPos(char *str)
Definition: common.hpp:340
void printStringHex(const string inStr, size_t strSize)
print byte-per-byte a given string in hexadecimal format
Definition: common.hpp:363
std::ofstream loggingAVGFile
Definition: common.hpp:554
void hex2ascii(const string &in, string &out)
Convert a hexadecimal string to a ascii string.
Definition: common.hpp:251
const std::string loggingMultiItFileName
Definition: common.hpp:583
unsigned long long int target_address
Definition: common.hpp:415
out
Definition: test.py:12
def clock()
Definition: common.py:174
ap_uint< 32 > size
The configuration of a WarpTransform Example application (UDP or TCP)